sqllogictest
Artifact Content
Not logged in

Artifact cda58e653f569255322adf2b1638cc50c3459e8d:


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)

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + - col1 * 88 + col0 col2 FROM tab2
----
-1992
-4438
27

query I rowsort
SELECT DISTINCT - col1 * 20 + + col0 * col2 FROM tab0
----
-1905
-928
5478

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 47 + + col0 col0 FROM tab2
----
1276
1300
1865

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3
SELECT - CAST( + col2 AS SIGNED ) * col0 + col1 FROM tab1
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-3
SELECT - CAST ( + col2 AS INTEGER ) * col0 + col1 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + col1 * col2 + - tab0.col2 AS col0 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT ( - tab0.col0 ) + + tab0.col1 FROM tab0
----
2
62

query I rowsort
SELECT ALL - col1 + ( + col2 ) * + 33 FROM tab2 AS cor0
----
1237
799
860

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 9 * col2 * + tab0.col1 + tab0.col0 col0 FROM tab0
----
-25518
-67069
-838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 82 * - col0 ) + - col1 col2 FROM tab0
----
1882
2773
7207

query I rowsort
SELECT DISTINCT col1 - + cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT - - col2 * col0 * ( + col2 ) + col0 FROM tab2 AS cor0
----
114155
5110
52806

query I rowsort
SELECT DISTINCT 80 * col0 * col1 + - col1 * - col2 AS col2 FROM tab2 AS cor0
----
108086
18197
369694

query I rowsort
SELECT - - 66 + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
166
235
742

query I rowsort
SELECT 71 * col1 + + col2 FROM tab2
----
1245
2228
4215

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 58 * col0 + - col0 FROM tab1 cor0
----
-177
-3776
-4720

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-16
SELECT + ( col0 ) + - CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 89 * - col1 + col2 FROM tab2 AS cor0
----
-1475
-2732
-5225

query I rowsort
SELECT ALL - + col2 * - col1 - + col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + ( + col0 + col0 ) FROM tab2
----
14
156
158

query I rowsort
SELECT - 43 + - col1 AS col1 FROM tab0
----
-129
-134
-140

query I rowsort
SELECT + 95 - + col0 FROM tab2 AS cor0
----
16
17
88

query I rowsort
SELECT DISTINCT ( col1 ) + + tab0.col2 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - col0 * - tab1.col2 + - col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT ALL tab0.col2 * + 27 FROM tab0
----
2214
27
891

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

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

query I rowsort
SELECT DISTINCT 86 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + + col0 * - 4 col2 FROM tab0 cor0
----
-182
-237
-447

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

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

query I rowsort
SELECT + 83 - + col0 AS col0 FROM tab1 AS cor0
----
19
3
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-30
SELECT - col1 + col2 DIV 21 FROM tab0 cor0
----
-85
-88
-97

skipif mysql # not compatible
query I rowsort label-30
SELECT - col1 + col2 / 21 FROM tab0 cor0
----
-85
-88
-97

query I rowsort
SELECT 4 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

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

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

query I rowsort
SELECT DISTINCT - col1 * 58 AS col1 FROM tab1 AS cor0
----
-1508
-580
-754

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

query I rowsort
SELECT ALL + 77 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT + col1 * 43 + col1 + col1 AS col0 FROM tab0 AS cor0
----
3870
4095
4365

onlyif mysql # use DIV operator for integer division
query I rowsort label-37
SELECT - + col1 DIV + 73 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-37
SELECT - + col1 / + 73 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 49 AS col0 FROM tab2 cor0
----
-49
-49
-49

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

query I rowsort
SELECT + cor3.col2 AS col0 FROM tab1 cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2, tab2 AS cor3
----
243 values hashing to 3dcd863493ac16ce594c62d4ac8b0412

query I rowsort
SELECT cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT cor1.col2 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1, tab2 cor2
----
243 values hashing to 39c7e653e7a493eb9c9e3dad9ba3b8c2

query I rowsort
SELECT + + 73 + - col2 AS col2 FROM tab0 AS cor0
----
-9
40
72

query I rowsort
SELECT ALL - col2 * - col1 + - col1 * + 44 AS col2 FROM tab1 AS cor0
----
130
260
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-45
SELECT ALL - col0 DIV 65 + + col2 col1 FROM tab1 AS cor0
----
54
57
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-45
SELECT ALL - col0 / 65 + + col2 col1 FROM tab1 AS cor0
----
54
57
95

query I rowsort
SELECT + - 56 AS col0 FROM tab2 AS cor0
----
-56
-56
-56

query I rowsort
SELECT ALL - cor0.col1 + - col1 AS col1 FROM tab0 cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 * col0 col2 FROM tab2 cor0
----
-224
-2496
-2528

query I rowsort
SELECT col2 * + col2 + + col0 + + cor0.col1 FROM tab0 AS cor0
----
1199
133
6904

query I rowsort
SELECT tab1.col1 * 17 AS col2 FROM tab1
----
170
221
442

onlyif mysql # use DIV operator for integer division
query I rowsort label-51
SELECT col2 - col0 DIV col1 col1 FROM tab2
----
25
27
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-51
SELECT col2 - col0 / col1 col1 FROM tab2
----
25
27
34

query I rowsort
SELECT + col0 * + 72 + - col2 AS col1 FROM tab2 AS cor0
----
477
5590
5650

onlyif mysql # use DIV operator for integer division
query I rowsort label-53
SELECT DISTINCT + tab2.col0 + - ( + col1 ) DIV - col0 FROM tab2
----
11
78
79

skipif mysql # not compatible
query I rowsort label-53
SELECT DISTINCT + tab2.col0 + - ( + col1 ) / - col0 FROM tab2
----
11
78
79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-54
SELECT DISTINCT + - col1 / col2 col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - + col2 + col0 * col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT + tab0.col0 + - col2 AS col1 FROM tab0 WHERE NOT ( NULL ) < col1 / + col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab0 AS cor0 WHERE NULL BETWEEN + col0 AND NULL
----

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

query I rowsort
SELECT DISTINCT tab1.col1 * col2 + - tab1.col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT DISTINCT + col0 - - cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col1 * col1 * + col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL col0 + col0 * col1 * + col2 AS col0 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT col0 + + cor0.col1 * - col0 * cor0.col0 FROM tab2 AS cor0 WHERE NOT col0 <= + cor0.col1 + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-64
SELECT ALL - col0 * col2 DIV col1 + + col1 + - col2 FROM tab0 AS cor0
----
-71
44
96

skipif mysql # not compatible
query I rowsort label-64
SELECT ALL - col0 * col2 / col1 + + col1 + - col2 FROM tab0 AS cor0
----
-71
44
96

query I rowsort
SELECT ALL col2 + + cor0.col2 AS col1 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT cor0.col1 - - col1 * - col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT col2 * - col2 + col0 + - tab2.col2 FROM tab2
----
-1403
-624
-749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 * col1 col0 FROM tab0
----
611884
93654
97

query I rowsort
SELECT + col2 + - col1 - - col2 FROM tab0
----
-20
-95
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-70
SELECT tab2.col1 * col2 + - col2 DIV - tab2.col1 FROM tab2
----
1534
648
837

skipif mysql # not compatible
query I rowsort label-70
SELECT tab2.col1 * col2 + - col2 / - tab2.col1 FROM tab2
----
1534
648
837

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col2 * col1 col2 FROM tab2 AS cor0
----
1612
725
844

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

query I rowsort
SELECT - + col1 + + col0 + col2 AS col1 FROM tab0 AS cor0
----
-29
-61
80

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

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

query I rowsort
SELECT col0 + + tab2.col2 + col2 FROM tab2
----
130
155
61

query I rowsort
SELECT tab0.col2 * col2 + col2 FROM tab0
----
1122
2
6806

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

query I rowsort
SELECT DISTINCT - - cor0.col1 * + col0 + col2 + col0 FROM tab2 AS cor0
----
1460
251
4706

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 + + col2 <> ( col2 - col2 ) AND ( NULL ) BETWEEN col0 AND NULL
----

query I rowsort
SELECT ALL + cor0.col2 + + 2 FROM tab0, tab0 AS cor0
----
9 values hashing to 3580ef541904494f3cc7699aa92c8dd0

query I rowsort
SELECT DISTINCT 76 + col0 + - col2 AS col2 FROM tab1 AS cor0
----
25
60
83

query I rowsort
SELECT 7 * col2 FROM tab1 cor0
----
378
399
672

query I rowsort
SELECT - + ( col0 ) + ( 2 ) + - col2 FROM tab0 AS cor0
----
-169
-34
-55

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

query I rowsort
SELECT - 86 * - col2 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT - + col0 * - col2 * col0 FROM tab2 cor0
----
1323
158184
237158

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

skipif mysql # not compatible
query I rowsort label-90
SELECT ALL + CAST ( NULL AS REAL ) AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 83 + tab2.col2 FROM tab2
----
109
110
121

query I rowsort
SELECT + col0 * col0 + col2 + + col1 AS col1 FROM tab0 AS cor0
----
1323
695
8094

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

query I rowsort
SELECT - + col1 + col1 + + 85 AS col2 FROM tab0 AS cor0
----
85
85
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-95
SELECT ALL + col1 DIV - tab2.col0 AS col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-95
SELECT ALL + col1 / - tab2.col0 AS col0 FROM tab2
----
-4
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab0 cor0, tab1 cor1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

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

query I rowsort
SELECT DISTINCT col2 * - col2 AS col2 FROM tab2 WHERE NULL BETWEEN col2 AND + col2
----

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

query I rowsort
SELECT ALL - col2 * + col0 + + tab2.col2 AS col1 FROM tab2
----
-162
-2002
-2964

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-102
SELECT ALL col1 DIV + col0 + col0 FROM tab2
----
11
78
79

skipif mysql # not compatible
query I rowsort label-102
SELECT ALL col1 / + col0 + col0 FROM tab2
----
11
78
79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col0 * col0 + col1 col0 FROM tab1 WHERE NULL <= - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-105
SELECT ALL col1 DIV - col1 + col1 AS col0 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-105
SELECT ALL col1 / - col1 + col1 AS col0 FROM tab2
----
16
30
58

query III rowsort
SELECT * FROM tab2 WHERE - col1 NOT BETWEEN col2 AND NULL
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

query III rowsort
SELECT * FROM tab1 WHERE NOT - col1 BETWEEN NULL AND NULL
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-111
SELECT tab1.col1 DIV - col2 - + col2 * col2 * + tab1.col2 FROM tab1
----
-157464
-185193
-884736

skipif mysql # not compatible
query I rowsort label-111
SELECT tab1.col1 / - col2 - + col2 * col2 * + tab1.col2 FROM tab1
----
-157464
-185193
-884736

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-113
SELECT + tab0.col2 + col1 DIV - col0 + col2 FROM tab0
----
0
163
63

skipif mysql # not compatible
query I rowsort label-113
SELECT + tab0.col2 + col1 / - col0 + col2 FROM tab0
----
0
163
63

query I rowsort
SELECT ALL tab0.col2 + col2 + + col0 AS col2 FROM tab0 WHERE col0 + + col2 * col2 / - col1 NOT BETWEEN - col2 + + col1 AND + col0
----
37
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col0 col2 FROM tab2 WHERE NULL = ( NULL )
----

query I rowsort
SELECT - col0 * col2 * col1 + - tab1.col1 FROM tab1
----
-36490
-4238
-99853

query I rowsort
SELECT ALL - col0 * col2 + - tab0.col0 * tab0.col0 AS col1 FROM tab0
----
-1260
-1368
-15219

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col1 col2 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-120
SELECT + + col2 * CAST( - col1 AS SIGNED ) + + col1 * col0 FROM tab2 AS cor0
----
-620
3068
697

skipif mysql # not compatible
query I rowsort label-120
SELECT + + col2 * CAST ( - col1 AS INTEGER ) + + col1 * col0 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT ( + 47 ) FROM tab1, tab2 cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT ( + col1 ) + - 7 FROM tab2
----
10
24
52

query I rowsort
SELECT DISTINCT + tab1.col0 * + col1 * - 54 FROM tab1
----
-34560
-4212
-56160

query I rowsort
SELECT DISTINCT 66 * col0 AS col2 FROM tab2 cor0
----
462
5148
5214

query I rowsort
SELECT DISTINCT 76 * col0 AS col2 FROM tab1 AS cor0
----
228
4864
6080

query I rowsort
SELECT + + col0 * ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-127
SELECT DISTINCT col2 * + CAST( col2 AS SIGNED ) FROM tab2
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-127
SELECT DISTINCT col2 * + CAST ( col2 AS INTEGER ) FROM tab2
----
1444
676
729

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

query I rowsort
SELECT + 48 + cor0.col2 FROM tab2 AS cor0
----
74
75
86

query I rowsort
SELECT 15 * - col2 AS col1 FROM tab0
----
-1230
-15
-495

query I rowsort
SELECT ALL ( - col1 * - col0 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT + 14 + cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 05f0fcbd66fc6981f5f475e47dcdda25

query I rowsort
SELECT col0 * + col0 + cor0.col1 AS col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT + col0 * - col2 - col2 FROM tab2
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-135
SELECT ALL + 12 + col0 DIV - col1 + ( - col2 * + 85 ) FROM tab2
----
-2199
-2283
-3222

skipif mysql # not compatible
query I rowsort label-135
SELECT ALL + 12 + col0 / - col1 + ( - col2 * + 85 ) FROM tab2
----
-2199
-2283
-3222

onlyif mysql # use DIV operator for integer division
query I rowsort label-136
SELECT + col0 * col1 + col0 DIV 97 AS col1 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-136
SELECT + col0 * col1 + col0 / 97 AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 98 * + col0 FROM tab0
----
2352
3430
8722

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

query I rowsort
SELECT DISTINCT 35 + + col1 FROM tab0
----
121
126
132

query I rowsort
SELECT - - col2 * + ( 60 ) + cor0.col0 AS col0 FROM tab2 cor0
----
1627
1638
2359

query I rowsort
SELECT - cor0.col0 * - col1 + - cor0.col0 * col1 * + col1 AS col1 FROM tab2 AS cor0
----
-21488
-266916
-6510

query I rowsort
SELECT ALL - col2 * - 49 FROM tab0 AS cor0
----
1617
4018
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-143
SELECT col0 + CAST( NULL AS DECIMAL ) * + col2 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-143
SELECT col0 + CAST ( NULL AS REAL ) * + col2 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * ( + 85 ) + col0 FROM tab2 AS cor0
----
1524
2642
5093

query I rowsort
SELECT ALL - cor0.col0 * + ( 64 ) FROM tab0 cor0
----
-1536
-2240
-5696

onlyif mysql # use DIV operator for integer division
query I rowsort label-146
SELECT DISTINCT + col0 DIV + col1 + col1 DIV + col1 + ( col1 ) AS col1 FROM tab1 AS cor0
----
17
20
27

skipif mysql # not compatible
query I rowsort label-146
SELECT DISTINCT + col0 / + col1 + col1 / + col1 + ( col1 ) AS col1 FROM tab1 AS cor0
----
17
20
27

skipif mysql # not compatible
query I rowsort
SELECT ALL + col0 + + CAST ( col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - col1 + 86 * ( - col1 ) AS col1 FROM tab2 AS cor0
----
-1479
-2697
-5133

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

query I rowsort
SELECT ALL - + cor0.col0 * + 85 FROM tab2 AS cor0
----
-595
-6630
-6715

onlyif mysql # use DIV operator for integer division
query I rowsort label-151
SELECT col1 * col1 + col2 DIV col0 AS col2 FROM tab1 cor0
----
100
170
694

skipif mysql # not compatible
query I rowsort label-151
SELECT col1 * col1 + col2 / col0 AS col2 FROM tab1 cor0
----
100
170
694

query I rowsort
SELECT ALL - col1 * cor0.col0 + ( col0 * cor0.col0 ) + + ( col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
-1129
-1999
4609

query I rowsort
SELECT ALL col0 * - ( - 66 ) FROM tab0 cor0
----
1584
2310
5874

query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 * - col1 * - col2 AS col2 FROM tab1 AS cor0
----
-36490
-4238
-99853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 - + col1 col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - + col0 * + 19 + cor0.col1 FROM tab1 AS cor0
----
-1206
-1507
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col1 * cor0.col2 + + 29 - col2 * + col0 col0 FROM tab1 AS cor0
----
112157
28871
75683

query I rowsort
SELECT + ( - col0 ) * - col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + + 42 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT ALL - 31 + 57 FROM tab1 AS cor0
----
26
26
26

query I rowsort
SELECT DISTINCT - - cor0.col0 + col2 * col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

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

query I rowsort
SELECT 67 - 40 AS col0 FROM tab1 AS cor0
----
27
27
27

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

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

query I rowsort
SELECT ALL - 87 * 90 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 76c0c31ed2ce0fecc34b7f6af61af34c

query I rowsort
SELECT 32 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 12 * col2 col0 FROM tab2 AS cor0
----
312
324
456

query I rowsort
SELECT + 34 * cor0.col1 FROM tab1 AS cor0
----
340
442
884

query I rowsort
SELECT 88 * col1 FROM tab2 AS cor0
----
1496
2728
5192

query I rowsort
SELECT DISTINCT ( 56 ) FROM tab0
----
56

query I rowsort
SELECT + col1 * 59 FROM tab1
----
1534
590
767

query I rowsort
SELECT ALL - - ( - col1 ) * col0 + - cor0.col0 * + col1 FROM tab0 cor0
----
-16198
-4128
-6790

query I rowsort
SELECT DISTINCT + - cor0.col1 + col1 * col1 AS col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT ALL + col1 * + col0 * col2 FROM tab2 cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-175
SELECT + 44 DIV col0 + col1 FROM tab0 AS cor0
----
87
91
98

skipif mysql # not compatible
query I rowsort label-175
SELECT + 44 / col0 + col1 FROM tab0 AS cor0
----
87
91
98

query I rowsort
SELECT + ( + cor0.col2 ) + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 + + cor0.col2 col2 FROM tab1 AS cor0
----
102
60
63

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

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-180
SELECT col2 DIV col1 + - col2 FROM tab2 AS cor0
----
-26
-27
-36

skipif mysql # not compatible
query I rowsort label-180
SELECT col2 / col1 + - col2 FROM tab2 AS cor0
----
-26
-27
-36

query I rowsort
SELECT ALL + - 24 * - col2 + - col1 FROM tab0 AS cor0
----
-73
1877
706

onlyif mysql # use DIV operator for integer division
query I rowsort label-182
SELECT DISTINCT ( cor0.col0 ) DIV col2 + ( - cor0.col2 ) + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
8

skipif mysql # not compatible
query I rowsort label-182
SELECT DISTINCT ( cor0.col0 ) / col2 + ( - cor0.col2 ) + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
8

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab1, tab2 AS cor0
----
12

query I rowsort
SELECT DISTINCT + col0 * 75 + + col0 + tab2.col2 FROM tab2
----
559
5954
6042

query I rowsort
SELECT col0 + + ( col1 ) * - col0 AS col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT - - 75 * - cor0.col0 FROM tab0 AS cor0
----
-1800
-2625
-6675

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

skipif mysql # not compatible
query I rowsort label-187
SELECT + col1 + CAST ( NULL AS INTEGER ) * + 37 AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-188
SELECT ALL col0 * - 29 + col2 + - col0 DIV ( - col0 ) FROM tab0
----
-1013
-2498
-662

skipif mysql # not compatible
query I rowsort label-188
SELECT ALL col0 * - 29 + col2 + - col0 / ( - col0 ) FROM tab0
----
-1013
-2498
-662

query I rowsort
SELECT ALL + 41 AS col2 FROM tab0
----
41
41
41

query I rowsort
SELECT - col2 * ( tab0.col2 + - 10 * - 18 ) AS col2 FROM tab0
----
-181
-21484
-7029

query I rowsort
SELECT DISTINCT - col2 + + 68 * + col0 FROM tab1 AS cor0
----
150
4295
5344

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

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

query I rowsort
SELECT ALL + 4 * + col1 FROM tab0 AS cor0
----
344
364
388

onlyif mysql # use DIV operator for integer division
query I rowsort label-194
SELECT col1 DIV col0 - - 49 AS col1 FROM tab1
----
49
49
57

skipif mysql # not compatible
query I rowsort label-194
SELECT col1 / col0 - - 49 AS col1 FROM tab1
----
49
49
57

query I rowsort
SELECT ALL 16 * + 32 AS col0 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to a48cedba5c9c5867c7054245e08c6cd5

query I rowsort
SELECT ( 89 ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

onlyif mysql # use DIV operator for integer division
query I rowsort label-197
SELECT col2 + col1 DIV 96 AS col0 FROM tab0
----
2
33
82

skipif mysql # not compatible
query I rowsort label-197
SELECT col2 + col1 / 96 AS col0 FROM tab0
----
2
33
82

query I rowsort
SELECT + - 82 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

onlyif mysql # use DIV operator for integer division
query I rowsort label-199
SELECT DISTINCT + col1 DIV - tab0.col0 + tab0.col1 AS col2 FROM tab0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-199
SELECT DISTINCT + col1 / - tab0.col0 + tab0.col1 AS col2 FROM tab0
----
83
90
95

query I rowsort
SELECT - col2 + 53 AS col2 FROM tab0
----
-29
20
52

query I rowsort
SELECT ALL - col0 - ( col1 ) FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-202
SELECT DISTINCT - col1 + CAST( col0 AS SIGNED ) * - col2 AS col1 FROM tab2
----
-2087
-220
-3019

skipif mysql # not compatible
query I rowsort label-202
SELECT DISTINCT - col1 + CAST ( col0 AS INTEGER ) * - col2 AS col1 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT - col2 + - col0 + - col2 AS col0 FROM tab0
----
-253
-37
-90

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

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

query I rowsort
SELECT DISTINCT - - col1 + ( 13 ) * col1 AS col2 FROM tab0 cor0
----
1204
1274
1358

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col1 - - col0 col2 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 31 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

onlyif mysql # use DIV operator for integer division
query I rowsort label-208
SELECT ALL col1 * tab2.col0 DIV + ( + col0 ) + + 35 * - 7 AS col0 FROM tab2
----
-186
-214
-228

skipif mysql # not compatible
query I rowsort label-208
SELECT ALL col1 * tab2.col0 / + ( + col0 ) + + 35 * - 7 AS col0 FROM tab2
----
-186
-214
-228

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

query I rowsort
SELECT DISTINCT - cor0.col0 * + 72 * col1 FROM tab2 AS cor0
----
-15624
-331344
-96696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + col0 + col0 col0 FROM tab2 AS cor0
----
-13
120
130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * + cor0.col1 col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - 61 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT DISTINCT + col1 * - col0 + cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ( - col1 ) * col2 - - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - col1 - + col2 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-217
SELECT - col2 * col2 DIV - col1 AS col0 FROM tab1
----
112
324
708

skipif mysql # not compatible
query I rowsort label-217
SELECT - col2 * col2 / - col1 AS col0 FROM tab1
----
112
324
708

query I rowsort
SELECT col1 * + 27 FROM tab2 AS cor0
----
1593
459
837

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-220
SELECT DISTINCT - - cor0.col2 DIV col1 AS col0 FROM tab2 cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-220
SELECT DISTINCT - - cor0.col2 / col1 AS col0 FROM tab2 cor0
----
0
2

query I rowsort
SELECT DISTINCT - + 46 + col0 * col1 FROM tab0 AS cor0
----
2018
3349
8053

onlyif mysql # use DIV operator for integer division
query I rowsort label-222
SELECT - cor0.col1 DIV + col0 AS col0 FROM tab1 cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-222
SELECT - cor0.col1 / + col0 AS col0 FROM tab1 cor0
----
-8
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + cor0.col2 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - + cor0.col1 * + cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-225
SELECT + col0 + - col2 DIV ( + col0 ) FROM tab1
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-225
SELECT + col0 + - col2 / ( + col0 ) FROM tab1
----
-15
64
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 74 col1 FROM tab2
----
-74

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

query I rowsort
SELECT - 8 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT col2 + 79 * - ( - col1 ) AS col0 FROM tab0 AS cor0
----
6827
7271
7664

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

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

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

skipif mysql # not compatible
query I rowsort label-231
SELECT cor0.col0 / + cor0.col2 AS col0 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT ALL + 95 AS col1 FROM tab1
----
95
95
95

query I rowsort
SELECT + - col0 * col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT - + 13 * col1 FROM tab0 AS cor0
----
-1118
-1183
-1261

query I rowsort
SELECT cor0.col1 FROM tab0, tab1 AS cor0, tab0 cor1, tab2 cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT DISTINCT + 76 FROM tab2, tab1 cor0
----
76

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

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

skipif mysql # not compatible
query I rowsort label-238
SELECT CAST ( col2 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT 52 + cor0.col0 AS col1 FROM tab2 AS cor0
----
130
131
59

query I rowsort
SELECT ALL - ( col2 ) * - ( + col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT col0 + + col1 * 41 AS col0 FROM tab0 AS cor0
----
3550
3820
4012

query I rowsort
SELECT ALL ( + 11 * + tab2.col0 ) FROM tab2
----
77
858
869

query I rowsort
SELECT ALL 94 * col2 * + col2 FROM tab0
----
102366
632056
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-244
SELECT - col0 DIV 33 + col2 FROM tab2 AS cor0
----
24
27
36

skipif mysql # not compatible
query I rowsort label-244
SELECT - col0 / 33 + col2 FROM tab2 AS cor0
----
24
27
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-245
SELECT - - cor0.col2 DIV 19 + col0 * - cor0.col2 FROM tab1 AS cor0
----
-160
-3645
-7675

skipif mysql # not compatible
query I rowsort label-245
SELECT - - cor0.col2 / 19 + col0 * - cor0.col2 FROM tab1 AS cor0
----
-160
-3645
-7675

query I rowsort
SELECT - + col1 * col0 + 13 * + col0 AS col2 FROM tab0 AS cor0
----
-1752
-2940
-6942

query I rowsort
SELECT col2 * + 67 + col0 FROM tab0 AS cor0
----
102
2235
5583

query I rowsort
SELECT DISTINCT - col1 + col2 * - col0 + + 76 AS col1 FROM tab1
----
-112
-3582
-7617

query I rowsort
SELECT - col0 * + col2 * + 23 FROM tab0
----
-167854
-18216
-805

query I rowsort
SELECT ALL - 10 + 9 FROM tab0, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

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

skipif mysql # not compatible
query I rowsort label-251
SELECT - col0 - CAST ( ( + col1 ) * + col2 + + col2 AS INTEGER ) FROM tab0 AS cor0
----
-133
-2895
-7633

query I rowsort
SELECT col1 + col0 * col2 + cor0.col2 AS col0 FROM tab1 cor0
----
242
3715
7789

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - 31 * col0 col0 FROM tab2 AS cor0
----
-190
-2392
-2411

query I rowsort
SELECT DISTINCT - col2 * col1 + col1 * + col1 AS col0 FROM tab0 cor0
----
4558
819
9312

query I rowsort
SELECT DISTINCT - col1 * - 95 + col0 - cor0.col2 FROM tab1 AS cor0
----
1219
2419
957

query I rowsort
SELECT 24 + col1 AS col2 FROM tab2 AS cor0
----
41
55
83

query I rowsort
SELECT ALL - ( - col0 ) + - col2 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT - col0 + - cor0.col2 * col2 + + 74 AS col2 FROM tab2 AS cor0
----
-1449
-662
-680

query I rowsort
SELECT DISTINCT col1 + - 58 AS col1 FROM tab2 AS cor0
----
-27
-41
1

query I rowsort
SELECT ALL + col0 + - 44 FROM tab2 AS cor0
----
-37
34
35

query I rowsort
SELECT ALL + cor0.col2 * - col2 + cor0.col2 AS col2 FROM tab0 cor0
----
-1056
-6642
0

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-262
SELECT - + CAST ( col0 AS INTEGER ) + + col2 col1 FROM tab2 cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 col2 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT ALL col2 + - ( col0 ) * ( - col0 ) FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT + col1 * - 95 + col2 FROM tab2 AS cor0
----
-1577
-2918
-5579

query I rowsort
SELECT + + col1 + col0 * 58 FROM tab0 AS cor0
----
1478
2127
5253

skipif mysql # not compatible
query I rowsort
SELECT col1 + col2 * CAST ( - col0 AS REAL ) AS col0 FROM tab0
----
-706
-7207
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-268
SELECT + col0 * - tab0.col0 DIV ( col0 ) - + col1 * + CAST( col1 * col0 AS SIGNED ) AS col1 FROM tab0
----
-177528
-329350
-737098

skipif mysql # not compatible
query I rowsort label-268
SELECT + col0 * - tab0.col0 / ( col0 ) - + col1 * + CAST ( col1 * col0 AS INTEGER ) AS col1 FROM tab0
----
-177528
-329350
-737098

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

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

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

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

query I rowsort
SELECT ALL col1 * + 61 - - col0 AS col0 FROM tab2
----
1116
1898
3677

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

query I rowsort
SELECT ALL col0 * + col2 - + col2 AS col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT + col0 + + col0 * - 64 AS col2 FROM tab0 AS cor0
----
-1512
-2205
-5607

query I rowsort
SELECT DISTINCT - 46 + col2 AS col2 FROM tab0 AS cor0
----
-13
-45
36

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

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

query I rowsort
SELECT col2 + col1 * 22 FROM tab0 AS cor0
----
1925
2084
2135

query I rowsort
SELECT ALL + ( col0 ) * col0 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-280
SELECT DISTINCT + + col1 DIV + col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-280
SELECT DISTINCT + + col1 / + col0 FROM tab0 cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * - col0 - - col2 col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT 94 * col1 AS col0 FROM tab0 AS cor0
----
8084
8554
9118

query I rowsort
SELECT DISTINCT 88 * col0 FROM tab1
----
264
5632
7040

query I rowsort
SELECT - + col0 + cor0.col0 * 78 AS col2 FROM tab0 AS cor0
----
1848
2695
6853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 - - cor0.col0 col2 FROM tab2, tab2 cor0
----
9 values hashing to 5be202143ce02071b100652028ee1958

query I rowsort
SELECT DISTINCT col2 + - col2 * ( + cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT 3 * + col2 - - col2 FROM tab2 AS cor0
----
104
108
152

query I rowsort
SELECT - 48 * - cor0.col0 FROM tab0 AS cor0
----
1152
1680
4272

query I rowsort
SELECT + col0 * + 68 * col1 AS col2 FROM tab1 cor0
----
43520
5304
70720

query I rowsort
SELECT DISTINCT + - col0 * - col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

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

query I rowsort
SELECT - col0 + cor0.col2 + 37 * col0 * col0 FROM tab0 AS cor0
----
21321
293070
45291

query I rowsort
SELECT ALL + col2 + - col0 + + ( 42 * - col0 ) AS col1 FROM tab0
----
-1504
-3745
-999

query I rowsort
SELECT DISTINCT col2 * cor0.col0 - col2 AS col0 FROM tab2 AS cor0
----
162
2002
2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * + 80 + + cor0.col2 * + col2 col1 FROM tab0 AS cor0
----
13284
3729
81

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

query I rowsort
SELECT ALL ( - 83 * col2 ) FROM tab0
----
-2739
-6806
-83

query I rowsort
SELECT - ( col2 ) + col0 * ( col1 ) * col0 AS col2 FROM tab0 AS cor0
----
118824
49503
720729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( col1 ) + col0 * 67 col2 FROM tab2 AS cor0
----
438
5167
5276

query I rowsort
SELECT ALL - 49 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 + - col2 * col0 col0 FROM tab1 AS cor0
----
-190
-3695
-7763

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * - cor0.col2 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 9f4d33c2594156f40c1a77ce18b06bc3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-304
SELECT ALL ( cor0.col1 ) * CAST( 77 AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to fb59b8f2aa6c78ddef0d0ff7ba44453d

skipif mysql # not compatible
query I rowsort label-304
SELECT ALL ( cor0.col1 ) * CAST ( 77 AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to fb59b8f2aa6c78ddef0d0ff7ba44453d

query I rowsort
SELECT - col2 + 40 FROM tab2
----
13
14
2

query I rowsort
SELECT DISTINCT tab1.col1 - cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
-28
-31
-41
-44
-47
-70
-83
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-307
SELECT - CAST( 38 * col2 AS SIGNED ) AS col1 FROM tab2
----
-1026
-1444
-988

skipif mysql # not compatible
query I rowsort label-307
SELECT - CAST ( 38 * col2 AS INTEGER ) AS col1 FROM tab2
----
-1026
-1444
-988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-308
SELECT CAST( ( col0 ) AS SIGNED ) + - cor0.col2 FROM tab1 AS cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-308
SELECT CAST ( ( col0 ) AS INTEGER ) + - cor0.col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL 53 + 6 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT ALL - col0 * + col1 + 40 AS col2 FROM tab1 AS cor0
----
-1000
-38
-600

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 / - col1 + + CAST ( col1 + + col2 AS REAL ) * col0 FROM tab0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT 44 + col1 FROM tab1
----
54
57
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col2 col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 52 + + cor1.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
111
69
83

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-316
SELECT - col0 + tab1.col2 DIV + tab1.col0 col0 FROM tab1
----
-64
-79
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-316
SELECT - col0 + tab1.col2 / + tab1.col0 col0 FROM tab1
----
-64
-79
15

query I rowsort
SELECT ALL 64 * - 18 FROM tab2, tab0 AS cor0
----
9 values hashing to 15b8d8db368604ae48543fabf3fda4c7

query I rowsort
SELECT DISTINCT + 9 AS col0 FROM tab1, tab2 cor0
----
9

query I rowsort
SELECT ALL col1 * - 14 FROM tab0 AS cor0
----
-1204
-1274
-1358

query I rowsort
SELECT cor0.col0 * - 48 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to dd629622b93bd94cc2fe909691e695e1

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

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

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

query I rowsort
SELECT + ( 32 ) * + col2 FROM tab1 AS cor0
----
1728
1824
3072

query I rowsort
SELECT DISTINCT - + ( 16 ) * - col1 FROM tab0 AS cor0
----
1376
1456
1552

onlyif mysql # use DIV operator for integer division
query I rowsort label-325
SELECT - col1 + 33 DIV col0 + + col2 * col2 col2 FROM tab2 AS cor0
----
1427
617
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-325
SELECT - col1 + 33 / col0 + + col2 * col2 col2 FROM tab2 AS cor0
----
1427
617
702

query I rowsort
SELECT DISTINCT + cor0.col1 * 4 * col0 + - ( + 47 ) * - col1 AS col2 FROM tab1 AS cor0
----
1534
3030
4771

query I rowsort
SELECT DISTINCT - 6 * + cor0.col1 + col2 - ( col1 ) AS col2 FROM tab1 AS cor0
----
-128
-13
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-328
SELECT DISTINCT - + 42 * + ( col2 ) + - col2 DIV + cor0.col1 FROM tab2 AS cor0
----
-1092
-1134
-1598

skipif mysql # not compatible
query I rowsort label-328
SELECT DISTINCT - + 42 * + ( col2 ) + - col2 / + cor0.col1 FROM tab2 AS cor0
----
-1092
-1134
-1598

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

query I rowsort
SELECT ALL + col0 + col1 * - col0 FROM tab1 AS cor0
----
-576
-75
-960

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 42 AS REAL ) FROM tab2 AS cor0
----
42
42
42

query I rowsort
SELECT ALL - ( + 45 ) FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT tab0.col0 * col1 + - 4 * - col0 FROM tab0
----
2160
3535
8455

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 + col2 col2 FROM tab0
----
164
2
66

query I rowsort
SELECT - 18 + - 44 * + col1 FROM tab2 AS cor0
----
-1382
-2614
-766

query I rowsort
SELECT col1 * 12 AS col2 FROM tab1 AS cor0
----
120
156
312

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

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

query I rowsort
SELECT DISTINCT + 72 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
72

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 30 * col2 FROM tab0
----
2460
30
990

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - ( - col2 ) + - col2 * CAST ( col0 AS REAL ) * col0 AS col1 FROM tab2
----
-1296
-158158
-237120

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

query I rowsort
SELECT - ( + 22 ) * + col0 FROM tab0 AS cor0
----
-1958
-528
-770

query I rowsort
SELECT DISTINCT + 78 * + col2 FROM tab1
----
4212
4446
7488

query I rowsort
SELECT cor0.col1 - - ( col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col0 * 0 + col2 * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + col0 + cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-348
SELECT - tab2.col0 + - col0 * + CAST( col0 AS SIGNED ) FROM tab2
----
-56
-6162
-6320

skipif mysql # not compatible
query I rowsort label-348
SELECT - tab2.col0 + - col0 * + CAST ( col0 AS INTEGER ) FROM tab2
----
-56
-6162
-6320

query I rowsort
SELECT ALL + col1 * col2 * - col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - col2 + + ( 39 ) FROM tab2 cor0
----
1
12
13

query I rowsort
SELECT DISTINCT - col2 * col2 + - col1 AS col1 FROM tab0 AS cor0
----
-1175
-6815
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-352
SELECT - col2 + col2 DIV - ( - cor0.col2 + + col0 ) AS col0 FROM tab1 AS cor0
----
-53
-65
-90

skipif mysql # not compatible
query I rowsort label-352
SELECT - col2 + col2 / - ( - cor0.col2 + + col0 ) AS col0 FROM tab1 AS cor0
----
-53
-65
-90

query I rowsort
SELECT DISTINCT + col0 + 48 AS col0 FROM tab1 AS cor0
----
112
128
51

query I rowsort
SELECT - col0 * ( - cor0.col0 ) AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL cor1.col1 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - + col2 * 32 AS col2 FROM tab1 AS cor0
----
-1728
-1824
-3072

onlyif mysql # use DIV operator for integer division
query I rowsort label-357
SELECT col2 DIV 52 col2 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-357
SELECT col2 / 52 col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + - col1 + - cor0.col2 * - col2 + col2 * + ( 95 ) * col2 AS col2 FROM tab1 AS cor0
----
279910
311894
884723

query I rowsort
SELECT ALL col2 + col2 * - col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT ALL - + col2 * - col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - - col2 + - col2 * col1 AS col0 FROM tab2 cor0
----
-1508
-608
-810

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

skipif mysql # not compatible
query I rowsort label-362
SELECT ALL col2 / + cor0.col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort
SELECT - + CAST ( - 59 AS REAL ) - col0 AS col0 FROM tab1 AS cor0
----
-21
-5
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-364
SELECT + + cor0.col1 DIV col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-364
SELECT + + cor0.col1 / col1 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-365
SELECT - col1 DIV ( + col0 * col1 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-365
SELECT - col1 / ( + col0 * col1 ) FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - ( 88 ) FROM tab2 cor0
----
-88
-88
-88

query I rowsort
SELECT - + 89 + 51 AS col1 FROM tab2 AS cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT - - 18 + - cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
-1426
-658
-711

query I rowsort
SELECT + - 80 * + 25 * cor0.col1 - + 25 FROM tab1 cor0
----
-20025
-26025
-52025

query I rowsort
SELECT + tab0.col1 + + tab0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 30f96c938ee95872f59e2a087590314f

query I rowsort
SELECT DISTINCT col2 + col1 - col1 AS col0 FROM tab1
----
54
57
96

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-374
SELECT DISTINCT + col1 * cor0.col1 + + ( col0 ) DIV + col2 AS col0 FROM tab0 AS cor0
----
7396
8282
9444

skipif mysql # not compatible
query I rowsort label-374
SELECT DISTINCT + col1 * cor0.col1 + + ( col0 ) / + col2 AS col0 FROM tab0 AS cor0
----
7396
8282
9444

query I rowsort
SELECT + - 92 * col1 + - col1 * + cor0.col2 FROM tab0 AS cor0
----
-10750
-15834
-9021

query I rowsort
SELECT DISTINCT - col0 + + col1 * - ( - col1 * col1 ) AS col0 FROM tab0 AS cor0
----
636032
753482
912638

query I rowsort
SELECT ALL - col0 * - cor0.col2 + 19 * 26 FROM tab0 AS cor0
----
1286
529
7792

query I rowsort
SELECT ALL col0 * - cor0.col2 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col1 * - col1 * 60 FROM tab2 cor0
----
-17340
-208860
-57660

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

query I rowsort
SELECT DISTINCT - col1 * col1 * col1 + - col0 FROM tab1 AS cor0
----
-1064
-17579
-2277

query I rowsort
SELECT DISTINCT - - cor0.col0 * - col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + + col1 * CAST ( col2 AS REAL ) / cor0.col2 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab2, tab0 AS cor0
----
98

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - 19 * col0 AS col0 FROM tab2 cor0
----
-133
-1482
-1501

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

query I rowsort
SELECT ALL col2 * - col0 * col1 + - col1 * + col1 FROM tab0 AS cor0
----
-12804
-672399
-75508

query I rowsort
SELECT DISTINCT - col1 * col1 + - col2 AS col0 FROM tab2 AS cor0
----
-327
-3507
-988

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

query I rowsort
SELECT DISTINCT - col1 + col0 + col0 AS col2 FROM tab0 AS cor0
----
-27
-38
87

query III rowsort
SELECT * FROM tab0 WHERE ( col0 + + col1 ) NOT IN ( - col1 * - col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-394
SELECT - col2 - + col1 DIV + col1 AS col1 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-394
SELECT - col2 - + col1 / + col1 AS col1 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT ALL col0 * cor0.col2 - + col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT - + cor0.col2 + cor0.col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1226
-609
-8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-397
SELECT DISTINCT + col2 * col2 DIV cor0.col2 + + cor0.col0 * - col0 + col1 FROM tab0 AS cor0
----
-1127
-457
-7748

skipif mysql # not compatible
query I rowsort label-397
SELECT DISTINCT + col2 * col2 / cor0.col2 + + cor0.col0 * - col0 + col1 FROM tab0 AS cor0
----
-1127
-457
-7748

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * col1 col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-400
SELECT col1 + col2 DIV col1 FROM tab2
----
19
31
59

skipif mysql # not compatible
query I rowsort label-400
SELECT col1 + col2 / col1 FROM tab2
----
19
31
59

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - col0 + + col0 + col1 * - col0 * col2 col1 FROM tab2 AS cor0
----
-124176
-52298
-6069

onlyif mysql # use DIV operator for integer division
query I rowsort label-403
SELECT DISTINCT + col2 DIV cor0.col2 + col1 * col2 + - col0 * cor0.col1 FROM tab1 cor0
----
-69
1327
209

skipif mysql # not compatible
query I rowsort label-403
SELECT DISTINCT + col2 / cor0.col2 + col1 * col2 + - col0 * cor0.col1 FROM tab1 cor0
----
-69
1327
209

query I rowsort
SELECT - 0 * + col2 + col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - - 35 + col2 + col0 * col1 AS col0 FROM tab0 AS cor0
----
2132
3431
8216

onlyif mysql # use DIV operator for integer division
query I rowsort label-406
SELECT + cor0.col1 DIV - col1 + col1 + - col2 * col2 FROM tab2 cor0
----
-1428
-618
-699

skipif mysql # not compatible
query I rowsort label-406
SELECT + cor0.col1 / - col1 + col1 + - col2 * col2 FROM tab2 cor0
----
-1428
-618
-699

query I rowsort
SELECT DISTINCT - col2 + - col1 AS col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT col2 * - col2 + - col0 - + col1 FROM tab1 AS cor0
----
-2945
-3323
-9309

onlyif mysql # use DIV operator for integer division
query I rowsort label-409
SELECT DISTINCT col1 DIV col2 + col1 * cor0.col0 FROM tab0 AS cor0
----
2066
3492
8100

skipif mysql # not compatible
query I rowsort label-409
SELECT DISTINCT col1 / col2 + col1 * cor0.col0 FROM tab0 AS cor0
----
2066
3492
8100

query I rowsort
SELECT DISTINCT + - col0 * + col1 + - col1 AS col0 FROM tab2 cor0
----
-1360
-248
-4661

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-412
SELECT col0 - + col1 * col0 DIV - col0 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-412
SELECT col0 - + col1 * col0 / - col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT col1 * + col2 * - col2 AS col0 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT + col1 / col0 FROM tab1 WHERE NOT NULL < NULL
----

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col1 col0 FROM tab1
----
1248
1404
570

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

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL >= col0
----

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

query I rowsort
SELECT + col2 * + col1 - col1 * col2 * col2 FROM tab2
----
-21762
-23902
-38350

onlyif mysql # use DIV operator for integer division
query I rowsort label-421
SELECT ALL col0 + + col0 DIV tab1.col1 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-421
SELECT ALL col0 + + col0 / tab1.col1 FROM tab1
----
3
70
86

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( col0 * + col0 * - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - col2 * col0 col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT - 94 * + col1 + - col2 AS col0 FROM tab1 AS cor0
----
-1318
-2498
-997

onlyif mysql # use DIV operator for integer division
query I rowsort label-425
SELECT col0 + col1 DIV - col0 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-425
SELECT col0 + col1 / - col0 FROM tab0
----
21
33
88

query I rowsort
SELECT col0 AS col0 FROM tab2 WHERE NOT - col1 * col2 BETWEEN - col1 AND - col1 / - col0
----
7
78
79

query I rowsort
SELECT DISTINCT tab1.col1 + - tab1.col2 * col1 AS col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL + tab0.col0 * tab0.col1 + col1 * col0 AS col2 FROM tab0
----
16198
4128
6790

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

query I rowsort
SELECT col2 * - col2 + + col1 FROM tab1 AS cor0 WHERE ( + col2 * col1 * + col1 ) = ( col0 )
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-432
SELECT col2 DIV - col1 + - col0 AS col1 FROM tab1
----
-5
-69
-87

skipif mysql # not compatible
query I rowsort label-432
SELECT col2 / - col1 + - col0 AS col1 FROM tab1
----
-5
-69
-87

query I rowsort
SELECT DISTINCT - col2 + col2 * col2 FROM tab1
----
2862
3192
9120

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-435
SELECT ALL - col2 DIV - tab0.col1 + col2 AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-435
SELECT ALL - col2 / - tab0.col1 + col2 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT col0 + col0 * tab0.col2 + - col2 AS col0 FROM tab0
----
69
7305
783

query I rowsort
SELECT ALL - col2 * col1 + - col0 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT col0 * - tab1.col0 + col2 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT + col1 + - col0 * + col2 * + col1 FROM tab2
----
-119593
-51017
-5828

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

query III rowsort
SELECT * FROM tab0 WHERE col2 * col2 / - col1 >= NULL
----

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

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL < + col1 * + col0 * col0
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT col1 < NULL
----

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

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT col2 BETWEEN ( cor0.col2 ) AND - col2 * col2 * + col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

query I rowsort
SELECT - 49 * - col2 AS col1 FROM tab2 AS cor0
----
1274
1323
1862

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

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

query I rowsort
SELECT ALL + ( + tab1.col0 ) - ( - col0 * - col1 ) AS col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT 51 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

onlyif mysql # use DIV operator for integer division
query I rowsort label-452
SELECT + ( - col2 ) DIV + tab0.col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-452
SELECT + ( - col2 ) / + tab0.col2 FROM tab0
----
-1
-1
-1

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

query I rowsort
SELECT ALL 96 - col2 FROM tab0
----
14
63
95

query I rowsort
SELECT ALL - col2 - + col0 * + col1 FROM tab1
----
-1136
-132
-697

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

query I rowsort
SELECT DISTINCT + 60 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
60

query I rowsort
SELECT DISTINCT - col2 * tab0.col2 * - col1 AS col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - ( - 19 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT DISTINCT col2 * col0 * - 74 FROM tab0
----
-2590
-540052
-58608

query I rowsort
SELECT + + ( + col2 ) AS col2 FROM tab0 cor0
----
1
33
82

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

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

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

query I rowsort
SELECT + 19 * - 85 AS col0 FROM tab1 AS cor0
----
-1615
-1615
-1615

query I rowsort
SELECT + 21 * col0 * col2 FROM tab0 AS cor0
----
153258
16632
735

query I rowsort
SELECT - ( 9 * - tab2.col2 ) AS col1 FROM tab2
----
234
243
342

query I rowsort
SELECT DISTINCT - col2 * 4 FROM tab0
----
-132
-328
-4

query I rowsort
SELECT ALL + ( - cor0.col0 ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT ALL col0 + - col1 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT ALL - + col2 * cor0.col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 22 col0 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT ALL - 30 * - col2 + - 48 * col2 FROM tab2 AS cor0
----
-468
-486
-684

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

query I rowsort
SELECT DISTINCT - 76 * col1 + - col1 * col2 FROM tab1 AS cor0
----
-1330
-2236
-3380

query I rowsort
SELECT DISTINCT - 82 * col2 AS col0 FROM tab1 AS cor0
----
-4428
-4674
-7872

query I rowsort
SELECT DISTINCT + - 43 * + col2 FROM tab1 AS cor0
----
-2322
-2451
-4128

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-479
SELECT DISTINCT - col0 DIV cor0.col1 + + ( col0 * col0 ) AS col1 FROM tab2 AS cor0
----
49
6083
6237

skipif mysql # not compatible
query I rowsort label-479
SELECT DISTINCT - col0 / cor0.col1 + + ( col0 * col0 ) AS col1 FROM tab2 AS cor0
----
49
6083
6237

query I rowsort
SELECT - + col1 * col1 + - 84 * col1 + 99 * + 92 AS col1 FROM tab2 cor0
----
5543
671
7391

skipif mysql # not compatible
query I rowsort
SELECT + col2 + + col0 * ( col1 ) + - CAST ( 35 AS REAL ) AS col1 FROM tab0 AS cor0
----
2062
3361
8146

query I rowsort
SELECT + col1 + + cor0.col2 + - col1 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT cor0.col2 + + ( col0 ) * - col2 FROM tab0 AS cor0
----
-34
-7216
-759

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

query I rowsort
SELECT - col2 + - col0 * col1 FROM tab1 cor0
----
-1136
-132
-697

query I rowsort
SELECT 54 * + col2 FROM tab1
----
2916
3078
5184

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

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

query I rowsort
SELECT ALL + tab1.col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + cor0.col0 * - ( cor0.col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-491
SELECT cor0.col2 * cor0.col0 + col0 DIV - col1 AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-491
SELECT cor0.col2 * cor0.col0 + col0 / - col1 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + + col2 * - cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col2 * + col2 - col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-399
1536
2754

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

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

query I rowsort
SELECT tab1.col1 * col0 * tab1.col0 AS col2 FROM tab1
----
234
40960
83200

query I rowsort
SELECT cor0.col0 * + cor0.col0 + - col2 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT - - 69 * col1 FROM tab0 AS cor0
----
5934
6279
6693

onlyif mysql # use DIV operator for integer division
query I rowsort label-498
SELECT ALL + - 30 DIV 17 AS col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-498
SELECT ALL + - 30 / 17 AS col2 FROM tab0 cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-499
SELECT ALL + tab2.col0 + - 1 * - col2 + col2 DIV - 22 col2 FROM tab2
----
103
116
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-499
SELECT ALL + tab2.col0 + - 1 * - col2 + col2 / - 22 col2 FROM tab2
----
103
116
33

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

query I rowsort
SELECT - tab1.col2 * + col0 * 35 AS col0 FROM tab1
----
-127680
-268800
-5670

query I rowsort
SELECT DISTINCT 0 + - col0 * - 94 AS col2 FROM tab2
----
658
7332
7426

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-505
SELECT - col0 DIV + CAST( 24 * col0 AS SIGNED ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-505
SELECT - col0 / + CAST ( 24 * col0 AS INTEGER ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 + ( + cor0.col2 ) FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT col1 * + ( - col2 * - col2 ) + + col1 * col1 FROM tab0 AS cor0
----
101050
620165
9506

query I rowsort
SELECT ALL + + col2 * col1 + + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + col1 + + ( + 32 ) * - col2 FROM tab2 AS cor0
----
-1199
-773
-833

query I rowsort
SELECT DISTINCT + col1 * + col0 + col2 * - col1 FROM tab0 AS cor0
----
-774
3298
637

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 56 col0 FROM tab2 AS cor0
----
392
4368
4424

query I rowsort
SELECT DISTINCT + col1 + col1 + col1 AS col2 FROM tab2
----
177
51
93

query I rowsort
SELECT ALL 74 + tab2.col0 FROM tab2
----
152
153
81

query I rowsort
SELECT ALL + col0 * 1 + cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT DISTINCT 28 + 47 FROM tab2 cor0
----
75

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-518
SELECT ALL col0 + ( - col2 ) DIV col0 - col2 * col0 * col1 AS col1 FROM tab0 AS cor0
----
-3360
-664029
-68089

skipif mysql # not compatible
query I rowsort label-518
SELECT ALL col0 + ( - col2 ) / col0 - col2 * col0 * col1 AS col1 FROM tab0 AS cor0
----
-3360
-664029
-68089

query I rowsort
SELECT - col1 * - col1 + + col0 * + 86 AS col1 FROM tab2 AS cor0
----
10189
1563
7083

query I rowsort
SELECT DISTINCT 78 + + col0 FROM tab1 AS cor0
----
142
158
81

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

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

query I rowsort
SELECT ALL - ( - col1 ) + - col1 * col2 FROM tab1 AS cor0
----
-1235
-1378
-560

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

skipif mysql # not compatible
query I rowsort label-524
SELECT DISTINCT + CAST ( + 53 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-525
SELECT DISTINCT + col1 DIV col1 + + 0 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-525
SELECT DISTINCT + col1 / col1 + + 0 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + col1 * cor0.col2 * col0 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT + 68 + - col0 AS col1 FROM tab2 AS cor0
----
-10
-11
61

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

query I rowsort
SELECT ALL 54 * col2 + col0 FROM tab2 AS cor0
----
1465
1482
2131

query I rowsort
SELECT DISTINCT - + 34 + - col2 FROM tab2 AS cor0
----
-60
-61
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-533
SELECT - ( - col2 ) * - CAST( - col0 AS SIGNED ) FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-533
SELECT - ( - col2 ) * - CAST ( - col0 AS INTEGER ) FROM tab1 cor0
----
162
3648
7680

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

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

skipif mysql # not compatible
query I rowsort label-535
SELECT col1 * - col0 + CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + + 61 * col0 AS col0 FROM tab1 AS cor0
----
183
3904
4880

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-538
SELECT - 47 DIV + col1 + 36 col2 FROM tab2 AS cor0
----
34
35
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-538
SELECT - 47 / + col1 + 36 col2 FROM tab2 AS cor0
----
34
35
36

query I rowsort
SELECT - 85 + + col0 AS col2 FROM tab1 AS cor0
----
-21
-5
-82

query I rowsort
SELECT ALL - 54 * - col1 FROM tab0 AS cor0
----
4644
4914
5238

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 - col1 col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT - - 60 + - col1 * + ( - col1 ) AS col0 FROM tab2 AS cor0
----
1021
349
3541

query I rowsort
SELECT + - col2 * col2 + - col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT - col2 + ( 64 ) AS col1 FROM tab2 AS cor0
----
26
37
38

query I rowsort
SELECT DISTINCT + - ( + 85 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-85

query I rowsort
SELECT - col0 + - col1 + + col2 FROM tab0
----
-131
-77
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + cor0.col2 col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + 10 * 94 AS col0 FROM tab2 cor0
----
940
940
940

query I rowsort
SELECT ALL cor0.col0 + col0 + - col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + 61 + + col1 AS col2 FROM tab1
----
71
74
87

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

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

query I rowsort
SELECT + col1 * 10 AS col2 FROM tab1
----
100
130
260

onlyif mysql # use DIV operator for integer division
query I rowsort label-553
SELECT DISTINCT col2 DIV tab2.col1 + + tab2.col2 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-553
SELECT DISTINCT col2 / tab2.col1 + + tab2.col2 FROM tab2
----
26
27
40

query I rowsort
SELECT + 49 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 14 col0 FROM tab1
----
-1344
-756
-798

query I rowsort
SELECT + - col1 * - col1 + col1 * - col2 * col0 FROM tab2 AS cor0
----
-116171
-4898
-50745

onlyif mysql # use DIV operator for integer division
query I rowsort label-557
SELECT DISTINCT col1 DIV 75 + tab1.col1 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-557
SELECT DISTINCT col1 / 75 + tab1.col1 AS col1 FROM tab1
----
10
13
26

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

query I rowsort
SELECT DISTINCT ( 52 ) * + col0 FROM tab0
----
1248
1820
4628

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col2 + + col0 * - col2 AS REAL ) AS col1 FROM tab0
----
34
7216
759

query I rowsort
SELECT 5 + - col1 AS col2 FROM tab2 AS cor0
----
-12
-26
-54

query I rowsort
SELECT DISTINCT - ( - col2 ) * + tab2.col2 + col0 * col2 AS col1 FROM tab2
----
2704
4446
918

query I rowsort
SELECT col2 + 13 AS col0 FROM tab1
----
109
67
70

query I rowsort
SELECT DISTINCT col1 * - 35 + + col0 FROM tab1
----
-286
-375
-907

query I rowsort
SELECT ALL - 68 + - col0 * - col0 AS col1 FROM tab0
----
1157
508
7853

query I rowsort
SELECT DISTINCT - col0 * 37 FROM tab2 AS cor0
----
-259
-2886
-2923

query I rowsort
SELECT + col0 * - 15 AS col2 FROM tab1 AS cor0
----
-1200
-45
-960

query I rowsort
SELECT ALL - col0 + 13 FROM tab2 AS cor0
----
-65
-66
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-569
SELECT - - col0 * - 69 + - col2 + - col0 DIV ( - col0 ) AS col0 FROM tab0 AS cor0
----
-1688
-2415
-6222

skipif mysql # not compatible
query I rowsort label-569
SELECT - - col0 * - 69 + - col2 + - col0 / ( - col0 ) AS col0 FROM tab0 AS cor0
----
-1688
-2415
-6222

query I rowsort
SELECT DISTINCT + col2 * 80 FROM tab2 AS cor0
----
2080
2160
3040

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - 49 col2 FROM tab1 AS cor0
----
-1274
-490
-637

query I rowsort
SELECT ALL - - col1 * - 28 AS col2 FROM tab1 AS cor0
----
-280
-364
-728

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-575
SELECT DISTINCT - + col0 DIV 59 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-575
SELECT DISTINCT - + col0 / 59 FROM tab0 AS cor0
----
-1
0

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

skipif mysql # not compatible
query I rowsort label-576
SELECT + col1 + + CAST ( - col0 AS INTEGER ) * col1 + - col1 * + col1 FROM tab2 AS cor0
----
-1147
-1615
-8024

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

query I rowsort
SELECT ALL - 4 FROM tab0, tab0 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT DISTINCT col2 * + 73 * col2 - - col2 AS col2 FROM tab1 cor0
----
212922
237234
672864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-580
SELECT - + CAST( col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-580
SELECT - + CAST ( col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL ( 47 ) * col0 AS col0 FROM tab0 AS cor0
----
1128
1645
4183

query I rowsort
SELECT - 66 * + col1 FROM tab2 AS cor0
----
-1122
-2046
-3894

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

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

query I rowsort
SELECT col2 * - col1 * + col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + col1 * + col1 + + col1 FROM tab1 AS cor0
----
110
182
702

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

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

query I rowsort
SELECT + col0 * + col1 * + col0 AS col0 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-589
SELECT DISTINCT + tab1.col0 DIV + col0 AS col2 FROM tab1
----
1

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

query I rowsort
SELECT ALL - 51 * tab1.col1 FROM tab1
----
-1326
-510
-663

onlyif mysql # use DIV operator for integer division
query I rowsort label-591
SELECT DISTINCT + col1 + tab2.col1 * col1 DIV + col1 + + col1 AS col2 FROM tab2
----
177
51
93

skipif mysql # not compatible
query I rowsort label-591
SELECT DISTINCT + col1 + tab2.col1 * col1 / + col1 + + col1 AS col2 FROM tab2
----
177
51
93

query I rowsort
SELECT 93 - col2 * 13 AS col1 FROM tab1
----
-1155
-609
-648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - col0 + - cor0.col0 col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

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

query I rowsort
SELECT DISTINCT col1 + ( 42 ) FROM tab1 AS cor0
----
52
55
68

query I rowsort
SELECT ALL + ( + tab0.col1 ) + + col2 + - col1 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * ( col1 ) col1 FROM tab1 cor0
----
1248
1404
570

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

query I rowsort
SELECT DISTINCT - - col1 + 46 * + ( col1 ) FROM tab1 cor0
----
1222
470
611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-600
SELECT DISTINCT + - col1 * + CAST( col2 AS SIGNED ) + - col0 col1 FROM tab1 AS cor0
----
-1328
-1407
-634

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-600
SELECT DISTINCT + - col1 * + CAST ( col2 AS INTEGER ) + - col0 col1 FROM tab1 AS cor0
----
-1328
-1407
-634

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

query I rowsort
SELECT DISTINCT - col0 * + 98 AS col0 FROM tab2 AS cor0
----
-686
-7644
-7742

query I rowsort
SELECT ALL ( + col1 ) * tab2.col1 * + tab2.col2 - col2 FROM tab2
----
10944
25920
90480

query I rowsort
SELECT DISTINCT 2 - + 66 AS col2 FROM tab2
----
-64

query I rowsort
SELECT ALL + col2 * + 66 * - col0 - col2 AS col1 FROM tab0
----
-2311
-481750
-52305

query I rowsort
SELECT - 51 - - col1 * - col2 FROM tab1
----
-1299
-1455
-621

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

query I rowsort
SELECT ALL 76 * - col2 * tab0.col0 - col1 AS col1 FROM tab0
----
-2757
-554739
-60278

query I rowsort
SELECT DISTINCT 18 * + tab2.col2 AS col0 FROM tab2, tab0, tab2 AS cor0
----
468
486
684

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

query I rowsort
SELECT ALL - 93 * col0 + - col2 FROM tab0 AS cor0
----
-2265
-3256
-8359

query I rowsort
SELECT + cor0.col0 * - col2 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-613
SELECT ALL - col1 + col2 * ( col1 ) - + col2 DIV col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

skipif mysql # not compatible
query I rowsort label-613
SELECT ALL - col1 + col2 * ( col1 ) - + col2 / col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

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

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

query I rowsort
SELECT ALL + col2 * col0 + + 6 * col1 AS col1 FROM tab0
----
1308
617
7844

query I rowsort
SELECT ( + col2 ) + ( 52 * col1 ) FROM tab2 AS cor0
----
1639
3094
922

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col0 + - 79 col1 FROM tab0 AS cor0
----
-1304
-655
-8000

query I rowsort
SELECT col1 + + col2 - col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT cor0.col2 + col2 * ( col2 + cor0.col2 ) FROM tab0 AS cor0
----
13530
2211
3

query I rowsort
SELECT ALL - 73 + + col0 * col0 AS col2 FROM tab1 cor0
----
-64
4023
6327

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

query I rowsort
SELECT DISTINCT + - ( - col2 ) * col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

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

query I rowsort
SELECT ALL + col0 - col1 * col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-626
SELECT DISTINCT + cor0.col1 DIV - col0 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-626
SELECT DISTINCT + cor0.col1 / - col0 FROM tab2 AS cor0
----
-4
0

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

query I rowsort
SELECT - + ( + col1 ) * col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT - ( col2 ) * + col0 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col2 * - 23 AS col0 FROM tab2 AS cor0
----
598
621
874

query I rowsort
SELECT 64 + col1 * + col1 AS col2 FROM tab2 cor0
----
1025
353
3545

query I rowsort
SELECT DISTINCT + - 89 FROM tab1 cor0
----
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-633
SELECT + 71 DIV + col0 + - col2 FROM tab1 AS cor0
----
-31
-56
-96

skipif mysql # not compatible
query I rowsort label-633
SELECT + 71 / + col0 + - col2 FROM tab1 AS cor0
----
-31
-56
-96

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-634
SELECT CAST ( NULL AS INTEGER ) + + 8 col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * col2 + col1 * col0 * - col1 AS col2 FROM tab1
----
-12272
-5830
-624

query I rowsort
SELECT + 15 + col0 AS col2 FROM tab0 AS cor0
----
104
39
50

query I rowsort
SELECT DISTINCT ( 82 + col0 ) * - ( tab2.col2 ) FROM tab2
----
-2403
-4160
-6118

query I rowsort
SELECT 51 * + col0 AS col2 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT - 65 * - col1 AS col0 FROM tab2 AS cor0
----
1105
2015
3835

query I rowsort
SELECT ALL + 94 AS col2 FROM tab2
----
94
94
94

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-642
SELECT DISTINCT + tab1.col1 DIV - col1 col0 FROM tab1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-642
SELECT DISTINCT + tab1.col1 / - col1 col0 FROM tab1
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-643
SELECT - col0 DIV 23 AS col0 FROM tab0 AS cor0
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-643
SELECT - col0 / 23 AS col0 FROM tab0 AS cor0
----
-1
-1
-3

query I rowsort
SELECT - col0 + 88 AS col2 FROM tab1 AS cor0
----
24
8
85

query I rowsort
SELECT + col0 * col2 * - 55 + - col2 FROM tab2 AS cor0
----
-10422
-111566
-165148

query I rowsort
SELECT ALL - + cor0.col2 + - 84 FROM tab1 cor0
----
-138
-141
-180

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

skipif mysql # not compatible
query I rowsort label-647
SELECT + col2 / - 91 + 0 AS col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL col2 * col0 * - ( + col1 ) AS col1 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col0 + + 29 AS col2 FROM tab2 AS cor0
----
-49
-50
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 * - col1 + col0 * col1 col0 FROM tab1 AS cor0
----
-1326
-208
70

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

query I rowsort
SELECT - - 32 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT DISTINCT + col0 * + col2 + + cor0.col2 * col1 FROM tab1 cor0
----
1566
4218
8928

query I rowsort
SELECT DISTINCT - cor0.col1 * 3 * - col2 FROM tab1 AS cor0
----
1710
3744
4212

onlyif mysql # use DIV operator for integer division
query I rowsort label-655
SELECT DISTINCT col0 DIV - 91 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-655
SELECT DISTINCT col0 / - 91 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col1 - col1 * col2 * col0 FROM tab2 AS cor0
----
-119711
-51051
-5890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + - col0 col1 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-658
SELECT col0 - CAST( + 41 + col1 * - ( + 74 ) AS SIGNED ) AS col2 FROM tab1 AS cor0
----
1001
1886
763

skipif mysql # not compatible
query I rowsort label-658
SELECT col0 - CAST ( + 41 + col1 * - ( + 74 ) AS INTEGER ) AS col2 FROM tab1 AS cor0
----
1001
1886
763

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-661
SELECT DISTINCT col1 + - col2 DIV col0 FROM tab1
----
10
12
8

skipif mysql # not compatible
query I rowsort label-661
SELECT DISTINCT col1 + - col2 / col0 FROM tab1
----
10
12
8

query I rowsort
SELECT 60 + col1 FROM tab1 AS cor0
----
70
73
86

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

query I rowsort
SELECT cor0.col2 + 16 AS col2 FROM tab2 AS cor0
----
42
43
54

query I rowsort
SELECT ALL 50 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # use DIV operator for integer division
query I rowsort label-666
SELECT 31 DIV 14 FROM tab1
----
2
2
2

skipif mysql # not compatible
query I rowsort label-666
SELECT 31 / 14 FROM tab1
----
2
2
2

query I rowsort
SELECT + + 35 + + col2 FROM tab1 AS cor0
----
131
89
92

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT + - cor0.col2 + + col2 * - col1 * + 60 FROM tab0 AS cor0
----
-170313
-447802
-5821

query I rowsort
SELECT - - 1 - 11 FROM tab1 AS cor0
----
-10
-10
-10

query I rowsort
SELECT + + col2 - - ( col2 ) FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + 89 * col1 + col2 + 57 FROM tab1 AS cor0
----
1004
1310
2425

query I rowsort
SELECT ALL - 46 * col1 AS col1 FROM tab0 AS cor0
----
-3956
-4186
-4462

query I rowsort
SELECT ALL - - 29 * - col2 FROM tab2 AS cor0
----
-1102
-754
-783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) * - cor0.col2 * - col0 col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT + 28 * col0 FROM tab1 AS cor0
----
1792
2240
84

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

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

query I rowsort
SELECT DISTINCT - 1 FROM tab1, tab1 AS cor0
----
-1

query I rowsort
SELECT ALL 42 + - 43 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT ( 49 ) FROM tab0, tab0 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 52 col1 FROM tab0 AS cor0
----
-1716
-4264
-52

query I rowsort
SELECT + ( - 32 + + col1 ) * + 92 FROM tab1
----
-1748
-2024
-552

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 * + cor0.col0 + col1 col0 FROM tab1 AS cor0
----
245
4682
5853

query I rowsort
SELECT - + col1 + - ( col0 ) * + col0 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT + 64 * col2 + - col1 + col0 AS col2 FROM tab0 AS cor0
----
2
2050
5246

query I rowsort
SELECT 62 * - col0 FROM tab2 AS cor0
----
-434
-4836
-4898

query I rowsort
SELECT DISTINCT + + col2 + col2 * col0 * col0 - col2 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col2 + ( - col0 ) col1 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT DISTINCT + - 62 * - col1 FROM tab1 AS cor0
----
1612
620
806

query I rowsort
SELECT + col0 + - ( + 57 ) - + col0 * + col2 AS col1 FROM tab1 AS cor0
----
-216
-3641
-7657

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-692
SELECT + CAST( 27 AS SIGNED ) FROM tab2 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

skipif mysql # not compatible
query I rowsort label-692
SELECT + CAST ( 27 AS INTEGER ) FROM tab2 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT DISTINCT 65 AS col0 FROM tab0, tab2 cor0, tab2 cor1
----
65

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + 8 ) col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT - + cor0.col2 * - col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

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

query I rowsort
SELECT ALL - + col2 * + col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 84 * - col0 AS col1 FROM tab1 AS cor0
----
-252
-5376
-6720

query I rowsort
SELECT ( + 39 ) * - col0 FROM tab2 AS cor0
----
-273
-3042
-3081

query I rowsort
SELECT ALL col0 * - 52 AS col0 FROM tab1
----
-156
-3328
-4160

query I rowsort
SELECT DISTINCT - col0 * - 95 FROM tab0
----
2280
3325
8455

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + - col1 * + col1 * col1 col2 FROM tab2 AS cor0
----
-205301
-29784
-4834

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

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

query I rowsort
SELECT - 1 * + cor0.col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col0 + - 14 - - col2 FROM tab0
----
157
22
43

query I rowsort
SELECT + col1 + + ( - tab2.col2 ) * + col1 * col2 - col1 AS col2 FROM tab2
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-708
SELECT + ( 99 ) DIV col1 - - col0 FROM tab1
----
6
73
87

skipif mysql # not compatible
query I rowsort label-708
SELECT + ( 99 ) / col1 - - col0 FROM tab1
----
6
73
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col0 col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT col0 + + 95 * col1 + col0 * col2 AS col2 FROM tab2
----
3141
4696
7711

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

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

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

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

query I rowsort
SELECT - col0 + col2 * col0 * - col0 + col1 FROM tab0 AS cor0
----
-1163
-18946
-649520

query I rowsort
SELECT DISTINCT tab0.col1 + - 53 + tab0.col1 AS col0 FROM tab0
----
119
129
141

query I rowsort
SELECT ALL tab1.col2 + - 81 AS col2 FROM tab1
----
-24
-27
15

query I rowsort
SELECT + 67 - + col1 FROM tab1
----
41
54
57

query I rowsort
SELECT DISTINCT + ( - col1 ) + + col2 FROM tab0
----
-53
-9
-96

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

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

query I rowsort
SELECT + 82 * + col0 FROM tab1
----
246
5248
6560

query I rowsort
SELECT + col2 * 78 + col2 * col0 AS col0 FROM tab2
----
2295
4056
5966

query I rowsort
SELECT 43 + + col2 * col0 + - col2 FROM tab1
----
151
3634
7627

onlyif mysql # use DIV operator for integer division
query I rowsort label-724
SELECT ALL 86 DIV 23 + + col2 AS col0 FROM tab1
----
57
60
99

skipif mysql # not compatible
query I rowsort label-724
SELECT ALL 86 / 23 + + col2 AS col0 FROM tab1
----
57
60
99

query I rowsort
SELECT DISTINCT col0 * + ( col2 ) + - col1 * col2 AS col1 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT + col1 * - 55 * - col0 + col0 AS col2 FROM tab2
----
11942
253188
73944

query I rowsort
SELECT DISTINCT - 36 + + ( - col2 + tab2.col2 ) * + col1 AS col0 FROM tab2
----
-36

query I rowsort
SELECT col1 * col1 + + col1 + col1 FROM tab1
----
120
195
728

query I rowsort
SELECT DISTINCT + + cor0.col2 FROM tab2, tab1, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL col0 + - 30 * - col2 AS col1 FROM tab0 AS cor0
----
1014
2549
65

query I rowsort
SELECT ( + col2 ) + - col1 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT 94 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 30 col0 FROM tab2
----
-30
-30
-30

query I rowsort
SELECT ALL 68 * col0 AS col1 FROM tab0
----
1632
2380
6052

query I rowsort
SELECT + col0 * + col2 * + 69 - col0 AS col2 FROM tab1
----
11175
251648
529840

onlyif mysql # use DIV operator for integer division
query I rowsort label-736
SELECT col0 DIV + ( + 29 ) FROM tab1
----
0
2
2

skipif mysql # not compatible
query I rowsort label-736
SELECT col0 / + ( + 29 ) FROM tab1
----
0
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-737
SELECT tab1.col2 * 59 * + tab1.col2 + col0 * col2 DIV + tab1.col2 + col1 AS col2 FROM tab1
----
172073
191765
543837

skipif mysql # not compatible
query I rowsort label-737
SELECT tab1.col2 * 59 * + tab1.col2 + col0 * col2 / + tab1.col2 + col1 AS col2 FROM tab1
----
172073
191765
543837

query I rowsort
SELECT DISTINCT - col0 + 10 + + col1 FROM tab0 cor0
----
12
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-739
SELECT ALL + - col2 DIV col2 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-739
SELECT ALL + - col2 / col2 col1 FROM tab0 AS cor0
----
-1
-1
-1

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

query I rowsort
SELECT DISTINCT + col0 * + ( - col2 ) * col2 + - cor0.col0 FROM tab2 AS cor0
----
-114155
-5110
-52806

query I rowsort
SELECT DISTINCT col2 * + ( + col0 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col0 + - ( ( - col1 ) ) * col2 FROM tab0 cor0
----
132
2862
7551

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

skipif mysql # not compatible
query I rowsort label-744
SELECT + col0 * CAST ( col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + col2 + + 90 * - col2 FROM tab1 AS cor0
----
-4806
-5073
-8544

query I rowsort
SELECT ALL + col2 * 3 AS col0 FROM tab0 AS cor0
----
246
3
99

query I rowsort
SELECT DISTINCT col2 + + 95 AS col1 FROM tab0 AS cor0
----
128
177
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-748
SELECT DISTINCT 59 + tab2.col0 DIV + ( + col0 ) FROM tab2
----
60

skipif mysql # not compatible
query I rowsort label-748
SELECT DISTINCT 59 + tab2.col0 / + ( + col0 ) FROM tab2
----
60

query I rowsort
SELECT ALL ( - cor0.col0 ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT DISTINCT - 41 * + col1 FROM tab2 cor0
----
-1271
-2419
-697

query I rowsort
SELECT DISTINCT + cor0.col2 * - 93 FROM tab2, tab0 AS cor0
----
-3069
-7626
-93

query I rowsort
SELECT ALL tab1.col1 + 56 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to aa5936e49475a1032ac11cdad95f2765

query I rowsort
SELECT - col2 + cor0.col2 * - col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT + - col2 * - ( - col0 ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-755
SELECT ALL col1 + 28 DIV 46 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-755
SELECT ALL col1 + 28 / 46 FROM tab0 AS cor0
----
86
91
97

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

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

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

query I rowsort
SELECT cor0.col1 * + ( 70 ) * col2 AS col0 FROM tab0 AS cor0
----
198660
522340
6790

query I rowsort
SELECT DISTINCT col2 + col2 * col0 * + 98 AS col1 FROM tab0
----
3431
715286
77649

query I rowsort
SELECT DISTINCT - col2 + tab0.col1 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT col1 * - cor0.col1 + + cor0.col0 * col0 * ( col0 ) AS col1 FROM tab2 AS cor0
----
-618
471071
492750

onlyif mysql # use DIV operator for integer division
query I rowsort label-762
SELECT col0 * col1 DIV col2 + tab1.col1 + col0 FROM tab1
----
103
30
85

skipif mysql # not compatible
query I rowsort label-762
SELECT col0 * col1 / col2 + tab1.col1 + col0 FROM tab1
----
103
30
85

query I rowsort
SELECT ALL + 10 * - col1 FROM tab2 AS cor0
----
-170
-310
-590

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

skipif mysql # not compatible
query I rowsort label-764
SELECT CAST ( NULL AS INTEGER ) / col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 28 FROM tab1 AS cor0
----
-28
-28
-28

query I rowsort
SELECT DISTINCT - 14 * 84 AS col2 FROM tab1 cor0
----
-1176

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

skipif mysql # not compatible
query I rowsort label-767
SELECT DISTINCT + CAST ( cor0.col2 AS INTEGER ) * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT ( ( col2 ) ) * - col2 + + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL + col0 + 78 * col2 AS col0 FROM tab1 AS cor0
----
4215
4510
7568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 + col1 col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - col2 + ( - tab2.col0 ) FROM tab2
----
-104
-117
-34

query I rowsort
SELECT ALL - - 31 * col0 + - col2 FROM tab2 AS cor0
----
190
2392
2411

query I rowsort
SELECT DISTINCT 39 * col2 FROM tab2 AS cor0
----
1014
1053
1482

query I rowsort
SELECT 58 - - col0 AS col0 FROM tab1
----
122
138
61

query I rowsort
SELECT DISTINCT 72 AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
72

query I rowsort
SELECT - 83 * + col0 AS col2 FROM tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT DISTINCT + + 42 + + col1 AS col2 FROM tab1 AS cor0
----
52
55
68

query I rowsort
SELECT 48 + + 1 FROM tab2
----
49
49
49

query I rowsort
SELECT - 50 * col0 FROM tab1 AS cor0
----
-150
-3200
-4000

query I rowsort
SELECT col1 * + col0 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL - 58 * - col1 FROM tab1
----
1508
580
754

query I rowsort
SELECT - col1 * + col2 * + 73 FROM tab1 cor0
----
-102492
-41610
-91104

query I rowsort
SELECT - + 26 * col1 AS col1 FROM tab1 AS cor0
----
-260
-338
-676

query I rowsort
SELECT ALL col1 + col2 * ( 54 ) AS col2 FROM tab1 AS cor0
----
2942
3088
5197

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

query I rowsort
SELECT DISTINCT 57 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
57

query I rowsort
SELECT 44 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col0 * 12 col0 FROM tab2 AS cor0
----
-77
-858
-869

query I rowsort
SELECT DISTINCT col0 * ( col2 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - - col0 * 13 FROM tab1 AS cor0
----
1040
39
832

query I rowsort
SELECT ALL + + col1 + + 51 FROM tab0 AS cor0
----
137
142
148

query I rowsort
SELECT ALL + col0 * - col2 * + ( cor0.col0 * - cor0.col0 ) FROM tab2 AS cor0
----
12338352
18735482
9261

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + 84 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT ALL + + 97 + col2 FROM tab0 AS cor0
----
130
179
98

query I rowsort
SELECT DISTINCT - ( - col2 ) + col0 * 49 * col0 + + col1 * - 88 FROM tab1 cor0
----
-1793
199881
312552

query I rowsort
SELECT + 20 + col1 AS col2 FROM tab0 cor0
----
106
111
117

query I rowsort
SELECT ( + cor0.col2 ) * + col2 * - 56 AS col0 FROM tab0 AS cor0
----
-376544
-56
-60984

onlyif mysql # use DIV operator for integer division
query I rowsort label-799
SELECT + cor0.col0 DIV col2 + + col0 + col2 AS col1 FROM tab1 AS cor0
----
122
176
57

skipif mysql # not compatible
query I rowsort label-799
SELECT + cor0.col0 / col2 + + col0 + col2 AS col1 FROM tab1 AS cor0
----
122
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-800
SELECT DISTINCT - CAST( + cor0.col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-800
SELECT DISTINCT - CAST ( + cor0.col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + - 11 col0 FROM tab1 cor0
----
-21
-24
-37

query I rowsort
SELECT - col2 * - col2 + - col0 + - ( 0 ) FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT + col0 * col1 - col2 * + 73 AS col0 FROM tab0 AS cor0
----
-345
2113
3322

query I rowsort
SELECT DISTINCT - ( 62 ) AS col0 FROM tab2 AS cor0
----
-62

query I rowsort
SELECT ALL - 63 * - col0 AS col0 FROM tab0 cor0
----
1512
2205
5607

query I rowsort
SELECT ALL + + cor0.col2 AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - col0 * 36 FROM tab1
----
-108
-2304
-2880

query I rowsort
SELECT ALL + ( + col0 ) + - col0 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL tab1.col1 + - col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + + col2 * 67 + col0 FROM tab0 AS cor0
----
102
2235
5583

query I rowsort
SELECT + col1 + + col2 + + col0 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT + col0 * + cor0.col0 + - col2 AS col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT col2 * col0 + col1 * + col0 * col0 FROM tab2 AS cor0
----
109099
1708
360984

query I rowsort
SELECT + col0 * ( 21 + + col0 ) AS col2 FROM tab1
----
5440
72
8080

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - col0 * - col2 - col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + col1 * - 47 AS col2 FROM tab0 AS cor0
----
-4042
-4277
-4559

query I rowsort
SELECT ALL + - col1 * 37 FROM tab2 AS cor0
----
-1147
-2183
-629

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-820
SELECT ALL + col2 + CAST( - col2 + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-820
SELECT ALL + col2 + CAST ( - col2 + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col1 * - 35 FROM tab1 AS cor0
----
-350
-455
-910

query I rowsort
SELECT DISTINCT - + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

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

query I rowsort
SELECT col2 * + 41 AS col0 FROM tab2 AS cor0
----
1066
1107
1558

query I rowsort
SELECT ALL - col2 + - 14 * col2 + + col2 * 13 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT - 63 * + col1 + + col1 AS col2 FROM tab1 AS cor0
----
-1612
-620
-806

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

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

query I rowsort
SELECT DISTINCT 3 + col1 AS col0 FROM tab2 AS cor0
----
20
34
62

query I rowsort
SELECT tab1.col1 * col0 * + ( + col2 ) + col0 FROM tab1
----
36544
4215
99920

onlyif mysql # use DIV operator for integer division
query I rowsort label-830
SELECT - 15 * 7 + - col2 * + cor0.col2 DIV + col2 AS col2 FROM tab1 AS cor0
----
-159
-162
-201

skipif mysql # not compatible
query I rowsort label-830
SELECT - 15 * 7 + - col2 * + cor0.col2 / + col2 AS col2 FROM tab1 AS cor0
----
-159
-162
-201

query I rowsort
SELECT + cor0.col2 * - cor0.col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT 27 * - col2 + + col0 + - 68 AS col2 FROM tab2 cor0
----
-1015
-692
-790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 * - cor0.col1 + - cor0.col0 * - col2 * col0 + col0 * col0 col0 FROM tab2 cor0
----
-1604
158604
241767

onlyif mysql # use DIV operator for integer division
query I rowsort label-834
SELECT tab0.col1 - - col0 DIV + 21 FROM tab0
----
87
95
98

skipif mysql # not compatible
query I rowsort label-834
SELECT tab0.col1 - - col0 / + 21 FROM tab0
----
87
95
98

query I rowsort
SELECT DISTINCT + col0 + col2 * + cor0.col2 AS col1 FROM tab2 cor0
----
1523
736
754

skipif mysql # not compatible
query I rowsort
SELECT + + col0 * CAST ( + col1 AS REAL ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - col0 * col2 + - col0 * col1 FROM tab0 AS cor0
----
-15397
-2856
-3430

onlyif mysql # use DIV operator for integer division
query I rowsort label-838
SELECT DISTINCT + - col0 DIV + ( + col1 ) - col0 * + col2 FROM tab0 cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-838
SELECT DISTINCT + - col0 / + ( + col1 ) - col0 * + col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col2 + - cor0.col2 * + 29 FROM tab2 AS cor0
----
-1064
-728
-756

onlyif mysql # use DIV operator for integer division
query I rowsort label-840
SELECT ALL - 73 DIV + col2 FROM tab0
----
-2
-73
0

skipif mysql # not compatible
query I rowsort label-840
SELECT ALL - 73 / + col2 FROM tab0
----
-2
-73
0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab1, tab2 cor1
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 * col2 ) col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + tab2.col1 + 21 FROM tab2, tab0, tab2 AS cor0, tab1
----
81 values hashing to 3faaa7f83a8a689d40f78e259f5173e5

query I rowsort
SELECT + 0 * col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - 63 * - col0 FROM tab0
----
1512
2205
5607

query I rowsort
SELECT + 59 * + col0 AS col0 FROM tab0
----
1416
2065
5251

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-848
SELECT DISTINCT ( col0 + + CAST( col0 AS SIGNED ) ) * col0 FROM tab1
----
12800
18
8192

skipif mysql # not compatible
query I rowsort label-848
SELECT DISTINCT ( col0 + + CAST ( col0 AS INTEGER ) ) * col0 FROM tab1
----
12800
18
8192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * + 91 col0 FROM tab0, tab1, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to 149976631bfbc8daa645fbf8f717f727

query I rowsort
SELECT - 85 * tab0.col1 FROM tab0
----
-7310
-7735
-8245

query I rowsort
SELECT - ( - col1 ) * - 50 AS col0 FROM tab2 AS cor0
----
-1550
-2950
-850

query I rowsort
SELECT DISTINCT + 0 * cor0.col2 + - col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

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

query I rowsort
SELECT - col1 * + col1 * col0 AS col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

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

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

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

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

query I rowsort
SELECT ALL - 37 * col2 + cor0.col1 FROM tab1 cor0
----
-1972
-2099
-3539

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-858
SELECT - - CAST( col1 AS SIGNED ) + + cor0.col1 AS col2 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-858
SELECT - - CAST ( col1 AS INTEGER ) + + cor0.col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - - 62 + cor0.col2 * + col0 FROM tab2 AS cor0
----
2090
251
3064

query I rowsort
SELECT DISTINCT + + ( - col1 ) + col2 * col2 * col2 FROM tab0 AS cor0
----
-96
35851
551277

query I rowsort
SELECT + 68 * + cor0.col2 FROM tab1 AS cor0
----
3672
3876
6528

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-862
SELECT + - CAST( col2 AS SIGNED ) AS col1 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-862
SELECT + - CAST ( col2 AS INTEGER ) AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + col1 + - col1 * col2 AS col0 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT col0 * + ( - tab0.col2 * + tab0.col2 ) FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT ( 99 ) FROM tab1 AS cor0
----
99
99
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-866
SELECT CAST( - col1 AS SIGNED ) FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-866
SELECT CAST ( - col1 AS INTEGER ) FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 32 + - col2 AS col2 FROM tab1
----
-22
-25
-64

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

query I rowsort
SELECT + ( ( col2 ) ) * 38 FROM tab1
----
2052
2166
3648

query I rowsort
SELECT - 18 * - 3 AS col2 FROM tab1 cor0
----
54
54
54

query I rowsort
SELECT cor0.col2 + col2 + col0 FROM tab2 AS cor0
----
130
155
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-872
SELECT + + CAST( + col2 AS SIGNED ) * - col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-872
SELECT + + CAST ( + col2 AS INTEGER ) * - col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - - col1 + col0 * ( cor0.col1 ) AS col0 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT ALL + - col2 + - col0 - col1 * + col0 FROM tab0 AS cor0
----
-2121
-3431
-8270

query I rowsort
SELECT - 48 * + col1 FROM tab2 cor0
----
-1488
-2832
-816

query I rowsort
SELECT ALL + - col1 * cor0.col2 + - ( col1 * + col1 ) FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT - - 70 * col0 AS col2 FROM tab1 AS cor0
----
210
4480
5600

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

query I rowsort
SELECT ALL - col0 * + ( col2 * col2 + - col0 ) FROM tab2
----
-107835
-46644
-5054

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( 89 AS REAL ) FROM tab1
----
89
89
89

query I rowsort
SELECT DISTINCT - 86 * - col0 * col1 AS col2 FROM tab2
----
115498
18662
395772

query I rowsort
SELECT + - col1 * 59 AS col2 FROM tab2 AS cor0
----
-1003
-1829
-3481

query I rowsort
SELECT + col0 * 93 - cor0.col0 AS col0 FROM tab0 AS cor0
----
2208
3220
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-885
SELECT + - cor0.col0 + + col2 DIV 35 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-176
-48
-70

skipif mysql # not compatible
query I rowsort label-885
SELECT + - cor0.col0 + + col2 / 35 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-176
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-886
SELECT 41 DIV col1 AS col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-886
SELECT 41 / col1 AS col1 FROM tab2
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-887
SELECT + 99 DIV - col2 + + 23 FROM tab1
----
22
22
22

skipif mysql # not compatible
query I rowsort label-887
SELECT + 99 / - col2 + + 23 FROM tab1
----
22
22
22

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

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

query I rowsort
SELECT ALL tab0.col0 * - 42 AS col0 FROM tab0
----
-1008
-1470
-3738

query I rowsort
SELECT ALL + col2 + - ( - col2 + col1 ) * - col1 FROM tab2 AS cor0
----
-319
151
1973

onlyif mysql # use DIV operator for integer division
query I rowsort label-891
SELECT + col0 DIV col0 + col0 DIV + col1 + + ( col0 * col1 ) AS col2 FROM tab0 AS cor0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-891
SELECT + col0 / col0 + col0 / + col1 + + ( col0 * col1 ) AS col2 FROM tab0 AS cor0
----
2065
3396
8100

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

query I rowsort
SELECT DISTINCT + - 49 * col1 FROM tab0 cor0
----
-4214
-4459
-4753

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-895
SELECT col2 * col2 DIV + col0 AS col0 FROM tab1 AS cor0
----
115
50
972

skipif mysql # not compatible
query I rowsort label-895
SELECT col2 * col2 / + col0 AS col0 FROM tab1 AS cor0
----
115
50
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-896
SELECT ALL cor0.col1 DIV col1 + cor0.col0 + 22 AS col1 FROM tab1 AS cor0
----
103
26
87

skipif mysql # not compatible
query I rowsort label-896
SELECT ALL cor0.col1 / col1 + cor0.col0 + 22 AS col1 FROM tab1 AS cor0
----
103
26
87

query I rowsort
SELECT + 23 * col1 AS col2 FROM tab0
----
1978
2093
2231

query I rowsort
SELECT - 97 + cor0.col1 * + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 63ba395257ac026f495f1b4604fe015c

query I rowsort
SELECT DISTINCT + 39 + cor0.col2 + cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
143
144
145
155
156
72
73
84

query I rowsort
SELECT 20 - - cor0.col2 AS col0 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT + 73 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT 75 + - col0 * col2 + + col2 FROM tab0
----
-684
-7141
41

query I rowsort
SELECT ALL + + col0 * col1 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - 83 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 77a48ad722db122f51d5ef36604ad843

onlyif mysql # use DIV operator for integer division
query I rowsort label-905
SELECT DISTINCT - ( - ( + col0 ) ) DIV - 66 + col1 AS col0 FROM tab1 AS cor0
----
10
12
26

skipif mysql # not compatible
query I rowsort label-905
SELECT DISTINCT - ( - ( + col0 ) ) / - 66 + col1 AS col0 FROM tab1 AS cor0
----
10
12
26

query I rowsort
SELECT - ( - col0 ) + - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + tab0.col2 * + col1 AS col2 FROM tab0
----
2838
7462
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-909
SELECT + ( 81 ) DIV + col2 AS col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-909
SELECT + ( 81 ) / + col2 AS col2 FROM tab1 AS cor0
----
0
1
1

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

query I rowsort
SELECT 41 + + col2 AS col0 FROM tab0
----
123
42
74

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

query I rowsort
SELECT DISTINCT + 22 + - col0 AS col2 FROM tab0 AS cor0
----
-13
-2
-67

query I rowsort
SELECT ALL - + 21 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-1134
-1197
-2016

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-915
SELECT DISTINCT 17 * 48 + - col0 * CAST( NULL AS DECIMAL ) AS col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-915
SELECT DISTINCT 17 * 48 + - col0 * CAST ( NULL AS REAL ) AS col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL - 25 + col1 * - cor0.col2 FROM tab2 AS cor0
----
-1559
-671
-862

query I rowsort
SELECT ALL - 33 * col0 * col0 + col1 FROM tab0 AS cor0
----
-18922
-261302
-40328

query I rowsort
SELECT ALL 95 * - 67 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to a5a3572b7da66073533525e64610ba3d

query I rowsort
SELECT ALL + + 58 * + cor0.col0 + col0 * col2 * col2 FROM tab0 AS cor0
----
2065
27528
603598

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-921
SELECT - 70 + col0 DIV - cor0.col2 AS col0 FROM tab1 AS cor0
----
-70
-70
-71

skipif mysql # not compatible
query I rowsort label-921
SELECT - 70 + col0 / - cor0.col2 AS col0 FROM tab1 AS cor0
----
-70
-70
-71

query I rowsort
SELECT DISTINCT col1 * + col0 + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - 89 * - col1 + col2 FROM tab1 AS cor0
----
1253
2368
947

query I rowsort
SELECT - ( col0 ) + + ( + col2 ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - ( col0 ) + - col0 - + 75 FROM tab1 AS cor0
----
-203
-235
-81

query I rowsort
SELECT DISTINCT col0 + 72 AS col2 FROM tab1
----
136
152
75

query I rowsort
SELECT DISTINCT + 41 FROM tab2, tab2 cor0
----
41

query I rowsort
SELECT - - col0 + + 14 * col2 * - cor0.col2 FROM tab2 AS cor0
----
-10199
-20137
-9386

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

query I rowsort
SELECT col2 + - ( col2 ) * + col2 AS col0 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT tab2.col1 + + col0 * ( + col0 ) FROM tab2
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-932
SELECT DISTINCT + col1 * 87 DIV col1 AS col1 FROM tab2 AS cor0
----
87

skipif mysql # not compatible
query I rowsort label-932
SELECT DISTINCT + col1 * 87 / col1 AS col1 FROM tab2 AS cor0
----
87

query I rowsort
SELECT - cor0.col0 + 50 FROM tab1 cor0
----
-14
-30
47

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-935
SELECT ALL col0 * - cor0.col1 + cor0.col2 DIV + col1 + 23 AS col0 FROM tab2 AS cor0
----
-1318
-194
-4579

skipif mysql # not compatible
query I rowsort label-935
SELECT ALL col0 * - cor0.col1 + cor0.col2 / + col1 + 23 AS col0 FROM tab2 AS cor0
----
-1318
-194
-4579

query I rowsort
SELECT + + ( - col0 ) + col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + col2 * ( col1 ) + 31 AS col1 FROM tab0 AS cor0
----
128
2869
7493

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

query I rowsort
SELECT DISTINCT - ( 2 ) - + col1 AS col1 FROM tab0 AS cor0
----
-88
-93
-99

query I rowsort
SELECT DISTINCT - + col0 * - 53 FROM tab2 AS cor0
----
371
4134
4187

query I rowsort
SELECT ALL + - ( 31 ) AS col1 FROM tab1 AS cor0
----
-31
-31
-31

query I rowsort
SELECT + - ( + 77 ) * cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
-1824
-2660
-6764

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-943
SELECT DISTINCT - - CAST ( col0 AS INTEGER ) + + col1 + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 32 + + col0 * + col1 FROM tab1 AS cor0
----
1072
110
672

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 * cor0.col0 FROM tab0 AS cor0
----
2040
3360
8010

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

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

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

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

query I rowsort
SELECT ALL + 31 + col1 FROM tab2 AS cor0
----
48
62
90

query I rowsort
SELECT - 16 + - col0 * + cor0.col1 FROM tab0 cor0
----
-2080
-3411
-8115

query I rowsort
SELECT ALL - col2 * + cor0.col0 + - col1 * col1 AS col2 FROM tab0 AS cor0
----
-15579
-8188
-9444

query I rowsort
SELECT ALL + col2 + ( + tab0.col0 ) + + col0 FROM tab0
----
260
71
81

query I rowsort
SELECT DISTINCT - 46 * 81 AS col0 FROM tab0 AS cor0
----
-3726

onlyif mysql # use DIV operator for integer division
query I rowsort label-953
SELECT + col0 DIV col0 + col2 * CAST( + col1 AS SIGNED ) DIV col1 + 88 * col2 AS col1 FROM tab1 AS cor0
----
4807
5074
8545

skipif mysql # not compatible
query I rowsort label-953
SELECT + col0 / col0 + col2 * CAST ( + col1 AS INTEGER ) / col1 + 88 * col2 AS col1 FROM tab1 AS cor0
----
4807
5074
8545

query I rowsort
SELECT ALL + + col2 + ( col2 ) FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - col0 * + 47 FROM tab0
----
-1128
-1645
-4183

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-959
SELECT ALL - tab2.col0 DIV + 44 AS col2 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-959
SELECT ALL - tab2.col0 / + 44 AS col2 FROM tab2
----
-1
-1
0

query I rowsort
SELECT ALL + 59 FROM tab2, tab1 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-962
SELECT DISTINCT CAST( - col1 AS SIGNED ) DIV col1 + + ( col2 ) FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-962
SELECT DISTINCT CAST ( - col1 AS INTEGER ) / col1 + + ( col2 ) FROM tab0
----
0
32
81

query I rowsort
SELECT DISTINCT 65 + tab2.col2 FROM tab2
----
103
91
92

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

query I rowsort
SELECT + cor0.col2 + - ( - col2 ) FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL col0 * - col2 + col0 + + 70 * - col1 * col2 FROM tab1 AS cor0
----
-43484
-94960
-98439

query I rowsort
SELECT DISTINCT col2 + - col0 * col2 AS col1 FROM tab0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 + - col2 col0 FROM tab0
----
-164
-2
-66

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

query I rowsort
SELECT ALL + col1 * col1 + - cor0.col0 * ( - col1 ) FROM tab1 AS cor0
----
1209
740
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-971
SELECT ALL - 73 + - col0 DIV col1 FROM tab2 AS cor0
----
-73
-74
-77

skipif mysql # not compatible
query I rowsort label-971
SELECT ALL - 73 + - col0 / col1 FROM tab2 AS cor0
----
-73
-74
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-972
SELECT + cor0.col1 * col2 + CAST( col0 AS SIGNED ) * col0 FROM tab2 cor0
----
6887
7618
886

skipif mysql # not compatible
query I rowsort label-972
SELECT + cor0.col1 * col2 + CAST ( col0 AS INTEGER ) * col0 FROM tab2 cor0
----
6887
7618
886

query I rowsort
SELECT ALL + - col1 + cor0.col0 * cor0.col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT - + 38 * col2 FROM tab1 cor0
----
-2052
-2166
-3648

query I rowsort
SELECT DISTINCT + 75 + col0 AS col0 FROM tab0 cor0
----
110
164
99

query I rowsort
SELECT ALL ( - col0 ) + col1 + - col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + - 31 + col1 FROM tab2 cor0
----
-14
0
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-978
SELECT ALL - 78 * col2 * + col2 + col2 DIV - col1 FROM tab1 AS cor0
----
-227450
-253427
-718855

skipif mysql # not compatible
query I rowsort label-978
SELECT ALL - 78 * col2 * + col2 + col2 / - col1 FROM tab1 AS cor0
----
-227450
-253427
-718855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 * cor0.col1 col2 FROM tab0 AS cor0
----
774
819
873

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

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

query I rowsort
SELECT - 38 AS col0 FROM tab1 AS cor0
----
-38
-38
-38

query I rowsort
SELECT + - cor0.col2 * + cor0.col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT + col0 + - 15 AS col1 FROM tab0 cor0
----
20
74
9

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-985
SELECT ALL + + col0 + + ( - col2 ) DIV col2 FROM tab0 cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-985
SELECT ALL + + col0 + + ( - col2 ) / col2 FROM tab0 cor0
----
23
34
88

query I rowsort
SELECT ALL + cor0.col0 * col0 - col0 * + col2 FROM tab2 AS cor0
----
-140
3239
4056

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

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

query I rowsort
SELECT - cor0.col2 * col0 + col1 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL 30 * col1 FROM tab0 AS cor0
----
2580
2730
2910

onlyif mysql # use DIV operator for integer division
query I rowsort label-990
SELECT DISTINCT + col0 * 90 DIV - col0 AS col0 FROM tab0 AS cor0
----
-90

skipif mysql # not compatible
query I rowsort label-990
SELECT DISTINCT + col0 * 90 / - col0 AS col0 FROM tab0 AS cor0
----
-90

query I rowsort
SELECT - col2 * 75 FROM tab1 AS cor0
----
-4050
-4275
-7200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col0 ) * col2 col1 FROM tab0 AS cor0
----
-35
-7298
-792

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

query I rowsort
SELECT + 36 * - col1 FROM tab1 AS cor0
----
-360
-468
-936

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

query I rowsort
SELECT - 66 * - col1 FROM tab2 AS cor0
----
1122
2046
3894

query I rowsort
SELECT ALL + - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-998
SELECT + ( tab0.col2 ) DIV 45 FROM tab0, tab1 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-998
SELECT + ( tab0.col2 ) / 45 FROM tab0, tab1 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

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

query I rowsort
SELECT ALL - + cor0.col0 * 22 FROM tab2 AS cor0
----
-154
-1716
-1738

onlyif mysql # use DIV operator for integer division
query I rowsort label-1001
SELECT ALL - - ( - col2 ) * col0 + + ( col1 + - col0 ) DIV col1 FROM tab2 AS cor0
----
-189
-2028
-3005

skipif mysql # not compatible
query I rowsort label-1001
SELECT ALL - - ( - col2 ) * col0 + + ( col1 + - col0 ) / col1 FROM tab2 AS cor0
----
-189
-2028
-3005

query I rowsort
SELECT DISTINCT - - 56 + 48 AS col1 FROM tab2 AS cor0
----
104

onlyif mysql # use DIV operator for integer division
query I rowsort label-1003
SELECT ALL - col1 DIV 35 + + col0 FROM tab0 AS cor0
----
22
33
87

skipif mysql # not compatible
query I rowsort label-1003
SELECT ALL - col1 / 35 + + col0 FROM tab0 AS cor0
----
22
33
87

query I rowsort
SELECT ALL - - 66 + - col0 FROM tab2 AS cor0
----
-12
-13
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1005
SELECT ALL - CAST( col0 AS SIGNED ) AS col1 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1005
SELECT ALL - CAST ( col0 AS INTEGER ) AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT col0 * 90 * - col1 AS col0 FROM tab2 AS cor0
----
-120870
-19530
-414180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1007
SELECT ALL col0 * + 72 + col2 * CAST( - ( - col1 ) * col1 AS SIGNED ) FROM tab2 AS cor0
----
16670
26451
96122

skipif mysql # not compatible
query I rowsort label-1007
SELECT ALL col0 * + 72 + col2 * CAST ( - ( - col1 ) * col1 AS INTEGER ) FROM tab2 AS cor0
----
16670
26451
96122

query I rowsort
SELECT ALL col1 + + col1 * col1 * col0 AS col0 FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT ALL + col2 * 21 AS col0 FROM tab0
----
1722
21
693

query I rowsort
SELECT col2 - - ( col2 ) AS col2 FROM tab0
----
164
2
66

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( col0 AS REAL ) AS col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1012
SELECT ALL 55 DIV 52 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-1012
SELECT ALL 55 / 52 col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + 39 + - col1 AS col1 FROM tab1 AS cor0
----
13
26
29

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 32 + 89 * col2 col2 FROM tab2 AS cor0
----
2346
2435
3414

query I rowsort
SELECT + 75 * cor0.col1 FROM tab2 AS cor0
----
1275
2325
4425

query I rowsort
SELECT + 86 + - col2 AS col0 FROM tab1 cor0
----
-10
29
32

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col1 col2 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT - 5 + - col0 AS col0 FROM tab0 AS cor0
----
-29
-40
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 * - col2 col1 FROM tab2 cor0
----
-2470
-2565
-3610

query I rowsort
SELECT + 57 + - col0 * + cor0.col1 FROM tab0 AS cor0
----
-2007
-3338
-8042

query I rowsort
SELECT DISTINCT - ( - col0 ) * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

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

query I rowsort
SELECT ALL 81 * - col1 FROM tab0 AS cor0
----
-6966
-7371
-7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-1027
SELECT - 15 * - cor0.col2 + col1 DIV col0 + + cor0.col2 FROM tab0 AS cor0
----
1313
18
531

skipif mysql # not compatible
query I rowsort label-1027
SELECT - 15 * - cor0.col2 + col1 / col0 + + cor0.col2 FROM tab0 AS cor0
----
1313
18
531

query I rowsort
SELECT + - col0 * col2 + 97 AS col0 FROM tab1 cor0
----
-3551
-65
-7583

query I rowsort
SELECT ALL - col1 * + 10 * col2 + + col1 AS col0 FROM tab0 cor0
----
-28294
-74529
-873

onlyif mysql # use DIV operator for integer division
query I rowsort label-1030
SELECT DISTINCT + col2 + + col2 + cor0.col2 DIV col1 FROM tab0 cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-1030
SELECT DISTINCT + col2 + + col2 + cor0.col2 / col1 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL cor0.col1 - - ( col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT col0 * - 98 AS col2 FROM tab0 AS cor0
----
-2352
-3430
-8722

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

query I rowsort
SELECT ALL - col2 * 76 FROM tab0 cor0
----
-2508
-6232
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * ( cor0.col2 ) col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 * 30 FROM tab2 AS cor0
----
-138060
-40290
-6510

query I rowsort
SELECT col0 + - 12 * col0 FROM tab0 AS cor0
----
-264
-385
-979

query I rowsort
SELECT ALL - - col1 * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

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

skipif mysql # not compatible
query I rowsort label-1039
SELECT DISTINCT cor0.col0 * 4 / + cor0.col0 AS col1 FROM tab0 cor0
----
4

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 * - col2 AS col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT - col2 * + col1 + tab0.col2 AS col1 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL + col1 + - col2 * + 75 + col1 * - col0 AS col2 FROM tab0
----
-14158
-3373
-4453

query I rowsort
SELECT tab2.col2 * + col2 * + 92 FROM tab2
----
132848
62192
67068

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

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

query I rowsort
SELECT ALL cor0.col0 * col2 * col0 + + col2 + + col0 FROM tab1 AS cor0
----
233593
543
614576

query I rowsort
SELECT + 68 + - cor0.col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to bd833cb83aff83b6bea76593b9c77261

query I rowsort
SELECT DISTINCT 95 AS col1 FROM tab0, tab0 cor0 CROSS JOIN tab2
----
95

query I rowsort
SELECT DISTINCT - col2 - 19 AS col1 FROM tab1
----
-115
-73
-76

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

query I rowsort
SELECT col1 * col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
205379
29791
4913

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1052
SELECT DISTINCT + cor0.col2 + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-1052
SELECT DISTINCT + cor0.col2 + CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
NULL

query I rowsort
SELECT + col0 + + col0 * + 34 FROM tab0
----
1225
3115
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-1054
SELECT DISTINCT col1 + col1 + + col2 DIV col1 FROM tab1
----
25
33
54

skipif mysql # not compatible
query I rowsort label-1054
SELECT DISTINCT col1 + col1 + + col2 / col1 FROM tab1
----
25
33
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col2 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + - 20 + col1 FROM tab0 cor0
----
66
71
77

query I rowsort
SELECT - col1 * col1 - + col0 FROM tab1 cor0
----
-164
-249
-679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * tab0.col2 + col2 col0 FROM tab0
----
1122
2
6806

query I rowsort
SELECT DISTINCT col1 * col1 + + ( + col0 ) AS col2 FROM tab2
----
3559
368
968

query I rowsort
SELECT DISTINCT - + 57 + col2 FROM tab2 cor0
----
-19
-30
-31

query I rowsort
SELECT ALL - col0 + + col1 * - 35 FROM tab0 AS cor0
----
-3034
-3274
-3430

onlyif mysql # use DIV operator for integer division
query I rowsort label-1062
SELECT DISTINCT + + ( - col1 ) DIV ( - col1 ) FROM tab2 cor0
----
1

skipif mysql # not compatible
query I rowsort label-1062
SELECT DISTINCT + + ( - col1 ) / ( - col1 ) FROM tab2 cor0
----
1

query I rowsort
SELECT - 11 * + col2 * - ( cor0.col2 ) + col1 AS col1 FROM tab1 cor0
----
101389
32102
35749

query I rowsort
SELECT ( col0 ) * col0 - cor0.col1 * col1 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT ALL - 4 * - col2 AS col0 FROM tab2 AS cor0
----
104
108
152

query I rowsort
SELECT ALL col0 * + ( - col1 ) + + 58 AS col0 FROM tab0 cor0
----
-2006
-3337
-8041

query I rowsort
SELECT DISTINCT + 4 - - cor0.col1 AS col2 FROM tab2 cor0
----
21
35
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-1068
SELECT DISTINCT col2 DIV - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-5
-69
-87

skipif mysql # not compatible
query I rowsort label-1068
SELECT DISTINCT col2 / - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-5
-69
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-1069
SELECT DISTINCT + col2 - col2 DIV - col1 AS col0 FROM tab1 AS cor0
----
103
56
62

skipif mysql # not compatible
query I rowsort label-1069
SELECT DISTINCT + col2 - col2 / - col1 AS col0 FROM tab1 AS cor0
----
103
56
62

query I rowsort
SELECT - 95 + 10 * - cor0.col2 FROM tab1 cor0
----
-1055
-635
-665

query I rowsort
SELECT - 61 + - col0 * - cor0.col1 FROM tab2 AS cor0
----
1282
156
4541

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

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

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

query I rowsort
SELECT 86 + - col0 AS col2 FROM tab1 AS cor0
----
22
6
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1075
SELECT ALL + 8 DIV + col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1075
SELECT ALL + 8 / + col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1076
SELECT + 86 DIV - col2 + col2 DIV - 40 FROM tab1 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-1076
SELECT + 86 / - col2 + col2 / - 40 FROM tab1 AS cor0
----
-2
-2
-2

query I rowsort
SELECT col1 * 4 FROM tab1 cor0
----
104
40
52

query I rowsort
SELECT + ( - col0 ) * - col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - col2 * - col1 + 54 FROM tab1 cor0
----
1302
1458
624

query I rowsort
SELECT 25 + - col1 FROM tab2 AS cor0
----
-34
-6
8

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1083
SELECT - + col1 * - CAST( 15 AS SIGNED ) FROM tab0 AS cor0
----
1290
1365
1455

skipif mysql # not compatible
query I rowsort label-1083
SELECT - + col1 * - CAST ( 15 AS INTEGER ) FROM tab0 AS cor0
----
1290
1365
1455

onlyif mysql # use DIV operator for integer division
query I rowsort label-1084
SELECT ALL + - col0 DIV - col2 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-1084
SELECT ALL + - col0 / - col2 col1 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1085
SELECT ALL - col0 DIV - ( cor0.col0 ) + cor0.col0 DIV 21 - - 35 DIV col0 AS col2 FROM tab1 AS cor0
----
12
4
4

skipif mysql # not compatible
query I rowsort label-1085
SELECT ALL - col0 / - ( cor0.col0 ) + cor0.col0 / 21 - - 35 / col0 AS col2 FROM tab1 AS cor0
----
12
4
4

query I rowsort
SELECT DISTINCT col1 + 37 FROM tab1 AS cor0
----
47
50
63

query I rowsort
SELECT ALL col0 + - 44 FROM tab1
----
-41
20
36

query I rowsort
SELECT + col2 * - ( - col1 ) + + col2 FROM tab0
----
2871
7544
98

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 75 + + col0 col0 FROM tab2 AS cor0
----
-68
3
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1091
SELECT col0 DIV ( - col1 ) FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-1091
SELECT col0 / ( - col1 ) FROM tab1
----
-6
-6
0

query I rowsort
SELECT ALL + col2 + + 6 * + 47 AS col1 FROM tab1 AS cor0
----
336
339
378

query I rowsort
SELECT DISTINCT - col0 + - cor0.col0 * - col2 + cor0.col2 * - 75 FROM tab1 cor0
----
-3891
-691
400

query I rowsort
SELECT DISTINCT - tab2.col1 * col1 + + 17 + + col0 AS col2 FROM tab2
----
-193
-3386
-937

query I rowsort
SELECT + col2 * + 78 AS col1 FROM tab1
----
4212
4446
7488

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

query I rowsort
SELECT + + col1 * 96 * col2 AS col0 FROM tab2 AS cor0
----
147264
62016
80352

query I rowsort
SELECT DISTINCT - ( + 80 ) * col2 FROM tab1 AS cor0
----
-4320
-4560
-7680

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

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

query I rowsort
SELECT + 32 * col2 AS col1 FROM tab0 AS cor0
----
1056
2624
32

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

query I rowsort
SELECT 29 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT ALL ( col0 ) * col2 AS col2 FROM tab1
----
162
3648
7680

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

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

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

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

query I rowsort
SELECT + col0 + - 31 * - col1 AS col1 FROM tab0 cor0
----
2690
2910
3042

query I rowsort
SELECT col1 * - col1 + + tab0.col0 + + col0 FROM tab0
----
-7348
-8103
-9339

onlyif mysql # use DIV operator for integer division
query I rowsort label-1108
SELECT 65 DIV col0 + col1 FROM tab0
----
88
91
98

skipif mysql # not compatible
query I rowsort label-1108
SELECT 65 / col0 + col1 FROM tab0
----
88
91
98

query I rowsort
SELECT - - col1 + 16 FROM tab1 AS cor0
----
26
29
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-1110
SELECT ALL + 87 DIV - col2 AS col0 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1110
SELECT ALL + 87 / - col2 AS col0 FROM tab1
----
-1
-1
0

query I rowsort
SELECT + 82 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
246
5248
6560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + 91 col1 FROM tab1
----
273
5824
7280

query I rowsort
SELECT DISTINCT col0 + - 78 * col0 FROM tab0 AS cor0
----
-1848
-2695
-6853

query I rowsort
SELECT - + col0 + + ( col1 ) AS col1 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col1 col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - 27 - col2 AS col0 FROM tab2
----
-53
-54
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-1117
SELECT ALL + col2 DIV tab0.col0 col2 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1117
SELECT ALL + col2 / tab0.col0 col2 FROM tab0
----
0
0
1

query I rowsort
SELECT 90 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

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

skipif mysql # not compatible
query I rowsort label-1119
SELECT DISTINCT + col2 / - col0 + col0 * col1 AS col2 FROM tab0
----
2063
3395
8099

query I rowsort
SELECT DISTINCT 76 + + col1 FROM tab2
----
107
135
93

query I rowsort
SELECT tab2.col2 + col1 + 96 AS col1 FROM tab2
----
151
154
181

onlyif mysql # use DIV operator for integer division
query I rowsort label-1122
SELECT 58 DIV col1 + - col0 AS col0 FROM tab2
----
-6
-76
-78

skipif mysql # not compatible
query I rowsort label-1122
SELECT 58 / col1 + - col0 AS col0 FROM tab2
----
-6
-76
-78

query I rowsort
SELECT - col0 * ( col2 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

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

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

query I rowsort
SELECT ALL - col0 * - 25 AS col1 FROM tab1 cor0
----
1600
2000
75

query I rowsort
SELECT DISTINCT - 95 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-95

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

query I rowsort
SELECT - - col1 + 74 FROM tab2 AS cor0
----
105
133
91

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 - - col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-1130
SELECT DISTINCT - + cor0.col0 * 55 + col2 DIV + col1 AS col0 FROM tab2 cor0
----
-385
-4290
-4343

skipif mysql # not compatible
query I rowsort label-1130
SELECT DISTINCT - + cor0.col0 * 55 + col2 / + col1 AS col0 FROM tab2 cor0
----
-385
-4290
-4343

query I rowsort
SELECT col2 * + 9 + - col1 AS col2 FROM tab1 cor0
----
460
503
851

query I rowsort
SELECT DISTINCT + - col0 * - col2 * col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-1133
SELECT ALL - col0 DIV - col0 + - col1 + col0 * + col1 * + col0 FROM tab2 AS cor0
----
106081
1489
358898

skipif mysql # not compatible
query I rowsort label-1133
SELECT ALL - col0 / - col0 + - col1 + col0 * + col1 * + col0 FROM tab2 AS cor0
----
106081
1489
358898

query I rowsort
SELECT ALL col0 * 83 + - 31 FROM tab2 AS cor0
----
550
6443
6526

query I rowsort
SELECT ALL col2 * + 23 + + col2 AS col0 FROM tab2 AS cor0
----
624
648
912

query I rowsort
SELECT DISTINCT col1 * + ( col1 ) FROM tab2 AS cor0
----
289
3481
961

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

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

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

skipif mysql # not compatible
query I rowsort label-1138
SELECT DISTINCT - + col2 / + col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL - col0 * - col0 + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL col1 + - ( + 2 * - col1 ) FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT col1 * col2 FROM tab1 WHERE - col1 - col1 IN ( col2 )
----

query I rowsort
SELECT DISTINCT col1 + - col2 + col0 FROM tab1
----
-25
-3
17

query I rowsort
SELECT DISTINCT col2 * col2 + - col0 * tab0.col2 + col1 * - col1 FROM tab0
----
-7099
-8855
-9443

onlyif mysql # use DIV operator for integer division
query I rowsort label-1144
SELECT col0 * col1 DIV col1 + col0 AS col2 FROM tab2
----
14
156
158

skipif mysql # not compatible
query I rowsort label-1144
SELECT col0 * col1 / col1 + col0 AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT col1 * - col1 * + col0 AS col1 FROM tab1
----
-13520
-2028
-6400

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1147
SELECT ALL col0 DIV - col2 + - col0 + + col2 * col0 FROM tab1
----
159
3583
7600

skipif mysql # not compatible
query I rowsort label-1147
SELECT ALL col0 / - col2 + - col0 + + col2 * col0 FROM tab1
----
159
3583
7600

query I rowsort
SELECT col1 * - col0 AS col1 FROM tab0 WHERE NULL >= ( col0 )
----

query I rowsort
SELECT col2 * tab2.col1 * - col2 AS col2 FROM tab2
----
-22599
-24548
-39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 + col2 col0 FROM tab0
----
-34
-7216
-759

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 ALL - col2 + + col1 + + col2 * col2 * + col2 FROM tab1
----
157436
185146
884653

onlyif mysql # use DIV operator for integer division
query I rowsort label-1153
SELECT DISTINCT tab1.col1 DIV col0 + - tab1.col1 DIV + col0 + col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1153
SELECT DISTINCT tab1.col1 / col0 + - tab1.col1 / + col0 + col1 FROM tab1
----
10
13
26

query III rowsort
SELECT * FROM tab2 WHERE col0 - + col0 < col2 * col0 * + col0
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT * FROM tab1 WHERE - col0 * + col0 + - col1 NOT IN ( - col1 / col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col2 * + col2 - col1 col1 FROM tab2
----
-1423
-709
-733

query I rowsort
SELECT ALL - 27 + col0 AS col1 FROM tab2 AS cor0
----
-20
51
52

query I rowsort
SELECT DISTINCT - col2 * col2 + col2 * col0 AS col1 FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT cor0.col1 * - col2 + 37 FROM tab0 AS cor0
----
-2801
-60
-7425

query I rowsort
SELECT + 29 + + col1 * - 2 AS col2 FROM tab1 AS cor0
----
-23
3
9

query I rowsort
SELECT + 98 + - col0 FROM tab1 AS cor0
----
18
34
95

query I rowsort
SELECT ALL 83 * col2 AS col0 FROM tab1 cor0
----
4482
4731
7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-1163
SELECT - col1 DIV tab2.col0 + - col0 FROM tab2
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-1163
SELECT - col1 / tab2.col0 + - col0 FROM tab2
----
-11
-78
-79

query I rowsort
SELECT + tab2.col0 * col1 + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT ( col1 ) * cor0.col0 * col0 AS col1 FROM tab0 cor0
----
118825
49536
720811

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

query I rowsort
SELECT + + col1 * col1 * + cor0.col2 + + col1 AS col0 FROM tab2 AS cor0
----
10999
25978
90565

onlyif mysql # use DIV operator for integer division
query I rowsort label-1168
SELECT - col1 * col2 DIV + ( col1 ) + cor0.col2 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-1168
SELECT - col1 * col2 / + ( col1 ) + cor0.col2 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 93 + col2 AS col1 FROM tab2 AS cor0
----
119
120
131

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 ALL + + ( col2 ) - 57 AS col1 FROM tab1 AS cor0
----
-3
0
39

query I rowsort
SELECT - ( - col1 ) + col1 * - col1 FROM tab2 cor0
----
-272
-3422
-930

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

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

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

skipif mysql # not compatible
query I rowsort label-1175
SELECT col1 + - col0 / 95 FROM tab0 AS cor0
----
86
91
97

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col1 * - 86 col1 FROM tab0 AS cor0
----
244068
641732
8342

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

query I rowsort
SELECT ALL col2 * col0 + 67 AS col0 FROM tab1
----
229
3715
7747

query I rowsort
SELECT + col2 + + col1 + + ( + col2 ) * + col1 FROM tab0
----
195
2957
7635

query I rowsort
SELECT 89 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT - col1 + - col0 + 91 FROM tab1
----
-2
17
62

query I rowsort
SELECT ALL - 35 + col2 AS col1 FROM tab0
----
-2
-34
47

query I rowsort
SELECT DISTINCT - 68 + - col1 * + col2 FROM tab2 AS cor0
----
-1602
-714
-905

query I rowsort
SELECT ALL - 62 * - 20 AS col0 FROM tab2 AS cor0
----
1240
1240
1240

query I rowsort
SELECT DISTINCT - col1 * + col0 + + cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

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

query I rowsort
SELECT ALL ( 36 ) * + col2 AS col2 FROM tab2
----
1368
936
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-1189
SELECT ALL - col2 DIV col0 - col0 FROM tab0
----
-25
-35
-89

skipif mysql # not compatible
query I rowsort label-1189
SELECT ALL - col2 / col0 - col0 FROM tab0
----
-25
-35
-89

query I rowsort
SELECT ALL + 98 FROM tab2, tab1, tab0 cor0
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

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

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

query I rowsort
SELECT ALL - + 26 + - col0 + + col1 FROM tab0 AS cor0
----
-24
36
36

query I rowsort
SELECT ALL + col0 * + col1 + col0 * - col2 AS col1 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT + + 97 * cor0.col1 FROM tab1 cor0
----
1261
2522
970

query I rowsort
SELECT ALL 66 * - col1 FROM tab1 AS cor0
----
-1716
-660
-858

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

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

query I rowsort
SELECT ALL + + col0 * col2 + - col1 + - col2 FROM tab0 AS cor0
----
-63
673
7125

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1201
SELECT DISTINCT col1 + tab2.col0 DIV col1 AS col0 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-1201
SELECT DISTINCT col1 + tab2.col0 / col1 AS col0 FROM tab2
----
21
31
60

query I rowsort
SELECT col0 * col0 + col2 + col0 FROM tab0
----
1261
633
8092

query I rowsort
SELECT - + col2 * - col0 + - col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL 16 FROM tab0, tab0 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT DISTINCT - 0 + - ( + col1 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - ( - col0 ) * col1 * cor0.col1 + col1 * col1 FROM tab0 AS cor0
----
184900
338724
745290

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1207
SELECT CAST( + 29 + col2 AS SIGNED ) FROM tab0
----
111
30
62

skipif mysql # not compatible
query I rowsort label-1207
SELECT CAST ( + 29 + col2 AS INTEGER ) FROM tab0
----
111
30
62

query I rowsort
SELECT 98 * col1 FROM tab1 AS cor0
----
1274
2548
980

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * - 53 col0 FROM tab2 AS cor0
----
-371
-4134
-4187

query I rowsort
SELECT ALL - 76 * tab1.col2 FROM tab1
----
-4104
-4332
-7296

query I rowsort
SELECT DISTINCT col0 * cor0.col0 * col1 + + col1 - col0 * cor0.col1 * + col2 FROM tab2 AS cor0 WHERE NULL = + col0 + + col1 - col2
----

query I rowsort
SELECT ALL tab0.col2 AS col0 FROM tab2 cor0 CROSS JOIN tab0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query III rowsort
SELECT * FROM tab2 WHERE + col0 IN ( tab2.col1 )
----

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 WHERE NOT col0 * - col0 < NULL
----

query I rowsort
SELECT ALL col0 + col1 * + col0 * - tab2.col1 FROM tab2
----
-22752
-271440
-6720

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab2 WHERE col1 <> ( NULL )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL > col2 * col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 - + col0 col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT col0 * - col2 + + col1 * + tab0.col2 * - col0 AS col2 FROM tab0
----
-3430
-671416
-68904

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col0 col0 FROM tab1
----
-121
-176
-57

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

query I rowsort
SELECT DISTINCT col1 - tab1.col1 AS col1 FROM tab1
----
0

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( col2 / - col1 ) > - col1
----

query I rowsort
SELECT - + col2 * col2 + + col0 * + col0 FROM tab2 cor0
----
-680
4797
5408

onlyif mysql # use DIV operator for integer division
query I rowsort label-1226
SELECT + col1 * col0 DIV col0 AS col2 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1226
SELECT + col1 * col0 / col0 AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT - - col0 * cor0.col0 * - col0 FROM tab1 AS cor0
----
-262144
-27
-512000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * col2 + col2 + - col2 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col1 + col2 * col2 AS col2 FROM tab0 AS cor0
----
1175
6815
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1230
SELECT cor0.col2 DIV + col2 + col1 * col2 * + col2 + col1 AS col2 FROM tab1 AS cor0
----
119822
32501
75843

skipif mysql # not compatible
query I rowsort label-1230
SELECT cor0.col2 / + col2 + col1 * col2 * + col2 + col1 AS col2 FROM tab1 AS cor0
----
119822
32501
75843

query I rowsort
SELECT tab0.col0 * + tab0.col2 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 WHERE col0 = NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT + col0 IN ( - col0 * - tab0.col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

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

query I rowsort
SELECT - col2 * col0 + col0 * col0 * - col0 AS col0 FROM tab1 AS cor0
----
-189
-265792
-519680

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

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

query I rowsort
SELECT - col1 + + col2 * - col0 + - col2 * col0 FROM tab2 AS cor0
----
-409
-4115
-6021

query I rowsort
SELECT + 15 * 79 FROM tab1 cor0
----
1185
1185
1185

query I rowsort
SELECT DISTINCT - 84 * col0 * col0 FROM tab0 cor0
----
-102900
-48384
-665364

onlyif mysql # use DIV operator for integer division
query I rowsort label-1241
SELECT DISTINCT - col2 + + col1 DIV col1 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-1241
SELECT DISTINCT - col2 + + col1 / col1 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT + + col2 * - 6 FROM tab1 AS cor0
----
-324
-342
-576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + 35 ) col0 FROM tab2 AS cor0
----
35

query I rowsort
SELECT + + 50 - + cor0.col0 AS col1 FROM tab1 AS cor0
----
-14
-30
47

query I rowsort
SELECT DISTINCT + col1 * - col2 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL + col0 * + 93 FROM tab1 AS cor0
----
279
5952
7440

onlyif mysql # use DIV operator for integer division
query I rowsort label-1247
SELECT DISTINCT 53 DIV + cor0.col0 + col1 FROM tab1 AS cor0
----
10
13
43

skipif mysql # not compatible
query I rowsort label-1247
SELECT DISTINCT 53 / + cor0.col0 + col1 FROM tab1 AS cor0
----
10
13
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-1248
SELECT - col1 + col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-1248
SELECT - col1 + col2 / + col2 AS col2 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT col0 * + ( tab1.col1 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT + 28 FROM tab2, tab1 cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

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

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

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

skipif mysql # not compatible
query I rowsort label-1252
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col0 FROM tab0
----
NULL

query I rowsort
SELECT ( + col1 ) * + col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT col2 * + 68 - + col1 * - col2 FROM tab2
----
2673
3230
3302

query I rowsort
SELECT ALL ( - col1 ) * + col2 + ( + tab2.col2 ) FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT - col1 * col1 + - col0 FROM tab1
----
-164
-249
-679

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

skipif mysql # not compatible
query I rowsort label-1257
SELECT + col2 + 69 * col1 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col1 FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT DISTINCT + col2 + cor0.col0 * cor0.col1 + - col1 FROM tab2 AS cor0
----
1364
213
4569

query I rowsort
SELECT DISTINCT - col0 * + 13 + + col1 * cor0.col1 + cor0.col2 FROM tab0 AS cor0
----
7117
7206
8955

onlyif mysql # use DIV operator for integer division
query I rowsort label-1261
SELECT cor0.col2 DIV - 53 AS col2 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1261
SELECT cor0.col2 / - 53 AS col2 FROM tab1 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 47 * + col2 col1 FROM tab1
----
-2538
-2679
-4512

onlyif mysql # use DIV operator for integer division
query I rowsort label-1263
SELECT - col0 DIV - 29 FROM tab1
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1263
SELECT - col0 / - 29 FROM tab1
----
0
2
2

query I rowsort
SELECT cor1.col0 * 79 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 74cbabf2e3b3d0becc1b7a0f237217af

query I rowsort
SELECT - + col0 * ( 40 ) FROM tab2 AS cor0
----
-280
-3120
-3160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col1 * col0 col0 FROM tab1 AS cor0
----
13520
2028
6400

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * 81 col0 FROM tab0 AS cor0
----
2673
6642
81

query I rowsort
SELECT + 85 AS col1 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query I rowsort
SELECT DISTINCT tab2.col1 * + 63 FROM tab2
----
1071
1953
3717

query I rowsort
SELECT DISTINCT + col2 + 52 * + ( + cor0.col1 ) FROM tab0 AS cor0
----
4505
4814
5045

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL - ( + col2 ) + - col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1274
SELECT + + col1 DIV col1 + - col2 * - cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
37
7381
826

skipif mysql # not compatible
query I rowsort label-1274
SELECT + + col1 / col1 + - col2 * - cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
37
7381
826

query I rowsort
SELECT DISTINCT + - col1 * 12 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT + cor0.col1 * - 82 * cor0.col1 - 92 FROM tab2 AS cor0
----
-23790
-285534
-78894

query I rowsort
SELECT ALL + - 25 * col1 FROM tab2 cor0
----
-1475
-425
-775

query I rowsort
SELECT 88 * + 27 * - col2 FROM tab0 cor0
----
-194832
-2376
-78408

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

query I rowsort
SELECT ( + col2 ) + + cor0.col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1281
SELECT DISTINCT - 98 * col2 + col0 DIV 44 col0 FROM tab0 AS cor0
----
-3234
-8034
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1281
SELECT DISTINCT - 98 * col2 + col0 / 44 col0 FROM tab0 AS cor0
----
-3234
-8034
-98

query I rowsort
SELECT DISTINCT 38 + col0 AS col2 FROM tab0 AS cor0
----
127
62
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1283
SELECT - cor0.col0 * + col2 - col0 * + CAST( col2 * + col0 AS SIGNED ) col2 FROM tab2 AS cor0
----
-1512
-160212
-240160

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1283
SELECT - cor0.col0 * + col2 - col0 * + CAST ( col2 * + col0 AS INTEGER ) col2 FROM tab2 AS cor0
----
-1512
-160212
-240160

query I rowsort
SELECT col0 * + col2 + + col2 AS col2 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT ALL + ( col0 ) * - col2 + col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT - 68 + col0 AS col0 FROM tab2 AS cor0
----
-61
10
11

query I rowsort
SELECT DISTINCT + cor0.col2 * - col0 + - 95 * - cor0.col1 + + col0 FROM tab1 AS cor0
----
-2634
-6365
2311

query I rowsort
SELECT ALL - - 49 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

onlyif mysql # use DIV operator for integer division
query I rowsort label-1289
SELECT ALL col0 DIV col1 col0 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1289
SELECT ALL col0 / col1 col0 FROM tab1 AS cor0
----
0
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1290
SELECT - col0 * + col0 + - col1 DIV + cor0.col2 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-1290
SELECT - col0 * + col0 + - col1 / + cor0.col2 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col1 * + col0 - 2 FROM tab0 AS cor0
----
-2066
-3397
-8101

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

query I rowsort
SELECT + - 49 * col0 FROM tab2 AS cor0
----
-343
-3822
-3871

query I rowsort
SELECT DISTINCT - 99 * cor0.col2 * - ( + col1 * - col2 ) + col2 * col0 AS col2 FROM tab1 AS cor0
----
-11853312
-3212862
-7505622

onlyif mysql # use DIV operator for integer division
query I rowsort label-1295
SELECT DISTINCT 74 DIV col0 AS col1 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1295
SELECT DISTINCT 74 / col0 AS col1 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT DISTINCT - 3 * col0 FROM tab2 AS cor0
----
-21
-234
-237

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

query I rowsort
SELECT 24 * 78 FROM tab2, tab2 AS cor0
----
9 values hashing to 35658b677fad6dc88f95b662dff098da

onlyif mysql # use DIV operator for integer division
query I rowsort label-1299
SELECT ALL - cor0.col1 DIV 93 - col1 FROM tab0 AS cor0
----
-86
-91
-98

skipif mysql # not compatible
query I rowsort label-1299
SELECT ALL - cor0.col1 / 93 - col1 FROM tab0 AS cor0
----
-86
-91
-98

query I rowsort
SELECT + + col2 * - 55 * + col1 FROM tab2 AS cor0
----
-35530
-46035
-84370

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

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

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

query I rowsort
SELECT ALL + col2 * - col2 + + col1 + - col2 * + 13 * - col1 FROM tab2 AS cor0
----
10183
19325
6971

query I rowsort
SELECT 93 + - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2ac7e30f7797373bc416b67d4ef0cd00

query I rowsort
SELECT + 64 * - col2 FROM tab2 AS cor0
----
-1664
-1728
-2432

query I rowsort
SELECT - col0 + + col0 * col0 * col0 AS col1 FROM tab2 AS cor0
----
336
474474
492960

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1309
SELECT ALL 1 DIV col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1309
SELECT ALL 1 / col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - 1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT ALL ( 16 ) * + col2 AS col0 FROM tab0
----
1312
16
528

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-1313
SELECT + tab1.col2 * col1 DIV - col0 + + 71 * col0 AS col0 FROM tab1
----
-255
4536
5665

skipif mysql # not compatible
query I rowsort label-1313
SELECT + tab1.col2 * col1 / - col0 + + 71 * col0 AS col0 FROM tab1
----
-255
4536
5665

query I rowsort
SELECT DISTINCT 37 FROM tab0, tab0 cor0
----
37

query I rowsort
SELECT DISTINCT - 38 * col0 FROM tab0
----
-1330
-3382
-912

query I rowsort
SELECT + col1 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

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

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

query I rowsort
SELECT - - col2 * + col2 + + col0 FROM tab0 AS cor0
----
1113
36
6813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1320
SELECT DISTINCT + + col2 + - CAST( - 88 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
114
115
126

skipif mysql # not compatible
query I rowsort label-1320
SELECT DISTINCT + + col2 + - CAST ( - 88 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
114
115
126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col0 * - col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

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

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

query I rowsort
SELECT DISTINCT - 41 AS col1 FROM tab1, tab0 cor0
----
-41

onlyif mysql # use DIV operator for integer division
query I rowsort label-1325
SELECT + col0 + + cor0.col0 * col0 DIV + cor0.col2 FROM tab0 AS cor0
----
1260
185
41

skipif mysql # not compatible
query I rowsort label-1325
SELECT + col0 + + cor0.col0 * col0 / + cor0.col2 FROM tab0 AS cor0
----
1260
185
41

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

query I rowsort
SELECT ALL + 6 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 44f233d1b3804e00d9436c0a41d1e2c8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1328
SELECT - 34 DIV - 5 FROM tab2 AS cor0
----
6
6
6

skipif mysql # not compatible
query I rowsort label-1328
SELECT - 34 / - 5 FROM tab2 AS cor0
----
6
6
6

query I rowsort
SELECT ALL 23 + + col1 FROM tab2
----
40
54
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1330
SELECT - CAST( + 73 AS SIGNED ) + + col0 FROM tab2 AS cor0
----
-66
5
6

skipif mysql # not compatible
query I rowsort label-1330
SELECT - CAST ( + 73 AS INTEGER ) + + col0 FROM tab2 AS cor0
----
-66
5
6

query I rowsort
SELECT DISTINCT + - col2 + - col1 + 99 FROM tab1 AS cor0
----
-10
19
32

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

query I rowsort
SELECT ALL + 35 + - col0 AS col1 FROM tab2 cor0
----
-43
-44
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-1334
SELECT ALL - col2 + col2 DIV + col1 AS col0 FROM tab2 AS cor0
----
-26
-27
-36

skipif mysql # not compatible
query I rowsort label-1334
SELECT ALL - col2 + col2 / + col1 AS col0 FROM tab2 AS cor0
----
-26
-27
-36

query I rowsort
SELECT - col1 - col2 * + ( col1 + - col2 ) AS col0 FROM tab2 AS cor0
----
-139
-917
781

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

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

query I rowsort
SELECT ALL + 88 + ( + col0 ) AS col1 FROM tab1 AS cor0
----
152
168
91

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1338
SELECT DISTINCT CAST ( NULL AS INTEGER ) / col2 + + cor0.col1 col0 FROM tab0 AS cor0
----
NULL

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

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

query I rowsort
SELECT + ( + 95 ) + col1 * + col1 AS col2 FROM tab0 AS cor0
----
7491
8376
9504

query I rowsort
SELECT - col1 * + col2 + col2 * + col0 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT - - col2 * col1 + + col2 AS col0 FROM tab1 cor0
----
1344
1458
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1344
SELECT - CAST( - ( cor0.col2 ) AS SIGNED ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif mysql # not compatible
query I rowsort label-1344
SELECT - CAST ( - ( cor0.col2 ) AS INTEGER ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL col1 * 78 AS col0 FROM tab2
----
1326
2418
4602

query I rowsort
SELECT ALL + - 29 - col0 FROM tab2 cor0
----
-107
-108
-36

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

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

query I rowsort
SELECT ALL 82 * - col1 AS col1 FROM tab2 cor0
----
-1394
-2542
-4838

query I rowsort
SELECT ALL + 99 + col1 * 63 FROM tab1 AS cor0
----
1737
729
918

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

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

query I rowsort
SELECT - col0 + ( + col2 + col1 ) AS col0 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT ALL - - col0 * ( + col0 ) * col2 - - 30 AS col2 FROM tab2 AS cor0
----
1353
158214
237188

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - tab2.col2 + + col2 - ( col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL col1 * + 77 AS col1 FROM tab0 AS cor0
----
6622
7007
7469

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1357
SELECT DISTINCT - col2 * CAST( - 75 AS SIGNED ) + - col2 FROM tab1 AS cor0
----
3996
4218
7104

skipif mysql # not compatible
query I rowsort label-1357
SELECT DISTINCT - col2 * CAST ( - 75 AS INTEGER ) + - col2 FROM tab1 AS cor0
----
3996
4218
7104

onlyif mysql # use DIV operator for integer division
query I rowsort label-1358
SELECT DISTINCT + col1 * col0 * col0 + - col2 DIV - col1 - cor0.col1 AS col1 FROM tab2 AS cor0
----
106082
1488
358897

skipif mysql # not compatible
query I rowsort label-1358
SELECT DISTINCT + col1 * col0 * col0 + - col2 / - col1 - cor0.col1 AS col1 FROM tab2 AS cor0
----
106082
1488
358897

query I rowsort
SELECT + + col0 + - 13 FROM tab1 AS cor0
----
-10
51
67

query I rowsort
SELECT + + col2 - + ( col0 ) * + col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL tab1.col1 - - col0 * ( - col0 ) FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT + col0 - - col0 FROM tab1
----
128
160
6

query I rowsort
SELECT + col0 * col0 + col1 * - col0 AS col2 FROM tab1
----
-69
3456
5360

query I rowsort
SELECT ALL + 87 * + col0 - col1 FROM tab0
----
2002
2948
7652

query I rowsort
SELECT ALL + cor0.col1 + + col0 * col0 AS col1 FROM tab0 AS cor0
----
1322
662
8012

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

query I rowsort
SELECT DISTINCT - ( + 68 ) AS col1 FROM tab0 AS cor0
----
-68

query I rowsort
SELECT ALL + 1 * - col0 * col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 + - col0 col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL - ( + 86 ) * col0 AS col0 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT + + col2 + - 34 * col2 FROM tab0 AS cor0
----
-1089
-2706
-33

query I rowsort
SELECT col2 * + col1 * 59 AS col2 FROM tab0
----
167442
440258
5723

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

query I rowsort
SELECT - + 71 + + 96 * + col2 AS col1 FROM tab1 cor0
----
5113
5401
9145

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

query I rowsort
SELECT cor0.col2 FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT col0 * - tab0.col0 + - col0 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT + col0 + + col1 * col1 * col0 FROM tab2 AS cor0
----
22910
271596
6734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 26 col2 FROM tab2
----
-26
-26
-26

query I rowsort
SELECT - 44 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT + 69 * 47 + col2 AS col0 FROM tab0
----
3244
3276
3325

query I rowsort
SELECT + 64 + + 73 FROM tab2
----
137
137
137

query I rowsort
SELECT - col0 * col1 + tab1.col0 AS col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT ALL 11 + col2 * - 83 FROM tab0 AS cor0
----
-2728
-6795
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * col1 col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + 67 * - col2 FROM tab2 AS cor0
----
-1742
-1809
-2546

query I rowsort
SELECT ALL - - 35 * col2 FROM tab2 cor0
----
1330
910
945

query I rowsort
SELECT ALL - col0 + col1 * - 19 * 56 FROM tab0 AS cor0
----
-103243
-91528
-96913

onlyif mysql # use DIV operator for integer division
query I rowsort label-1391
SELECT + col2 + + col1 DIV + 16 AS col0 FROM tab1 AS cor0
----
55
57
96

skipif mysql # not compatible
query I rowsort label-1391
SELECT + col2 + + col1 / + 16 AS col0 FROM tab1 AS cor0
----
55
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1392
SELECT DISTINCT - 38 * + col0 + CAST( - col0 AS SIGNED ) * cor0.col2 AS col2 FROM tab0 AS cor0
----
-10680
-1365
-1704

skipif mysql # not compatible
query I rowsort label-1392
SELECT DISTINCT - 38 * + col0 + CAST ( - col0 AS INTEGER ) * cor0.col2 AS col2 FROM tab0 AS cor0
----
-10680
-1365
-1704

query I rowsort
SELECT ALL + - 84 + cor0.col1 * ( cor0.col2 ) FROM tab1 AS cor0
----
1164
1320
486

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

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

skipif mysql # not compatible
query I rowsort label-1395
SELECT ALL + col2 * + CAST ( NULL AS REAL ) + 21 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * - col0 + + col2 AS col0 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT - + col2 - 62 AS col0 FROM tab2 cor0
----
-100
-88
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col0 * - col1 col2 FROM tab1 AS cor0
----
1027
52
630

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

query I rowsort
SELECT ALL + cor0.col1 + - 34 * col0 - - col1 * col2 FROM tab2 cor0
----
-1059
-2023
630

query I rowsort
SELECT ALL col2 * + cor0.col1 * - col0 + + col0 * col0 FROM tab1 AS cor0
----
-32384
-4203
-93440

query I rowsort
SELECT DISTINCT - 36 + col1 FROM tab2 cor0
----
-19
-5
23

query I rowsort
SELECT - + 86 * 77 FROM tab1 cor0
----
-6622
-6622
-6622

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col2 * + col2 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + - col0 * 2 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1407
SELECT 42 DIV col0 AS col0 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1407
SELECT 42 / col0 AS col0 FROM tab0 AS cor0
----
0
1
1

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1408
SELECT ALL - col2 / 32 col0 FROM tab0 AS cor0
----
-1
-2
0

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

query I rowsort
SELECT ALL + + col1 + 77 FROM tab1 AS cor0
----
103
87
90

query I rowsort
SELECT col0 + 70 AS col0 FROM tab1 cor0
----
134
150
73

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1413
SELECT cor0.col1 + col0 DIV col2 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-1413
SELECT cor0.col1 + col0 / col2 FROM tab1 AS cor0
----
11
13
26

query I rowsort
SELECT ALL + col2 + + col0 * col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - col1 + col1 + + col1 FROM tab2 AS cor0
----
17
31
59

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

query I rowsort
SELECT 65 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

onlyif mysql # use DIV operator for integer division
query I rowsort label-1418
SELECT - col1 DIV tab1.col1 + 81 AS col2 FROM tab1
----
80
80
80

skipif mysql # not compatible
query I rowsort label-1418
SELECT - col1 / tab1.col1 + 81 AS col2 FROM tab1
----
80
80
80

query I rowsort
SELECT + 76 * cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f15d2817f2ea042f876ce434f787327a

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT - col0 + col0 + + col1 AS col2 FROM tab1 cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1422
SELECT - 12 * - cor0.col0 * + CAST( + col1 + - col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
15264
40320
9612

skipif mysql # not compatible
query I rowsort label-1422
SELECT - 12 * - cor0.col0 * + CAST ( + col1 + - col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
15264
40320
9612

query I rowsort
SELECT - - cor0.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - ( - cor0.col0 ) * + 85 * col2 FROM tab1 AS cor0
----
13770
310080
652800

query I rowsort
SELECT ALL tab2.col0 + col0 + - col1 FROM tab2
----
-17
141
97

query I rowsort
SELECT ALL + col1 + - col0 * tab0.col0 + + col2 AS col0 FROM tab0
----
-1127
-457
-7748

query I rowsort
SELECT ALL tab0.col0 * + tab0.col1 * - ( tab0.col1 ) AS col2 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT 31 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT DISTINCT + 24 * col2 AS col2 FROM tab1
----
1296
1368
2304

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

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

query I rowsort
SELECT 77 + col2 AS col2 FROM tab0 AS cor0
----
110
159
78

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

skipif mysql # not compatible
query I rowsort label-1433
SELECT ALL + col2 / col2 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT - col1 * + col2 + 20 * col1 FROM tab2 AS cor0
----
-217
-306
-354

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

query I rowsort
SELECT 80 * col0 FROM tab2
----
560
6240
6320

query I rowsort
SELECT col2 + 42 AS col0 FROM tab2
----
68
69
80

query I rowsort
SELECT ALL - tab0.col1 + ( - col2 + - col1 ) AS col0 FROM tab0
----
-195
-205
-264

query I rowsort
SELECT - + col2 * 68 FROM tab2 AS cor0
----
-1768
-1836
-2584

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

query I rowsort
SELECT + 32 AS col0 FROM tab2
----
32
32
32

query I rowsort
SELECT ALL cor0.col1 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col1 * ( + 98 ) * col1 col1 FROM tab0 AS cor0
----
-724784
-811449
-922047

query I rowsort
SELECT + 64 + - col0 FROM tab2 AS cor0
----
-14
-15
57

query I rowsort
SELECT + col1 - col0 * + cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

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

query I rowsort
SELECT ALL + col2 + col1 * + 79 FROM tab1 AS cor0
----
1123
2108
847

query I rowsort
SELECT ALL - cor0.col1 * + col1 * - 73 + col2 AS col0 FROM tab1 AS cor0
----
12433
49402
7357

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 26 - + col0 col0 FROM tab2 AS cor0
----
-52
-53
19

query I rowsort
SELECT DISTINCT 86 * cor0.col2 AS col1 FROM tab2 cor0
----
2236
2322
3268

query I rowsort
SELECT - col0 - - col1 * 83 FROM tab1 AS cor0
----
2155
766
999

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + 78 col2 FROM tab2
----
40
51
52

query I rowsort
SELECT ALL col2 * - col0 AS col1 FROM tab2 WHERE NOT NULL = NULL
----

query I rowsort
SELECT ALL + col2 * col2 + col0 * col0 AS col2 FROM tab0
----
1226
14645
1665

query III rowsort
SELECT * FROM tab1 WHERE NOT + col2 * col2 * col0 IN ( col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT col2 + tab1.col0 FROM tab1 WHERE NULL > NULL
----

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

query I rowsort
SELECT + col1 * col2 + col0 - + col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col2 * + col2 AS col1 FROM tab1 WHERE NULL > NULL
----

query I rowsort
SELECT - tab2.col0 - - col0 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + + col0 * + tab0.col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT col1 * tab2.col0 + col1 * col1 AS col1 FROM tab2
----
1178
1632
8083

query I rowsort
SELECT - col2 + tab0.col1 + col1 * + col1 AS col2 FROM tab0 WHERE NOT NULL BETWEEN col1 AND ( NULL )
----

query I rowsort
SELECT DISTINCT col1 FROM tab0 WHERE NOT col0 IN ( - col0 + - tab0.col1 )
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1467
SELECT col2 DIV cor0.col0 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1467
SELECT col2 / cor0.col0 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT ALL col2 + + col1 + + col1 AS col0 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT - - 52 * - col2 * + 9 AS col2 FROM tab1 AS cor0
----
-25272
-26676
-44928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1470
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab2 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-1470
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab2 cor1
----
NULL

query I rowsort
SELECT DISTINCT 19 * col0 FROM tab1 cor0
----
1216
1520
57

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

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

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

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT BETWEEN ( - col1 + + col1 ) AND NULL
----

query I rowsort
SELECT DISTINCT col1 * + col1 + - col2 FROM tab0
----
7363
8199
9408

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE NOT col2 <= ( NULL )
----

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

query I rowsort
SELECT ALL + col0 AS col0 FROM tab1 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT ALL - tab0.col0 * tab0.col0 + - col2 FROM tab0
----
-1226
-609
-8003

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

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

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 WHERE NOT NULL > NULL
----

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

query I rowsort
SELECT ALL + col1 * - tab0.col0 + - tab0.col2 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + col0 + - col2 + col1 FROM tab1
----
-25
-3
17

query I rowsort
SELECT - col0 + - col1 * col0 + - tab0.col2 FROM tab0
----
-2121
-3431
-8270

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT col0 > ( NULL )
----

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

query I rowsort
SELECT ALL + tab2.col0 * col2 * - col0 + + col0 + + col1 AS col2 FROM tab2
----
-1285
-158047
-237062

query I rowsort
SELECT DISTINCT - 62 * - col1 FROM tab2 AS cor0
----
1054
1922
3658

query I rowsort
SELECT - ( + 41 ) * - col1 AS col2 FROM tab0 AS cor0
----
3526
3731
3977

query I rowsort
SELECT + col0 + + 58 FROM tab1 AS cor0
----
122
138
61

query I rowsort
SELECT + ( - 95 ) + col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
122
1248
4507

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

query I rowsort
SELECT tab0.col0 + + tab0.col0 * col0 AS col0 FROM tab0
----
1260
600
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-1496
SELECT tab2.col0 DIV col0 + col1 AS col2 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-1496
SELECT tab2.col0 / col0 + col1 AS col2 FROM tab2
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-1497
SELECT - col1 DIV cor0.col2 - col0 FROM tab0 AS cor0
----
-132
-26
-90

skipif mysql # not compatible
query I rowsort label-1497
SELECT - col1 / cor0.col2 - col0 FROM tab0 AS cor0
----
-132
-26
-90

query I rowsort
SELECT + cor0.col1 * ( 93 ) AS col0 FROM tab2 AS cor0
----
1581
2883
5487

onlyif mysql # use DIV operator for integer division
query I rowsort label-1499
SELECT ALL - col2 DIV + col2 + col1 - col0 FROM tab0
----
1
61
61

skipif mysql # not compatible
query I rowsort label-1499
SELECT ALL - col2 / + col2 + col1 - col0 FROM tab0
----
1
61
61

query I rowsort
SELECT DISTINCT + col1 * col2 - + 64 * - 39 AS col2 FROM tab0
----
2593
5334
9958

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1502
SELECT - col0 + - CAST( col0 AS SIGNED ) * - col1 - + cor0.col1 AS col2 FROM tab2 AS cor0
----
1247
179
4465

skipif mysql # not compatible
query I rowsort label-1502
SELECT - col0 + - CAST ( col0 AS INTEGER ) * - col1 - + cor0.col1 AS col2 FROM tab2 AS cor0
----
1247
179
4465

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

query I rowsort
SELECT ALL tab1.col2 * + col0 * - col2 FROM tab1
----
-207936
-737280
-8748

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

query I rowsort
SELECT DISTINCT col1 * - col0 + col2 * tab1.col2 * col2 + + tab1.col0 AS col1 FROM tab1
----
157389
184617
883776

query I rowsort
SELECT ALL - + col0 * 78 AS col0 FROM tab2 AS cor0
----
-546
-6084
-6162

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 * ( - col2 + col0 ) AS col2 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT DISTINCT + col0 * col1 * cor0.col2 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT + 12 * - cor0.col0 FROM tab0 AS cor0
----
-1068
-288
-420

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

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

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

query I rowsort
SELECT ALL 29 * col0 AS col0 FROM tab2 AS cor0
----
203
2262
2291

query I rowsort
SELECT ALL 89 * col2 FROM tab0 AS cor0
----
2937
7298
89

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 31 ) * col2 col1 FROM tab0
----
-1023
-2542
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-1519
SELECT - 83 DIV + col0 AS col2 FROM tab2 cor0
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-1519
SELECT - 83 / + col0 AS col2 FROM tab2 cor0
----
-1
-1
-11

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

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

query I rowsort
SELECT col0 * ( ( col0 ) ) AS col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT - col1 * - 94 AS col2 FROM tab2 AS cor0
----
1598
2914
5546

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1527
SELECT - CAST( + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1527
SELECT - CAST ( + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col0 * - tab0.col1 * - col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL ( + 35 ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT DISTINCT col2 + 36 AS col2 FROM tab1
----
132
90
93

query I rowsort
SELECT DISTINCT ( 27 ) AS col0 FROM tab2, tab2 AS cor0
----
27

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

query I rowsort
SELECT ALL + - col0 * col1 * - col0 - - col0 * col1 AS col0 FROM tab2 AS cor0
----
107440
1736
363558

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

query I rowsort
SELECT DISTINCT + col2 * + col1 * - cor0.col0 - cor0.col0 AS col1 FROM tab1 AS cor0
----
-36544
-4215
-99920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + + col0 - col2 * - cor0.col0 col2 FROM tab2 AS cor0
----
-21
-2496
1738

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

query I rowsort
SELECT - col0 * + tab0.col0 AS col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL col2 * - col1 * col2 - - col0 FROM tab0
----
-611795
-62
-93630

query I rowsort
SELECT DISTINCT + tab1.col1 + col0 - col1 FROM tab1
----
3
64
80

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

query I rowsort
SELECT ALL - tab2.col0 * col1 - + col1 AS col0 FROM tab2
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-1543
SELECT col2 DIV col0 + + col2 + + col2 AS col0 FROM tab2
----
52
57
76

skipif mysql # not compatible
query I rowsort label-1543
SELECT col2 / col0 + + col2 + + col2 AS col0 FROM tab2
----
52
57
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1544
SELECT col2 + col0 DIV + col1 + - col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-1544
SELECT col2 + col0 / + col1 + - col2 FROM tab2
----
0
1
4

query I rowsort
SELECT 80 * - col2 FROM tab1
----
-4320
-4560
-7680

query I rowsort
SELECT ALL + cor0.col1 * - col2 * col0 + + col0 AS col2 FROM tab0 AS cor0
----
-3360
-664029
-68088

onlyif mysql # use DIV operator for integer division
query I rowsort label-1547
SELECT ALL - col1 * + col2 + col1 * + col2 DIV col2 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort label-1547
SELECT ALL - col1 * + col2 + col1 * + col2 / col2 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 col0 FROM tab0
----
9
9
9

query I rowsort
SELECT ALL col2 * col2 * tab2.col2 FROM tab2
----
17576
19683
54872

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1551
SELECT DISTINCT - col1 DIV - col0 AS col0 FROM tab1
----
0
8

skipif mysql # not compatible
query I rowsort label-1551
SELECT DISTINCT - col1 / - col0 AS col0 FROM tab1
----
0
8

query I rowsort
SELECT + col0 * + col1 + col1 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT + - col2 + + ( - 77 ) FROM tab2 AS cor0
----
-103
-104
-115

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1554
SELECT DISTINCT + cor0.col1 * + CAST( 63 AS SIGNED ) col2 FROM tab1 AS cor0
----
1638
630
819

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1554
SELECT DISTINCT + cor0.col1 * + CAST ( 63 AS INTEGER ) col2 FROM tab1 AS cor0
----
1638
630
819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - ( + 38 ) col2 FROM tab0 AS cor0
----
-1254
-3116
-38

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

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

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

query I rowsort
SELECT DISTINCT - col1 * - 9 AS col0 FROM tab0 AS cor0
----
774
819
873

query I rowsort
SELECT DISTINCT col1 + + col1 + + col1 * col0 * + col0 AS col0 FROM tab2
----
106131
1581
359074

query I rowsort
SELECT ALL col2 + tab1.col2 AS col1 FROM tab1
----
108
114
192

query I rowsort
SELECT - 27 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

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

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

query I rowsort
SELECT - col0 * - tab2.col0 + 92 FROM tab2
----
141
6176
6333

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + ( + 91 ) * col1 col1 FROM tab2
----
139594
58786
76167

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

query I rowsort
SELECT DISTINCT col1 * ( col1 ) AS col2 FROM tab0 AS cor0
----
7396
8281
9409

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 18 - col2 col0 FROM tab1
----
-36
-39
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1571
SELECT col1 DIV 19 AS col2 FROM tab0
----
4
4
5

skipif mysql # not compatible
query I rowsort label-1571
SELECT col1 / 19 AS col2 FROM tab0
----
4
4
5

query I rowsort
SELECT DISTINCT - 26 - + col2 FROM tab1
----
-122
-80
-83

query I rowsort
SELECT DISTINCT col0 - - 94 AS col0 FROM tab0
----
118
129
183

query I rowsort
SELECT ALL + 65 * 20 - col0 * col2 FROM tab0
----
-5998
1265
508

query I rowsort
SELECT DISTINCT - col2 + - col2 - col0 FROM tab0
----
-253
-37
-90

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

query I rowsort
SELECT DISTINCT - col2 * col2 + - col1 FROM tab1
----
-2942
-3259
-9229

query I rowsort
SELECT DISTINCT + col0 * col2 + col0 * col0 AS col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT + col1 + + col1 + col0 * - 65 FROM tab1 AS cor0
----
-143
-4140
-5174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col0 + col2 * col1 + col1 col1 FROM tab0 AS cor0
----
15652
3589
4988

query I rowsort
SELECT DISTINCT + ( 53 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
53

query I rowsort
SELECT + 13 * + col2 + - 2 * + col0 FROM tab2 AS cor0
----
182
336
337

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1584
SELECT + col2 DIV col1 - col2 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-1584
SELECT + col2 / col1 - col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL 5 * col0 + 80 FROM tab0 AS cor0
----
200
255
525

query I rowsort
SELECT DISTINCT + col2 + col0 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT + col1 * 99 FROM tab2
----
1683
3069
5841

onlyif mysql # use DIV operator for integer division
query I rowsort label-1588
SELECT DISTINCT + col1 * - col2 + col2 DIV + col0 FROM tab0 AS cor0
----
-2837
-7462
-97

skipif mysql # not compatible
query I rowsort label-1588
SELECT DISTINCT + col1 * - col2 + col2 / + col0 FROM tab0 AS cor0
----
-2837
-7462
-97

query I rowsort
SELECT + cor0.col2 * col0 * + col0 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

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

query I rowsort
SELECT ALL - + ( - col2 ) * - col0 + col0 + col0 FROM tab2 AS cor0
----
-175
-1872
-2844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + col1 + 24 col2 FROM tab1 AS cor0
----
1272
1428
594

query I rowsort
SELECT ALL - 33 * - col1 FROM tab0 AS cor0
----
2838
3003
3201

query I rowsort
SELECT ALL + col1 * col0 + + col2 + + col0 * + col1 FROM tab0 AS cor0
----
16280
4161
6791

query I rowsort
SELECT ALL + 6 AS col1 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT col1 * col1 * - 76 AS col0 FROM tab2
----
-21964
-264556
-73036

query I rowsort
SELECT + 61 + col1 AS col2 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT + 33 + - cor0.col2 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 7d31b4c5ef38ad5fbd5ce0b13cebb7b5

query I rowsort
SELECT ALL 15 - - col0 * col1 FROM tab2 AS cor0
----
1358
232
4617

query I rowsort
SELECT DISTINCT + 1 - col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT - col0 * + col2 + - col0 * col2 * - col1 AS col0 FROM tab2 AS cor0
----
117624
48032
5670

skipif mysql # not compatible
query I rowsort
SELECT - col1 + + CAST ( - 45 AS REAL ) FROM tab0 cor0
----
-131
-136
-142

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col2 * + ( + col1 ) col0 FROM tab1 AS cor0
----
1152
1350
513

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 + CAST ( cor0.col1 * col2 AS REAL ) AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL - col2 - 45 FROM tab0 AS cor0
----
-127
-46
-78

query I rowsort
SELECT col0 * - col2 + + col0 * col1 FROM tab0 AS cor0
----
1272
3360
801

query I rowsort
SELECT ALL col0 * 47 - + 46 FROM tab2 AS cor0
----
283
3620
3667

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

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

query I rowsort
SELECT 59 + col0 * - col0 + + col2 FROM tab1
----
-3980
-6245
104

query I rowsort
SELECT DISTINCT + - 7 - ( cor0.col1 ) * col0 AS col0 FROM tab2 AS cor0
----
-1350
-224
-4609

query I rowsort
SELECT ALL - + col0 + - col0 * col0 AS col0 FROM tab2 cor0
----
-56
-6162
-6320

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1614
SELECT DISTINCT CAST( 23 AS SIGNED ) + + col1 * cor0.col0 AS col0 FROM tab1 AS cor0
----
101
1063
663

skipif mysql # not compatible
query I rowsort label-1614
SELECT DISTINCT CAST ( 23 AS INTEGER ) + + col1 * cor0.col0 AS col0 FROM tab1 AS cor0
----
101
1063
663

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 1 + - col0 col0 FROM tab2 AS cor0
----
-79
-8
-80

query I rowsort
SELECT ALL 1 + + col0 AS col2 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL - 58 + col0 * + col2 * col2 AS col1 FROM tab1 AS cor0
----
207878
737222
8690

query I rowsort
SELECT - col1 * - col0 - - col0 * - col2 FROM tab0
----
1272
3360
801

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1621
SELECT ALL CAST( - ( + col0 ) AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1621
SELECT ALL CAST ( - ( + col0 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1622
SELECT ALL CAST( NULL AS SIGNED ) * - 70 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1622
SELECT ALL CAST ( NULL AS INTEGER ) * - 70 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( tab1.col0 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1624
SELECT DISTINCT col1 * tab1.col0 + + col0 DIV + col0 FROM tab1
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-1624
SELECT DISTINCT col1 * tab1.col0 + + col0 / + col0 FROM tab1
----
1041
641
79

query I rowsort
SELECT + 24 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT + cor0.col1 * 34 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 294887c314e7e54f53a64df13c68d61c

query I rowsort
SELECT - 97 * col1 FROM tab1 AS cor0
----
-1261
-2522
-970

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col2 ) + col0 col2 FROM tab1 cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1629
SELECT col0 DIV ( col1 + + col1 ) FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1629
SELECT col0 / ( col1 + + col1 ) FROM tab2
----
0
0
2

query I rowsort
SELECT ALL + ( 41 ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT col0 + - col1 - col0 * 63 AS col1 FROM tab2
----
-465
-4895
-4915

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

skipif mysql # not compatible
query I rowsort label-1632
SELECT + CAST ( NULL AS REAL ) + col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - cor0.col0 + - cor0.col2 col0 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-1634
SELECT - col2 DIV 24 FROM tab1 AS cor0
----
-2
-2
-4

skipif mysql # not compatible
query I rowsort label-1634
SELECT - col2 / 24 FROM tab1 AS cor0
----
-2
-2
-4

query I rowsort
SELECT + col1 * col1 + + col0 * - ( - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
4196
6569
685

query I rowsort
SELECT - - 13 * - col2 * col0 + + 32 * 21 FROM tab0 cor0
----
-94202
-9624
217

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1638
SELECT - CAST( + col2 AS SIGNED ) * col0 + 77 FROM tab1 AS cor0
----
-3571
-7603
-85

skipif mysql # not compatible
query I rowsort label-1638
SELECT - CAST ( + col2 AS INTEGER ) * col0 + 77 FROM tab1 AS cor0
----
-3571
-7603
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 48 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
48

query I rowsort
SELECT DISTINCT ( + tab1.col0 ) AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT 93 + 15 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to bc094bfb79720eed713b3b8a7614c0d1

query I rowsort
SELECT ALL - col0 * col0 + - col0 * - col1 FROM tab2 AS cor0
----
-1482
-4898
168

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1643
SELECT - col1 / - ( cor0.col2 ) col2 FROM tab0 AS cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1644
SELECT + + col0 DIV 27 AS col0 FROM tab2 AS cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1644
SELECT + + col0 / 27 AS col0 FROM tab2 AS cor0
----
0
2
2

query I rowsort
SELECT ALL - 78 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT ALL cor2.col2 AS col2 FROM tab1, tab0 cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 + col0 - - col1 * col0 col2 FROM tab1 AS cor0
----
1040
640
78

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

skipif mysql # not compatible
query I rowsort label-1648
SELECT + col0 * CAST ( + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col2 * col1 col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT cor0.col1 * + 33 AS col1 FROM tab2 AS cor0
----
1023
1947
561

query I rowsort
SELECT ALL cor0.col0 * + 90 FROM tab1 cor0
----
270
5760
7200

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1652
SELECT DISTINCT col2 + CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col0 + - 69 * + col0 AS col1 FROM tab2 AS cor0
----
-490
-5460
-5530

query I rowsort
SELECT ALL + cor0.col1 + 14 FROM tab0 AS cor0
----
100
105
111

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

query I rowsort
SELECT ALL - 89 + - 41 * col1 FROM tab0 AS cor0
----
-3615
-3820
-4066

query I rowsort
SELECT DISTINCT - 91 + 65 * + col1 FROM tab1 AS cor0
----
1599
559
754

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + - 15 + cor0.col1 * + col1 FROM tab0 cor0
----
7381
8266
9394

query I rowsort
SELECT ALL + 86 * - col0 FROM tab2 cor0
----
-602
-6708
-6794

query I rowsort
SELECT ALL + - 89 * cor0.col1 FROM tab0 AS cor0
----
-7654
-8099
-8633

query I rowsort
SELECT ( col0 ) * - 86 FROM tab1 AS cor0
----
-258
-5504
-6880

query I rowsort
SELECT col2 * 47 * col1 FROM tab0
----
133386
350714
4559

onlyif mysql # use DIV operator for integer division
query I rowsort label-1664
SELECT DISTINCT + tab0.col1 DIV 20 AS col0 FROM tab0
----
4

skipif mysql # not compatible
query I rowsort label-1664
SELECT DISTINCT + tab0.col1 / 20 AS col0 FROM tab0
----
4

query I rowsort
SELECT + col1 + - col1 + - cor0.col0 FROM tab1 AS cor0
----
-3
-64
-80

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1668
SELECT ALL - + col2 DIV + 88 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1668
SELECT ALL - + col2 / + 88 AS col0 FROM tab2 AS cor0
----
0
0
0

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

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

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

query I rowsort
SELECT ALL - col0 * + col2 * col0 AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL - ( 92 ) * col2 FROM tab2 AS cor0
----
-2392
-2484
-3496

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

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

query I rowsort
SELECT DISTINCT + 33 * col1 + + col1 * cor0.col1 * + col1 AS col0 FROM tab1 AS cor0
----
1330
18434
2626

query I rowsort
SELECT DISTINCT + 79 + 7 + col1 AS col0 FROM tab0 AS cor0
----
172
177
183

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1678
SELECT CAST ( NULL AS INTEGER ) + col0 col1 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1679
SELECT ALL ( + 39 ) * + col2 + - CAST( + ( + cor0.col1 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-58
1201
3107

skipif mysql # not compatible
query I rowsort label-1679
SELECT ALL ( + 39 ) * + col2 + - CAST ( + ( + cor0.col1 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-58
1201
3107

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

query I rowsort
SELECT DISTINCT - - col0 * 80 FROM tab0 AS cor0
----
1920
2800
7120

onlyif mysql # use DIV operator for integer division
query I rowsort label-1682
SELECT + - col0 DIV - col1 + col2 AS col2 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-1682
SELECT + - col0 / - col1 + col2 AS col2 FROM tab1 AS cor0
----
102
54
63

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

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

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

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

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

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

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

query I rowsort
SELECT - col1 * + 55 + col1 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT - + 15 + col0 AS col1 FROM tab2 cor0
----
-8
63
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 75 ) + col1 * cor0.col2 col1 FROM tab0 AS cor0
----
172
2913
7537

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * cor0.col2 + - cor0.col1 col1 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT ALL ( + col1 ) * col2 + + ( 67 * col1 ) AS col2 FROM tab0 AS cor0
----
13559
6596
8600

query I rowsort
SELECT ALL + ( + col0 ) * col1 + 66 - 34 FROM tab2 AS cor0
----
1375
249
4634

query I rowsort
SELECT - col2 + - cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT ALL col2 * - col0 + tab1.col2 AS col2 FROM tab1
----
-108
-3591
-7584

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1696
SELECT ( tab1.col1 ) DIV - col0 + + col0 + 44 * col0 * ( col2 ) FROM tab1
----
160576
338000
7123

skipif mysql # not compatible
query I rowsort label-1696
SELECT ( tab1.col1 ) / - col0 + + col0 + 44 * col0 * ( col2 ) FROM tab1
----
160576
338000
7123

query I rowsort
SELECT - col2 + + col0 * + col0 AS col1 FROM tab2 AS cor0
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-1698
SELECT ALL + cor0.col2 DIV col2 - - col1 FROM tab0 cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-1698
SELECT ALL + cor0.col2 / col2 - - col1 FROM tab0 cor0
----
87
92
98

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

query I rowsort
SELECT 42 * ( - cor0.col2 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5fc546e00ba049089a7789d1dc74820f

query I rowsort
SELECT ALL - 26 AS col1 FROM tab0
----
-26
-26
-26

query I rowsort
SELECT ALL + col2 - tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT col0 - 77 AS col1 FROM tab0
----
-42
-53
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1704
SELECT - col2 + CAST( + 4 AS SIGNED ) col1 FROM tab1 cor0
----
-50
-53
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1704
SELECT - col2 + CAST ( + 4 AS INTEGER ) col1 FROM tab1 cor0
----
-50
-53
-92

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

skipif mysql # not compatible
query I rowsort label-1705
SELECT DISTINCT + cor0.col2 * - CAST ( col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - - 88 * 76 FROM tab2 AS cor0
----
6688

onlyif mysql # use DIV operator for integer division
query I rowsort label-1707
SELECT - cor0.col2 - + col2 DIV col0 AS col2 FROM tab1 AS cor0
----
-57
-72
-97

skipif mysql # not compatible
query I rowsort label-1707
SELECT - cor0.col2 - + col2 / col0 AS col2 FROM tab1 AS cor0
----
-57
-72
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1708
SELECT ALL + col1 DIV 29 FROM tab0
----
2
3
3

skipif mysql # not compatible
query I rowsort label-1708
SELECT ALL + col1 / 29 FROM tab0
----
2
3
3

query I rowsort
SELECT ALL + - tab1.col2 AS col1 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT + ( 0 ) FROM tab2
----
0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1712
SELECT ALL + + 90 * - col0 + col1 DIV 41 FROM tab1 AS cor0
----
-270
-5760
-7200

skipif mysql # not compatible
query I rowsort label-1712
SELECT ALL + + 90 * - col0 + col1 / 41 FROM tab1 AS cor0
----
-270
-5760
-7200

onlyif mysql # use DIV operator for integer division
query I rowsort label-1713
SELECT DISTINCT col1 DIV + col1 AS col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1713
SELECT DISTINCT col1 / + col1 AS col0 FROM tab1 AS cor0
----
1

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

query I rowsort
SELECT ALL - col1 * - 18 * col2 FROM tab1 cor0
----
10260
22464
25272

query I rowsort
SELECT DISTINCT - col0 + ( - col2 + + col0 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col2 + + 44 col2 FROM tab2 AS cor0
----
-1490
-602
-793

query I rowsort
SELECT DISTINCT col1 * + 87 + 52 + col1 AS col1 FROM tab1 AS cor0
----
1196
2340
932

query I rowsort
SELECT + cor0.col1 + - 27 FROM tab2, tab0 AS cor0
----
9 values hashing to 75e330bbda2f51e914bb28c92ea3f70d

onlyif mysql # use DIV operator for integer division
query I rowsort label-1720
SELECT - col0 * col0 DIV 15 AS col1 FROM tab1 AS cor0
----
-273
-426
0

skipif mysql # not compatible
query I rowsort label-1720
SELECT - col0 * col0 / 15 AS col1 FROM tab1 AS cor0
----
-273
-426
0

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

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

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

query I rowsort
SELECT DISTINCT - 53 - col1 * + cor0.col1 FROM tab2 AS cor0
----
-1014
-342
-3534

query I rowsort
SELECT ALL - col2 * - col1 - - 49 FROM tab0 AS cor0
----
146
2887
7511

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

skipif mysql # not compatible
query I rowsort label-1726
SELECT DISTINCT - cor0.col0 / tab0.col1 + - cor0.col0 AS col1 FROM tab0, tab1 AS cor0
----
-3
-64
-80

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1727
SELECT + 0 / ( col0 ) col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 70 * col0 FROM tab2 AS cor0
----
490
5460
5530

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1731
SELECT + col0 + + 75 * col1 DIV col2 FROM tab0 AS cor0
----
172
219
7310

skipif mysql # not compatible
query I rowsort label-1731
SELECT + col0 + + 75 * col1 / col2 FROM tab0 AS cor0
----
172
219
7310

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1732
SELECT - - CAST( ( - col2 ) AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1732
SELECT - - CAST ( ( - col2 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1733
SELECT + tab0.col1 + 66 DIV - col2 FROM tab0
----
31
84
91

skipif mysql # not compatible
query I rowsort label-1733
SELECT + tab0.col1 + 66 / - col2 FROM tab0
----
31
84
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-1734
SELECT DISTINCT - col1 DIV - 88 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-1734
SELECT DISTINCT - col1 / - 88 FROM tab0
----
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1735
SELECT ALL CAST( - 93 AS SIGNED ) FROM tab2
----
-93
-93
-93

skipif mysql # not compatible
query I rowsort label-1735
SELECT ALL CAST ( - 93 AS INTEGER ) FROM tab2
----
-93
-93
-93

query I rowsort
SELECT 67 * col1 + + tab1.col0 * + col2 FROM tab1
----
1904
4318
8551

query I rowsort
SELECT DISTINCT 3 * 6 * col1 + - 58 + + col0 AS col1 FROM tab2
----
1082
327
507

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

query I rowsort
SELECT ALL - 19 FROM tab0, tab1 cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 ) * + col1 + tab0.col2 col0 FROM tab0
----
2871
7544
98

query I rowsort
SELECT - 55 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT ALL - - col0 * cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

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

query I rowsort
SELECT DISTINCT - + cor0.col2 + - col1 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 * + col2 * col1 + 95 col0 FROM tab1 AS cor0
----
103991
42275
92447

query I rowsort
SELECT ALL + - col1 * + col2 + 43 AS col0 FROM tab2 AS cor0
----
-1491
-603
-794

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 * + cor0.col1 col0 FROM tab0 cor0
----
7396
8281
9409

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 21 * col2 col2 FROM tab2 AS cor0
----
-546
-567
-798

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1751
SELECT - col1 DIV - col0 + ( col0 ) * col0 AS col0 FROM tab2 AS cor0
----
53
6084
6241

skipif mysql # not compatible
query I rowsort label-1751
SELECT - col1 / - col0 + ( col0 ) * col0 AS col0 FROM tab2 AS cor0
----
53
6084
6241

query I rowsort
SELECT ALL col0 * + col2 + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT col0 * - ( + col2 ) - + col2 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT + tab1.col0 + ( - col2 ) - col1 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT - - col1 * 28 AS col0 FROM tab0 AS cor0
----
2408
2548
2716

query I rowsort
SELECT - 65 + - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 cor2
----
81 values hashing to d139224c4b5b20aa9788713df75bfeb4

query I rowsort
SELECT DISTINCT + tab2.col1 - col1 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 - + 42 col1 FROM tab1 AS cor0
----
12
15
54

query I rowsort
SELECT + - col0 + + 35 AS col2 FROM tab0 AS cor0
----
-54
0
11

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col2 + + col2 + col1 * cor0.col1 * CAST ( col1 AS REAL ) AS col0 FROM tab1 AS cor0
----
1114
17684
2389

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

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

query I rowsort
SELECT DISTINCT col0 * 94 AS col1 FROM tab1 AS cor0
----
282
6016
7520

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

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

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

skipif mysql # not compatible
query I rowsort label-1764
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - 74 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL - ( + 78 ) FROM tab2, tab1 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT + - col2 * ( col2 ) * col2 AS col0 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT DISTINCT - 86 * - col1 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
1214
2290
917

query I rowsort
SELECT DISTINCT + col0 + - col1 * col0 FROM tab1 AS cor0
----
-576
-75
-960

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * col1 + - 75 col1 FROM tab0 AS cor0
----
22
2763
7387

onlyif mysql # use DIV operator for integer division
query I rowsort label-1771
SELECT DISTINCT - cor0.col2 + cor0.col1 DIV 78 AS col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-1771
SELECT DISTINCT - cor0.col2 + cor0.col1 / 78 AS col2 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT DISTINCT + 89 * col1 FROM tab0 AS cor0
----
7654
8099
8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-1773
SELECT ALL - col1 DIV + cor0.col1 col2 FROM tab2 AS cor0
----
-1
-1
-1

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

query I rowsort
SELECT - col1 - cor0.col2 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

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

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

query I rowsort
SELECT DISTINCT col0 * - 12 FROM tab1 AS cor0
----
-36
-768
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-1777
SELECT + col2 * 38 DIV + 13 - + col0 FROM tab1 cor0
----
102
154
200

skipif mysql # not compatible
query I rowsort label-1777
SELECT + col2 * 38 / + 13 - + col0 FROM tab1 cor0
----
102
154
200

query I rowsort
SELECT DISTINCT - + col1 - + 17 FROM tab0 AS cor0
----
-103
-108
-114

query I rowsort
SELECT ALL 73 * col1 - - col1 AS col2 FROM tab1
----
1924
740
962

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

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

query I rowsort
SELECT ALL - + 48 + - col0 FROM tab0 AS cor0
----
-137
-72
-83

query I rowsort
SELECT ALL + col1 * 32 * col1 FROM tab2 AS cor0
----
111392
30752
9248

query I rowsort
SELECT + 99 + - col0 FROM tab0 AS cor0
----
10
64
75

query I rowsort
SELECT DISTINCT + + col2 + - col1 * - col0 - col1 * - col1 * col0 AS col0 FROM tab2 AS cor0
----
24212
276146
6971

query I rowsort
SELECT + 69 + 95 FROM tab0 AS cor0
----
164
164
164

query I rowsort
SELECT ALL col0 + + ( - col0 ) * - col0 AS col2 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + - col0 + ( + col0 ) FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) * - col0 col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + 8 * cor0.col0 AS col1 FROM tab0 cor0
----
192
280
712

query I rowsort
SELECT DISTINCT col2 * cor0.col0 + + 51 AS col2 FROM tab0 cor0
----
7349
843
86

query I rowsort
SELECT DISTINCT + col2 + col2 * ( col0 ) AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT col2 + + 32 FROM tab0
----
114
33
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-1793
SELECT - col2 * col0 + + col0 DIV ( 84 ) FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-1793
SELECT - col2 * col0 + + col0 / ( 84 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT - col0 * - ( + col2 ) + ( col2 ) FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT ( + 41 ) FROM tab2
----
41

query I rowsort
SELECT 78 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

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

skipif mysql # not compatible
query I rowsort label-1797
SELECT + CAST ( NULL AS INTEGER ) + - 97 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 74 + + 78 AS col0 FROM tab2
----
152
152
152

query I rowsort
SELECT - 49 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to adfccb10c9468825d9961e3613140f89

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

skipif mysql # not compatible
query I rowsort label-1800
SELECT ALL + ( - col0 ) / col2 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL 24 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 col1 FROM tab0, tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT 47 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT ALL tab2.col2 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL col1 * + ( - col2 ) + - col0 AS col0 FROM tab0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-1807
SELECT col2 DIV col0 + col2 + col0 FROM tab0
----
171
36
58

skipif mysql # not compatible
query I rowsort label-1807
SELECT col2 / col0 + col2 + col0 FROM tab0
----
171
36
58

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

query I rowsort
SELECT + 43 + - ( - col2 ) + cor0.col1 FROM tab1 AS cor0
----
110
123
152

query I rowsort
SELECT ALL - col2 * col2 + + col1 * + tab1.col1 AS col2 FROM tab1
----
-2240
-3149
-9047

query I rowsort
SELECT ALL + col1 * col0 + + 56 FROM tab1
----
1096
134
696

query I rowsort
SELECT 30 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL col1 * ( + cor0.col0 ) + + cor0.col1 * ( 20 ) AS col2 FROM tab1 AS cor0
----
1300
598
840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + 2 * - col2 * - col2 + col2 col1 FROM tab2
----
1404
1512
2964

query I rowsort
SELECT ALL - 60 AS col1 FROM tab1 cor0
----
-60
-60
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-1816
SELECT + 31 + - col2 DIV + col0 FROM tab1 AS cor0
----
13
30
31

skipif mysql # not compatible
query I rowsort label-1816
SELECT + 31 + - col2 / + col0 FROM tab1 AS cor0
----
13
30
31

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

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

skipif mysql # not compatible
query I rowsort label-1818
SELECT CAST ( + col0 AS INTEGER ) * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1819
SELECT - + 34 * + 78 + - cor0.col1 * col0 + - col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
-2731
-3293
-3693

skipif mysql # not compatible
query I rowsort label-1819
SELECT - + 34 * + 78 + - cor0.col1 * col0 + - col1 / cor0.col1 AS col2 FROM tab1 AS cor0
----
-2731
-3293
-3693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1820
SELECT + - CAST( col2 AS SIGNED ) * cor0.col0 * 90 AS col1 FROM tab2 AS cor0
----
-17010
-182520
-270180

skipif mysql # not compatible
query I rowsort label-1820
SELECT + - CAST ( col2 AS INTEGER ) * cor0.col0 * 90 AS col1 FROM tab2 AS cor0
----
-17010
-182520
-270180

query I rowsort
SELECT ALL + + col2 * + 25 FROM tab2 AS cor0
----
650
675
950

skipif mysql # not compatible
query I rowsort
SELECT ALL + - CAST ( + cor0.col1 AS REAL ) + col1 * - cor0.col1 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT + ( 40 ) + + cor0.col2 + col1 * 3 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
2017
3256
328

query I rowsort
SELECT - col2 + - col1 * cor0.col0 + + ( - 10 ) FROM tab2 cor0
----
-1391
-254
-4638

query I rowsort
SELECT col1 * - 61 AS col0 FROM tab0
----
-5246
-5551
-5917

onlyif mysql # use DIV operator for integer division
query I rowsort label-1826
SELECT - col0 DIV + col2 - tab1.col1 AS col2 FROM tab1
----
-11
-13
-26

skipif mysql # not compatible
query I rowsort label-1826
SELECT - col0 / + col2 - tab1.col1 AS col2 FROM tab1
----
-11
-13
-26

query I rowsort
SELECT - col0 - 61 FROM tab0
----
-150
-85
-96

query I rowsort
SELECT DISTINCT col2 + + 61 * col0 AS col1 FROM tab1
----
237
3961
4976

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

query I rowsort
SELECT 65 AS col2 FROM tab1 cor0
----
65
65
65

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

query I rowsort
SELECT DISTINCT - + 72 + col0 + + col1 * col1 FROM tab1 AS cor0
----
177
607
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1833
SELECT - col2 DIV - 8 FROM tab2 cor0
----
3
3
4

skipif mysql # not compatible
query I rowsort label-1833
SELECT - col2 / - 8 FROM tab2 cor0
----
3
3
4

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

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

query I rowsort
SELECT + col1 + - col1 * - col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + ( - 94 ) + col0 FROM tab0 AS cor0
----
-5
-59
-70

query I rowsort
SELECT + ( 63 ) AS col0 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT + - col0 * col1 - col2 * + 72 AS col0 FROM tab2 cor0
----
-2161
-4079
-6474

query I rowsort
SELECT col0 + col2 * + ( 92 ) FROM tab2 AS cor0
----
2470
2491
3575

query I rowsort
SELECT + - col1 + + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

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

query I rowsort
SELECT - - 95 + + col2 AS col2 FROM tab0 AS cor0
----
128
177
96

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

query I rowsort
SELECT ALL - col1 + - ( - col0 ) FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT - + 26 * col2 AS col0 FROM tab2 AS cor0
----
-676
-702
-988

query I rowsort
SELECT + 73 * col0 AS col2 FROM tab0
----
1752
2555
6497

query I rowsort
SELECT DISTINCT col0 * + 56 AS col0 FROM tab2 AS cor0
----
392
4368
4424

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1848
SELECT ALL cor0.col0 + + CAST( NULL AS DECIMAL ) * 8 * col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1848
SELECT ALL cor0.col0 + + CAST ( NULL AS REAL ) * 8 * col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - col0 * col1 * + col0 + col2 FROM tab1 AS cor0
----
-180
-40903
-83104

onlyif mysql # use DIV operator for integer division
query I rowsort label-1851
SELECT DISTINCT + cor0.col2 + - 28 DIV + 52 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-1851
SELECT DISTINCT + cor0.col2 + - 28 / + 52 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col2 * col0 + + col1 * + col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT DISTINCT ( col2 ) * - ( + 23 * - col2 ) - col2 * 87 FROM tab0
----
-64
147518
22176

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1855
SELECT - 95 DIV + col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-1855
SELECT - 95 / + col0 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT tab2.col1 - 4 * col0 FROM tab2
----
-253
-299
3

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

query I rowsort
SELECT ALL + col0 + 72 + tab2.col0 * - col1 * 77 FROM tab2
----
-103260
-16630
-354204

onlyif mysql # use DIV operator for integer division
query I rowsort label-1859
SELECT + cor0.col2 * ( 64 ) + col2 + - col1 DIV col1 FROM tab2 AS cor0
----
1689
1754
2469

skipif mysql # not compatible
query I rowsort label-1859
SELECT + cor0.col2 * ( 64 ) + col2 + - col1 / col1 FROM tab2 AS cor0
----
1689
1754
2469

query I rowsort
SELECT col0 * 31 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT DISTINCT + - col2 + - col1 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + 24 col0 FROM tab0 cor0
----
2064
2184
2328

query I rowsort
SELECT + col1 + - col0 * col1 + col2 * + ( col1 * cor0.col0 + col1 * - 6 ) AS col0 FROM tab2 AS cor0
----
105905
45832
651

query I rowsort
SELECT 91 + + 67 FROM tab1 AS cor0
----
158
158
158

query I rowsort
SELECT - 4 * + 36 AS col2 FROM tab0 cor0
----
-144
-144
-144

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

query I rowsort
SELECT + + cor0.col2 * col1 * col2 - 99 FROM tab1 AS cor0
----
119709
32391
75717

query I rowsort
SELECT + - 64 * cor0.col2 FROM tab1 AS cor0
----
-3456
-3648
-6144

query I rowsort
SELECT ALL + col1 * col0 - - tab1.col2 AS col0 FROM tab1
----
1136
132
697

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

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

query I rowsort
SELECT ALL ( - col0 * + 41 ) + col1 AS col2 FROM tab0
----
-1338
-3558
-898

query I rowsort
SELECT DISTINCT col0 * - col2 * 37 AS col2 FROM tab2 AS cor0
----
-111074
-6993
-75036

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

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

skipif mysql # not compatible
query I rowsort label-1874
SELECT - + col0 / cor0.col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT col0 * cor0.col2 + ( col2 ) FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT 25 - col1 FROM tab2 cor0
----
-34
-6
8

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

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

query I rowsort
SELECT 1 + - 4 FROM tab0
----
-3
-3
-3

query I rowsort
SELECT 13 * tab0.col2 + 66 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 40d0ad3d14b77f23a3781289ec3bdc31

onlyif mysql # use DIV operator for integer division
query I rowsort label-1881
SELECT col1 * col0 DIV - 18 AS col2 FROM tab0 AS cor0
----
-114
-188
-449

skipif mysql # not compatible
query I rowsort label-1881
SELECT col1 * col0 / - 18 AS col2 FROM tab0 AS cor0
----
-114
-188
-449

query I rowsort
SELECT + 0 * - col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( + tab2.col0 ) * + col2 * - col1 AS col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT - col1 * 98 AS col2 FROM tab2
----
-1666
-3038
-5782

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

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

skipif mysql # not compatible
query I rowsort label-1886
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 66 AS col0 FROM tab0
----
NULL

query I rowsort
SELECT + tab0.col2 + 55 FROM tab0
----
137
56
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col2 FROM tab0, tab1 cor0, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT ALL + cor0.col2 + 1 FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to bd43319518fab1b8ed15ab6d8284ab95

query I rowsort
SELECT DISTINCT - col1 * col2 * col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL + col1 * - col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

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

query I rowsort
SELECT ALL 63 - - col0 FROM tab1 AS cor0
----
127
143
66

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

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

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

query I rowsort
SELECT DISTINCT col0 + 74 AS col2 FROM tab1
----
138
154
77

query I rowsort
SELECT 99 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT - col2 + - ( col1 ) FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL col2 + + col1 * - ( tab2.col1 * col2 ) FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT + 11 FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 288f8fb62e079d095c14d7cf3e2d3359

onlyif mysql # use DIV operator for integer division
query I rowsort label-1902
SELECT + col0 + + ( col0 * - cor0.col0 ) + + col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6164

skipif mysql # not compatible
query I rowsort label-1902
SELECT + col0 + + ( col0 * - cor0.col0 ) + + col2 / - col1 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6164

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + + 9 * - col1 col0 FROM tab1 AS cor0
----
-231
-26
-37

query I rowsort
SELECT DISTINCT + col0 + ( cor0.col2 ) + col0 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT - + col1 * + ( col1 ) + cor0.col2 * + col0 AS col0 FROM tab2 AS cor0
----
-1453
-772
2713

query I rowsort
SELECT ALL col2 + col0 * - 44 AS col0 FROM tab2
----
-281
-3406
-3438

onlyif mysql # use DIV operator for integer division
query I rowsort label-1907
SELECT DISTINCT + col2 + - CAST( col0 AS SIGNED ) DIV col0 AS col0 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-1907
SELECT DISTINCT + col2 + - CAST ( col0 AS INTEGER ) / col0 AS col0 FROM tab2 AS cor0
----
25
26
37

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1909
SELECT DISTINCT CAST( + ( + col2 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-1909
SELECT DISTINCT CAST ( + ( + col2 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - - 60 * + col1 FROM tab0 AS cor0
----
5160
5460
5820

onlyif mysql # use DIV operator for integer division
query I rowsort label-1911
SELECT - ( - cor0.col0 ) + col0 DIV - col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-1911
SELECT - ( - cor0.col0 ) + col0 / - col1 FROM tab2 AS cor0
----
7
75
77

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

query I rowsort
SELECT ALL - + 70 AS col2 FROM tab0 AS cor0
----
-70
-70
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1914
SELECT DISTINCT + CAST( 21 * + col0 AS SIGNED ) AS col1 FROM tab0
----
1869
504
735

skipif mysql # not compatible
query I rowsort label-1914
SELECT DISTINCT + CAST ( 21 * + col0 AS INTEGER ) AS col1 FROM tab0
----
1869
504
735

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

query I rowsort
SELECT + 68 * - 2 * + col1 AS col2 FROM tab1 AS cor0
----
-1360
-1768
-3536

query I rowsort
SELECT ALL - col0 * col1 - col2 * 13 AS col2 FROM tab0 AS cor0
----
-2493
-3408
-9165

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1919
SELECT ALL + ( col0 ) DIV col1 + 64 AS col0 FROM tab2 AS cor0
----
64
65
68

skipif mysql # not compatible
query I rowsort label-1919
SELECT ALL + ( col0 ) / col1 + 64 AS col0 FROM tab2 AS cor0
----
64
65
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 - cor0.col2 col0 FROM tab1 AS cor0
----
-108
-114
-192

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + col1 * - 94 col2 FROM tab0 AS cor0
----
-10148
-12513
-16653

query I rowsort
SELECT - col2 + + 37 AS col1 FROM tab1 AS cor0
----
-17
-20
-59

query I rowsort
SELECT + 33 * 39 FROM tab2 AS cor0
----
1287
1287
1287

query I rowsort
SELECT - cor0.col2 * - col0 * - col0 + col1 FROM tab0 AS cor0
----
-1128
-18922
-649431

query I rowsort
SELECT + ( cor0.col2 ) * - cor0.col1 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 67 col2 FROM tab1
----
1742
670
871

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT col2 * + ( + 12 ) + + col1 AS col2 FROM tab1 AS cor0
----
1165
674
694

query I rowsort
SELECT - col2 + + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT + col2 - + 78 * ( - col2 + col1 ) AS col1 FROM tab1 AS cor0
----
2238
3723
6570

query I rowsort
SELECT ALL - + 10 * 21 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ceea7215d265e15a570f1309daac50d8

query I rowsort
SELECT + - col1 * + 90 FROM tab2 AS cor0
----
-1530
-2790
-5310

query I rowsort
SELECT - cor0.col2 * - col0 AS col2 FROM tab1 cor0
----
162
3648
7680

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1936
SELECT DISTINCT col2 - - cor0.col0 DIV col1 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-1936
SELECT DISTINCT col2 - - cor0.col0 / col1 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - - col1 * - ( 50 + + col1 ) FROM tab2 AS cor0
----
-1139
-2511
-6431

query I rowsort
SELECT 28 * 71 FROM tab1, tab0 cor0
----
9 values hashing to 56d8bc63d4c78f2102f928c273b7591f

query I rowsort
SELECT ALL col1 * 61 * 75 AS col1 FROM tab1 AS cor0
----
118950
45750
59475

query I rowsort
SELECT ( - col2 ) + col1 + + cor0.col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + 21 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + 27 + - col2 col0 FROM tab1
----
-24
11
34

query I rowsort
SELECT ALL + col0 + - col2 + - col2 AS col0 FROM tab0
----
-42
-75
33

query I rowsort
SELECT ALL 73 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT DISTINCT + col0 + + ( + col0 ) FROM tab1
----
128
160
6

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

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

query I rowsort
SELECT - + col1 + cor0.col1 * col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
0
611793
93568

query I rowsort
SELECT col0 * col0 + col2 AS col0 FROM tab2
----
6110
6279
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1950
SELECT + CAST( + col0 AS SIGNED ) FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-1950
SELECT + CAST ( + col0 AS INTEGER ) FROM tab2
----
7
78
79

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

query I rowsort
SELECT + 83 * col2 AS col2 FROM tab1 cor0
----
4482
4731
7968

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1954
SELECT + col1 * - col2 * CAST( col2 AS SIGNED ) + + col2 AS col0 FROM tab2 AS cor0
----
-22572
-24510
-39858

skipif mysql # not compatible
query I rowsort label-1954
SELECT + col1 * - col2 * CAST ( col2 AS INTEGER ) + + col2 AS col0 FROM tab2 AS cor0
----
-22572
-24510
-39858

query I rowsort
SELECT - - 56 + col1 * cor0.col1 * + col1 FROM tab2 AS cor0
----
205435
29847
4969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col1 * cor0.col2 col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - 13 * - col1 + col0 FROM tab2
----
300
410
845

query I rowsort
SELECT DISTINCT + col2 * + col1 * col0 - 66 AS col1 FROM tab2 AS cor0
----
119586
50968
5793

query I rowsort
SELECT - ( col1 ) + - col1 * col1 AS col2 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT ALL ( - col1 ) * + tab2.col1 + col0 FROM tab2
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-1961
SELECT 94 DIV - col2 col0 FROM tab0
----
-1
-2
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1961
SELECT 94 / - col2 col0 FROM tab0
----
-1
-2
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1962
SELECT DISTINCT + 55 * - col2 - CAST( + 68 * + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-11808
-6642
-7011

skipif mysql # not compatible
query I rowsort label-1962
SELECT DISTINCT + 55 * - col2 - CAST ( + 68 * + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-11808
-6642
-7011

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

query I rowsort
SELECT ALL 77 * - col2 AS col2 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT ALL - + col0 - cor0.col1 * ( col0 ) * cor0.col2 AS col2 FROM tab0 AS cor0
----
-3430
-664207
-68136

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1967
SELECT ALL cor0.col1 DIV cor0.col2 + - 92 col0 FROM tab1 AS cor0
----
-92
-92
-92

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

query I rowsort
SELECT DISTINCT - + 45 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1170
-450
-585

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1970
SELECT DISTINCT + col2 - col1 DIV 52 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-1970
SELECT DISTINCT + col2 - col1 / 52 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col2 + 35 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
120
90
93

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

query I rowsort
SELECT ALL + col1 + 2 + + 5 AS col0 FROM tab2 cor0
----
24
38
66

query I rowsort
SELECT - ( + tab2.col0 ) + col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL - col0 * ( - ( + col0 ) ) * - col1 + col2 + col2 * + col1 FROM tab0 AS cor0
----
-118727
-46665
-713267

query I rowsort
SELECT - col1 + 99 FROM tab1 AS cor0
----
73
86
89

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * col1 + col0 + cor0.col1 col0 FROM tab0 AS cor0
----
229
2948
7642

query I rowsort
SELECT col2 + tab1.col0 + - col1 FROM tab1
----
111
163
31

query I rowsort
SELECT DISTINCT + col1 * col2 - col0 * - 13 * - tab1.col0 FROM tab1
----
-52678
-81952
1287

query I rowsort
SELECT ALL 68 + - col0 AS col0 FROM tab1
----
-12
4
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - - col2 col0 FROM tab2
----
104
117
34

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

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

query I rowsort
SELECT DISTINCT 78 - + col2 AS col2 FROM tab0
----
-4
45
77

query I rowsort
SELECT ALL 71 - col0 FROM tab2
----
-7
-8
64

query I rowsort
SELECT ALL + 23 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 546d49aa433406dd83ea19885588e658

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 11 * col0 col2 FROM tab1 AS cor0
----
33
704
880

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

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

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

query I rowsort
SELECT col2 + - col0 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1232
-1353
-577

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + 25 * + col0 col0 FROM tab0 AS cor0
----
2134
514
778

query I rowsort
SELECT DISTINCT col2 * + col0 * + col0 FROM tab2 cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-1993
SELECT DISTINCT - 68 * col2 DIV col0 AS col1 FROM tab2 cor0
----
-22
-262
-32

skipif mysql # not compatible
query I rowsort label-1993
SELECT DISTINCT - 68 * col2 / col0 AS col1 FROM tab2 cor0
----
-22
-262
-32

query I rowsort
SELECT ALL 77 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT ALL - col1 * - col1 + col1 AS col1 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT + - col0 * + ( - col2 + ( 53 ) * - col1 ) FROM tab0 AS cor0
----
110184
179970
436545

query I rowsort
SELECT + cor0.col0 * - 16 AS col0 FROM tab2 AS cor0
----
-112
-1248
-1264

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

query I rowsort
SELECT ( - ( - col0 ) ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

onlyif mysql # use DIV operator for integer division
query I rowsort label-2001
SELECT - col1 DIV - col1 + - col0 + col1 FROM tab2 AS cor0
----
-18
-61
25

skipif mysql # not compatible
query I rowsort label-2001
SELECT - col1 / - col1 + - col0 + col1 FROM tab2 AS cor0
----
-18
-61
25

query I rowsort
SELECT DISTINCT + cor0.col1 * + col2 * col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT - + col2 * + 78 FROM tab0 AS cor0
----
-2574
-6396
-78

query I rowsort
SELECT DISTINCT - + col1 + - ( - col0 ) * col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT - col1 + - 48 AS col1 FROM tab0 AS cor0
----
-134
-139
-145

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - cor0.col2 col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col2 + + 96 AS col0 FROM tab2 cor0
----
122
123
134

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2010
SELECT ALL col2 DIV + CAST( col0 * + col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2010
SELECT ALL col2 / + CAST ( col0 * + col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 - 97 FROM tab0
----
-15
-64
-96

query I rowsort
SELECT + col2 * col2 + + col1 + 35 FROM tab0
----
1210
133
6850

onlyif mysql # use DIV operator for integer division
query I rowsort label-2013
SELECT DISTINCT 4 DIV col1 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2013
SELECT DISTINCT 4 / col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col1 * 11 * col0 + - col1 FROM tab2
----
14756
2356
50563

query I rowsort
SELECT DISTINCT - col1 * col0 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-576
-75
-960

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 ALL + col0 + - col1 * ( - col0 ) + tab0.col1 * ( + 86 ) col1 FROM tab0
----
11772
16014
9484

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2018
SELECT + - ( cor0.col1 ) * CAST( - col0 AS SIGNED ) * - col0 AS col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

skipif mysql # not compatible
query I rowsort label-2018
SELECT + - ( cor0.col1 ) * CAST ( - col0 AS INTEGER ) * - col0 AS col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + col1 + + col1 * 40 AS col1 FROM tab1 AS cor0
----
1066
410
533

query I rowsort
SELECT ALL - 19 * col0 AS col0 FROM tab0 cor0
----
-1691
-456
-665

query I rowsort
SELECT ALL + 99 * col2 FROM tab1
----
5346
5643
9504

query I rowsort
SELECT DISTINCT - 1 AS col0 FROM tab0 cor0
----
-1

query I rowsort
SELECT - 94 * col1 + - col0 FROM tab1 cor0
----
-1004
-1302
-2447

query I rowsort
SELECT - 60 * + col1 + col2 FROM tab2 AS cor0
----
-1833
-3514
-982

onlyif mysql # use DIV operator for integer division
query I rowsort label-2025
SELECT ALL - col1 DIV + col0 AS col1 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-2025
SELECT ALL - col1 / + col0 AS col1 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 * CAST ( - 98 AS REAL ) AS col0 FROM tab0
----
2352
3430
8722

query I rowsort
SELECT + col1 + col2 + + col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1019
344
3566

query I rowsort
SELECT DISTINCT + col0 + - 32 FROM tab1 AS cor0
----
-29
32
48

query I rowsort
SELECT ALL 80 * 88 + col1 AS col1 FROM tab1 AS cor0
----
7050
7053
7066

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * col1 col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT tab1.col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT col0 * col1 + col2 FROM tab1 AS cor0
----
1136
132
697

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2034
SELECT ALL - + col0 DIV col1 + + col2 FROM tab1 AS cor0
----
51
54
90

skipif mysql # not compatible
query I rowsort label-2034
SELECT ALL - + col0 / col1 + + col2 FROM tab1 AS cor0
----
51
54
90

query I rowsort
SELECT - - col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2036
SELECT - - cor0.col1 + col2 DIV ( - col0 ) FROM tab2 AS cor0
----
17
28
59

skipif mysql # not compatible
query I rowsort label-2036
SELECT - - cor0.col1 + col2 / ( - col0 ) FROM tab2 AS cor0
----
17
28
59

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

query I rowsort
SELECT + col1 + col1 * 56 AS col0 FROM tab1 AS cor0
----
1482
570
741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 49 col2 FROM tab2
----
49
49
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2040
SELECT + 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-2040
SELECT + CAST ( NULL AS INTEGER ) + tab2.col2 col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 76 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT DISTINCT - col1 + + 63 AS col1 FROM tab0 AS cor0
----
-23
-28
-34

query I rowsort
SELECT col1 * 60 + cor0.col0 AS col1 FROM tab1 AS cor0
----
1563
664
860

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

skipif mysql # not compatible
query I rowsort label-2044
SELECT ALL + 60 / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * 2 + col2 FROM tab0 AS cor0
----
246
3
99

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2047
SELECT 76 DIV col0 AS col1 FROM tab1
----
0
1
25

skipif mysql # not compatible
query I rowsort label-2047
SELECT 76 / col0 AS col1 FROM tab1
----
0
1
25

query I rowsort
SELECT ALL + col2 - - col0 * - col0 FROM tab0
----
-1224
-543
-7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 + - col0 * + col0 + + 67 col0 FROM tab1
----
-3389
-5293
136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 * col2 col0 FROM tab1
----
-3240
-3420
-5760

query I rowsort
SELECT 44 * col1 FROM tab2 AS cor0
----
1364
2596
748

query I rowsort
SELECT - 70 * + col1 FROM tab2 AS cor0
----
-1190
-2170
-4130

query I rowsort
SELECT ALL - 69 - - tab0.col2 AS col2 FROM tab0
----
-36
-68
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-2054
SELECT col2 DIV + 64 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2054
SELECT col2 / + 64 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * + tab2.col1 + tab2.col0 * - col0 * col1 FROM tab2
----
-105451
-357422
-682

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL 35 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab0
----
0

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

query I rowsort
SELECT - col0 + + 79 * + cor0.col0 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT + col0 * + 45 FROM tab2 cor0
----
315
3510
3555

query I rowsort
SELECT - - col0 + cor0.col2 * col0 * + col0 AS col1 FROM tab0 AS cor0
----
1260
19032
649611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2063
SELECT CAST( NULL AS SIGNED ) + + 96 * + cor0.col1 + + 81 * - 39 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2063
SELECT CAST ( NULL AS INTEGER ) + + 96 * + cor0.col1 + + 81 * - 39 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col1 * + col1 + + col0 FROM tab2
----
3559
368
968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2065
SELECT col2 + CAST( - col2 AS SIGNED ) AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2065
SELECT col2 + CAST ( - col2 AS INTEGER ) AS col1 FROM tab2
----
0
0
0

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

skipif mysql # not compatible
query I rowsort label-2066
SELECT ALL + - col0 * - 73 + - col1 + col1 * 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-2067
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab0, tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2067
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab0, tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col2 + + 90 + col0 * 21 AS col0 FROM tab2 AS cor0
----
1754
1787
264

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

skipif mysql # not compatible
query I rowsort label-2069
SELECT ALL - col2 * col0 * col1 + CAST ( NULL AS REAL ) + col0 * - col0 * ( 20 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL - ( - cor0.col0 ) AS col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2074
SELECT ALL + ( ( - col0 ) ) + - CAST( + col2 AS SIGNED ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

skipif mysql # not compatible
query I rowsort label-2074
SELECT ALL + ( ( - col0 ) ) + - CAST ( + col2 AS INTEGER ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - 23 + + 40 FROM tab1 AS cor0
----
17
17
17

query I rowsort
SELECT + + 96 FROM tab0 cor0
----
96
96
96

query I rowsort
SELECT ALL - - 39 + + cor0.col1 * + col2 FROM tab2 cor0
----
1573
685
876

query I rowsort
SELECT - 47 + - col1 * - col0 AS col2 FROM tab1 AS cor0
----
31
593
993

query I rowsort
SELECT DISTINCT - + col2 + 16 AS col1 FROM tab2 AS cor0
----
-10
-11
-22

onlyif mysql # use DIV operator for integer division
query I rowsort label-2080
SELECT DISTINCT + - 93 DIV 39 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
11
24
8

skipif mysql # not compatible
query I rowsort label-2080
SELECT DISTINCT + - 93 / 39 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
11
24
8

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

skipif mysql # not compatible
query I rowsort label-2081
SELECT DISTINCT + CAST ( NULL AS REAL ) + - 51 * + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - + cor0.col1 * col1 * col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT ALL + + 9 AS col1 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT DISTINCT - + 82 * + col0 FROM tab1 cor0
----
-246
-5248
-6560

query I rowsort
SELECT - ( col1 ) + col1 * + col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
16211
36478
5690

query I rowsort
SELECT ALL + 64 AS col0 FROM tab0 AS cor0
----
64
64
64

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

query I rowsort
SELECT DISTINCT - 15 * - col2 + + col1 AS col1 FROM tab0 cor0
----
112
1321
581

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2090
SELECT DISTINCT - 57 DIV col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2090
SELECT DISTINCT - 57 / col0 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT ALL - 57 * - col0 AS col0 FROM tab0 cor0
----
1368
1995
5073

query I rowsort
SELECT ALL + - 77 - + col0 AS col2 FROM tab1 AS cor0
----
-141
-157
-80

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2094
SELECT DISTINCT col1 + - col2 DIV col2 AS col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-2094
SELECT DISTINCT col1 + - col2 / col2 AS col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT ALL ( + col0 ) - - cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col1 * - col2 + - 37 * ( + col1 ) AS col0 FROM tab0 AS cor0
----
-10829
-3686
-6020

query I rowsort
SELECT DISTINCT + 5 * + col2 * + ( col0 ) FROM tab1 AS cor0
----
18240
38400
810

query I rowsort
SELECT DISTINCT + col2 * - col2 + col1 AS col0 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2099
SELECT - CAST( NULL AS SIGNED ) * + cor0.col1 col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2099
SELECT - CAST ( NULL AS INTEGER ) * + cor0.col1 col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 * - ( col2 ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2101
SELECT col1 + cor0.col2 DIV + 52 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2101
SELECT col1 + cor0.col2 / + 52 FROM tab1 cor0
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-2102
SELECT DISTINCT - col0 DIV + CAST( + col0 AS SIGNED ) + - col1 * ( col2 ) FROM tab2 AS cor0
----
-1535
-647
-838

skipif mysql # not compatible
query I rowsort label-2102
SELECT DISTINCT - col0 / + CAST ( + col0 AS INTEGER ) + - col1 * ( col2 ) FROM tab2 AS cor0
----
-1535
-647
-838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * + col0 * 20 - - cor0.col1 * ( + col0 ) col0 FROM tab0 cor0
----
154059
17904
4095

query I rowsort
SELECT DISTINCT col1 * + 1 + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL ( 94 ) * - col1 FROM tab2 AS cor0
----
-1598
-2914
-5546

query I rowsort
SELECT col0 * + ( - col1 ) - 89 * 12 FROM tab0 AS cor0
----
-3132
-4463
-9167

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

query I rowsort
SELECT 61 - col1 AS col1 FROM tab2 AS cor0
----
2
30
44

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

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

query I rowsort
SELECT DISTINCT ( 28 ) * - col1 + ( - 31 + col2 ) * + 57 FROM tab2 AS cor0
----
-1096
-1937
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2111
SELECT cor0.col1 * + col2 + - CAST( + 76 AS SIGNED ) * + col2 col2 FROM tab2 AS cor0
----
-1215
-2242
-442

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2111
SELECT cor0.col1 * + col2 + - CAST ( + 76 AS INTEGER ) * + col2 col2 FROM tab2 AS cor0
----
-1215
-2242
-442

query I rowsort
SELECT - 99 * col0 + col1 AS col2 FROM tab0 AS cor0
----
-2290
-3368
-8720

query I rowsort
SELECT + 19 + col1 FROM tab2 AS cor0
----
36
50
78

query I rowsort
SELECT DISTINCT + 98 * col1 AS col1 FROM tab2 cor0
----
1666
3038
5782

query I rowsort
SELECT DISTINCT + - cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2116
SELECT ALL - - col1 * - col1 + col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
-7396
-8280
-9374

skipif mysql # not compatible
query I rowsort label-2116
SELECT ALL - - col1 * - col1 + col0 / + col2 AS col1 FROM tab0 AS cor0
----
-7396
-8280
-9374

query I rowsort
SELECT ALL + col2 * col2 + + col1 AS col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT ALL - col1 + 59 * + col0 AS col1 FROM tab2
----
382
4543
4644

query I rowsort
SELECT ALL + 63 + col1 * - col1 + - col1 FROM tab2
----
-243
-3477
-929

query I rowsort
SELECT DISTINCT col1 * col1 - col2 * col1 FROM tab2 AS cor0
----
-357
124
1947

query I rowsort
SELECT DISTINCT - - col1 - + 43 * - col1 * + col0 AS col1 FROM tab1 AS cor0
----
27530
3380
44733

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

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

query I rowsort
SELECT + col2 + 78 AS col2 FROM tab1 AS cor0
----
132
135
174

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

skipif mysql # not compatible
query I rowsort label-2125
SELECT ALL - col0 / CAST ( NULL AS REAL ) + - 31 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 * - ( - 46 ) FROM tab1 AS cor0
----
1196
460
598

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - 77 col0 FROM tab0 AS cor0
----
-163
-168
-174

query I rowsort
SELECT DISTINCT col1 * + 22 FROM tab2 AS cor0
----
1298
374
682

query I rowsort
SELECT - + col1 * 84 * - col1 FROM tab1 AS cor0
----
14196
56784
8400

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

query I rowsort
SELECT + 35 * cor0.col2 FROM tab1 AS cor0
----
1890
1995
3360

query I rowsort
SELECT ( 61 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT + 42 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT + cor0.col2 * 22 FROM tab0 AS cor0
----
1804
22
726

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

query I rowsort
SELECT ( - 66 ) * col0 FROM tab1
----
-198
-4224
-5280

query I rowsort
SELECT ALL col0 * - 25 FROM tab1
----
-1600
-2000
-75

query I rowsort
SELECT + 17 * 21 * col2 AS col0 FROM tab2
----
13566
9282
9639

query I rowsort
SELECT ALL - 59 AS col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT DISTINCT - - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
3
64
80

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 WHERE NULL > NULL
----

query I rowsort
SELECT + 31 * col1 + - 6 FROM tab1 AS cor0
----
304
397
800

query I rowsort
SELECT DISTINCT + 95 * cor0.col0 AS col1 FROM tab0 AS cor0
----
2280
3325
8455

query I rowsort
SELECT ALL col0 + - col1 * + ( + 3 ) FROM tab0 AS cor0
----
-184
-234
-256

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2145
SELECT CAST( NULL AS SIGNED ) / cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2145
SELECT CAST ( NULL AS INTEGER ) / cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ( cor0.col1 ) AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT - - cor0.col0 * - 26 * + col2 AS col1 FROM tab0 AS cor0
----
-189748
-20592
-910

query I rowsort
SELECT + 75 * - cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to aed14ed404e87746f8fce6033ab77c42

query I rowsort
SELECT ALL + col1 * 30 AS col2 FROM tab1
----
300
390
780

query I rowsort
SELECT ALL - col0 * 81 AS col2 FROM tab0
----
-1944
-2835
-7209

query I rowsort
SELECT DISTINCT - col1 * 51 AS col1 FROM tab2
----
-1581
-3009
-867

query I rowsort
SELECT + - col0 * col1 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-2153
SELECT 92 + - cor0.col1 DIV + col1 col1 FROM tab2 AS cor0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2153
SELECT 92 + - cor0.col1 / + col1 col1 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT ALL 38 + col2 FROM tab2 AS cor0
----
64
65
76

query I rowsort
SELECT DISTINCT + ( col1 ) AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL - cor0.col2 * ( ( col0 ) ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + col1 + + 96 * col1 FROM tab2 AS cor0
----
1615
2945
5605

query I rowsort
SELECT DISTINCT + col0 + 53 AS col2 FROM tab2 AS cor0
----
131
132
60

query I rowsort
SELECT + + col1 * 28 FROM tab0 cor0
----
2408
2548
2716

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 69 col2 FROM tab2 AS cor0
----
1794
1863
2622

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

query I rowsort
SELECT + cor0.col2 + col0 * + cor0.col2 + 87 * col2 AS col2 FROM tab2 cor0
----
2565
4316
6346

query I rowsort
SELECT + 36 * - col2 + - col2 FROM tab0 AS cor0
----
-1221
-3034
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 20 col1 FROM tab2
----
-1180
-340
-620

query I rowsort
SELECT DISTINCT - 89 * + col0 - + 57 AS col1 FROM tab2 AS cor0
----
-680
-6999
-7088

query I rowsort
SELECT ALL - + 45 + + col0 AS col0 FROM tab2 AS cor0
----
-38
33
34

query I rowsort
SELECT + + 46 AS col0 FROM tab2 AS cor0
----
46
46
46

query I rowsort
SELECT + col1 + 91 * - tab2.col2 * 74 FROM tab2
----
-175025
-181787
-255875

onlyif mysql # use DIV operator for integer division
query I rowsort label-2169
SELECT ALL - col2 DIV + col1 + col2 FROM tab2
----
26
27
36

skipif mysql # not compatible
query I rowsort label-2169
SELECT ALL - col2 / + col1 + col2 FROM tab2
----
26
27
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-2170
SELECT DISTINCT - 36 DIV + col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2170
SELECT DISTINCT - 36 / + col2 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2171
SELECT - - ( + col2 ) * CAST( col2 AS SIGNED ) * col0 FROM tab1 AS cor0
----
207936
737280
8748

skipif mysql # not compatible
query I rowsort label-2171
SELECT - - ( + col2 ) * CAST ( col2 AS INTEGER ) * col0 FROM tab1 AS cor0
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-2172
SELECT - 20 * col2 * + col1 + col1 * - col0 + col0 * - ( col1 ) DIV - col1 AS col1 FROM tab1 AS cor0
----
-11976
-25920
-28155

skipif mysql # not compatible
query I rowsort label-2172
SELECT - 20 * col2 * + col1 + col1 * - col0 + col0 * - ( col1 ) / - col1 AS col1 FROM tab1 AS cor0
----
-11976
-25920
-28155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2173
SELECT DISTINCT - - CAST( tab1.col1 AS SIGNED ) FROM tab1, tab2 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2173
SELECT DISTINCT - - CAST ( tab1.col1 AS INTEGER ) FROM tab1, tab2 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2174
SELECT + CAST( - col1 AS SIGNED ) + tab1.col0 * col1 AS col0 FROM tab1
----
1027
52
630

skipif mysql # not compatible
query I rowsort label-2174
SELECT + CAST ( - col1 AS INTEGER ) + tab1.col0 * col1 AS col0 FROM tab1
----
1027
52
630

query I rowsort
SELECT ALL - col2 + + col0 * ( col0 + + col2 ) AS col2 FROM tab1 AS cor0
----
117
13984
7687

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

query I rowsort
SELECT DISTINCT ( - tab0.col0 ) + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT 91 AS col2 FROM tab0, tab0 AS cor0
----
91

query I rowsort
SELECT + col2 + + col1 * col2 * col1 - - 89 FROM tab2
----
11109
26063
90621

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

skipif mysql # not compatible
query I rowsort label-2180
SELECT DISTINCT ( - col1 ) * - CAST ( NULL AS INTEGER ) * + 32 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL 26 AS col2 FROM tab0
----
26
26
26

query I rowsort
SELECT + 59 * col2 + col2 AS col1 FROM tab1
----
3240
3420
5760

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2185
SELECT DISTINCT - col0 DIV - col2 + + 34 FROM tab1 cor0
----
34
35

skipif mysql # not compatible
query I rowsort label-2185
SELECT DISTINCT - col0 / - col2 + + 34 FROM tab1 cor0
----
34
35

query I rowsort
SELECT DISTINCT + - ( col1 ) * - 28 - cor0.col1 AS col2 FROM tab1 AS cor0
----
270
351
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 + col1 col0 FROM tab0 AS cor0
----
121
126
132

onlyif mysql # use DIV operator for integer division
query I rowsort label-2188
SELECT col1 DIV + col1 + - tab1.col2 AS col1 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-2188
SELECT col1 / + col1 + - tab1.col2 AS col1 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT + col2 * col0 + + col1 + + col1 AS col2 FROM tab1
----
214
3668
7706

query I rowsort
SELECT + col2 - - col1 * 39 AS col1 FROM tab1
----
1068
447
603

query I rowsort
SELECT - col2 + + ( - tab1.col1 * + col1 ) - - 7 * col0 AS col2 FROM tab1
----
-709
291
295

query I rowsort
SELECT DISTINCT - col2 + ( col1 ) * col1 - col0 AS col0 FROM tab2
----
172
3377
927

query I rowsort
SELECT ALL + col2 - + 76 * 38 FROM tab0
----
-2806
-2855
-2887

query I rowsort
SELECT DISTINCT tab1.col0 * ( col2 ) - tab1.col0 AS col1 FROM tab1
----
159
3584
7600

query I rowsort
SELECT ALL - col0 + 25 AS col2 FROM tab0
----
-10
-64
1

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( - col1 AS REAL ) + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT 26 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2132
26
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2198
SELECT DISTINCT - + CAST( - ( col2 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2198
SELECT DISTINCT - + CAST ( - ( col2 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + col1 * + ( col0 ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL 78 * col2 + col1 FROM tab0 AS cor0
----
175
2660
6487

query I rowsort
SELECT + + col0 + col1 + + col0 AS col2 FROM tab1 AS cor0
----
138
173
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * ( + col2 ) col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + ( col1 ) + + cor0.col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT col0 * 10 FROM tab2 AS cor0
----
70
780
790

skipif mysql # not compatible
query I rowsort
SELECT ALL + + CAST ( - col0 AS REAL ) + + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + 20 + + col1 + - cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
-686
-7187
82

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + col2 * + col2 AS col2 FROM tab1 cor0
----
2913
3185
9136

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

query I rowsort
SELECT DISTINCT col0 * ( + col2 ) * + col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + - col1 * 21 + - col1 AS col0 FROM tab0 AS cor0
----
-1892
-2002
-2134

query I rowsort
SELECT ALL - cor0.col0 + 63 AS col1 FROM tab0 cor0
----
-26
28
39

query I rowsort
SELECT - + col1 * - col1 - col2 AS col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT col2 * + col1 + tab0.col1 FROM tab0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - - col1 * - col2 col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT col1 * - col0 + col0 FROM tab1
----
-576
-75
-960

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col0 col2 FROM tab2 AS cor0 WHERE NULL IN ( col0 )
----

query I rowsort
SELECT ALL - col0 + - col2 * + col1 AS col1 FROM tab2 cor0
----
-1612
-725
-844

query I rowsort
SELECT col1 / col1 + tab2.col0 * - col2 AS col2 FROM tab2 WHERE NULL >= NULL
----

query III rowsort
SELECT * FROM tab1 WHERE col2 BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - col2 * col2 + col2 * col2 * col2 FROM tab0
----
0
34848
544644

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col2 + + col0 col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT ALL tab1.col2 + - col1 * - tab1.col0 AS col1 FROM tab1
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-2224
SELECT tab1.col1 DIV + col1 + col1 AS col2 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2224
SELECT tab1.col1 / + col1 + col1 AS col2 FROM tab1
----
11
14
27

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

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col2 - col1 * col0 < + col1
----

query I rowsort
SELECT col2 * - col1 * - col2 AS col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT DISTINCT tab2.col0 AS col2 FROM tab2 WHERE ( - col1 - + col1 ) < ( col0 )
----
7
78
79

query III rowsort
SELECT ALL * FROM tab1 WHERE ( + tab1.col0 ) BETWEEN ( - col2 ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2230
SELECT DISTINCT col2 + + col2 DIV tab0.col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2230
SELECT DISTINCT col2 + + col2 / tab0.col2 FROM tab0
----
2
34
83

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2231
SELECT DISTINCT col2 / col0 col2 FROM tab2
----
0
3

query I rowsort
SELECT DISTINCT col1 * - col0 AS col2 FROM tab0 WHERE NOT ( - col1 ) >= + col0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL tab0.col2 + - col0 AS col2 FROM tab0 WHERE ( NULL ) NOT IN ( col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2234
SELECT ALL col2 + col1 DIV + col0 + - col2 * + tab1.col0 AS col2 FROM tab1
----
-100
-3591
-7584

skipif mysql # not compatible
query I rowsort label-2234
SELECT ALL col2 + col1 / + col0 + - col2 * + tab1.col0 AS col2 FROM tab1
----
-100
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2235
SELECT - col0 * col1 DIV - col0 col1 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2235
SELECT - col0 * col1 / - col0 col1 FROM tab1
----
10
13
26

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

query I rowsort
SELECT DISTINCT - col0 + col1 + + col1 FROM tab2 AS cor0
----
-45
40
55

query I rowsort
SELECT DISTINCT col2 / + col1 FROM tab1 WHERE NOT NULL < NULL
----

query I rowsort
SELECT ALL + col2 + col2 * cor0.col1 + + col1 FROM tab1 AS cor0
----
1357
1484
637

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2242
SELECT DISTINCT col2 DIV col1 - - col1 DIV + cor0.col1 AS col1 FROM tab2 AS cor0
----
1
3

skipif mysql # not compatible
query I rowsort label-2242
SELECT DISTINCT col2 / col1 - - col1 / + cor0.col1 AS col1 FROM tab2 AS cor0
----
1
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 + - cor0.col2 col0 FROM tab2 cor0
----
-1482
-702
-756

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

skipif mysql # not compatible
query I rowsort label-2244
SELECT + col0 / cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2245
SELECT DISTINCT col2 * col1 DIV - col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2245
SELECT DISTINCT col2 * col1 / - col1 FROM tab1 AS cor0
----
-54
-57
-96

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

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 WHERE col1 > cor0.col1
----

query IIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 WHERE NOT ( NULL ) <> NULL
----

query I rowsort
SELECT col1 FROM tab0 cor0 WHERE NOT NULL IN ( - col1 * col1 )
----

query I rowsort
SELECT DISTINCT col0 * col1 * - col2 + + col1 FROM tab2 cor0
----
-119593
-51017
-5828

query I rowsort
SELECT cor0.col1 * cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

query I rowsort
SELECT + tab0.col0 + col1 * - col1 AS col0 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT + + col0 * 46 AS col0 FROM tab0 AS cor0
----
1104
1610
4094

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

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

skipif mysql # not compatible
query I rowsort label-2255
SELECT col0 / - cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT + - cor0.col0 + 62 AS col0 FROM tab0 AS cor0
----
-27
27
38

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

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

query I rowsort
SELECT - - col2 * + 2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + 22 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

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

skipif mysql # not compatible
query I rowsort label-2261
SELECT CAST ( + 81 AS INTEGER ) FROM tab1 AS cor0
----
81
81
81

query I rowsort
SELECT - col1 * col1 * cor0.col2 + 44 FROM tab1 AS cor0
----
-16180
-36460
-5656

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2264
SELECT col1 DIV col1 + - col1 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2264
SELECT col1 / col1 + - col1 FROM tab2
----
-16
-30
-58

query III rowsort
SELECT ALL * FROM tab0 WHERE ( + tab0.col0 + + col1 ) >= ( - col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL col1 + + col1 * col2 FROM tab1
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col0 col0 FROM tab2
----
-1343
-217
-4602

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

query I rowsort
SELECT DISTINCT - - col0 + - col0 * col1 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + col2 col0 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + col2 + cor0.col0 * 44 FROM tab2 AS cor0
----
335
3458
3514

onlyif mysql # use DIV operator for integer division
query I rowsort label-2272
SELECT DISTINCT col2 DIV - ( + col1 ) + tab0.col0 * col2 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-2272
SELECT DISTINCT col2 / - ( + col1 ) + tab0.col0 * col2 FROM tab0
----
35
7298
792

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

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

skipif mysql # not compatible
query I rowsort label-2274
SELECT + tab0.col1 * CAST ( NULL AS INTEGER ) * + 23 + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * - 71 + col1 * + col2 * col2 AS col1 FROM tab2
----
20398
23341
35695

query I rowsort
SELECT ALL - ( - tab0.col0 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - + col1 + 73 FROM tab1 AS cor0
----
47
60
63

query I rowsort
SELECT ALL - 42 * cor0.col1 + col1 FROM tab2 cor0
----
-1271
-2419
-697

query I rowsort
SELECT 98 + - cor0.col1 FROM tab2 AS cor0
----
39
67
81

query I rowsort
SELECT ALL - + col2 + 1 FROM tab0 AS cor0
----
-32
-81
0

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

skipif mysql # not compatible
query I rowsort label-2281
SELECT cor0.col2 + col0 / - col2 FROM tab0 AS cor0
----
-34
33
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2282
SELECT 75 + col1 DIV col2 AS col0 FROM tab1
----
75
75
75

skipif mysql # not compatible
query I rowsort label-2282
SELECT 75 + col1 / col2 AS col0 FROM tab1
----
75
75
75

query I rowsort
SELECT ALL - 85 * col0 AS col1 FROM tab2 AS cor0
----
-595
-6630
-6715

query I rowsort
SELECT tab2.col0 - cor0.col2 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to db183adc221c8dbeefe59ca25fa8960a

query I rowsort
SELECT ALL - col2 - + col2 AS col1 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT + col0 + - tab0.col0 - 68 FROM tab0
----
-68
-68
-68

query I rowsort
SELECT ALL + 28 FROM tab0, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 47 + col2 col1 FROM tab0 cor0
----
129
48
80

query I rowsort
SELECT + - 91 + - col1 FROM tab2 AS cor0
----
-108
-122
-150

query I rowsort
SELECT DISTINCT - - col2 * - col1 + 89 - + col2 * - col2 FROM tab2 AS cor0
----
-19
-769
887

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

skipif mysql # not compatible
query I rowsort label-2291
SELECT + col2 + - 47 / - col0 AS col0 FROM tab2 AS cor0
----
26
33
38

query I rowsort
SELECT - + col0 * - ( - col2 ) AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 * - cor0.col0 * - 77 + + cor0.col2 FROM tab0 cor0
----
-2694
-561864
-60951

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2296
SELECT DISTINCT + 63 DIV col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-2296
SELECT DISTINCT + 63 / col1 FROM tab0
----
0

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

query I rowsort
SELECT DISTINCT + col1 - col1 FROM tab2 cor0
----
0

query I rowsort
SELECT col1 * col0 - - col2 * + col2 FROM tab1 AS cor0
----
10256
2994
3889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 + col2 col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - col2 * - col2 - col0 AS col0 FROM tab2
----
1365
598
722

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2303
SELECT - col1 DIV - col0 - - tab0.col0 AS col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-2303
SELECT - col1 / - col0 - - tab0.col0 AS col0 FROM tab0
----
27
37
90

query I rowsort
SELECT col1 * - col1 + + cor0.col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - col1 * - col1 + - col0 / - col1 FROM tab0 AS cor0 WHERE NOT ( col0 + col2 ) <> + col1 + - col1 * + col1 * col1 OR NOT ( NULL ) NOT BETWEEN col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2306
SELECT ALL + col1 + tab1.col0 DIV - col2 AS col2 FROM tab1
----
13
26
9

skipif mysql # not compatible
query I rowsort label-2306
SELECT ALL + col1 + tab1.col0 / - col2 AS col2 FROM tab1
----
13
26
9

query I rowsort
SELECT + col2 - + tab0.col0 * col0 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT - col1 + - col1 * + col1 AS col1 FROM tab2
----
-306
-3540
-992

onlyif mysql # use DIV operator for integer division
query I rowsort label-2309
SELECT col2 DIV col0 + + col0 AS col0 FROM tab1
----
21
64
81

skipif mysql # not compatible
query I rowsort label-2309
SELECT col2 / col0 + + col0 AS col0 FROM tab1
----
21
64
81

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

skipif mysql # not compatible
query I rowsort label-2310
SELECT tab0.col2 / col2 AS col1 FROM tab0
----
1
1
1

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

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

query I rowsort
SELECT DISTINCT col0 * + col1 * tab0.col1 + - col1 * - col2 AS col2 FROM tab0
----
180342
329412
744471

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab2 cor0
----
93

query I rowsort
SELECT DISTINCT - - col0 * - col2 + + col1 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 50 * - col2 col2 FROM tab0 AS cor0
----
-1650
-4100
-50

query I rowsort
SELECT - - cor0.col2 * col2 * col1 AS col2 FROM tab1 AS cor0
----
119808
32490
75816

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

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

query I rowsort
SELECT - 81 + - col2 FROM tab1
----
-135
-138
-177

query I rowsort
SELECT DISTINCT col2 + - col0 + tab2.col2 FROM tab2
----
-26
-3
47

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

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

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

query I rowsort
SELECT - - 12 * col1 + - col1 AS col0 FROM tab2 AS cor0
----
187
341
649

query I rowsort
SELECT ALL - col0 * col1 - col1 AS col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - col1 * + col0 + col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT + col0 + - col1 * col1 AS col2 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL + 20 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 * + col1 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT 89 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT ALL - ( cor0.col1 ) - - tab2.col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 29a344fb4ecaf9061cb2c6ffe0fd7f9e

query I rowsort
SELECT - - col2 * 6 + cor0.col1 FROM tab0 cor0
----
103
284
583

query I rowsort
SELECT DISTINCT col2 * - col1 + + 23 FROM tab1 AS cor0
----
-1225
-1381
-547

query I rowsort
SELECT DISTINCT - 31 * + 33 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-1023

query I rowsort
SELECT 12 * + col0 FROM tab2 AS cor0
----
84
936
948

query I rowsort
SELECT DISTINCT - tab2.col0 AS col1 FROM tab2, tab0, tab1 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - ( - 25 ) * col2 AS col1 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT ALL - tab1.col0 + + 34 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 76c361dd660f634ea22ee4da2975c14a

query I rowsort
SELECT DISTINCT + col2 * - 34 AS col0 FROM tab2
----
-1292
-884
-918

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2342
SELECT col2 + col1 DIV tab1.col0 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-2342
SELECT col2 + col1 / tab1.col0 FROM tab1
----
57
62
96

query I rowsort
SELECT + + cor0.col0 * - col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

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

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

query I rowsort
SELECT + col1 + 64 AS col0 FROM tab2 AS cor0
----
123
81
95

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

query I rowsort
SELECT 1 * 42 FROM tab2 AS cor0
----
42
42
42

query I rowsort
SELECT ALL - 35 + col2 FROM tab1 cor0
----
19
22
61

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

skipif mysql # not compatible
query I rowsort label-2350
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / + col1 - + col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT + + col2 * 2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + + 60 - - col1 FROM tab2 cor0
----
119
77
91

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

query I rowsort
SELECT ALL + tab0.col0 * col0 AS col1 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col0 ) col1 FROM tab0
----
24
35
89

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2357
SELECT ALL 0 DIV 35 - - col1 * col1 * 19 AS col2 FROM tab1
----
12844
1900
3211

skipif mysql # not compatible
query I rowsort label-2357
SELECT ALL 0 / 35 - - col1 * col1 * 19 AS col2 FROM tab1
----
12844
1900
3211

query I rowsort
SELECT - col1 * 40 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-3354
-3549
-3783

query I rowsort
SELECT - col1 + col2 + 38 AS col1 FROM tab0 AS cor0
----
-15
-58
29

query I rowsort
SELECT ( - col2 ) - 39 AS col2 FROM tab2
----
-65
-66
-77

query I rowsort
SELECT DISTINCT + + 44 * col1 AS col1 FROM tab1 AS cor0
----
1144
440
572

query I rowsort
SELECT + col1 + col2 * + col2 + ( col2 ) FROM tab1 AS cor0
----
2996
3316
9325

query I rowsort
SELECT ALL + 48 * col2 FROM tab2
----
1248
1296
1824

query I rowsort
SELECT - 18 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 2dbe09d9295cfd52d854fefabf2cec4e

query I rowsort
SELECT - col1 + - cor0.col2 + - col2 AS col0 FROM tab0 AS cor0
----
-152
-255
-99

query I rowsort
SELECT + - col1 + col1 * ( cor0.col0 ) * + col0 AS col2 FROM tab1 AS cor0
----
208
40950
83187

query I rowsort
SELECT + - col1 * 73 AS col0 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT + col0 + 93 * cor0.col2 * col2 AS col1 FROM tab2 AS cor0
----
134371
62946
67804

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 68 * 2 FROM tab0 AS cor0
----
-136
-136
-136

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

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

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

query I rowsort
SELECT ALL col2 * - 74 FROM tab2 AS cor0
----
-1924
-1998
-2812

query I rowsort
SELECT DISTINCT - col2 * 2 AS col0 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT - cor0.col2 * - 18 AS col0 FROM tab2, tab2 cor0
----
468
486
684

query I rowsort
SELECT col2 + 38 FROM tab2 cor0
----
64
65
76

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + + CAST ( 2 AS REAL ) AS col1 FROM tab0 AS cor0
----
88
93
99

query I rowsort
SELECT ALL - col2 + col0 * col2 AS col2 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-2380
SELECT DISTINCT + + cor0.col2 - + col2 DIV col1 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-2380
SELECT DISTINCT + + cor0.col2 - + col2 / col1 FROM tab2 AS cor0
----
26
27
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - ( + col0 ) col2 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * 38 col1 FROM tab2 AS cor0
----
1178
2242
646

query I rowsort
SELECT ALL - col1 * ( + 7 ) AS col0 FROM tab1 cor0
----
-182
-70
-91

query I rowsort
SELECT + - col0 * col1 + - col0 FROM tab2 AS cor0
----
-1422
-224
-4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2385
SELECT DISTINCT col2 DIV - col1 - + col2 * - col0 AS col2 FROM tab1
----
160
3643
7673

skipif mysql # not compatible
query I rowsort label-2385
SELECT DISTINCT col2 / - col1 - + col2 * - col0 AS col2 FROM tab1
----
160
3643
7673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab0.col0 + 43 ) * col1 col2 FROM tab0
----
12012
5762
7566

query I rowsort
SELECT 91 * - col1 AS col2 FROM tab1
----
-1183
-2366
-910

query I rowsort
SELECT 47 * col1 AS col2 FROM tab2
----
1457
2773
799

query I rowsort
SELECT - col1 + - 56 AS col1 FROM tab0
----
-142
-147
-153

query I rowsort
SELECT ALL 93 * cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1f8f6090116a8ad86d2dd0b7c3651663

query I rowsort
SELECT DISTINCT + col2 + - col1 * 64 FROM tab1
----
-1610
-583
-736

query I rowsort
SELECT cor1.col1 FROM tab2 cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - - col0 - 53 AS col2 FROM tab0 AS cor0
----
-18
-29
36

query I rowsort
SELECT ALL - - col0 + - col0 + + col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col0 * + 51 FROM tab1
----
-153
-3264
-4080

onlyif mysql # use DIV operator for integer division
query I rowsort label-2396
SELECT ALL + 33 DIV - col1 AS col0 FROM tab1
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2396
SELECT ALL + 33 / - col1 AS col0 FROM tab1
----
-1
-2
-3

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

query I rowsort
SELECT DISTINCT + 85 * col1 AS col1 FROM tab1 cor0
----
1105
2210
850

query I rowsort
SELECT DISTINCT - col1 * + col1 + - col0 AS col2 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT DISTINCT col2 + + cor0.col0 * col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL - 76 * - cor0.col2 FROM tab2 cor0
----
1976
2052
2888

query I rowsort
SELECT 83 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT DISTINCT - ( tab1.col1 ) AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-10
-13
-26

query I rowsort
SELECT ALL col0 * col1 + + col0 + + col0 FROM tab0
----
2112
3465
8277

onlyif mysql # use DIV operator for integer division
query I rowsort label-2405
SELECT ALL - 51 DIV + cor0.col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2405
SELECT ALL - 51 / + cor0.col0 FROM tab0 AS cor0
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2406
SELECT DISTINCT + col1 DIV col2 + + col0 AS col2 FROM tab0 cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-2406
SELECT DISTINCT + col1 / col2 + + col0 AS col2 FROM tab0 cor0
----
132
26
90

query I rowsort
SELECT ALL + 88 * col0 * - ( col1 ) + + cor0.col1 AS col2 FROM tab2 AS cor0
----
-118167
-19065
-404917

query I rowsort
SELECT - + ( - col1 ) * + col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col0 + 84 FROM tab1 AS cor0
----
148
164
87

query I rowsort
SELECT DISTINCT - cor0.col1 * - 76 AS col1 FROM tab1 cor0
----
1976
760
988

query I rowsort
SELECT - col2 * col1 - + col0 * + col1 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT cor0.col0 * 35 * col1 FROM tab2 AS cor0
----
161070
47005
7595

query I rowsort
SELECT ALL + cor0.col0 * - col2 * - col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT - col0 - col1 * + col2 * + ( - col2 ) AS col0 FROM tab2
----
22592
24469
39806

query I rowsort
SELECT - col2 * 30 + col2 FROM tab1 AS cor0
----
-1566
-1653
-2784

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

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

query I rowsort
SELECT cor0.col0 - 60 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to dbc0dce3f770fa429539d989c467a3d8

query I rowsort
SELECT DISTINCT - 17 * + col2 + + col1 FROM tab0 cor0
----
-1303
-475
80

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2423
SELECT + CAST( 11 AS SIGNED ) + - col2 AS col0 FROM tab0 AS cor0
----
-22
-71
10

skipif mysql # not compatible
query I rowsort label-2423
SELECT + CAST ( 11 AS INTEGER ) + - col2 AS col0 FROM tab0 AS cor0
----
-22
-71
10

query I rowsort
SELECT ALL 99 * col2 + col1 FROM tab0 AS cor0
----
196
3353
8209

query I rowsort
SELECT ALL - 47 * col2 AS col1 FROM tab0 AS cor0
----
-1551
-3854
-47

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

query I rowsort
SELECT ALL + 50 + col2 FROM tab1 cor0
----
104
107
146

query I rowsort
SELECT ALL 68 + + ( col0 + + ( + col1 ) ) FROM tab2 AS cor0
----
106
164
205

onlyif mysql # use DIV operator for integer division
query I rowsort label-2429
SELECT DISTINCT col1 * + col1 + + col2 DIV 15 FROM tab2 AS cor0
----
291
3482
962

skipif mysql # not compatible
query I rowsort label-2429
SELECT DISTINCT col1 * + col1 + + col2 / 15 FROM tab2 AS cor0
----
291
3482
962

onlyif mysql # use DIV operator for integer division
query I rowsort label-2430
SELECT ALL - + 83 + col0 DIV col0 - + col1 AS col0 FROM tab2 AS cor0
----
-113
-141
-99

skipif mysql # not compatible
query I rowsort label-2430
SELECT ALL - + 83 + col0 / col0 - + col1 AS col0 FROM tab2 AS cor0
----
-113
-141
-99

query I rowsort
SELECT DISTINCT 34 * 85 - + cor0.col0 AS col0 FROM tab1 AS cor0
----
2810
2826
2887

query I rowsort
SELECT DISTINCT col2 * - col2 + + col0 * col2 + col0 FROM tab0 AS cor0
----
-273
663
69

query I rowsort
SELECT col2 - + col2 * + col0 AS col0 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT col1 * + col1 + col0 * col2 FROM tab0
----
15579
8188
9444

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2437
SELECT DISTINCT col1 DIV - 14 AS col2 FROM tab2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-2437
SELECT DISTINCT col1 / - 14 AS col2 FROM tab2
----
-1
-2
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2438
SELECT DISTINCT - col0 DIV 72 FROM tab1 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2438
SELECT DISTINCT - col0 / 72 FROM tab1 cor0
----
-1
0

query I rowsort
SELECT DISTINCT cor0.col2 + - 45 FROM tab2 AS cor0
----
-18
-19
-7

query I rowsort
SELECT - col0 * 12 * - ( - col1 ) AS col2 FROM tab0 AS cor0
----
-24768
-40740
-97188

query I rowsort
SELECT - 25 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2e7a33467ee3a4d9570560d60302b35a

query I rowsort
SELECT - - col0 * 59 + col2 FROM tab2 AS cor0
----
440
4628
4699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 * 92 col2 FROM tab0 cor0
----
-6164
-6164
-6164

query I rowsort
SELECT + col0 * - col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

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

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

query I rowsort
SELECT ALL 14 FROM tab0, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

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

skipif mysql # not compatible
query I rowsort label-2448
SELECT DISTINCT - col0 / 84 AS col1 FROM tab0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2449
SELECT + - col0 * col1 + ( + col1 ) DIV + col1 FROM tab2 AS cor0
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-2449
SELECT + - col0 * col1 + ( + col1 ) / + col1 FROM tab2 AS cor0
----
-1342
-216
-4601

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

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col1 + 0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL 98 * col0 AS col0 FROM tab2 AS cor0
----
686
7644
7742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 26 * + col0 - col1 col2 FROM tab1 AS cor0
----
1654
2067
52

query I rowsort
SELECT ( - col2 * + col1 ) AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL 2 - + tab1.col0 FROM tab1
----
-1
-62
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 + + col2 col0 FROM tab2
----
-28
-39
-40

query I rowsort
SELECT col0 * + col2 * 54 FROM tab2
----
10206
109512
162108

onlyif mysql # use DIV operator for integer division
query I rowsort label-2458
SELECT col1 + - col2 + + col0 DIV - 99 AS col2 FROM tab0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-2458
SELECT col1 + - col2 + + col0 / - 99 AS col2 FROM tab0
----
53
9
96

query I rowsort
SELECT tab1.col0 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL col2 * - col0 + ( + col2 * - col2 ) AS col1 FROM tab2 AS cor0
----
-2704
-4446
-918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col0 - col2 * col1 col2 FROM tab1 AS cor0
----
-1341
-1433
-644

onlyif mysql # use DIV operator for integer division
query I rowsort label-2462
SELECT DISTINCT - - col1 DIV col0 AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2462
SELECT DISTINCT - - col1 / col0 AS col0 FROM tab0 AS cor0
----
1
2
3

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

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

query I rowsort
SELECT - ( - tab2.col2 ) + cor1.col2 AS col0 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 135e61500eadea964d6ea6ab73b38c8f

onlyif mysql # use DIV operator for integer division
query I rowsort label-2466
SELECT 56 DIV col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2466
SELECT 56 / col2 FROM tab1
----
0
0
1

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

query I rowsort
SELECT ALL - cor0.col0 * - col2 * 65 AS col2 FROM tab1 cor0
----
10530
237120
499200

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 9be0dab92dd50faf37ee99ac8db7c57d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2470
SELECT + - col2 DIV 38 AS col1 FROM tab0 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2470
SELECT + - col2 / 38 AS col1 FROM tab0 AS cor0
----
-2
0
0

query I rowsort
SELECT ALL + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - + col1 + - ( 24 ) FROM tab1 AS cor0
----
-34
-37
-50

query I rowsort
SELECT col1 - - 62 AS col0 FROM tab1 AS cor0
----
72
75
88

query I rowsort
SELECT + cor0.col0 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2475
SELECT + cor0.col0 * CAST ( NULL AS INTEGER ) + 16 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0 CROSS JOIN tab0, tab1, tab0 AS cor1
----
3645 values hashing to 2566f3fa788816c8bfc482e730aaed74

query I rowsort
SELECT + 5 * 6 FROM tab0 cor0
----
30
30
30

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

skipif mysql # not compatible
query I rowsort label-2480
SELECT + CAST ( col0 AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - col0 * + col2 * + col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL - col1 * - col0 + cor0.col2 * col0 AS col0 FROM tab0 cor0
----
15397
2856
3430

query I rowsort
SELECT - col2 * + 21 * + col2 FROM tab0 cor0
----
-141204
-21
-22869

query I rowsort
SELECT - - 56 * - col2 FROM tab0 AS cor0
----
-1848
-4592
-56

query I rowsort
SELECT ALL - 6 + 90 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT ALL - col0 + col1 + col1 FROM tab2 AS cor0
----
-45
40
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-2487
SELECT DISTINCT 87 DIV + 58 - col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2487
SELECT DISTINCT 87 / + 58 - col1 FROM tab2 AS cor0
----
-16
-30
-58

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

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

query I rowsort
SELECT ALL - ( - cor0.col2 ) * col0 + + col0 * 86 FROM tab0 cor0
----
14952
2856
3045

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

query I rowsort
SELECT + col1 * 62 + col0 AS col2 FROM tab2 AS cor0
----
1133
1929
3736

query I rowsort
SELECT + - 99 + 53 FROM tab0 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL - 72 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT DISTINCT - + 63 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT DISTINCT - col1 * + 33 FROM tab2 cor0
----
-1023
-1947
-561

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

query I rowsort
SELECT ALL + col2 + + col2 + - col1 * - col2 FROM tab1 AS cor0
----
1440
1512
684

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

query I rowsort
SELECT DISTINCT - col2 * col1 * col1 + 44 * - col0 FROM tab1 AS cor0
----
-19744
-36636
-8516

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

query I rowsort
SELECT col2 * col2 + - col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT DISTINCT + col2 + - col2 * col1 AS col1 FROM tab0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2504
SELECT ( col1 ) DIV - col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2504
SELECT ( col1 ) / - col1 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT - col2 + - col1 * 29 AS col1 FROM tab2
----
-1737
-531
-926

onlyif mysql # use DIV operator for integer division
query I rowsort label-2506
SELECT + col1 + ( - 87 ) DIV - col2 FROM tab1
----
11
13
27

skipif mysql # not compatible
query I rowsort label-2506
SELECT + col1 + ( - 87 ) / - col2 FROM tab1
----
11
13
27

query I rowsort
SELECT col0 * + col0 + + col0 * col2 FROM tab1
----
14080
171
7744

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

skipif mysql # not compatible
query I rowsort label-2508
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) - - 2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT tab0.col1 AS col2 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT col2 * - ( col0 ) * + col2 AS col2 FROM tab2
----
-114076
-5103
-52728

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

query I rowsort
SELECT col1 * + ( 1 ) FROM tab0 cor0
----
86
91
97

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

query I rowsort
SELECT DISTINCT - + cor0.col0 + + col0 * 99 AS col2 FROM tab1 AS cor0
----
294
6272
7840

query I rowsort
SELECT ALL + col0 + 7 * + col1 AS col0 FROM tab0 AS cor0
----
626
714
726

query I rowsort
SELECT ALL + - col0 * + 16 FROM tab1 cor0
----
-1024
-1280
-48

query I rowsort
SELECT ALL + ( - col1 ) + col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

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

query I rowsort
SELECT ALL + ( 93 ) * + col1 FROM tab1
----
1209
2418
930

query I rowsort
SELECT ALL col1 * + 11 AS col2 FROM tab2
----
187
341
649

query I rowsort
SELECT DISTINCT - cor0.col1 + 80 FROM tab1 cor0
----
54
67
70

query I rowsort
SELECT DISTINCT - - ( col1 ) + - cor0.col1 * - ( + col1 ) AS col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL cor0.col0 - + 30 FROM tab1 AS cor0
----
-27
34
50

query I rowsort
SELECT ALL col0 * - col2 + 31 AS col2 FROM tab0
----
-4
-7267
-761

query I rowsort
SELECT + col2 + + tab0.col2 * col1 + ( - col2 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT 76 + - col2 FROM tab0 AS cor0
----
-6
43
75

query I rowsort
SELECT DISTINCT + col2 * col0 + col1 + col0 AS col0 FROM tab2
----
2165
227
3098

query I rowsort
SELECT ALL + col2 + cor0.col1 * col1 * + 87 FROM tab2 AS cor0
----
25181
302873
83634

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

query I rowsort
SELECT DISTINCT + 47 * + cor0.col2 AS col0 FROM tab2 cor0
----
1222
1269
1786

onlyif mysql # use DIV operator for integer division
query I rowsort label-2531
SELECT ALL col2 DIV 92 + + 57 FROM tab1 AS cor0
----
57
57
58

skipif mysql # not compatible
query I rowsort label-2531
SELECT ALL col2 / 92 + + 57 FROM tab1 AS cor0
----
57
57
58

query I rowsort
SELECT ALL + + cor0.col2 + 13 FROM tab0 AS cor0
----
14
46
95

query I rowsort
SELECT ALL col2 * col1 + - 51 * + col2 FROM tab0 AS cor0
----
1155
3280
46

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

query I rowsort
SELECT ALL - col0 + col2 * cor0.col1 * - col2 FROM tab1 AS cor0
----
-119888
-32554
-75819

query I rowsort
SELECT DISTINCT + - col2 + col0 * + col0 AS col1 FROM tab2 AS cor0
----
22
6058
6203

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

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

query I rowsort
SELECT ALL - cor0.col0 * col1 + col2 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-2539
SELECT + - col2 DIV - cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2539
SELECT + - col2 / - cor0.col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - - col1 + 91 AS col0 FROM tab0 AS cor0
----
177
182
188

query I rowsort
SELECT ALL - 71 + col0 + + 50 * + col0 FROM tab0
----
1153
1714
4468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2542
SELECT ALL 15 * col0 + - CAST( - col2 AS SIGNED ) AS col0 FROM tab1
----
1017
1296
99

skipif mysql # not compatible
query I rowsort label-2542
SELECT ALL 15 * col0 + - CAST ( - col2 AS INTEGER ) AS col0 FROM tab1
----
1017
1296
99

query I rowsort
SELECT cor0.col1 * - 59 FROM tab1, tab1 AS cor0
----
9 values hashing to 45e711e5ea001a4b37a1982ea9658743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col1 col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col1 + col0 * + col0 + - col1 FROM tab0
----
1225
576
7921

query III rowsort
SELECT * FROM tab2 WHERE col2 < NULL
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( col2 ) <= ( col0 )
----
64
10
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0 WHERE NOT + col0 NOT IN ( col1 * tab0.col0 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE col2 * col1 NOT IN ( + tab1.col2 / + tab1.col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT col2 * tab0.col1 * col0 + - tab0.col0 AS col1 FROM tab0
----
3360
664029
68088

query I rowsort
SELECT col0 + col0 + col2 AS col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) IN ( col2 * - col1 * - col0 + + col1 * cor0.col2 )
----

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

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

query I rowsort
SELECT - col0 + - col1 + col0 * col1 AS col2 FROM tab0 AS cor0
----
1954
3263
7919

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - col0 * + col0 col1 FROM tab1 cor0
----
233472
486
614400

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

query I rowsort
SELECT ALL + col2 * + cor0.col2 + cor0.col2 + col0 FROM tab0 cor0
----
1146
37
6895

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * + col0 col0 FROM tab2 cor0
----
-49
-6084
-6241

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

query I rowsort
SELECT DISTINCT col2 + - col2 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

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

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

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NULL < NULL OR + cor0.col1 * + col2 <= col2 * - col2 - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2564
SELECT DISTINCT + col1 DIV + tab1.col2 col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2564
SELECT DISTINCT + col1 / + tab1.col2 col1 FROM tab1
----
0

query I rowsort
SELECT col1 * col0 * + col2 + - col0 FROM tab1
----
36416
4209
99760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2566
SELECT + tab2.col0 + col1 DIV + col1 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-2566
SELECT + tab2.col0 + col1 / + col1 FROM tab2
----
79
8
80

query I rowsort
SELECT ALL + col1 + + col1 * + col1 * + col2 FROM tab0 AS cor0
----
244154
679133
9506

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

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

query I rowsort
SELECT ALL + col0 - - cor0.col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + 18 * cor0.col1 AS col1 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT + + col1 * + col2 + cor0.col2 * + col0 * ( 19 + col0 ) AS col0 FROM tab0 AS cor0
----
1987
36894
795646

query I rowsort
SELECT - - cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

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

skipif mysql # not compatible
query I rowsort label-2573
SELECT - - col0 + CAST ( - col1 AS INTEGER ) + col1 AS col0 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * ( 53 ) col2 FROM tab0 AS cor0
----
4558
4823
5141

query I rowsort
SELECT col2 + 39 * + col1 FROM tab2 AS cor0
----
1236
2327
701

onlyif mysql # use DIV operator for integer division
query I rowsort label-2576
SELECT ALL + col0 DIV - 68 + col2 AS col0 FROM tab1 AS cor0
----
54
57
95

skipif mysql # not compatible
query I rowsort label-2576
SELECT ALL + col0 / - 68 + col2 AS col0 FROM tab1 AS cor0
----
54
57
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2577
SELECT col0 * - col2 - 24 DIV + ( + col1 ) AS col0 FROM tab0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-2577
SELECT col0 * - col2 - 24 / + ( + col1 ) AS col0 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 + col1 col2 FROM tab1
----
-54
-67
23

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

query III rowsort
SELECT * FROM tab1 WHERE NULL >= + col2 / col0
----

query I rowsort
SELECT DISTINCT - col0 FROM tab0 WHERE col1 NOT IN ( - col1 )
----
-24
-35
-89

query I rowsort
SELECT ALL - col2 AS col1 FROM tab1 WHERE NOT + col1 NOT IN ( + col0 * col2 + - col2 )
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2585
SELECT ALL col0 DIV col1 + + col1 * col1 FROM tab1
----
106
175
676

skipif mysql # not compatible
query I rowsort label-2585
SELECT ALL col0 / col1 + + col1 * col1 FROM tab1
----
106
175
676

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

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

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

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

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

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT IN ( col1 * col0 + tab1.col2 / col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + - col2 col2 FROM tab1
----
-1344
-1458
-627

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

query I rowsort
SELECT col0 * + col2 + 33 * + col1 FROM tab1
----
1020
3978
8109

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 62 * + col2 * + tab0.col0 col2 FROM tab0
----
-2170
-452476
-49104

query I rowsort
SELECT - 90 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

onlyif mysql # use DIV operator for integer division
query I rowsort label-2597
SELECT ALL + 49 * col2 DIV 45 FROM tab1 AS cor0
----
104
58
62

skipif mysql # not compatible
query I rowsort label-2597
SELECT ALL + 49 * col2 / 45 FROM tab1 AS cor0
----
104
58
62

query I rowsort
SELECT DISTINCT - col2 * - ( - 85 ) + - cor0.col0 FROM tab1 cor0
----
-4593
-4909
-8240

query I rowsort
SELECT ALL col2 + - ( + 53 ) AS col2 FROM tab2 AS cor0
----
-15
-26
-27

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

query I rowsort
SELECT col0 * + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + + col1 * + 38 * 27 FROM tab1 AS cor0
----
10260
13338
26676

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 * - 13 FROM tab2 AS cor0
----
-10881
-19942
-8398

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2604
SELECT DISTINCT - + col0 + CAST( + col1 AS SIGNED ) * col1 FROM tab2 AS cor0
----
210
3403
954

skipif mysql # not compatible
query I rowsort label-2604
SELECT DISTINCT - + col0 + CAST ( + col1 AS INTEGER ) * col1 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL + col1 * ( col1 ) AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL 99 * col0 * + col0 FROM tab1
----
405504
633600
891

query I rowsort
SELECT DISTINCT + col0 * + col2 + 21 + col1 AS col2 FROM tab2 AS cor0
----
2108
241
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2608
SELECT DISTINCT - CAST( + ( - col0 ) AS SIGNED ) AS col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2608
SELECT DISTINCT - CAST ( + ( - col0 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + col0 + 50 FROM tab0 AS cor0
----
139
74
85

query I rowsort
SELECT + 77 + col0 AS col2 FROM tab1 AS cor0
----
141
157
80

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 19 ) * - col2 + 97 * col1 col2 FROM tab0 AS cor0
----
7269
7715
9390

query I rowsort
SELECT 97 + ( col0 ) * + 47 AS col1 FROM tab2 AS cor0
----
3763
3810
426

query I rowsort
SELECT DISTINCT col1 + 20 * col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
146051
15926
797

query I rowsort
SELECT - col2 * 4 FROM tab1
----
-216
-228
-384

onlyif mysql # use DIV operator for integer division
query I rowsort label-2616
SELECT DISTINCT - cor0.col2 DIV 37 AS col0 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2616
SELECT DISTINCT - cor0.col2 / 37 AS col0 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT - 54 + 82 AS col0 FROM tab0 AS cor0
----
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-2618
SELECT ALL - col0 DIV + col2 + col1 AS col0 FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-2618
SELECT ALL - col0 / + col2 + col1 AS col0 FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT DISTINCT + + 82 - + col0 FROM tab2 AS cor0
----
3
4
75

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

skipif mysql # not compatible
query I rowsort label-2620
SELECT + - col1 / 24 + - col1 AS col2 FROM tab0 AS cor0
----
-101
-89
-94

query I rowsort
SELECT DISTINCT - 90 * - col1 - + cor0.col0 AS col1 FROM tab2 AS cor0
----
1451
2783
5232

query I rowsort
SELECT DISTINCT + 57 * + col0 FROM tab0 cor0
----
1368
1995
5073

query I rowsort
SELECT DISTINCT 24 AS col1 FROM tab2, tab2 AS cor0
----
24

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2627
SELECT col2 DIV 46 - col0 FROM tab1
----
-2
-63
-78

skipif mysql # not compatible
query I rowsort label-2627
SELECT col2 / 46 - col0 FROM tab1
----
-2
-63
-78

query I rowsort
SELECT - 15 AS col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
81 values hashing to af17c026b0658d7a3496b8b16be82ec5

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 + col2 * col1 * - col2 col1 FROM tab1 AS cor0
----
-118768
-31850
-75738

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

query I rowsort
SELECT DISTINCT - - col0 * col0 + + col2 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT - 71 * col1 + - col1 * col0 AS col1 FROM tab2 AS cor0
----
-2418
-2550
-8791

query I rowsort
SELECT DISTINCT col0 * + col1 + - col0 FROM tab0 cor0
----
2040
3360
8010

query I rowsort
SELECT - 55 + - col0 FROM tab0 AS cor0
----
-144
-79
-90

query I rowsort
SELECT ALL col1 * - col0 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + 22 + col0 FROM tab1 AS cor0
----
102
25
86

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

query I rowsort
SELECT ALL - tab1.col0 * 11 + tab1.col2 AS col0 FROM tab1
----
-647
-784
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2640
SELECT ALL - CAST( col1 AS SIGNED ) + col2 FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-2640
SELECT ALL - CAST ( col1 AS INTEGER ) + col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + col1 * - 55 + - col2 FROM tab1
----
-1484
-607
-811

onlyif mysql # use DIV operator for integer division
query I rowsort label-2642
SELECT col2 + col1 DIV - cor0.col0 FROM tab0 AS cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-2642
SELECT col2 + col1 / - cor0.col0 FROM tab0 AS cor0
----
-1
30
81

query I rowsort
SELECT DISTINCT - col1 + + ( col1 ) FROM tab2
----
0

query I rowsort
SELECT + 45 * - col0 FROM tab1 AS cor0
----
-135
-2880
-3600

query I rowsort
SELECT ALL - 16 + col0 * + col1 FROM tab2 AS cor0
----
1327
201
4586

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2648
SELECT col0 DIV 82 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2648
SELECT col0 / 82 FROM tab2
----
0
0
0

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

skipif mysql # not compatible
query I rowsort label-2649
SELECT DISTINCT col2 + CAST ( NULL AS INTEGER ) + + col2 FROM tab0
----
NULL

query I rowsort
SELECT ( - 35 * - col2 ) + tab2.col2 + col2 FROM tab2
----
1406
962
999

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 43cd4d6bf46fb9ce15caf369cb36598e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 * - col0 col2 FROM tab2 AS cor0
----
-455
-5070
-5135

query I rowsort
SELECT ALL - 22 + + 29 AS col1 FROM tab0 AS cor0
----
7
7
7

query I rowsort
SELECT ALL ( + col2 ) * + col2 + col0 AS col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT - col1 * 29 AS col1 FROM tab0 AS cor0
----
-2494
-2639
-2813

query I rowsort
SELECT DISTINCT - 93 + col0 * col2 AS col1 FROM tab0 AS cor0
----
-58
699
7205

query I rowsort
SELECT DISTINCT + 23 * ( - cor0.col1 ) FROM tab1 AS cor0
----
-230
-299
-598

query I rowsort
SELECT DISTINCT - col1 * - 37 * col2 FROM tab2 cor0
----
23902
30969
56758

query I rowsort
SELECT + 96 * - 44 AS col0 FROM tab2 AS cor0
----
-4224
-4224
-4224

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 86 AS REAL ) + - col0 FROM tab1 AS cor0
----
-150
-166
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2661
SELECT 96 DIV 71 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2661
SELECT 96 / 71 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2662
SELECT - tab2.col0 DIV + tab2.col0 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2662
SELECT - tab2.col0 / + tab2.col0 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT + tab1.col1 * + tab1.col1 AS col2 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2664
SELECT 90 * + col0 DIV + col0 FROM tab1
----
90
90
90

skipif mysql # not compatible
query I rowsort label-2664
SELECT 90 * + col0 / + col0 FROM tab1
----
90
90
90

query I rowsort
SELECT ALL - col1 * 30 * tab0.col2 AS col2 FROM tab0
----
-223860
-2910
-85140

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( 69 AS REAL ) AS col0 FROM tab0
----
69

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2668
SELECT DISTINCT col0 DIV - 90 AS col2 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-2668
SELECT DISTINCT col0 / - 90 AS col2 FROM tab1 cor0
----
0

query I rowsort
SELECT - col0 + + col1 - + col0 AS col0 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT - 4 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 39ed23475412c3cbba02ecdd2d7018e6

query I rowsort
SELECT + col1 + + col0 * + 51 AS col2 FROM tab1
----
179
3274
4093

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

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

query I rowsort
SELECT + col1 * 24 AS col2 FROM tab2 AS cor0
----
1416
408
744

query I rowsort
SELECT DISTINCT - col1 + 49 * + col2 AS col1 FROM tab1 AS cor0
----
2620
2783
4691

query I rowsort
SELECT + col1 * ( 4 * col2 ) FROM tab1 AS cor0
----
2280
4992
5616

query I rowsort
SELECT col0 * 65 FROM tab2 cor0
----
455
5070
5135

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

query I rowsort
SELECT + ( 97 ) FROM tab0, tab2 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

onlyif mysql # use DIV operator for integer division
query I rowsort label-2679
SELECT - + cor0.col1 + cor0.col1 DIV col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-2679
SELECT - + cor0.col1 + cor0.col1 / col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-18

query I rowsort
SELECT ALL + 7 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT ( - 16 ) + col2 AS col0 FROM tab0 cor0
----
-15
17
66

query I rowsort
SELECT + col2 * + col2 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-157464
-185193
-884736

onlyif mysql # use DIV operator for integer division
query I rowsort label-2683
SELECT ALL - ( - col1 ) * - col1 + + col1 DIV col2 FROM tab0 AS cor0
----
-7394
-8280
-9312

skipif mysql # not compatible
query I rowsort label-2683
SELECT ALL - ( - col1 ) * - col1 + + col1 / col2 FROM tab0 AS cor0
----
-7394
-8280
-9312

query I rowsort
SELECT ALL - cor0.col2 + - col2 * + col0 AS col2 FROM tab1 AS cor0
----
-216
-3705
-7776

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2687
SELECT - 52 DIV 64 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2687
SELECT - 52 / 64 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL 45 + + 33 AS col1 FROM tab0 AS cor0
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2689
SELECT + cor0.col0 * - col2 * 86 + col0 DIV col1 AS col1 FROM tab1 cor0
----
-13932
-313722
-660474

skipif mysql # not compatible
query I rowsort label-2689
SELECT + cor0.col0 * - col2 * 86 + col0 / col1 AS col1 FROM tab1 cor0
----
-13932
-313722
-660474

query I rowsort
SELECT cor0.col2 * - cor0.col0 - - ( + col2 ) FROM tab0 AS cor0
----
-34
-7216
-759

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

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

query I rowsort
SELECT - 5 + col0 FROM tab2 AS cor0
----
2
73
74

skipif mysql # not compatible
query I rowsort
SELECT cor0.col2 / + col0 + CAST ( col0 AS REAL ) FROM tab1 cor0
----
21
64
81

query I rowsort
SELECT ALL col0 + - 50 FROM tab1
----
-47
14
30

query I rowsort
SELECT DISTINCT + ( col2 ) + col2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT - ( - col2 * + col1 + + 34 ) AS col1 FROM tab2
----
1500
612
803

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + ( col1 ) * col2 col0 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + col1 * - 50 + 0 FROM tab0 AS cor0
----
-4300
-4550
-4850

query I rowsort
SELECT col2 + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - 9 * + col1 - + col2 * col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-4268
-664937
-68886

query I rowsort
SELECT ALL + 7 + + col1 AS col1 FROM tab2
----
24
38
66

query I rowsort
SELECT - col2 + col2 * - col0 FROM tab0
----
-36
-7380
-825

query I rowsort
SELECT 59 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT + 19 + + col1 FROM tab1 AS cor0
----
29
32
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2705
SELECT ALL col0 DIV col1 + + col2 * col0 + + 45 FROM tab1
----
207
3699
7731

skipif mysql # not compatible
query I rowsort label-2705
SELECT ALL col0 / col1 + + col2 * col0 + + 45 FROM tab1
----
207
3699
7731

query I rowsort
SELECT ALL + 0 + 24 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

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

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

query I rowsort
SELECT ALL 99 AS col0 FROM tab2 AS cor0
----
99
99
99

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + + col2 * - 45 col0 FROM tab1 AS cor0
----
-2484
-2622
-4416

query I rowsort
SELECT DISTINCT + + 68 + - col1 * - col0 * - 80 - + col1 FROM tab1 cor0
----
-51142
-6198
-83145

query I rowsort
SELECT ALL - + 55 AS col2 FROM tab2 AS cor0
----
-55
-55
-55

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

query I rowsort
SELECT DISTINCT + + 91 + col1 AS col2 FROM tab0 AS cor0
----
177
182
188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 - - ( - col1 ) col1 FROM tab1 cor0
----
-2942
-3259
-9229

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

query I rowsort
SELECT - 44 + - col1 * col1 AS col2 FROM tab2 AS cor0
----
-1005
-333
-3525

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

query I rowsort
SELECT ALL col0 + col1 - 99 * - col0 AS col1 FROM tab1
----
326
6410
8013

query I rowsort
SELECT col0 * + col1 - + col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + col1 * 72 - 37 AS col2 FROM tab0 AS cor0
----
6155
6515
6947

onlyif mysql # use DIV operator for integer division
query I rowsort label-2722
SELECT DISTINCT - col0 DIV - 26 FROM tab1 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-2722
SELECT DISTINCT - col0 / - 26 FROM tab1 AS cor0
----
0
2
3

query I rowsort
SELECT + col1 + + col2 * - ( col0 ) + + 43 * 15 AS col0 FROM tab1 AS cor0
----
-2993
-7022
509

query I rowsort
SELECT + cor0.col2 * 19 AS col1 FROM tab2 AS cor0
----
494
513
722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 59 col1 FROM tab2 AS cor0
----
137
138
66

query I rowsort
SELECT col0 * - 86 + - cor0.col1 * col2 FROM tab0 AS cor0
----
-15116
-3107
-4902

query I rowsort
SELECT col1 + 44 FROM tab1 cor0
----
54
57
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2728
SELECT + col0 * col0 DIV col0 + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-2728
SELECT + col0 * col0 / col0 + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - 72 AS col2 FROM tab2 AS cor0
----
-72
-72
-72

query I rowsort
SELECT + + cor0.col0 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

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

skipif mysql # not compatible
query I rowsort label-2731
SELECT DISTINCT - CAST ( 55 AS INTEGER ) FROM tab0 cor0
----
-55

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

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

query I rowsort
SELECT - 73 + cor0.col2 + - col0 * ( + col2 ) FROM tab1 cor0
----
-181
-3664
-7657

query I rowsort
SELECT DISTINCT - cor0.col0 * 28 AS col0 FROM tab2 cor0
----
-196
-2184
-2212

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

query I rowsort
SELECT - col1 * - 49 + cor0.col0 + ( - col2 + cor0.col2 ) AS col1 FROM tab2 AS cor0
----
1526
2969
912

query I rowsort
SELECT DISTINCT - - 87 * - ( + cor0.col0 ) FROM tab1 AS cor0
----
-261
-5568
-6960

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2740
SELECT ALL - CAST( col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2740
SELECT ALL - CAST ( col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL 63 * - 47 + col0 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
1251
33519
96879

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + cor0.col2 + col0 col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT + col0 + - 16 FROM tab1 AS cor0
----
-13
48
64

query I rowsort
SELECT + 32 + 92 - cor0.col1 AS col0 FROM tab0 AS cor0
----
27
33
38

query I rowsort
SELECT + cor0.col0 + col2 * col0 * 93 AS col0 FROM tab1 AS cor0
----
15069
339328
714320

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

query I rowsort
SELECT + 65 + + col1 AS col1 FROM tab0 AS cor0
----
151
156
162

query I rowsort
SELECT DISTINCT - - 53 * - ( col0 ) * - col0 + cor0.col1 * - col1 - 18 AS col0 FROM tab1 AS cor0
----
-217
216970
339013

query I rowsort
SELECT ALL - col1 - cor0.col1 * col0 AS col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

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

query I rowsort
SELECT DISTINCT - + 59 * col2 + col2 AS col0 FROM tab1 AS cor0
----
-3132
-3306
-5568

query I rowsort
SELECT ALL - + col2 + - 38 FROM tab0 AS cor0
----
-120
-39
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-2753
SELECT DISTINCT - 31 DIV col1 + col2 FROM tab1
----
53
54
94

skipif mysql # not compatible
query I rowsort label-2753
SELECT DISTINCT - 31 / col1 + col2 FROM tab1
----
53
54
94

query I rowsort
SELECT 96 * + col2 FROM tab2
----
2496
2592
3648

query I rowsort
SELECT + col0 * col0 + - 82 AS col1 FROM tab1 AS cor0
----
-73
4014
6318

query I rowsort
SELECT - + col0 * 47 FROM tab1 AS cor0
----
-141
-3008
-3760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2757
SELECT DISTINCT col0 DIV 14 - + 89 FROM tab0 AS cor0
----
-83
-87
-88

skipif mysql # not compatible
query I rowsort label-2757
SELECT DISTINCT col0 / 14 - + 89 FROM tab0 AS cor0
----
-83
-87
-88

query I rowsort
SELECT DISTINCT - col2 * ( - 78 + - col1 ) FROM tab2 AS cor0
----
2943
3562
3610

query I rowsort
SELECT ALL - col1 - 91 FROM tab1 cor0
----
-101
-104
-117

query I rowsort
SELECT ALL - + col2 - ( col2 ) AS col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 - col1 * + col0 col2 FROM tab1 cor0
----
-104
-1053
-650

query I rowsort
SELECT DISTINCT + col1 * + 61 - + 31 FROM tab2
----
1006
1860
3568

onlyif mysql # use DIV operator for integer division
query I rowsort label-2763
SELECT col2 + col2 DIV col0 col2 FROM tab1
----
57
72
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2763
SELECT col2 + col2 / col0 col2 FROM tab1
----
57
72
97

query I rowsort
SELECT DISTINCT - col0 * ( - tab1.col0 ) - + col2 FROM tab1
----
-45
4039
6304

query I rowsort
SELECT DISTINCT + tab2.col0 - ( + ( + tab2.col0 ) ) FROM tab2
----
0

query I rowsort
SELECT ALL - col0 - ( + col1 ) AS col1 FROM tab0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2767
SELECT tab0.col0 + 66 + + col2 DIV col0 FROM tab0
----
101
155
91

skipif mysql # not compatible
query I rowsort label-2767
SELECT tab0.col0 + 66 + + col2 / col0 FROM tab0
----
101
155
91

query I rowsort
SELECT col0 * col2 * + 7 + - col1 FROM tab0
----
148
50995
5458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 51 col1 FROM tab0 AS cor0
----
35
40
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-2770
SELECT - - 58 * col2 DIV + col2 AS col1 FROM tab1 AS cor0
----
58
58
58

skipif mysql # not compatible
query I rowsort label-2770
SELECT - - 58 * col2 / + col2 AS col1 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT 28 * tab1.col0 FROM tab1
----
1792
2240
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-2773
SELECT + - cor0.col2 DIV + 47 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2773
SELECT + - cor0.col2 / + 47 FROM tab2 AS cor0
----
0
0
0

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

query I rowsort
SELECT col1 * - ( - col0 ) + - col1 + - col2 AS col0 FROM tab1
----
-2
573
931

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2776
SELECT - col0 + CAST( ( col1 ) AS SIGNED ) FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-2776
SELECT - col0 + CAST ( ( col1 ) AS INTEGER ) FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT + col0 + - 65 AS col1 FROM tab2
----
-58
13
14

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

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

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

query I rowsort
SELECT ALL - 48 + + col2 * col2 * - 39 + + col2 AS col1 FROM tab2 cor0
----
-26386
-28452
-56326

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) * col2 col1 FROM tab1
----
162
3648
7680

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

query I rowsort
SELECT DISTINCT + - col0 + - ( col1 ) * 22 FROM tab1 AS cor0
----
-284
-366
-575

query I rowsort
SELECT DISTINCT + ( - col1 ) - col0 * + col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL + 19 * col2 + - ( - cor0.col1 ) AS col0 FROM tab2 AS cor0
----
544
553
739

query I rowsort
SELECT 37 * 82 AS col1 FROM tab1
----
3034
3034
3034

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

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

query I rowsort
SELECT + tab0.col1 * - col0 - - col0 AS col0 FROM tab0
----
-2040
-3360
-8010

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 59 + col2 col0 FROM tab0
----
-26
-58
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + col2 col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL + 21 * - col1 FROM tab0 AS cor0
----
-1806
-1911
-2037

onlyif mysql # use DIV operator for integer division
query I rowsort label-2794
SELECT ALL + + col2 + cor0.col0 DIV - ( cor0.col0 + + col2 ) AS col1 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2794
SELECT ALL + + col2 + cor0.col0 / - ( cor0.col0 + + col2 ) AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT 86 FROM tab2 cor0
----
86
86
86

query I rowsort
SELECT ALL - col2 * + col1 + + 88 AS col1 FROM tab2 AS cor0
----
-1446
-558
-749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 * - 65 * col2 col2 FROM tab1 AS cor0
----
-189566
-211195
-599053

query I rowsort
SELECT DISTINCT - 86 AS col2 FROM tab1, tab1 AS cor0
----
-86

query I rowsort
SELECT col0 - 56 AS col1 FROM tab0
----
-21
-32
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2800
SELECT DISTINCT + CAST( tab1.col2 AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2800
SELECT DISTINCT + CAST ( tab1.col2 AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - tab2.col1 * 90 FROM tab2
----
-1530
-2790
-5310

query I rowsort
SELECT ALL ( 91 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT - col0 + ( col2 ) FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - col1 * cor0.col1 + - col2 AS col2 FROM tab1 cor0
----
-157
-265
-730

query I rowsort
SELECT 48 * col2 FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT ALL col0 * 6 AS col0 FROM tab2 AS cor0
----
42
468
474

query I rowsort
SELECT - ( col2 ) + - col0 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT - 43 FROM tab2, tab0 AS cor0
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

query I rowsort
SELECT DISTINCT + ( + col2 ) * col1 + 75 AS col1 FROM tab0 AS cor0
----
172
2913
7537

query I rowsort
SELECT DISTINCT 38 * - col1 FROM tab2 cor0
----
-1178
-2242
-646

query I rowsort
SELECT - col1 + 28 * + col2 - + ( - col1 ) * - col2 AS col2 FROM tab0 AS cor0
----
-166
-2000
-5257

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2813
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * 56 col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 88 AS col2 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT ALL + col2 * - 39 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT DISTINCT + - 94 + + 24 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2817
SELECT - cor0.col1 + cor0.col2 DIV 99 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2817
SELECT - cor0.col1 + cor0.col2 / 99 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2818
SELECT DISTINCT col1 DIV - col1 + + col1 col2 FROM tab2 AS cor0
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2818
SELECT DISTINCT col1 / - col1 + + col1 col2 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT ALL - col1 + - col0 * 65 FROM tab2
----
-486
-5129
-5152

onlyif mysql # use DIV operator for integer division
query I rowsort label-2820
SELECT ALL - tab1.col0 * ( - 76 * - col1 ) + - 86 DIV col2 col2 FROM tab1
----
-48641
-5929
-79040

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2820
SELECT ALL - tab1.col0 * ( - 76 * - col1 ) + - 86 / col2 col2 FROM tab1
----
-48641
-5929
-79040

query I rowsort
SELECT + col0 + - ( + ( + col0 ) ) AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + - tab0.col1 * col0 AS col2 FROM tab0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL - 83 * cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 2d7947f3dff4b2e25e032725c9ac3510

query I rowsort
SELECT ALL - ( - col1 ) * - 16 AS col1 FROM tab0 AS cor0
----
-1376
-1456
-1552

query I rowsort
SELECT DISTINCT - + ( - col2 ) * ( + cor0.col2 * col0 ) AS col1 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + + 93 + col2 * col1 + col1 FROM tab0 cor0
----
287
3017
7646

query I rowsort
SELECT DISTINCT + 66 * + 63 FROM tab2
----
4158

query I rowsort
SELECT + tab0.col1 + + 61 AS col0 FROM tab0
----
147
152
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2829
SELECT + 52 DIV col1 + col0 FROM tab2
----
78
8
82

skipif mysql # not compatible
query I rowsort label-2829
SELECT + 52 / col1 + col0 FROM tab2
----
78
8
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 * col2 col2 FROM tab1
----
1248
1404
570

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2831
SELECT CAST ( NULL AS INTEGER ) col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 87 * tab1.col1 + - tab1.col0 * ( col2 * col1 ) AS col1 FROM tab1
----
-1950
-35610
-98709

query I rowsort
SELECT DISTINCT - - ( + col2 ) * + 44 + 34 FROM tab1 cor0
----
2410
2542
4258

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

query I rowsort
SELECT DISTINCT + + col1 + + col1 + cor0.col1 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT DISTINCT - - col0 * + col2 * - cor0.col0 + 91 + col1 AS col2 FROM tab1 AS cor0
----
-233371
-369
-614296

query I rowsort
SELECT - - col2 - col1 * 57 AS col1 FROM tab2 AS cor0
----
-1740
-3337
-931

query I rowsort
SELECT DISTINCT + 15 - - col1 AS col2 FROM tab0 AS cor0
----
101
106
112

query I rowsort
SELECT DISTINCT col2 * + col0 + - col2 * 66 FROM tab1 AS cor0
----
-114
-3402
1344

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

query I rowsort
SELECT DISTINCT + 19 * + col1 AS col0 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT 4 + col2 FROM tab0 cor0
----
37
5
86

query I rowsort
SELECT ALL col0 * col1 + - col0 AS col2 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT - col2 * - col1 + col0 FROM tab0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * col0 + col1 col0 FROM tab2
----
2087
220
3019

query I rowsort
SELECT ALL + 85 * 89 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e2f069e5562efaeeeccc04a5ad1bf048

query I rowsort
SELECT 74 * - tab2.col1 AS col0 FROM tab2
----
-1258
-2294
-4366

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

query I rowsort
SELECT ALL 15 + + col2 * col0 AS col1 FROM tab2 AS cor0
----
204
2043
3017

query I rowsort
SELECT DISTINCT col2 * + col1 - cor0.col2 AS col0 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-2851
SELECT DISTINCT + cor0.col0 + cor0.col1 DIV + 65 col1 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2851
SELECT DISTINCT + cor0.col0 + cor0.col1 / + 65 col1 FROM tab0 AS cor0
----
25
36
90

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2853
SELECT ALL ( col2 ) DIV - 54 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2853
SELECT ALL ( col2 ) / - 54 FROM tab2
----
0
0
0

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 + - col2 * - 69 FROM tab2 cor0
----
1870
1872
2701

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2857
SELECT ALL cor0.col1 + 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-2857
SELECT ALL cor0.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-2858
SELECT ALL - col2 DIV + 46 FROM tab0 AS cor0
----
-1
0
0

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

query I rowsort
SELECT DISTINCT + cor0.col1 - + col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col1 + + col2 col1 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-2861
SELECT + col1 DIV 35 + - col0 - cor0.col1 FROM tab0 cor0
----
-108
-130
-178

skipif mysql # not compatible
query I rowsort label-2861
SELECT + col1 / 35 + - col0 - cor0.col1 FROM tab0 cor0
----
-108
-130
-178

query I rowsort
SELECT + + col1 + + 22 FROM tab0 AS cor0
----
108
113
119

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

skipif mysql # not compatible
query I rowsort label-2863
SELECT col0 / col1 - - col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + + col0 * 60 AS col2 FROM tab0 cor0
----
1440
2100
5340

query I rowsort
SELECT - col0 * + ( col2 ) - + col0 * 46 FROM tab2 AS cor0
----
-511
-5616
-6636

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

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

query I rowsort
SELECT DISTINCT - 90 * + cor0.col2 * + cor0.col2 FROM tab2 AS cor0
----
-129960
-60840
-65610

query I rowsort
SELECT - 70 * 96 FROM tab0 AS cor0
----
-6720
-6720
-6720

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

query I rowsort
SELECT ALL + - 35 AS col0 FROM tab2 cor0
----
-35
-35
-35

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2871
SELECT col0 / + col0 col2 FROM tab1 AS cor0
----
1
1
1

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

skipif mysql # not compatible
query I rowsort label-2872
SELECT DISTINCT + CAST ( 80 AS INTEGER ) * - col2 AS col0 FROM tab2 AS cor0
----
-2080
-2160
-3040

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

query I rowsort
SELECT ALL - - 68 * - cor0.col0 FROM tab0 AS cor0
----
-1632
-2380
-6052

query I rowsort
SELECT DISTINCT cor0.col2 + - 19 AS col2 FROM tab1 AS cor0
----
35
38
77

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

query I rowsort
SELECT ALL 22 + col0 FROM tab1 AS cor0
----
102
25
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * + 17 col0 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT + + 43 * 9 * + col1 FROM tab0 AS cor0
----
33282
35217
37539

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

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

query I rowsort
SELECT 41 + col1 AS col0 FROM tab2 AS cor0
----
100
58
72

query I rowsort
SELECT DISTINCT + + 58 + + col2 AS col1 FROM tab1 AS cor0
----
112
115
154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 63 + 54 col2 FROM tab2 AS cor0
----
-9

query I rowsort
SELECT ALL 66 * - col1 FROM tab2 cor0
----
-1122
-2046
-3894

query I rowsort
SELECT - 52 + col0 FROM tab2 AS cor0
----
-45
26
27

query I rowsort
SELECT 65 * - tab0.col1 FROM tab0, tab1 cor0
----
9 values hashing to d19d651fdf56c3e54f2a946fd0aebb1b

query I rowsort
SELECT DISTINCT + col1 * col1 + col0 * + col0 + cor0.col0 FROM tab2 cor0
----
1017
6609
9643

onlyif mysql # use DIV operator for integer division
query I rowsort label-2889
SELECT + col2 + - col1 * cor0.col1 DIV col2 + - 90 FROM tab1 AS cor0
----
-34
-48
5

skipif mysql # not compatible
query I rowsort label-2889
SELECT + col2 + - col1 * cor0.col1 / col2 + - 90 FROM tab1 AS cor0
----
-34
-48
5

query I rowsort
SELECT - col1 * col2 + - 72 * col1 FROM tab1 AS cor0
----
-1290
-2184
-3276

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

skipif mysql # not compatible
query I rowsort label-2891
SELECT col2 / CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 * - 68 col2 FROM tab0 AS cor0
----
-5815
-6106
-6595

onlyif mysql # use DIV operator for integer division
query I rowsort label-2893
SELECT + - cor0.col2 DIV + 23 + col2 * + cor0.col1 + + col1 AS col2 FROM tab2 cor0
----
1592
662
867

skipif mysql # not compatible
query I rowsort label-2893
SELECT + - cor0.col2 / + 23 + col2 * + cor0.col1 + + col1 AS col2 FROM tab2 cor0
----
1592
662
867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * - cor0.col0 + 41 col2 FROM tab2 AS cor0
----
-6043
-6200
-8

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

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

query I rowsort
SELECT + col1 * + 81 FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT ( - col0 ) * col1 + + col0 AS col1 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT ( + 49 ) + - col1 + + 15 FROM tab2 AS cor0
----
33
47
5

query I rowsort
SELECT - cor0.col0 - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + 22 + + cor0.col2 FROM tab1 AS cor0
----
118
76
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0, tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

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

skipif mysql # not compatible
query I rowsort label-2902
SELECT ALL - col0 / - col2 + - col0 AS col0 FROM tab0 AS cor0
----
-24
-88
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2903
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2903
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + tab0.col2 * + tab0.col1 col1 FROM tab0
----
194
2924
7553

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 * + col0 + - ( + 65 * col2 ) col1 FROM tab0
----
-1290
-13251
-2721

query I rowsort
SELECT DISTINCT + col2 * 72 + 94 FROM tab0 AS cor0
----
166
2470
5998

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

query I rowsort
SELECT DISTINCT - - col2 + + 53 AS col0 FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT ALL - col0 + 83 AS col1 FROM tab0 cor0
----
-6
48
59

query I rowsort
SELECT - 18 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2dbe09d9295cfd52d854fefabf2cec4e

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + 16 - + tab2.col2 * col1 * - col0 col2 FROM tab2
----
118708
50762
5363

query I rowsort
SELECT DISTINCT + col0 - + 90 * - col0 AS col0 FROM tab2
----
637
7098
7189

query I rowsort
SELECT ALL col0 - 38 * col0 FROM tab0
----
-1295
-3293
-888

query I rowsort
SELECT + col1 * - 71 FROM tab0
----
-6106
-6461
-6887

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

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

query I rowsort
SELECT ALL + 50 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT ALL 59 * - ( col2 ) FROM tab1
----
-3186
-3363
-5664

query I rowsort
SELECT ALL ( 36 ) * col2 FROM tab2
----
1368
936
972

query I rowsort
SELECT col2 * col1 * - col1 - - tab1.col1 FROM tab1
----
-16211
-36478
-5690

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

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

query I rowsort
SELECT ALL - ( + 60 + + col0 ) AS col1 FROM tab2
----
-138
-139
-67

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

skipif mysql # not compatible
query I rowsort label-2924
SELECT ALL CAST ( NULL AS INTEGER ) * + 23 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 23 * - col2 - 22 FROM tab0 cor0
----
-1908
-45
-781

query I rowsort
SELECT ALL - + 86 AS col2 FROM tab2 AS cor0
----
-86
-86
-86

query I rowsort
SELECT ALL - col0 + col0 + + col0 AS col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2928
SELECT - + 64 DIV + col1 AS col1 FROM tab2 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2928
SELECT - + 64 / + col1 AS col1 FROM tab2 AS cor0
----
-1
-2
-3

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 DISTINCT 24 + + col2 AS col0 FROM tab1 AS cor0
----
120
78
81

query I rowsort
SELECT DISTINCT + 97 FROM tab0, tab2 AS cor0
----
97

query I rowsort
SELECT ALL + + ( 1 ) * col1 AS col1 FROM tab1 AS cor0
----
10
13
26

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2934
SELECT col2 DIV + 97 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2934
SELECT col2 / + 97 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab1, tab0 cor0
----
4

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

skipif mysql # not compatible
query I rowsort label-2936
SELECT ALL 41 * col1 * col1 + 96 + - ( col1 ) * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2938
SELECT DISTINCT col0 * 33 DIV - cor0.col2 FROM tab1 AS cor0
----
-1
-27
-37

skipif mysql # not compatible
query I rowsort label-2938
SELECT DISTINCT col0 * 33 / - cor0.col2 FROM tab1 AS cor0
----
-1
-27
-37

query I rowsort
SELECT ALL + 3 * - col1 + - col2 FROM tab2 AS cor0
----
-120
-203
-89

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

query I rowsort
SELECT DISTINCT + 59 * + col1 AS col1 FROM tab1 AS cor0
----
1534
590
767

query I rowsort
SELECT ALL - col1 + + 39 AS col2 FROM tab1 AS cor0
----
13
26
29

query I rowsort
SELECT DISTINCT + - ( 14 ) * + col1 FROM tab0 AS cor0
----
-1204
-1274
-1358

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col1 * cor0.col2 col0 FROM tab2 cor0
----
22599
24548
39884

skipif mysql # not compatible
query I rowsort
SELECT col0 * + col2 + CAST ( 24 * col1 AS REAL ) AS col0 FROM tab2 AS cor0
----
3410
3444
933

query I rowsort
SELECT ALL + + 94 * col0 + col1 FROM tab1 AS cor0
----
308
6026
7533

query I rowsort
SELECT - + 10 * col0 FROM tab2 AS cor0
----
-70
-780
-790

query I rowsort
SELECT - col1 * col0 + + 55 * - col1 * col0 + - col1 FROM tab1 AS cor0
----
-35850
-4394
-58253

onlyif mysql # use DIV operator for integer division
query I rowsort label-2949
SELECT - - cor0.col0 DIV - col1 - + 53 * + col1 FROM tab1 cor0
----
-1378
-536
-695

skipif mysql # not compatible
query I rowsort label-2949
SELECT - - cor0.col0 / - col1 - + 53 * + col1 FROM tab1 cor0
----
-1378
-536
-695

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * - col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 55 * + col0 + - col1 + + col2 AS col2 FROM tab1 AS cor0
----
-137
-3473
-4317

onlyif mysql # use DIV operator for integer division
query I rowsort label-2952
SELECT + col2 DIV + col0 - - 38 FROM tab2 AS cor0
----
38
38
41

skipif mysql # not compatible
query I rowsort label-2952
SELECT + col2 / + col0 - - 38 FROM tab2 AS cor0
----
38
38
41

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

query I rowsort
SELECT DISTINCT + 58 + - col0 AS col0 FROM tab2 AS cor0
----
-20
-21
51

query I rowsort
SELECT + col2 + + col0 + - col1 AS col0 FROM tab1
----
111
163
31

query I rowsort
SELECT 79 * + col1 AS col2 FROM tab2
----
1343
2449
4661

query I rowsort
SELECT ( + col2 ) + + tab0.col1 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + ( - col0 * - col1 ) col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL cor0.col1 * col2 * ( - col1 ) + col1 FROM tab0 AS cor0
----
-243982
-678951
-9312

query I rowsort
SELECT DISTINCT + col0 + + col0 - col2 AS col0 FROM tab1 AS cor0
----
-48
64
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + - 13 col2 FROM tab1 AS cor0
----
-109
-67
-70

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

skipif mysql # not compatible
query I rowsort label-2962
SELECT ALL - col0 * CAST ( col1 AS INTEGER ) + col1 AS col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT col0 + col1 + - col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL col2 + ( ( col2 ) ) + + col2 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT DISTINCT - col2 * 74 FROM tab0 AS cor0
----
-2442
-6068
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 + cor0.col2 col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL 76 AS col1 FROM tab0
----
76
76
76

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 * ( - col1 ) + + col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

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

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

query I rowsort
SELECT + col1 * - ( + 24 ) AS col1 FROM tab2 AS cor0
----
-1416
-408
-744

query I rowsort
SELECT + - 64 FROM tab1 cor0
----
-64
-64
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-2974
SELECT col0 DIV col1 + + col1 AS col0 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-2974
SELECT col0 / col1 + + col1 AS col0 FROM tab2
----
21
31
60

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

query I rowsort
SELECT DISTINCT - col0 * 20 * col1 AS col0 FROM tab1
----
-12800
-1560
-20800

query I rowsort
SELECT col1 + + tab0.col0 * col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - col0 * + ( + 33 ) FROM tab2
----
-231
-2574
-2607

query I rowsort
SELECT tab0.col2 * ( col2 ) + - col0 * col0 AS col1 FROM tab0
----
-1197
-1224
513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2980
SELECT ALL + + CAST( 18 AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
126
1404
1422

skipif mysql # not compatible
query I rowsort label-2980
SELECT ALL + + CAST ( 18 AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
126
1404
1422

query I rowsort
SELECT ALL 62 * col0 * + col0 FROM tab1 AS cor0
----
253952
396800
558

query I rowsort
SELECT DISTINCT - 50 * - col1 + - cor0.col0 FROM tab0 cor0
----
4276
4461
4815

query I rowsort
SELECT ALL 89 * + col0 + - col0 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT ALL 56 + + col2 * col1 FROM tab1 AS cor0
----
1304
1460
626

query I rowsort
SELECT DISTINCT + 99 * + 40 - col1 FROM tab2 cor0
----
3901
3929
3943

query I rowsort
SELECT DISTINCT + 99 AS col0 FROM tab0 AS cor0
----
99

query I rowsort
SELECT DISTINCT col1 * col0 * + col2 AS col0 FROM tab1 AS cor0
----
36480
4212
99840

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

query I rowsort
SELECT 41 + col0 AS col1 FROM tab1
----
105
121
44

query I rowsort
SELECT + ( + col2 ) + 82 * col1 AS col0 FROM tab2 cor0
----
1432
2569
4864

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

query I rowsort
SELECT DISTINCT - ( col1 ) * + col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL ( col2 ) + col1 * col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - - col0 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + 50 AS col1 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT - col1 + - ( 58 ) FROM tab2 AS cor0
----
-117
-75
-89

query I rowsort
SELECT ALL + col0 * - col1 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + col1 * + col1 + + col1 FROM tab2 cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT ( col1 ) + + col2 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3000
SELECT 50 * - col0 - CAST( ( col2 ) AS SIGNED ) DIV - col2 FROM tab1
----
-149
-3199
-3999

skipif mysql # not compatible
query I rowsort label-3000
SELECT 50 * - col0 - CAST ( ( col2 ) AS INTEGER ) / - col2 FROM tab1
----
-149
-3199
-3999

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3001
SELECT col1 + CAST( + 91 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
101
104
117

skipif mysql # not compatible
query I rowsort label-3001
SELECT col1 + CAST ( + 91 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
101
104
117

onlyif mysql # use DIV operator for integer division
query I rowsort label-3002
SELECT - cor0.col1 DIV ( - col1 * col1 ) + + col2 * + 3 + col1 * col1 col1 FROM tab2 AS cor0
----
1042
3559
403

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3002
SELECT - cor0.col1 / ( - col1 * col1 ) + + col2 * + 3 + col1 * col1 col1 FROM tab2 AS cor0
----
1042
3559
403

query I rowsort
SELECT - 92 * col0 AS col2 FROM tab1
----
-276
-5888
-7360

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

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

query I rowsort
SELECT ALL col1 + - 1 - - col0 AS col0 FROM tab0 AS cor0
----
109
131
179

query I rowsort
SELECT ALL 78 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT tab0.col2 + col2 - col0 * - tab0.col2 FROM tab0
----
37
7462
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 78 col1 FROM tab1, tab2, tab2 AS cor0
----
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3010
SELECT + col0 + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-3010
SELECT + col0 + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + cor0.col1 * 12 - 39 FROM tab0 AS cor0
----
1053
1125
993

query I rowsort
SELECT col1 + ( + col2 + - col2 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - - col2 + ( - cor0.col0 * col0 ) FROM tab1 AS cor0
----
-4039
-6304
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + + cor0.col0 col0 FROM tab1 AS cor0
----
-16
-51
7

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

query I rowsort
SELECT ALL - 25 * + col1 * col1 FROM tab2
----
-24025
-7225
-87025

query I rowsort
SELECT - 90 AS col0 FROM tab1 AS cor0
----
-90
-90
-90

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3019
SELECT col2 + + col2 DIV - col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3019
SELECT col2 + + col2 / - col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - 54 * cor0.col2 FROM tab1 AS cor0
----
-2916
-3078
-5184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col0 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT 81 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

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

query I rowsort
SELECT 71 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 * col0 col1 FROM tab2 AS cor0
----
504
5616
5688

query I rowsort
SELECT DISTINCT - 55 + cor0.col0 FROM tab2 AS cor0
----
-48
23
24

query I rowsort
SELECT + + 5 + + col0 AS col1 FROM tab1 AS cor0
----
69
8
85

query I rowsort
SELECT DISTINCT + col1 * col1 + col1 AS col2 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT - - 93 FROM tab0 cor0
----
93
93
93

query I rowsort
SELECT ALL + 38 + + col1 * - ( col0 ) AS col1 FROM tab2 AS cor0
----
-1305
-179
-4564

query I rowsort
SELECT DISTINCT - - col1 + col0 * + ( - cor0.col2 + + col2 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - 12 + col2 FROM tab2 AS cor0
----
14
15
26

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

query I rowsort
SELECT DISTINCT - 89 AS col0 FROM tab2, tab0 AS cor0
----
-89

query I rowsort
SELECT ALL + 44 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT - col0 - + 5 AS col1 FROM tab0 cor0
----
-29
-40
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-3037
SELECT DISTINCT - col2 + + col1 DIV col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3037
SELECT DISTINCT - col2 + + col1 / col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + cor0.col2 + - cor0.col1 * - col1 FROM tab1 AS cor0
----
157
265
730

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3040
SELECT ALL + cor0.col2 DIV + cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-3040
SELECT ALL + cor0.col2 / + cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

query I rowsort
SELECT ( 70 + col0 ) * - col2 AS col0 FROM tab1
----
-14400
-3942
-7638

query I rowsort
SELECT - 80 - - cor0.col2 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f2c969aae7dce12078998cdab205bf51

query I rowsort
SELECT ALL + col1 * - 99 + col0 FROM tab2
----
-1604
-3062
-5763

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

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

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

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

skipif mysql # not compatible
query I rowsort label-3046
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 87 - - col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 92 * + cor0.col2 + - col2 AS col1 FROM tab1 AS cor0
----
4914
5187
8736

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

query I rowsort
SELECT - cor0.col2 * 30 FROM tab2 AS cor0
----
-1140
-780
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3050
SELECT DISTINCT + + CAST( + 86 AS SIGNED ) * col0 + + CAST( col2 AS SIGNED ) * col2 FROM tab0 AS cor0
----
14378
3011
3153

skipif mysql # not compatible
query I rowsort label-3050
SELECT DISTINCT + + CAST ( + 86 AS INTEGER ) * col0 + + CAST ( col2 AS INTEGER ) * col2 FROM tab0 AS cor0
----
14378
3011
3153

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3051
SELECT + col2 + - col2 * - CAST( - col1 AS SIGNED ) * col0 AS col2 FROM tab2
----
-119626
-50996
-5832

skipif mysql # not compatible
query I rowsort label-3051
SELECT + col2 + - col2 * - CAST ( - col1 AS INTEGER ) * col0 AS col2 FROM tab2
----
-119626
-50996
-5832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * - col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3053
SELECT ALL + + cor0.col0 * col0 + CAST( - col2 AS SIGNED ) FROM tab2 AS cor0
----
22
6058
6203

skipif mysql # not compatible
query I rowsort label-3053
SELECT ALL + + cor0.col0 * col0 + CAST ( - col2 AS INTEGER ) FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT - + 5 + cor0.col1 FROM tab0 AS cor0
----
81
86
92

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

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

query I rowsort
SELECT - col2 * col1 + + 50 * col0 FROM tab2 AS cor0
----
-487
2366
3304

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

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

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

query I rowsort
SELECT DISTINCT + + col1 + 36 * 73 AS col0 FROM tab0 AS cor0
----
2714
2719
2725

query I rowsort
SELECT DISTINCT col2 * - ( 99 ) * - col0 + - col0 FROM tab1 AS cor0
----
16035
361088
760240

query I rowsort
SELECT - + col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - col0 + - 91 FROM tab2 cor0
----
-169
-170
-98

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3064
SELECT DISTINCT col2 * col0 DIV - 90 FROM tab1 AS cor0
----
-1
-40
-85

skipif mysql # not compatible
query I rowsort label-3064
SELECT DISTINCT col2 * col0 / - 90 FROM tab1 AS cor0
----
-1
-40
-85

query I rowsort
SELECT ALL col0 * col1 * 32 + + col2 * ( 95 ) AS col2 FROM tab1 AS cor0
----
25895
42400
7626

query I rowsort
SELECT ALL + - col0 + - 98 - - cor0.col0 * col0 AS col2 FROM tab2 cor0
----
-56
5908
6064

query I rowsort
SELECT ALL col1 + col1 * + col1 + + col0 * - col1 FROM tab1
----
-530
-858
624

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

skipif mysql # not compatible
query I rowsort label-3068
SELECT tab2.col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + 62 + col0 * 77 AS col0 FROM tab1
----
293
4990
6222

query I rowsort
SELECT - col0 * ( 37 ) + col0 * ( - ( col1 ) ) + cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
-2160
-4094
-4655

onlyif mysql # use DIV operator for integer division
query I rowsort label-3071
SELECT ALL 74 DIV col0 + col1 AS col0 FROM tab2
----
17
41
59

skipif mysql # not compatible
query I rowsort label-3071
SELECT ALL 74 / col0 + col1 AS col0 FROM tab2
----
17
41
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3072
SELECT ALL + col0 + col1 * 70 + tab0.col1 DIV col0 FROM tab0
----
6047
6460
6827

skipif mysql # not compatible
query I rowsort label-3072
SELECT ALL + col0 + col1 * 70 + tab0.col1 / col0 FROM tab0
----
6047
6460
6827

query I rowsort
SELECT ALL - 74 * cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to d45d54485b4ba3eff059c0ad868b6b3e

query I rowsort
SELECT cor0.col2 * + col1 + + 60 FROM tab1 AS cor0
----
1308
1464
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3075
SELECT - cor0.col1 DIV + col0 + col0 col0 FROM tab1 AS cor0
----
-5
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3075
SELECT - cor0.col1 / + col0 + col0 col0 FROM tab1 AS cor0
----
-5
64
80

query I rowsort
SELECT + + col2 * - ( cor0.col2 ) * + ( - col0 + col2 ) AS col1 FROM tab0 cor0
----
-9801
34
47068

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

query I rowsort
SELECT - col1 * cor0.col0 - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3079
SELECT + 32 DIV - col0 + - col2 AS col1 FROM tab1 cor0
----
-57
-64
-96

skipif mysql # not compatible
query I rowsort label-3079
SELECT + 32 / - col0 + - col2 AS col1 FROM tab1 cor0
----
-57
-64
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

query I rowsort
SELECT - ( 67 * - col1 ) FROM tab2
----
1139
2077
3953

onlyif mysql # use DIV operator for integer division
query I rowsort label-3082
SELECT - col1 DIV - col0 + + col2 + col0 AS col2 FROM tab1
----
121
176
65

skipif mysql # not compatible
query I rowsort label-3082
SELECT - col1 / - col0 + + col2 + col0 AS col2 FROM tab1
----
121
176
65

query I rowsort
SELECT 85 * tab2.col1 AS col0 FROM tab2
----
1445
2635
5015

query I rowsort
SELECT DISTINCT col2 * col2 + tab0.col1 * - col2 FROM tab0
----
-1749
-738
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3085
SELECT - col2 + - tab2.col2 + - CAST( - ( - col2 ) * + 6 + col2 AS SIGNED ) AS col1 FROM tab2
----
-234
-243
-342

skipif mysql # not compatible
query I rowsort label-3085
SELECT - col2 + - tab2.col2 + - CAST ( - ( - col2 ) * + 6 + col2 AS INTEGER ) AS col1 FROM tab2
----
-234
-243
-342

onlyif mysql # use DIV operator for integer division
query I rowsort label-3086
SELECT + 8 DIV tab2.col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-3086
SELECT + 8 / tab2.col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT DISTINCT + tab0.col2 - + 39 AS col2 FROM tab0, tab1 cor0
----
-38
-6
43

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

query I rowsort
SELECT 75 * col2 + + 55 FROM tab1 AS cor0
----
4105
4330
7255

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col0 + 33 * + col1 * + col1 col1 FROM tab2 AS cor0
----
108789
31664
3296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col2 - col0 col2 FROM tab1 cor0
----
2913
3185
9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT - col0 DIV col1 + col0 AS col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-3092
SELECT - col0 / col1 + col0 AS col1 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT ALL - - ( - col2 ) * + cor0.col2 + col1 * col1 * + ( col2 ) FROM tab2 AS cor0
----
25218
89830
9538

query I rowsort
SELECT - ( + col1 ) + - col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT - - col1 * - ( col0 ) AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

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

query I rowsort
SELECT ALL cor0.col1 * + col1 - + col2 FROM tab1 cor0
----
43
622
73

query I rowsort
SELECT ALL 36 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

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

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

skipif mysql # not compatible
query I rowsort label-3100
SELECT col0 / ( 74 * + col1 ) + + col0 FROM tab2
----
7
78
79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col2 * + col0 col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT + 38 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT DISTINCT 57 * - cor0.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
-399
-4446
-4503

query I rowsort
SELECT + 21 * + tab0.col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to b4ccf4f7bf38aa97368f788b22f4950f

query I rowsort
SELECT DISTINCT - col1 * - cor0.col1 + col0 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + ( - 51 ) col2 FROM tab1 AS cor0
----
-25
-38
-41

query I rowsort
SELECT col1 + 11 FROM tab0 cor0
----
102
108
97

query I rowsort
SELECT + - col2 + - col2 AS col2 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT - ( 8 ) AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3112
SELECT - col2 + + CAST( - 59 AS SIGNED ) * col0 AS col0 FROM tab0 cor0
----
-1449
-2066
-5333

skipif mysql # not compatible
query I rowsort label-3112
SELECT - col2 + + CAST ( - 59 AS INTEGER ) * col0 AS col0 FROM tab0 cor0
----
-1449
-2066
-5333

query I rowsort
SELECT ALL + - col1 + - 6 * + col1 FROM tab2 cor0
----
-119
-217
-413

query I rowsort
SELECT + - ( + 81 ) FROM tab2 AS cor0
----
-81
-81
-81

query I rowsort
SELECT DISTINCT + col2 + col1 * - col0 * 63 + + tab1.col1 AS col1 FROM tab1
----
-40253
-4834
-65411

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col0 FROM tab0 cor0
----
91
91
91

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab2 AS cor0
----
75

query I rowsort
SELECT + - col0 + - col1 + + 93 AS col1 FROM tab1 AS cor0
----
0
19
64

query I rowsort
SELECT ALL 55 FROM tab0 cor0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col2 + - 62 * + col2 + col0 col1 FROM tab2 AS cor0
----
-1856
-3562
-5279

onlyif mysql # use DIV operator for integer division
query I rowsort label-3122
SELECT - - col2 * 59 DIV + cor0.col2 AS col0 FROM tab1 cor0
----
59
59
59

skipif mysql # not compatible
query I rowsort label-3122
SELECT - - col2 * 59 / + cor0.col2 AS col0 FROM tab1 cor0
----
59
59
59

query I rowsort
SELECT ALL - - col0 * 4 AS col0 FROM tab2 AS cor0
----
28
312
316

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + + col1 col1 FROM tab1 cor0
----
104
1053
650

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

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

query I rowsort
SELECT DISTINCT - col1 * + 15 FROM tab2 cor0
----
-255
-465
-885

query I rowsort
SELECT ALL - col0 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col0 + + col1 * + 18 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
17291
5123
62580

query I rowsort
SELECT - 44 * + col1 * + col1 FROM tab0
----
-325424
-364364
-413996

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT DISTINCT - 3 DIV - col0 col2 FROM tab1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3130
SELECT DISTINCT - 3 / - col0 col2 FROM tab1
----
0
1

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

query I rowsort
SELECT ALL ( + col0 ) + - col2 * - col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - - 74 + col2 FROM tab0 AS cor0
----
107
156
75

query I rowsort
SELECT col0 * - cor0.col2 + + col1 FROM tab1 cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-3135
SELECT ALL + 24 + + col0 DIV ( col1 * col2 ) AS col2 FROM tab0 AS cor0
----
24
24
24

skipif mysql # not compatible
query I rowsort label-3135
SELECT ALL + 24 + + col0 / ( col1 * col2 ) AS col2 FROM tab0 AS cor0
----
24
24
24

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3137
SELECT - col0 + col1 DIV col0 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-3137
SELECT - col0 + col1 / col0 FROM tab1
----
-64
-80
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3138
SELECT DISTINCT col1 + col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
15
31
59

skipif mysql # not compatible
query I rowsort label-3138
SELECT DISTINCT col1 + col2 / - col1 AS col1 FROM tab2 AS cor0
----
15
31
59

query I rowsort
SELECT 14 + + col1 * + ( col1 + col1 * + tab2.col1 ) FROM tab2
----
208874
30766
5216

query I rowsort
SELECT - 10 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT ALL col0 * + col0 + + 86 * + 45 AS col2 FROM tab1 cor0
----
10270
3879
7966

query I rowsort
SELECT + tab1.col2 + - ( + 57 ) - tab1.col0 FROM tab1
----
-41
-6
-64

query I rowsort
SELECT ALL + cor0.col2 + 55 AS col2 FROM tab1 cor0
----
109
112
151

query I rowsort
SELECT - + cor0.col2 + + col1 - col2 AS col0 FROM tab0 AS cor0
----
-73
20
95

query I rowsort
SELECT - + col1 * 42 - + 11 * + col0 AS col0 FROM tab2 AS cor0
----
-1379
-1583
-3336

query I rowsort
SELECT ALL col2 + - 71 + ( - tab1.col0 ) FROM tab1
----
-20
-55
-78

query I rowsort
SELECT - 4 + + ( + cor0.col2 ) FROM tab0 AS cor0
----
-3
29
78

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

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

query I rowsort
SELECT DISTINCT - 77 * ( - col1 ) + - col1 * - col2 AS col1 FROM tab1 AS cor0
----
1340
2249
3406

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

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

query I rowsort
SELECT - col1 + + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-3152
SELECT DISTINCT - 40 * - 94 + - col1 * col2 DIV - ( + col1 ) + - ( + col1 ) FROM tab0 AS cor0
----
3664
3707
3751

skipif mysql # not compatible
query I rowsort label-3152
SELECT DISTINCT - 40 * - 94 + - col1 * col2 / - ( + col1 ) + - ( + col1 ) FROM tab0 AS cor0
----
3664
3707
3751

query I rowsort
SELECT col0 * - col2 + - col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 * col1 * + col0 - - col2 col1 FROM tab0 AS cor0
----
-111423
-183329
-437264

query I rowsort
SELECT ALL 21 AS col0 FROM tab1 cor0
----
21
21
21

query I rowsort
SELECT - 16 + - col2 * col2 AS col0 FROM tab1 AS cor0
----
-2932
-3265
-9232

onlyif mysql # use DIV operator for integer division
query I rowsort label-3159
SELECT ALL 81 DIV - col2 AS col0 FROM tab0 AS cor0
----
-2
-81
0

skipif mysql # not compatible
query I rowsort label-3159
SELECT ALL 81 / - col2 AS col0 FROM tab0 AS cor0
----
-2
-81
0

query I rowsort
SELECT DISTINCT + cor0.col2 + ( col2 ) AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT col0 * 91 FROM tab2
----
637
7098
7189

query I rowsort
SELECT - ( + 70 ) * - col2 FROM tab1 AS cor0
----
3780
3990
6720

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

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

skipif mysql # not compatible
query I rowsort label-3164
SELECT DISTINCT - + CAST ( col0 AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 * col2 col0 FROM tab0 cor0
----
1312
16
528

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

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

query I rowsort
SELECT + col2 * 95 FROM tab1 AS cor0
----
5130
5415
9120

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

query I rowsort
SELECT DISTINCT 5 AS col2 FROM tab2, tab0 AS cor0
----
5

query I rowsort
SELECT + 82 - - 59 FROM tab2 AS cor0
----
141
141
141

onlyif mysql # use DIV operator for integer division
query I rowsort label-3171
SELECT ALL - tab0.col0 DIV tab0.col0 + tab0.col1 AS col2 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3171
SELECT ALL - tab0.col0 / tab0.col0 + tab0.col1 AS col2 FROM tab0
----
85
90
96

query I rowsort
SELECT + 95 * col0 AS col0 FROM tab1
----
285
6080
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 72 * col0 col1 FROM tab1
----
216
4608
5760

query I rowsort
SELECT + col2 * - 55 AS col2 FROM tab2 AS cor0
----
-1430
-1485
-2090

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

query I rowsort
SELECT ALL + ( col1 ) * cor0.col1 + - col0 AS col2 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL - 86 * col0 + + col1 AS col2 FROM tab0 AS cor0
----
-1978
-2913
-7563

query I rowsort
SELECT - + 13 * 24 FROM tab0 cor0
----
-312
-312
-312

query I rowsort
SELECT + + cor0.col0 * + col2 + - 88 FROM tab2 AS cor0
----
101
1940
2914

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

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

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

query I rowsort
SELECT 10 + + col2 + ( - col2 ) * - col1 FROM tab0 cor0
----
108
2881
7554

query I rowsort
SELECT 19 * - cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to bdbd827f88584dd9a35be5ed2034ec5b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3184
SELECT ALL 52 + + col1 * tab2.col2 DIV col1 + tab2.col2 * col1 col0 FROM tab2
----
1612
736
916

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3184
SELECT ALL 52 + + col1 * tab2.col2 / col1 + tab2.col2 * col1 col0 FROM tab2
----
1612
736
916

query I rowsort
SELECT + cor0.col0 * + cor0.col2 + - col1 * - col0 + col0 FROM tab2 AS cor0
----
413
4424
6708

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3187
SELECT DISTINCT + CAST( 86 AS SIGNED ) AS col0 FROM tab2, tab1, tab2 cor0
----
86

skipif mysql # not compatible
query I rowsort label-3187
SELECT DISTINCT + CAST ( 86 AS INTEGER ) AS col0 FROM tab2, tab1, tab2 cor0
----
86

query I rowsort
SELECT 85 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3189
SELECT + col1 + ( col2 ) DIV col1 FROM tab1 cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-3189
SELECT + col1 + ( col2 ) / col1 FROM tab1 cor0
----
15
20
28

query I rowsort
SELECT col2 * - 31 AS col1 FROM tab0 AS cor0
----
-1023
-2542
-31

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

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

query I rowsort
SELECT DISTINCT + col0 + - col1 * - col1 * col0 FROM tab1 AS cor0
----
13600
2031
6464

query I rowsort
SELECT DISTINCT col2 + col0 * + 96 AS col2 FROM tab1 AS cor0
----
342
6201
7776

query I rowsort
SELECT DISTINCT + col0 * 5 AS col1 FROM tab0 AS cor0
----
120
175
445

onlyif mysql # use DIV operator for integer division
query I rowsort label-3195
SELECT + 48 DIV ( tab2.col2 + 89 ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-3195
SELECT + 48 / ( tab2.col2 + 89 ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ALL - col2 + - ( col1 ) + col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + 95 * + cor1.col0 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to ff69bfa81e622fc724102758d3e219c8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + - col1 + + cor0.col2 col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col2 + + col2 * - col2 AS col1 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT + + 86 + + col1 AS col1 FROM tab0 AS cor0
----
172
177
183

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

query I rowsort
SELECT DISTINCT - + col1 * - 31 FROM tab1 AS cor0
----
310
403
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-3203
SELECT ALL - col2 DIV col1 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-3203
SELECT ALL - col2 / col1 FROM tab1 cor0
----
-2
-5
-7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3205
SELECT col1 DIV - col0 AS col1 FROM tab2 cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-3205
SELECT col1 / - col0 AS col1 FROM tab2 cor0
----
-4
0
0

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

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

query I rowsort
SELECT 42 * - col1 + + col1 * 51 FROM tab0 AS cor0
----
774
819
873

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) * cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 col0 FROM tab2 cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort
SELECT ALL col0 * - col1 + col1 * + CAST ( + cor0.col2 AS REAL ) AS col0 FROM tab2 AS cor0
----
-3068
-697
620

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col2 * cor0.col2 col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL - col2 * col0 * col0 + 17 FROM tab0 cor0
----
-1208
-18991
-649505

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

query I rowsort
SELECT + + cor0.col0 * col2 + - 22 FROM tab1 AS cor0
----
140
3626
7658

query I rowsort
SELECT ALL - 16 * col2 * col0 FROM tab0
----
-116768
-12672
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT ALL + 79 + - col0 AS col2 FROM tab1 AS cor0
----
-1
15
76

query I rowsort
SELECT - - 30 * + col1 FROM tab2 cor0
----
1770
510
930

query I rowsort
SELECT ALL col2 + col0 * 37 AS col0 FROM tab2 AS cor0
----
286
2912
2961

query I rowsort
SELECT ALL + - cor0.col0 + - col0 AS col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - col1 + col2 * col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT + 70 * - col1 + col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-2121
1954
5051

skipif mysql # not compatible
query I rowsort
SELECT + col0 / col0 + CAST ( - col1 * - col2 AS REAL ) AS col2 FROM tab2 AS cor0
----
1535
647
838

onlyif mysql # use DIV operator for integer division
query I rowsort label-3226
SELECT col0 DIV col2 + col1 * - col0 AS col2 FROM tab0
----
-2064
-3360
-8098

skipif mysql # not compatible
query I rowsort label-3226
SELECT col0 / col2 + col1 * - col0 AS col2 FROM tab0
----
-2064
-3360
-8098

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

skipif mysql # not compatible
query I rowsort label-3227
SELECT ALL CAST ( col2 AS INTEGER ) + - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col1 * + col2 + col1 * ( col1 * col1 ) FROM tab2
----
206913
30628
5559

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col0 * 44 col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to aaff498604f54b8520bb2b4c87908e45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3230
SELECT DISTINCT + CAST( - tab1.col0 AS SIGNED ) * - col2 - + col1 * - col1 FROM tab1
----
3748
7849
838

skipif mysql # not compatible
query I rowsort label-3230
SELECT DISTINCT + CAST ( - tab1.col0 AS INTEGER ) * - col2 - + col1 * - col1 FROM tab1
----
3748
7849
838

query I rowsort
SELECT 46 - - 48 FROM tab2
----
94
94
94

query I rowsort
SELECT DISTINCT + tab1.col2 + - tab1.col1 * - ( + col2 ) FROM tab1
----
1344
1458
627

query I rowsort
SELECT col2 * col2 - + ( 61 ) FROM tab2
----
1383
615
668

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col1 + 3 col2 FROM tab2 AS cor0
----
1346
220
4605

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

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

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

query I rowsort
SELECT ALL 57 + - col2 * col1 AS col2 FROM tab1
----
-1191
-1347
-513

query I rowsort
SELECT 81 * col2 + tab2.col2 * - 28 + - tab2.col2 FROM tab2
----
1352
1404
1976

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

query I rowsort
SELECT 77 AS col0 FROM tab0, tab1 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 38f487c2147ee2fe05527e38c5e0503b

query I rowsort
SELECT - 88 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-2
3
9

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

skipif mysql # not compatible
query I rowsort label-3242
SELECT DISTINCT + CAST ( 14 AS INTEGER ) AS col1 FROM tab1 cor0
----
14

query I rowsort
SELECT DISTINCT - cor0.col2 + col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT DISTINCT + col1 * col1 + col2 - - col1 FROM tab1 AS cor0
----
167
278
756

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 29 * + ( col0 ) col0 FROM tab1 AS cor0
----
1856
2320
87

query I rowsort
SELECT ALL 30 AS col0 FROM tab0 AS cor0
----
30
30
30

query I rowsort
SELECT + - col0 * col2 + - 37 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-37
-7246
-805

query I rowsort
SELECT + col0 * + ( col1 ) + cor0.col2 + + col2 * col1 FROM tab1 cor0
----
1267
1536
2384

query I rowsort
SELECT ALL + col0 * ( + col0 ) + + col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT + col1 * - 18 + 20 + - col0 * + 33 FROM tab0 AS cor0
----
-2320
-2881
-4555

query I rowsort
SELECT + + col2 * col1 - col0 * - col2 * col2 AS col2 FROM tab0 AS cor0
----
132
28974
605898

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3254
SELECT + col0 + col0 + - col0 DIV - col1 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-3254
SELECT + col0 + col0 + - col0 / - col1 col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - - cor0.col0 * cor0.col0 FROM tab1 cor0
----
4096
6400
9

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3257
SELECT - col2 + + CAST( col2 AS SIGNED ) + col1 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3257
SELECT - col2 + + CAST ( col2 AS INTEGER ) + col1 AS col2 FROM tab1
----
10
13
26

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

query I rowsort
SELECT DISTINCT col2 - col1 * ( col1 ) FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT + + col2 * col1 * 63 AS col0 FROM tab0 AS cor0
----
178794
470106
6111

query I rowsort
SELECT DISTINCT 49 * col1 + col1 * - 27 AS col1 FROM tab0 AS cor0
----
1892
2002
2134

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3263
SELECT DISTINCT + 99 + - col1 DIV - 20 AS col1 FROM tab2
----
100
101
99

skipif mysql # not compatible
query I rowsort label-3263
SELECT DISTINCT + 99 + - col1 / - 20 AS col1 FROM tab2
----
100
101
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col2 * col0 + col2 col0 FROM tab0
----
-7127
-735
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3265
SELECT tab0.col2 DIV - col0 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3265
SELECT tab0.col2 / - col0 AS col2 FROM tab0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3266
SELECT DISTINCT col2 * tab0.col2 - - CAST( 14 AS SIGNED ) * col1 AS col1 FROM tab0
----
1359
2293
7998

skipif mysql # not compatible
query I rowsort label-3266
SELECT DISTINCT col2 * tab0.col2 - - CAST ( 14 AS INTEGER ) * col1 AS col1 FROM tab0
----
1359
2293
7998

query I rowsort
SELECT ALL - col2 + col2 + 13 AS col0 FROM tab0
----
13
13
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-3268
SELECT + col0 DIV col2 - col0 * + col1 AS col2 FROM tab1 cor0
----
-1040
-639
-78

skipif mysql # not compatible
query I rowsort label-3268
SELECT + col0 / col2 - col0 * + col1 AS col2 FROM tab1 cor0
----
-1040
-639
-78

query I rowsort
SELECT ALL col0 * + col0 + + col0 AS col2 FROM tab0 cor0
----
1260
600
8010

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3271
SELECT col2 * col0 + CAST( - ( - col1 ) * 32 + - col0 AS SIGNED ) col1 FROM tab0
----
10121
3104
3520

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3271
SELECT col2 * col0 + CAST ( - ( - col1 ) * 32 + - col0 AS INTEGER ) col1 FROM tab0
----
10121
3104
3520

query I rowsort
SELECT ALL 85 + + tab0.col2 FROM tab0
----
118
167
86

query I rowsort
SELECT ALL 20 * col1 * col1 + col0 AS col2 FROM tab0
----
147944
165709
188215

onlyif mysql # use DIV operator for integer division
query I rowsort label-3274
SELECT col0 DIV + ( + col1 ) FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3274
SELECT col0 / + ( + col1 ) FROM tab1
----
0
6
6

query I rowsort
SELECT - 42 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

onlyif mysql # use DIV operator for integer division
query I rowsort label-3276
SELECT ALL col0 DIV tab2.col0 AS col1 FROM tab2
----
1
1
1

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

query I rowsort
SELECT + col1 * - col0 - cor0.col0 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + col1 + - col0 * + col2 * col0 AS col0 FROM tab2 AS cor0
----
-1292
-158125
-237141

query I rowsort
SELECT + - 81 FROM tab0, tab1, tab0 cor0
----
27 values hashing to d0bfe8494f52235d9fcafb5ac5de3f81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3280
SELECT col2 + ( col2 ) DIV - CAST( 85 AS SIGNED ) FROM tab1
----
54
57
95

skipif mysql # not compatible
query I rowsort label-3280
SELECT col2 + ( col2 ) / - CAST ( 85 AS INTEGER ) FROM tab1
----
54
57
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col2 + - col2 ) col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT ( - 27 ) * + col1 AS col0 FROM tab1
----
-270
-351
-702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3283
SELECT DISTINCT + CAST( col1 AS SIGNED ) + + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-3283
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - col1 * - 60 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT - 52 * col1 + col0 * - col1 * + ( col2 ) + - col0 * + col0 FROM tab2 AS cor0
----
-128804
-58159
-7520

query I rowsort
SELECT DISTINCT col0 * 8 FROM tab1
----
24
512
640

query I rowsort
SELECT DISTINCT - - 82 + 61 FROM tab1 AS cor0
----
143

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

query I rowsort
SELECT - - col1 * cor0.col1 + - col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT 96 * col1 + 73 FROM tab1 AS cor0
----
1033
1321
2569

query I rowsort
SELECT DISTINCT col1 + col0 * - cor0.col0 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL - - col0 + - col2 * + 36 * + col1 AS col1 FROM tab2 AS cor0
----
-23177
-30125
-55146

query I rowsort
SELECT ALL - 49 + col2 AS col0 FROM tab1 cor0
----
47
5
8

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 50 col0 FROM tab0
----
-50

query I rowsort
SELECT - - 17 * col1 AS col0 FROM tab2 AS cor0
----
1003
289
527

query I rowsort
SELECT + col1 * col2 * tab1.col0 AS col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - col2 FROM tab1 WHERE col1 IN ( col1 + + tab1.col0 + col1 / tab1.col0 ) AND NOT ( - col2 ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + col2 + - col2 * tab0.col1 * - col0 AS col1 FROM tab0
----
3396
664200
68145

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3301
SELECT - col2 * + col1 + col2 DIV - col2 + col0 AS col0 FROM tab1 AS cor0
----
-1169
-1402
-507

skipif mysql # not compatible
query I rowsort label-3301
SELECT - col2 * + col1 + col2 / - col2 + col0 AS col0 FROM tab1 AS cor0
----
-1169
-1402
-507

query I rowsort
SELECT - col2 + + col0 * col1 / + col0 + col1 AS col0 FROM tab1 WHERE NOT col1 * col2 * col0 = NULL AND NOT NULL NOT IN ( + col2 )
----

query I rowsort
SELECT DISTINCT + col1 + col2 * - col1 * col2 FROM tab0 AS cor0
----
-611793
-93568
0

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

query I rowsort
SELECT + + 5 * - cor0.col2 + col2 FROM tab0 AS cor0
----
-132
-328
-4

query I rowsort
SELECT + 76 + - col1 + col0 FROM tab2 cor0
----
138
52
95

query I rowsort
SELECT col1 * - col0 + - col1 * col1 FROM tab1 AS cor0
----
-1209
-740
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-3308
SELECT + col2 * col0 DIV + col2 + - col1 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-3308
SELECT + col2 * col0 / + col2 + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + cor0.col2 + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
106
109
122
64
67
70
80
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3310
SELECT ALL 90 DIV col0 AS col1 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3310
SELECT ALL 90 / col0 AS col1 FROM tab0
----
1
2
3

query I rowsort
SELECT DISTINCT + tab0.col2 * tab0.col1 * - col0 + tab0.col2 AS col1 FROM tab0
----
-3394
-664036
-68079

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

query I rowsort
SELECT ALL + col1 * - col1 * + col0 AS col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT tab1.col0 * - col2 + col2 AS col0 FROM tab1
----
-108
-3591
-7584

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

query I rowsort
SELECT DISTINCT col0 * - col2 + - col2 AS col0 FROM tab0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT tab0.col2 * tab0.col1 FROM tab0
----
2838
7462
97

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT IN ( col0 * tab1.col0 )
----

query I rowsort
SELECT - col2 FROM tab1 WHERE NOT ( + col2 + - col1 * + col2 + col1 * - col1 ) NOT BETWEEN NULL AND NULL
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3321
SELECT DISTINCT col0 + tab0.col0 * col1 DIV col1 FROM tab0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-3321
SELECT DISTINCT col0 + tab0.col0 * col1 / col1 FROM tab0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 * + col2 col1 FROM tab1 WHERE NULL > ( NULL )
----

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

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL > + col0
----

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

query I rowsort
SELECT ALL col0 * col0 * col2 FROM tab1 WHERE NULL = NULL
----

query I rowsort
SELECT + col0 + col0 * + tab0.col1 AS col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + col1 + - tab2.col2 * col2 * + col1 FROM tab2
----
-22568
-24531
-39825

query I rowsort
SELECT ALL + col1 * col0 + tab0.col2 * col0 FROM tab0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT tab1.col2 * col2 + + col2 AS col0 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT ALL - col2 + + col1 + col1 * col1 AS col1 FROM tab0
----
7449
8290
9505

query I rowsort
SELECT col2 AS col0 FROM tab2 WHERE - col2 - + col1 IN ( - col2 )
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3334
SELECT DISTINCT col0 * col2 / - col2 col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL tab2.col2 * col0 * - col2 + col2 + - col2 * col1 FROM tab2
----
-114684
-54236
-5913

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3337
SELECT DISTINCT col2 + + col0 * col2 + - col2 DIV - col1 AS col2 FROM tab1
----
218
3710
7783

skipif mysql # not compatible
query I rowsort label-3337
SELECT DISTINCT col2 + + col0 * col2 + - col2 / - col1 AS col2 FROM tab1
----
218
3710
7783

query I rowsort
SELECT ALL + col0 * + col0 FROM tab2 WHERE NULL >= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 - + col0 col1 FROM tab1
----
-10
-13
-26

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

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

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

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

query I rowsort
SELECT - col1 FROM tab2 WHERE + col2 - - col0 / col0 <= NULL
----

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 WHERE NOT ( NULL ) NOT IN ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3345
SELECT DISTINCT - col0 DIV + tab2.col1 + col1 + col2 AS col0 FROM tab2
----
51
58
84

skipif mysql # not compatible
query I rowsort label-3345
SELECT DISTINCT - col0 / + tab2.col1 + col1 + col2 AS col0 FROM tab2
----
51
58
84

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( col0 * - col0 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE + col0 IN ( tab2.col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT col2 + col2 * col0 + - col1 * col2 * - cor0.col0 FROM tab2 AS cor0
----
121706
54074
6075

query I rowsort
SELECT col1 + - col1 * tab1.col1 * tab1.col0 FROM tab1
----
-13507
-2002
-6390

onlyif mysql # use DIV operator for integer division
query I rowsort label-3350
SELECT col2 - + col1 * col2 DIV col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3350
SELECT col2 - + col1 * col2 / col1 FROM tab1
----
0
0
0

query III rowsort
SELECT ALL * FROM tab0 WHERE ( col1 ) <= ( col1 + col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

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

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

query III rowsort
SELECT * FROM tab1 cor0 WHERE NOT + col1 BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3355
SELECT - col2 + + col2 * - col0 DIV col0 + 18 FROM tab0
----
-146
-48
16

skipif mysql # not compatible
query I rowsort label-3355
SELECT - col2 + + col2 * - col0 / col0 + 18 FROM tab0
----
-146
-48
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 * - col0 col1 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-3357
SELECT + ( 85 ) DIV tab1.col0 AS col1 FROM tab1
----
1
1
28

skipif mysql # not compatible
query I rowsort label-3357
SELECT + ( 85 ) / tab1.col0 AS col1 FROM tab1
----
1
1
28

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3359
SELECT - + col1 + + col2 DIV - col0 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-3359
SELECT - + col1 + + col2 / - col0 FROM tab0 AS cor0
----
-87
-91
-97

query I rowsort
SELECT DISTINCT + 56 * - ( + col0 ) + + ( col2 * col2 ) + col0 * col2 AS col2 FROM tab1 AS cor0
----
12416
2910
3313

query I rowsort
SELECT ALL + col0 + + 54 * col0 + col1 FROM tab0 AS cor0
----
1406
2022
4986

query I rowsort
SELECT ALL - - 28 * - col0 AS col2 FROM tab0 AS cor0
----
-2492
-672
-980

query I rowsort
SELECT DISTINCT - + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + - 94 + 8 AS col0 FROM tab1 AS cor0
----
-86

query I rowsort
SELECT ALL + - ( - 51 ) * cor0.col2 AS col2 FROM tab2 AS cor0
----
1326
1377
1938

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

skipif mysql # not compatible
query I rowsort label-3366
SELECT col0 + - col2 * + CAST ( + col2 * + col1 AS INTEGER ) AS col2 FROM tab0 cor0
----
-611795
-62
-93630

query I rowsort
SELECT ALL 99 * - col2 AS col2 FROM tab1 AS cor0
----
-5346
-5643
-9504

query I rowsort
SELECT 26 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

onlyif mysql # use DIV operator for integer division
query I rowsort label-3369
SELECT DISTINCT - - col2 DIV col0 + col0 * - 17 * + col1 - col2 AS col0 FROM tab1 AS cor0
----
-10937
-1362
-17775

skipif mysql # not compatible
query I rowsort label-3369
SELECT DISTINCT - - col2 / col0 + col0 * - 17 * + col1 - col2 AS col0 FROM tab1 AS cor0
----
-10937
-1362
-17775

query I rowsort
SELECT cor0.col0 * col1 - cor0.col0 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-3371
SELECT ALL + 94 DIV col1 + + tab1.col0 - - col0 AS col0 FROM tab1
----
137
167
9

skipif mysql # not compatible
query I rowsort label-3371
SELECT ALL + 94 / col1 + + tab1.col0 - - col0 AS col0 FROM tab1
----
137
167
9

query I rowsort
SELECT - col0 + + cor0.col1 * + col1 FROM tab2 AS cor0
----
210
3403
954

onlyif mysql # use DIV operator for integer division
query I rowsort label-3373
SELECT - col0 DIV 7 AS col2 FROM tab1 AS cor0
----
-11
-9
0

skipif mysql # not compatible
query I rowsort label-3373
SELECT - col0 / 7 AS col2 FROM tab1 AS cor0
----
-11
-9
0

query I rowsort
SELECT - cor0.col1 * + col1 + - col1 AS col2 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL col1 * + col2 * col0 + + col1 AS col2 FROM tab1 cor0
----
36490
4238
99853

query I rowsort
SELECT ALL - col0 * 61 FROM tab2 AS cor0
----
-427
-4758
-4819

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 + + col2 AS col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT + col0 + - 93 * + ( col0 ) AS col0 FROM tab0 AS cor0
----
-2208
-3220
-8188

query I rowsort
SELECT DISTINCT + 37 * + cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
137
2378
2973

query I rowsort
SELECT DISTINCT col0 * 34 AS col1 FROM tab0 AS cor0
----
1190
3026
816

query I rowsort
SELECT - 0 * - 49 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 17 + - 92 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT ALL + ( + col2 ) AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT 69 * col2 * - col2 AS col2 FROM tab1 AS cor0
----
-201204
-224181
-635904

query I rowsort
SELECT - col0 * 44 + - col0 FROM tab0
----
-1080
-1575
-4005

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

query I rowsort
SELECT - cor0.col2 * - cor0.col2 - + cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 9a010ef9b54cdf6d947c1df608a804dc

query I rowsort
SELECT + 23 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 * tab2.col1 col0 FROM tab2
----
1258
2294
4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-3390
SELECT DISTINCT ( + 17 ) DIV col0 FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-3390
SELECT DISTINCT ( + 17 ) / col0 FROM tab2
----
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3391
SELECT ALL + 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-3391
SELECT ALL + col0 / col0 col2 FROM tab0
----
1
1
1

query I rowsort
SELECT ( + 92 ) FROM tab2
----
92
92
92

query I rowsort
SELECT + 51 + tab2.col0 FROM tab2
----
129
130
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-3394
SELECT - col0 * col2 DIV tab0.col0 + + col2 DIV col0 FROM tab0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-3394
SELECT - col0 * col2 / tab0.col0 + + col2 / col0 FROM tab0
----
-1
-32
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3395
SELECT ALL + CAST( col0 AS SIGNED ) FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3395
SELECT ALL + CAST ( col0 AS INTEGER ) FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT - - col2 + + cor0.col0 * - col2 + col0 * col2 AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 82 * + col2 FROM tab0 AS cor0
----
2706
6724
82

query I rowsort
SELECT DISTINCT - col1 + - 90 + cor0.col1 FROM tab2 AS cor0
----
-90

query I rowsort
SELECT tab1.col2 + col1 * col2 + - col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 10 * col0 * - col2 + - col1 * col2 AS col1 FROM tab2
----
-21814
-2727
-30666

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * tab2.col2 col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - 12 AS col2 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT ALL - col2 * + 54 - col0 AS col2 FROM tab1 cor0
----
-2919
-3142
-5264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 + + 59 col0 FROM tab1 AS cor0
----
1307
1463
629

query I rowsort
SELECT - col2 + + ( 97 ) + + col1 FROM tab0 AS cor0
----
106
150
193

query I rowsort
SELECT ALL - + col0 + - 14 + - 2 AS col0 FROM tab2 AS cor0
----
-23
-94
-95

query I rowsort
SELECT - col1 + ( + 15 ) * col1 AS col2 FROM tab1 AS cor0
----
140
182
364

onlyif mysql # use DIV operator for integer division
query I rowsort label-3408
SELECT ALL cor0.col0 DIV col1 - 81 AS col0 FROM tab1 AS cor0
----
-75
-75
-81

skipif mysql # not compatible
query I rowsort label-3408
SELECT ALL cor0.col0 / col1 - 81 AS col0 FROM tab1 AS cor0
----
-75
-75
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * + col0 + + col0 col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL + col2 * 56 + col2 * + cor0.col2 FROM tab1 cor0
----
14592
5940
6441

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 + - ( - col1 ) * + col1 col2 FROM tab1 AS cor0
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-3414
SELECT ALL - - col2 DIV CAST( + 31 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3414
SELECT ALL - - col2 / CAST ( + 31 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT col1 * + col2 * - col2 FROM tab2 cor0
----
-22599
-24548
-39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * + col1 col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT col2 * - tab0.col0 * ( col1 * col2 ) AS col1 FROM tab0
----
-2247696
-3395
-54457676

query I rowsort
SELECT + col2 + + ( + 14 ) FROM tab1
----
110
68
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3419
SELECT DISTINCT col0 + CAST( col0 AS SIGNED ) * + col2 + ( tab0.col2 * + col1 ) AS col2 FROM tab0
----
14849
167
3654

skipif mysql # not compatible
query I rowsort label-3419
SELECT DISTINCT col0 + CAST ( col0 AS INTEGER ) * + col2 + ( tab0.col2 * + col1 ) AS col2 FROM tab0
----
14849
167
3654

query I rowsort
SELECT DISTINCT - 19 - cor0.col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
-101
-20
-52

query I rowsort
SELECT tab0.col0 * + 59 * + col2 FROM tab0
----
2065
430582
46728

query I rowsort
SELECT DISTINCT + col0 + col0 * tab2.col2 + col0 FROM tab2
----
203
2184
3160

query I rowsort
SELECT ALL 74 FROM tab2, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3424
SELECT + CAST( NULL AS SIGNED ) FROM tab1, tab0, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3424
SELECT + CAST ( NULL AS INTEGER ) FROM tab1, tab0, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT col0 * 13 AS col1 FROM tab0
----
1157
312
455

query I rowsort
SELECT ALL col2 + - 20 FROM tab0
----
-19
13
62

query I rowsort
SELECT DISTINCT - col0 + 52 FROM tab0
----
-37
17
28

query I rowsort
SELECT - 33 AS col1 FROM tab2
----
-33
-33
-33

query I rowsort
SELECT DISTINCT 55 * - col1 FROM tab0 AS cor0
----
-4730
-5005
-5335

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

query I rowsort
SELECT ALL - tab2.col0 - col2 AS col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT + + 23 * col1 FROM tab1 cor0
----
230
299
598

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

query I rowsort
SELECT ALL 84 - + col0 * 43 AS col0 FROM tab1 AS cor0
----
-2668
-3356
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3435
SELECT DISTINCT + col1 * col1 DIV - col0 AS col0 FROM tab0 cor0
----
-268
-308
-93

skipif mysql # not compatible
query I rowsort label-3435
SELECT DISTINCT + col1 * col1 / - col0 AS col0 FROM tab0 cor0
----
-268
-308
-93

query I rowsort
SELECT - 70 + col0 FROM tab0 AS cor0
----
-35
-46
19

query I rowsort
SELECT ALL - 79 + col0 * - 68 AS col1 FROM tab2 AS cor0
----
-5383
-5451
-555

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

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

query I rowsort
SELECT - col0 * col2 + - col2 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT + 47 AS col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT DISTINCT - 76 * + col0 * col1 AS col0 FROM tab0
----
-156864
-258020
-615524

onlyif mysql # use DIV operator for integer division
query I rowsort label-3443
SELECT col1 DIV col0 + col0 DIV + 33 FROM tab1
----
1
2
8

skipif mysql # not compatible
query I rowsort label-3443
SELECT col1 / col0 + col0 / + 33 FROM tab1
----
1
2
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3444
SELECT DISTINCT - 47 DIV + col1 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3444
SELECT DISTINCT - 47 / + col1 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT 63 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT - col1 * 14 + col2 AS col0 FROM tab2 cor0
----
-200
-407
-800

query I rowsort
SELECT ALL - - col0 * col2 + col2 + col2 FROM tab2 AS cor0
----
2080
243
3078

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

skipif mysql # not compatible
query I rowsort label-3448
SELECT ALL col2 + - 24 / + col1 + - col2 FROM tab2 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3449
SELECT DISTINCT + col0 DIV 61 - + col1 DIV - col0 FROM tab1 cor0
----
1
8

skipif mysql # not compatible
query I rowsort label-3449
SELECT DISTINCT + col0 / 61 - + col1 / - col0 FROM tab1 cor0
----
1
8

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

query I rowsort
SELECT DISTINCT col1 * col0 * + 48 FROM tab2 AS cor0
----
10416
220896
64464

query I rowsort
SELECT DISTINCT + col2 + cor0.col0 * + 62 + col1 * 23 * + col0 AS col1 FROM tab1 cor0
----
18745
2034
28976

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

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

query I rowsort
SELECT col0 * + 89 AS col2 FROM tab1 AS cor0
----
267
5696
7120

query I rowsort
SELECT DISTINCT + + col2 + + col2 * col1 - - col1 FROM tab0 cor0
----
195
2957
7635

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

query I rowsort
SELECT + + col0 * 44 FROM tab1 AS cor0
----
132
2816
3520

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

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

skipif mysql # not compatible
query I rowsort label-3459
SELECT CAST ( 17 AS INTEGER ) FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT + - 66 * - col0 FROM tab1 AS cor0
----
198
4224
5280

query I rowsort
SELECT DISTINCT + 19 + col2 FROM tab1 AS cor0
----
115
73
76

query I rowsort
SELECT + 8 * 2 + + col0 FROM tab0 AS cor0
----
105
40
51

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3464
SELECT + CAST( col1 AS SIGNED ) AS col0 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3464
SELECT + CAST ( col1 AS INTEGER ) AS col0 FROM tab0
----
86
91
97

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

query I rowsort
SELECT ALL + col1 + cor0.col1 * - 75 FROM tab2 AS cor0
----
-1258
-2294
-4366

query I rowsort
SELECT col2 + col0 * + col2 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT ALL - ( 95 ) AS col1 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to cf302b83f15b730fe35c19bdd9363c13

onlyif mysql # use DIV operator for integer division
query I rowsort label-3469
SELECT DISTINCT col1 + + col0 DIV 47 FROM tab1 AS cor0
----
11
14
26

skipif mysql # not compatible
query I rowsort label-3469
SELECT DISTINCT col1 + + col0 / 47 FROM tab1 AS cor0
----
11
14
26

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

query I rowsort
SELECT ALL col2 * + col1 * col1 - col1 AS col0 FROM tab1 cor0
----
16211
36478
5690

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

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

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

query I rowsort
SELECT - col2 * + 47 + 24 AS col1 FROM tab2
----
-1198
-1245
-1762

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 + col0 col0 FROM tab0 AS cor0
----
115
50
61

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
7
78
79

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-3478
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 + col1 * col0 col0 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3478
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 + col1 * col0 col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT DISTINCT ( - 35 ) * + col1 AS col1 FROM tab0 AS cor0
----
-3010
-3185
-3395

query I rowsort
SELECT ALL + 22 * - col1 + - col2 * + col0 AS col1 FROM tab1 AS cor0
----
-3868
-734
-7966

query I rowsort
SELECT + - ( col2 ) * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + ( + 56 ) * col1 AS col1 FROM tab1 AS cor0
----
1456
560
728

query I rowsort
SELECT DISTINCT ( 59 ) + col1 FROM tab2 AS cor0
----
118
76
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3484
SELECT CAST( col0 AS SIGNED ) col0 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3484
SELECT CAST ( col0 AS INTEGER ) col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + 17 * 89 + cor0.col2 AS col2 FROM tab0 AS cor0
----
1514
1546
1595

query I rowsort
SELECT + col2 + + 36 FROM tab1 AS cor0
----
132
90
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3487
SELECT ALL - + col0 + + col1 DIV col0 + col1 AS col2 FROM tab0 cor0
----
3
64
65

skipif mysql # not compatible
query I rowsort label-3487
SELECT ALL - + col0 + + col1 / col0 + col1 AS col2 FROM tab0 cor0
----
3
64
65

query I rowsort
SELECT DISTINCT - col1 + + col2 * col0 AS col2 FROM tab1
----
136
3638
7667

query I rowsort
SELECT ALL + - cor0.col0 + + col1 * - 68 FROM tab0 AS cor0
----
-5872
-6277
-6631

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col1 col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - col2 * cor0.col1 + 44 * 21 FROM tab2 AS cor0
----
-610
278
87

query I rowsort
SELECT 93 * col0 * + 20 AS col1 FROM tab1 cor0
----
119040
148800
5580

query I rowsort
SELECT DISTINCT + col0 * + col1 * + col1 + col0 * ( + col0 ) + col2 FROM tab0 AS cor0
----
178113
330541
745012

query I rowsort
SELECT DISTINCT - col0 * ( + 39 ) + - cor0.col0 FROM tab2 AS cor0
----
-280
-3120
-3160

query I rowsort
SELECT DISTINCT + col1 * - 17 * ( tab0.col1 ) FROM tab0
----
-125732
-140777
-159953

query I rowsort
SELECT ALL - - col1 + ( col1 ) FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + + col1 * - col0 col2 FROM tab0 AS cor0
----
182
5332
6014

query I rowsort
SELECT - col0 * 99 + + col2 FROM tab1 AS cor0
----
-243
-6279
-7824

query I rowsort
SELECT col1 + + col0 + + 11 * + col2 AS col1 FROM tab1 cor0
----
1149
623
701

query I rowsort
SELECT col1 + + cor0.col2 * + col1 * col0 + - col2 * col1 FROM tab0 AS cor0
----
3395
65360
656747

query I rowsort
SELECT + + col1 * - cor0.col0 + cor0.col2 + + col1 FROM tab1 AS cor0
----
-573
-931
2

query I rowsort
SELECT - cor0.col2 + 48 FROM tab0 AS cor0
----
-34
15
47

query I rowsort
SELECT + col0 * 31 + - col0 AS col2 FROM tab2 AS cor0
----
210
2340
2370

query I rowsort
SELECT - cor0.col0 * - 86 AS col2 FROM tab2 AS cor0
----
602
6708
6794

query I rowsort
SELECT 83 * + 44 + col2 FROM tab2 AS cor0
----
3678
3679
3690

query I rowsort
SELECT 93 * col2 AS col2 FROM tab2 AS cor0
----
2418
2511
3534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3507
SELECT + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3507
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - + col0 + - 75 FROM tab1 AS cor0
----
-139
-155
-78

query I rowsort
SELECT ALL 90 + col0 * - col0 * ( ( + col0 ) ) AS col0 FROM tab1 cor0
----
-262054
-511910
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( + col2 ) col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - - ( col0 ) - col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + - 33 - col0 * + ( - col0 ) * + col1 FROM tab1 cor0
----
201
40927
83167

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3513
SELECT ALL CAST( NULL AS SIGNED ) / + 61 + tab1.col0 * - 81 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3513
SELECT ALL CAST ( NULL AS INTEGER ) / + 61 + tab1.col0 * - 81 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3514
SELECT col2 + col1 DIV ( col0 ) AS col2 FROM tab1 cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-3514
SELECT col2 + col1 / ( col0 ) AS col2 FROM tab1 cor0
----
57
62
96

query I rowsort
SELECT col0 + col2 * ( + 4 ) + cor0.col0 AS col2 FROM tab0 AS cor0
----
180
506
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-3516
SELECT - 32 DIV - col1 AS col2 FROM tab1 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3516
SELECT - 32 / - col1 AS col2 FROM tab1 cor0
----
1
2
3

query I rowsort
SELECT col0 * - 36 + col1 + col1 * + 56 AS col0 FROM tab0 AS cor0
----
1983
4038
4269

query I rowsort
SELECT col2 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-3519
SELECT + col1 * + col1 + - col0 DIV - ( col1 ) FROM tab0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-3519
SELECT + col1 * + col1 + - col0 / - ( col1 ) FROM tab0
----
7396
8281
9409

query I rowsort
SELECT - - 18 * cor0.col2 * col2 FROM tab2 AS cor0
----
12168
13122
25992

query I rowsort
SELECT - col2 * 31 AS col1 FROM tab0 AS cor0
----
-1023
-2542
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-3522
SELECT ALL + col1 DIV + cor0.col1 + col0 * col1 DIV - col1 AS col0 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-3522
SELECT ALL + col1 / + cor0.col1 + col0 * col1 / - col1 AS col0 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT DISTINCT col0 * + 55 FROM tab0 cor0
----
1320
1925
4895

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL + col1 * + 64 AS col0 FROM tab2
----
1088
1984
3776

query I rowsort
SELECT ALL - col2 + col1 * - 9 * + 3 AS col1 FROM tab2 AS cor0
----
-1619
-497
-864

query I rowsort
SELECT - col1 * - col1 * - ( 21 ) + + col2 AS col1 FROM tab1 AS cor0
----
-14142
-2043
-3453

query I rowsort
SELECT ALL - 95 + - col1 * + ( + ( + col0 ) ) FROM tab0 cor0
----
-2159
-3490
-8194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col1 * 76 col1 FROM tab1 AS cor0
----
-12844
-51376
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-3530
SELECT + - col1 - - col1 DIV + 70 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-3530
SELECT + - col1 - - col1 / + 70 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - + cor0.col1 * + col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3532
SELECT DISTINCT - + col2 + col2 * col2 DIV - cor0.col0 AS col1 FROM tab2 AS cor0
----
-131
-34
-56

skipif mysql # not compatible
query I rowsort label-3532
SELECT DISTINCT - + col2 + col2 * col2 / - cor0.col0 AS col1 FROM tab2 AS cor0
----
-131
-34
-56

query I rowsort
SELECT ALL - cor0.col2 * + 62 AS col0 FROM tab0 cor0
----
-2046
-5084
-62

query I rowsort
SELECT + col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT - + col1 DIV - col1 col2 FROM tab2 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3535
SELECT - + col1 / - col1 col2 FROM tab2 cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3536
SELECT - col0 DIV col1 + 16 col1 FROM tab2 AS cor0
----
12
15
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3536
SELECT - col0 / col1 + 16 col1 FROM tab2 AS cor0
----
12
15
16

query I rowsort
SELECT - - 49 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT col2 * 69 + + col1 FROM tab2
----
1853
1894
2639

query I rowsort
SELECT - 69 * col0 FROM tab1 AS cor0
----
-207
-4416
-5520

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col1 AS REAL ) + - col1 / + col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT + 20 * col0 FROM tab2 AS cor0
----
140
1560
1580

query I rowsort
SELECT ALL - col1 * + col1 + + 24 FROM tab2
----
-265
-3457
-937

query I rowsort
SELECT DISTINCT col0 * 54 + col1 FROM tab2 AS cor0
----
409
4271
4283

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3544
SELECT ALL - + CAST( col0 AS SIGNED ) * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-3544
SELECT ALL - + CAST ( col0 AS INTEGER ) * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - 78 + col1 * col0 - - 68 AS col0 FROM tab2 AS cor0
----
1333
207
4592

query I rowsort
SELECT + 39 + - col1 FROM tab1 AS cor0
----
13
26
29

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - 24 AS col0 FROM tab1 cor0
----
-24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3549
SELECT DISTINCT - CAST( - 20 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
140
1560
1580

skipif mysql # not compatible
query I rowsort label-3549
SELECT DISTINCT - CAST ( - 20 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
140
1560
1580

query I rowsort
SELECT ALL - + cor0.col2 + 3 FROM tab2 cor0
----
-23
-24
-35

query I rowsort
SELECT ALL 3 + ( - col2 ) * + col0 - col0 FROM tab0 AS cor0
----
-67
-7384
-813

query I rowsort
SELECT 38 * - col1 AS col0 FROM tab2 cor0
----
-1178
-2242
-646

query I rowsort
SELECT ALL + 80 + + col2 AS col2 FROM tab2 AS cor0
----
106
107
118

onlyif mysql # use DIV operator for integer division
query I rowsort label-3554
SELECT DISTINCT + + col1 + - col1 + col2 DIV col2 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3554
SELECT DISTINCT + + col1 + - col1 + col2 / col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT - 33 * 1 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
-6
-7
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3556
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * - ( + col0 ) AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3556
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * - ( + col0 ) AS col1 FROM tab1 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3557
SELECT ALL ( 94 ) + col2 DIV - 59 AS col0 FROM tab1 AS cor0
----
93
94
94

skipif mysql # not compatible
query I rowsort label-3557
SELECT ALL ( 94 ) + col2 / - 59 AS col0 FROM tab1 AS cor0
----
93
94
94

query I rowsort
SELECT + - 93 * - col2 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT DISTINCT col2 * + cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT + 94 * + col2 - ( col0 ) * cor0.col1 FROM tab1 cor0
----
4718
4998
7984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col1 * ( + col2 ) col1 FROM tab0 cor0
----
2814
62
7373

query I rowsort
SELECT cor0.col2 * - col2 + ( + 74 ) AS col2 FROM tab2 AS cor0
----
-1370
-602
-655

query I rowsort
SELECT - - cor0.col0 + col1 + ( col1 + + col0 ) AS col2 FROM tab1 AS cor0
----
148
186
58

query I rowsort
SELECT - 18 + - col0 * + col0 FROM tab0 AS cor0
----
-1243
-594
-7939

query I rowsort
SELECT col2 * - col1 - cor0.col0 FROM tab1 cor0
----
-1328
-1407
-634

query I rowsort
SELECT col1 * 5 + col0 * - col0 FROM tab2 cor0
----
-5789
-6156
106

onlyif mysql # use DIV operator for integer division
query I rowsort label-3567
SELECT DISTINCT col1 DIV col0 + col2 AS col0 FROM tab1 AS cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-3567
SELECT DISTINCT col1 / col0 + col2 AS col0 FROM tab1 AS cor0
----
57
62
96

query I rowsort
SELECT col2 + - cor0.col2 * cor0.col0 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - 89 + + col1 + col2 col1 FROM tab2 AS cor0
----
681
7027
7086

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3570
SELECT DISTINCT - + cor0.col1 + 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-3570
SELECT DISTINCT - + cor0.col1 + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 + + 51 FROM tab2 AS cor0
----
77
78
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 * col1 col1 FROM tab1
----
1131
2262
870

query I rowsort
SELECT ALL - col0 + - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 * + CAST ( cor0.col0 AS REAL ) FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3575
SELECT DISTINCT - - col1 DIV - cor0.col0 AS col2 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-3575
SELECT DISTINCT - - col1 / - cor0.col0 AS col2 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT DISTINCT + 84 * + col1 AS col1 FROM tab1 AS cor0
----
1092
2184
840

query I rowsort
SELECT + cor0.col0 + col1 * - col0 AS col1 FROM tab1 cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-3578
SELECT 60 DIV - cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3578
SELECT 60 / - cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * col2 + + col0 AS col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL + - 54 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-47
24
25

query I rowsort
SELECT DISTINCT + cor0.col1 + - col0 * - 34 FROM tab1 AS cor0
----
128
2186
2733

onlyif mysql # use DIV operator for integer division
query I rowsort label-3582
SELECT + + col1 * col2 DIV 60 FROM tab0 AS cor0
----
1
124
47

skipif mysql # not compatible
query I rowsort label-3582
SELECT + + col1 * col2 / 60 FROM tab0 AS cor0
----
1
124
47

query I rowsort
SELECT ALL + col1 + - col2 * - tab0.col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT ALL col1 + 56 FROM tab1
----
66
69
82

query I rowsort
SELECT + - col1 * col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL col1 + + col2 * col2 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT ALL col1 - - ( 58 ) * - tab2.col1 FROM tab2
----
-1767
-3363
-969

query I rowsort
SELECT DISTINCT col0 * - tab1.col2 * col2 + tab1.col2 * col1 FROM tab1
----
-207366
-7344
-736032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( cor0.col2 ) col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + 76 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col2 AS col1 FROM tab1, tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col0 + + ( + col2 ) * col2 + + col0 * - col2 FROM tab2 AS cor0
----
-1274
-1479
547

query I rowsort
SELECT ALL - 6 + ( col2 ) AS col0 FROM tab2
----
20
21
32

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - - 38 * cor0.col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT - ( + 65 ) + + col0 FROM tab2 AS cor0
----
-58
13
14

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col0 * + cor0.col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + col1 * - col1 * - col0 + + col1 FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT DISTINCT + ( - ( + col2 ) ) FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3600
SELECT + - ( ( - col0 ) ) + CAST( - 34 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-27
44
45

skipif mysql # not compatible
query I rowsort label-3600
SELECT + - ( ( - col0 ) ) + CAST ( - 34 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-27
44
45

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) + col1 * 83 AS col2 FROM tab0 AS cor0
----
7114
7464
8016

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3602
SELECT ALL + + CAST( 85 AS SIGNED ) * + col1 FROM tab2 AS cor0
----
1445
2635
5015

skipif mysql # not compatible
query I rowsort label-3602
SELECT ALL + + CAST ( 85 AS INTEGER ) * + col1 FROM tab2 AS cor0
----
1445
2635
5015

query I rowsort
SELECT ALL + ( 36 ) * cor0.col2 + ( - col2 ) FROM tab0 cor0
----
1155
2870
35

query I rowsort
SELECT ( tab2.col1 ) * col2 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3605
SELECT DISTINCT - col0 DIV - 13 FROM tab1 AS cor0
----
0
4
6

skipif mysql # not compatible
query I rowsort label-3605
SELECT DISTINCT - col0 / - 13 FROM tab1 AS cor0
----
0
4
6

query I rowsort
SELECT - + col2 * cor0.col2 + col1 AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT + col0 + - 8 AS col1 FROM tab2 AS cor0
----
-1
70
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3608
SELECT col2 * col1 DIV - col1 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3608
SELECT col2 * col1 / - col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT col0 - - 26 FROM tab1 AS cor0
----
106
29
90

query I rowsort
SELECT ALL - 81 * - col1 AS col1 FROM tab2
----
1377
2511
4779

query I rowsort
SELECT - 88 + cor0.col2 AS col1 FROM tab2 AS cor0
----
-50
-61
-62

query I rowsort
SELECT 28 * col1 + - 97 FROM tab1 AS cor0
----
183
267
631

query I rowsort
SELECT ALL + col0 * col2 * col1 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-3614
SELECT ALL col0 + + 58 DIV col2 AS col1 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-3614
SELECT ALL col0 + + 58 / col2 AS col1 FROM tab1 AS cor0
----
4
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + 98 col2 FROM tab0 AS cor0
----
122
133
187

query I rowsort
SELECT ALL + + cor0.col2 * - 73 AS col1 FROM tab1 AS cor0
----
-3942
-4161
-7008

query I rowsort
SELECT + cor0.col2 * 55 AS col1 FROM tab0 AS cor0
----
1815
4510
55

query I rowsort
SELECT - - 75 - - col0 AS col2 FROM tab2 cor0
----
153
154
82

query I rowsort
SELECT + - 79 + - col2 AS col1 FROM tab1 AS cor0
----
-133
-136
-175

query I rowsort
SELECT + - col2 * - cor0.col0 + - col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3621
SELECT + CAST( + ( col0 ) AS SIGNED ) * - 60 FROM tab1 AS cor0
----
-180
-3840
-4800

skipif mysql # not compatible
query I rowsort label-3621
SELECT + CAST ( + ( col0 ) AS INTEGER ) * - 60 FROM tab1 AS cor0
----
-180
-3840
-4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 * + ( col2 ) + ( - col2 ) col2 FROM tab1 AS cor0
----
4536
4788
8064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT - col2 * - tab0.col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + 24 - col2 AS col2 FROM tab1
----
-30
-33
-72

query I rowsort
SELECT DISTINCT ( - col1 ) + col0 FROM tab0
----
-2
-62

query I rowsort
SELECT - cor0.col0 * col1 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col1 * + col2 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col1 col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT col0 + - col2 * + col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - - col1 + col2 * + col0 * + col2 AS col0 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT col2 + cor0.col1 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - tab2.col1 * col1 + + col1 AS col2 FROM tab2
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3634
SELECT ALL col0 + 4 + + col1 DIV - tab2.col1 FROM tab2
----
10
81
82

skipif mysql # not compatible
query I rowsort label-3634
SELECT ALL col0 + 4 + + col1 / - tab2.col1 FROM tab2
----
10
81
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 * - col1 * col0 + tab0.col1 col1 FROM tab0
----
-177418
-329218
-736918

onlyif mysql # use DIV operator for integer division
query I rowsort label-3636
SELECT DISTINCT - col1 * - col0 * - tab1.col0 + col1 DIV col2 FROM tab1
----
-234
-40960
-83200

skipif mysql # not compatible
query I rowsort label-3636
SELECT DISTINCT - col1 * - col0 * - tab1.col0 + col1 / col2 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT ALL 0 FROM tab2, tab2 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL - ( - 8 ) AS col2 FROM tab1 AS cor0
----
8
8
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3639
SELECT ALL + col0 * - col1 DIV + col1 AS col1 FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-3639
SELECT ALL + col0 * - col1 / + col1 AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - 83 + + cor0.col2 * + col1 AS col2 FROM tab0 AS cor0
----
14
2755
7379

query I rowsort
SELECT - col1 + 50 + + col1 AS col2 FROM tab2 AS cor0
----
50
50
50

query I rowsort
SELECT ALL + 1 + + col1 AS col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 - + col0 AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL + + ( col0 ) AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + 34 + col2 FROM tab0 AS cor0
----
116
35
67

query I rowsort
SELECT DISTINCT - 10 * + col1 FROM tab1
----
-100
-130
-260

query I rowsort
SELECT ALL 54 * col1 FROM tab2 AS cor0
----
1674
3186
918

query I rowsort
SELECT DISTINCT 93 + - col2 AS col0 FROM tab2 AS cor0
----
55
66
67

query I rowsort
SELECT - ( + col2 ) * col1 - - col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT ( 74 ) + col2 AS col0 FROM tab0
----
107
156
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col2 col0 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3652
SELECT CAST( NULL AS SIGNED ) * - col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3652
SELECT CAST ( NULL AS INTEGER ) * - col0 AS col2 FROM tab2
----
NULL
NULL
NULL

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT + cor0.col1 * - col2 <= NULL
----

query I rowsort
SELECT ALL col0 * + col2 * + col1 FROM tab1 AS cor0
----
36480
4212
99840

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE + col1 * col0 / col0 NOT IN ( col1 )
----

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 WHERE NULL > NULL
----

query I rowsort
SELECT ALL - col1 + col2 * col2 - col1 FROM tab2
----
1410
558
667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 + - col1 col1 FROM tab1 AS cor0
----
104
179
82

query III rowsort
SELECT * FROM tab1 WHERE col2 + - col0 / col0 < - col2 + col1
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL BETWEEN ( col1 ) AND + col1 * col1 + + col2 * + col1
----

query I rowsort
SELECT col1 + col0 * col2 * - col0 - col2 FROM tab1
----
-233519
-514
-614483

query I rowsort
SELECT ALL + col2 * + tab2.col0 * - col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT col1 / col0 + col2 AS col0 FROM tab2 WHERE NULL NOT BETWEEN ( col2 * col0 ) AND NULL
----

query I rowsort
SELECT ALL col2 * col1 + + col2 FROM tab1
----
1344
1458
627

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( - col0 / col0 ) BETWEEN - col0 * col2 AND - col1 - - col0
----
7
31
27

query I rowsort
SELECT col0 - col2 * - tab1.col0 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT ALL col1 + + col2 * - col0 FROM tab2
----
-158
-1969
-2985

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT col1 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL col1 * col1 * - tab1.col1 AS col1 FROM tab1
----
-1000
-17576
-2197

query I rowsort
SELECT col1 * + tab2.col1 + - tab2.col1 AS col2 FROM tab2
----
272
3422
930

query I rowsort
SELECT ALL col0 + col0 * + cor0.col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + col2 - + col1 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - col1 * cor0.col2 + col2 * col0 + col0 FROM tab0 AS cor0
----
-2022
-27
-75

query I rowsort
SELECT + - col0 + - col2 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - + col1 - - cor0.col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + col2 + + tab1.col2 * + col2 * col1 FROM tab1
----
119904
32547
75870

query I rowsort
SELECT + tab0.col2 * col2 + col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL - col2 + - col1 * + col2 * - tab1.col0 AS col1 FROM tab1
----
36423
4158
99744

query I rowsort
SELECT ALL - col0 + col0 + - col0 AS col1 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3682
SELECT col2 DIV tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3682
SELECT col2 / tab0.col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT col2 + tab1.col0 + col1 FROM tab1
----
131
189
83

query I rowsort
SELECT col2 + + tab1.col0 * - col0 + col1 FROM tab1
----
-4029
-6291
71

query I rowsort
SELECT ALL + col2 * - col0 + cor0.col0 * col1 AS col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT - col0 * col0 * col2 + + cor0.col1 FROM tab0 AS cor0
----
-1128
-18922
-649431

query I rowsort
SELECT ALL - col2 + - cor0.col1 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT ALL - col2 + - col0 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL + col2 * col2 + + col2 AS col1 FROM tab1 cor0
----
2970
3306
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 + cor0.col2 col0 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - col2 + + col2 * + col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT DISTINCT - col2 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3694
SELECT DISTINCT - + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3694
SELECT DISTINCT - + col0 / col0 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT - col2 * + ( + ( col2 ) ) AS col2 FROM tab0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * ( 91 ) col0 FROM tab0 AS cor0
----
3003
7462
91

query I rowsort
SELECT ALL - col2 - ( + col2 ) AS col0 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT - col1 + cor0.col1 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + - cor0.col1 + col2 + + 87 * col2 FROM tab2 AS cor0
----
2229
2345
3327

query I rowsort
SELECT + col2 + + col2 * + cor0.col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT cor0.col2 + - 42 AS col2 FROM tab2 AS cor0
----
-15
-16
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3702
SELECT + CAST( 94 AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
180
185
191

skipif mysql # not compatible
query I rowsort label-3702
SELECT + CAST ( 94 AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
180
185
191

query I rowsort
SELECT ALL - + 9 * ( - col1 ) AS col2 FROM tab1 AS cor0
----
117
234
90

query I rowsort
SELECT - col2 * - col2 + col0 * ( - 66 + col2 ) FROM tab0 AS cor0
----
-2274
297
8148

query I rowsort
SELECT DISTINCT ( col2 ) * col2 + col0 * col1 AS col1 FROM tab1 cor0
----
10256
2994
3889

query I rowsort
SELECT - + 11 + col2 * + col0 AS col0 FROM tab2 AS cor0
----
178
2017
2991

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) AS col2 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3708
SELECT ALL col0 + + col0 DIV + col1 + - col2 AS col2 FROM tab2 AS cor0
----
-20
45
53

skipif mysql # not compatible
query I rowsort label-3708
SELECT ALL col0 + + col0 / + col1 + - col2 AS col2 FROM tab2 AS cor0
----
-20
45
53

query I rowsort
SELECT ALL - - 0 * col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 * + col2 * + col1 AS col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - col2 * - col0 AS col1 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3712
SELECT ALL + + col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3712
SELECT ALL + + col0 / + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL + col1 + + cor0.col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + + 70 * - col2 AS col0 FROM tab2 AS cor0
----
-1820
-1890
-2660

query I rowsort
SELECT ALL + 72 AS col1 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT + tab1.col2 - ( + col1 ) AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL - + ( col0 ) + ( - cor0.col0 ) FROM tab2 AS cor0
----
-14
-156
-158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 col1 FROM tab1 AS cor0
----
46
46
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3719
SELECT + col2 + - CAST( + ( col2 ) AS SIGNED ) * + col0 FROM tab2 AS cor0
----
-162
-2002
-2964

skipif mysql # not compatible
query I rowsort label-3719
SELECT + col2 + - CAST ( + ( col2 ) AS INTEGER ) * + col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-3720
SELECT - + cor0.col2 DIV + 41 AS col1 FROM tab0 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-3720
SELECT - + cor0.col2 / + 41 AS col1 FROM tab0 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT + col2 + + col2 + col1 * col0 * + col2 FROM tab1
----
100032
36594
4320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3722
SELECT - + col2 * CAST( col1 AS SIGNED ) * col2 AS col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

skipif mysql # not compatible
query I rowsort label-3722
SELECT - + col2 * CAST ( col1 AS INTEGER ) * col2 AS col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL + - col0 * + 46 FROM tab2 AS cor0
----
-322
-3588
-3634

query I rowsort
SELECT ALL col1 + 88 FROM tab0 AS cor0
----
174
179
185

query I rowsort
SELECT - col0 * tab2.col0 + + 45 FROM tab2
----
-4
-6039
-6196

query I rowsort
SELECT - col2 * - ( col2 ) FROM tab1
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3727
SELECT + col0 + - CAST( NULL AS SIGNED ) / + 90 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3727
SELECT + col0 + - CAST ( NULL AS INTEGER ) / + 90 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 - + ( + col2 ) AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT col2 * 68 - ( col1 ) AS col0 FROM tab2 AS cor0
----
1709
1805
2567

query I rowsort
SELECT ALL - col1 * 11 + col2 - col2 AS col2 FROM tab2
----
-187
-341
-649

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab2, tab2 cor1
----
3645 values hashing to 1a92b418ae3c05ba566f88a890a407ae

query I rowsort
SELECT 20 AS col1 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT ALL ( - col2 + col1 ) AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT - 64 * - 97 * - tab1.col1 FROM tab1
----
-161408
-62080
-80704

query I rowsort
SELECT - col2 + cor0.col2 * + col1 AS col0 FROM tab1 AS cor0
----
1152
1350
513

onlyif mysql # use DIV operator for integer division
query I rowsort label-3736
SELECT ALL col2 DIV 61 + + cor0.col2 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3736
SELECT ALL col2 / 61 + + cor0.col2 / cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + 47 + 69 - col1 FROM tab0 AS cor0
----
19
25
30

query I rowsort
SELECT + + col2 * col1 AS col0 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - 66 * col1 * + 41 AS col1 FROM tab0 AS cor0
----
-232716
-246246
-262482

query I rowsort
SELECT col1 * + col0 + 87 FROM tab1 AS cor0
----
1127
165
727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 4 * cor0.col1 col1 FROM tab0 AS cor0
----
-344
-364
-388

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT ( - cor0.col1 ) FROM tab2, tab2 cor0, tab0, tab0 cor1
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT ALL - 83 - col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-118
-7381
-875

query I rowsort
SELECT + 51 * col2 AS col0 FROM tab2 AS cor0
----
1326
1377
1938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 - col0 col2 FROM tab2 cor0
----
-12
-13
59

query I rowsort
SELECT - - col2 + + col2 * col1 FROM tab0 cor0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3749
SELECT DISTINCT + cor0.col0 + + cor0.col2 / CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3749
SELECT DISTINCT + cor0.col0 + + cor0.col2 / CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + ( ( - tab2.col2 ) ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - col2 * col2 + col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL 46 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT ALL - 14 * - col0 + 78 * + cor0.col0 + + col2 FROM tab2 AS cor0
----
671
7202
7306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 * ( cor0.col2 ) + col1 * 78 * - 10 col0 FROM tab1 AS cor0
----
-2100
16224
6084

query I rowsort
SELECT + - col0 + col0 * col2 * cor0.col1 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT DISTINCT 66 + + col1 FROM tab2 AS cor0
----
125
83
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3757
SELECT col0 * col1 DIV col1 AS col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3757
SELECT col0 * col1 / col1 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT + col1 * - ( - 26 * col2 + ( col1 ) * col0 ) FROM tab2
----
-231634
-6035
15035

query I rowsort
SELECT - tab2.col2 * + col2 * col0 FROM tab2
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-3760
SELECT ALL - col1 * + ( 5 ) - col2 DIV + 34 col2 FROM tab0
----
-430
-457
-485

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3760
SELECT ALL - col1 * + ( 5 ) - col2 / + 34 col2 FROM tab0
----
-430
-457
-485

query I rowsort
SELECT + + 80 + - 98 AS col1 FROM tab0 AS cor0
----
-18
-18
-18

query I rowsort
SELECT ALL - cor0.col2 * - 78 + cor0.col2 AS col1 FROM tab1 AS cor0
----
4266
4503
7584

query I rowsort
SELECT DISTINCT - 36 * + col1 AS col2 FROM tab2 AS cor0
----
-1116
-2124
-612

query I rowsort
SELECT - ( + 4 ) FROM tab0 cor0
----
-4
-4
-4

query I rowsort
SELECT + 80 + 56 FROM tab2 AS cor0
----
136
136
136

query I rowsort
SELECT ALL + col2 * - 2 AS col2 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT ALL 14 * col1 + - col1 * - col2 FROM tab2 AS cor0
----
1271
2360
884

query I rowsort
SELECT DISTINCT + + 58 - + ( col1 ) FROM tab0 cor0
----
-28
-33
-39

query I rowsort
SELECT cor0.col2 * - col2 + - col1 * + ( col1 ) * col0 FROM tab0 AS cor0
----
-178593
-329316
-743733

query I rowsort
SELECT ALL - 73 * + 42 + col0 AS col1 FROM tab2 AS cor0
----
-2987
-2988
-3059

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( + col0 AS REAL ) * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - - col0 - col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL col1 * - 27 * + col1 FROM tab1 AS cor0
----
-18252
-2700
-4563

query I rowsort
SELECT ALL - 81 FROM tab0, tab0 cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

query I rowsort
SELECT DISTINCT col0 * + col1 + + col1 FROM tab0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-3776
SELECT - col1 DIV col2 AS col0 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3776
SELECT - col1 / col2 AS col0 FROM tab1 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3777
SELECT ALL + CAST( NULL AS DECIMAL ) * 44 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3777
SELECT ALL + CAST ( NULL AS REAL ) * 44 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3778
SELECT DISTINCT + + col1 DIV + 41 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3778
SELECT DISTINCT + + col1 / + 41 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + cor0.col2 * cor0.col0 + - col1 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT col2 * - col0 * col1 + - col0 * col2 FROM tab1 AS cor0
----
-107520
-40128
-4374

onlyif mysql # use DIV operator for integer division
query I rowsort label-3781
SELECT + col2 DIV + 69 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3781
SELECT + col2 / + 69 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - - 33 * cor0.col0 AS col1 FROM tab2 AS cor0
----
231
2574
2607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * col2 col0 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT + col0 + col0 * col0 AS col0 FROM tab0 cor0
----
1260
600
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-3785
SELECT ALL + ( col0 ) DIV - 6 FROM tab1 AS cor0
----
-10
-13
0

skipif mysql # not compatible
query I rowsort label-3785
SELECT ALL + ( col0 ) / - 6 FROM tab1 AS cor0
----
-10
-13
0

query I rowsort
SELECT DISTINCT + - col1 * - col2 - - cor0.col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL col1 + + 38 AS col2 FROM tab0
----
124
129
135

query I rowsort
SELECT DISTINCT - col2 * 65 + + col0 FROM tab1
----
-3507
-3641
-6160

query I rowsort
SELECT 52 * + ( col0 ) AS col0 FROM tab2
----
364
4056
4108

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT 82 + tab0.col1 + col2 * + CAST ( col0 AS REAL ) * + col0 FROM tab0
----
1404
19176
649695

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 col1 FROM tab2
----
8
8
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3792
SELECT ALL col1 + CAST( NULL AS DECIMAL ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3792
SELECT ALL col1 + CAST ( NULL AS REAL ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + + col0 * - col2 * - col1 AS col1 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT ALL - + col2 * 70 + + 15 * - col0 FROM tab0 AS cor0
----
-2670
-595
-7075

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3795
SELECT ALL col2 * CAST( NULL AS DECIMAL ) + col1 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3795
SELECT ALL col2 * CAST ( NULL AS REAL ) + col1 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * 60 + - cor0.col2 FROM tab0 AS cor0
----
1947
4838
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3797
SELECT DISTINCT + - col2 + col0 DIV + col0 AS col1 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3797
SELECT DISTINCT + - col2 + col0 / + col0 AS col1 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT ALL - - cor0.col0 + col2 + + cor0.col2 * col0 FROM tab1 AS cor0
----
219
3769
7856

query I rowsort
SELECT DISTINCT + tab2.col0 AS col1 FROM tab2, tab1, tab1 AS cor0, tab0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3800
SELECT DISTINCT col1 + col1 DIV 57 AS col0 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3800
SELECT DISTINCT col1 + col1 / 57 AS col0 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + + col0 + col2 + col0 FROM tab0 cor0
----
260
71
81

query I rowsort
SELECT cor0.col2 * + 59 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab1
----
85

query I rowsort
SELECT DISTINCT - + col1 * + 71 FROM tab1 AS cor0
----
-1846
-710
-923

query I rowsort
SELECT - col0 + + 51 AS col1 FROM tab0 AS cor0
----
-38
16
27

query I rowsort
SELECT ALL + col0 * 62 FROM tab1
----
186
3968
4960

query I rowsort
SELECT 98 * 59 FROM tab2, tab1 AS cor0
----
9 values hashing to a55b1fe6ed31e0f5d1213b1eb45ede23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3809
SELECT ALL - col1 + + col2 DIV tab2.col1 FROM tab2
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-3809
SELECT ALL - col1 + + col2 / tab2.col1 FROM tab2
----
-15
-31
-59

query I rowsort
SELECT ALL 49 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

onlyif mysql # use DIV operator for integer division
query I rowsort label-3811
SELECT cor0.col1 DIV + tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 2a96778151b3f10d316f2f957915629d

skipif mysql # not compatible
query I rowsort label-3811
SELECT cor0.col1 / + tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 2a96778151b3f10d316f2f957915629d

query I rowsort
SELECT DISTINCT 1 + tab2.col2 AS col1 FROM tab2
----
27
28
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 55 * col0 + col2 col2 FROM tab0
----
1353
1926
4977

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3814
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 52 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3814
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 52 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT ALL - col0 * cor0.col0 - col1 AS col1 FROM tab2 cor0
----
-6143
-6258
-80

query I rowsort
SELECT - 0 + col1 * - col2 * - 93 AS col2 FROM tab0 AS cor0
----
263934
693966
9021

query I rowsort
SELECT ALL 83 * + col1 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT DISTINCT - + col2 * + 64 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT ALL - + col2 * - 61 + - ( col0 ) + ( + col0 * col2 ) FROM tab0 cor0
----
12211
2781
61

query I rowsort
SELECT + + cor0.col0 + + 84 FROM tab0 AS cor0
----
108
119
173

query I rowsort
SELECT ALL - col1 + 25 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
1324
1415
2387

onlyif mysql # use DIV operator for integer division
query I rowsort label-3822
SELECT ALL col1 DIV cor0.col1 + - col0 * col0 FROM tab0 cor0
----
-1224
-575
-7920

skipif mysql # not compatible
query I rowsort label-3822
SELECT ALL col1 / cor0.col1 + - col0 * col0 FROM tab0 cor0
----
-1224
-575
-7920

query I rowsort
SELECT cor0.col2 * + 43 FROM tab2 AS cor0
----
1118
1161
1634

query I rowsort
SELECT + cor0.col1 * col0 + - col0 * - col2 * + ( - 68 ) FROM tab2 AS cor0
----
-12635
-133302
-202793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - + 16 col2 FROM tab2 AS cor0
----
-9
62
63

query I rowsort
SELECT + col0 + 57 AS col0 FROM tab0 AS cor0
----
146
81
92

query I rowsort
SELECT col2 * + 77 - - 40 FROM tab0 AS cor0
----
117
2581
6354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3828
SELECT col0 - + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3828
SELECT col0 - + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + + 88 * col1 AS col2 FROM tab0 AS cor0
----
7654
8099
8633

query I rowsort
SELECT ALL + col0 + - tab1.col2 * + col2 AS col2 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT - col2 + + col2 * col2 AS col0 FROM tab0
----
0
1056
6642

onlyif mysql # use DIV operator for integer division
query I rowsort label-3832
SELECT ALL + col1 + col2 DIV + col0 AS col1 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-3832
SELECT ALL + col1 + col2 / + col0 AS col1 FROM tab0
----
87
91
97

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL BETWEEN - col2 * + col0 AND NULL
----

query I rowsort
SELECT ALL col1 * col2 * + col0 AS col2 FROM tab1
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 col1 FROM tab1, tab0 cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT ALL ( 35 ) AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT col2 + col2 + + col2 AS col2 FROM tab1
----
162
171
288

query I rowsort
SELECT col2 AS col2 FROM tab2 WHERE NULL NOT IN ( col0 + + col0 )
----

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 WHERE NOT - col1 > - col0
----
31

query I rowsort
SELECT DISTINCT - col2 * + col0 + - col2 FROM tab0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 * + col2 col1 FROM tab1
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-3842
SELECT ALL col0 DIV col0 + col2 * - col1 * col1 col2 FROM tab2
----
-10981
-25946
-90505

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3842
SELECT ALL col0 / col0 + col2 * - col1 * col1 col2 FROM tab2
----
-10981
-25946
-90505

query I rowsort
SELECT - col0 * + cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3844
SELECT CAST( - cor1.col2 AS SIGNED ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

skipif mysql # not compatible
query I rowsort label-3844
SELECT CAST ( - cor1.col2 AS INTEGER ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT - ( + 82 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 * + col0 col0 FROM tab0
----
1056
1540
3916

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 15 ) col1 FROM tab1 AS cor0
----
-15
-15
-15

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT + col0 DIV + col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-3848
SELECT + col0 / + col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT + 31 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT 1 * + tab1.col2 AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT col2 * - 40 FROM tab0
----
-1320
-3280
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 30 * ( tab0.col0 ) col2 FROM tab0
----
1050
2670
720

query I rowsort
SELECT cor0.col0 + + 63 + + col2 FROM tab2 cor0
----
167
180
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3854
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3854
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col1 + 21 col0 FROM tab0 AS cor0
----
-65
-70
-76

query I rowsort
SELECT col0 + col0 + 14 FROM tab1 AS cor0
----
142
174
20

query I rowsort
SELECT ALL cor0.col2 * + col0 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3858
SELECT DISTINCT - - col0 DIV CAST( - col0 + col2 AS SIGNED ) AS col2 FROM tab2 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3858
SELECT DISTINCT - - col0 / CAST ( - col0 + col2 AS INTEGER ) AS col2 FROM tab2 cor0
----
-1
0

query I rowsort
SELECT col1 - ( - col0 + - col1 ) AS col0 FROM tab0 AS cor0
----
196
229
271

onlyif mysql # use DIV operator for integer division
query I rowsort label-3860
SELECT + col2 DIV + ( col0 ) + + col0 * 81 + col2 AS col2 FROM tab0 AS cor0
----
1978
2836
7291

skipif mysql # not compatible
query I rowsort label-3860
SELECT + col2 / + ( col0 ) + + col0 * 81 + col2 AS col2 FROM tab0 AS cor0
----
1978
2836
7291

onlyif mysql # use DIV operator for integer division
query I rowsort label-3861
SELECT + - col1 * col1 DIV col0 AS col1 FROM tab0 AS cor0
----
-268
-308
-93

skipif mysql # not compatible
query I rowsort label-3861
SELECT + - col1 * col1 / col0 AS col1 FROM tab0 AS cor0
----
-268
-308
-93

query I rowsort
SELECT DISTINCT - col1 + col2 * - col0 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3863
SELECT DISTINCT cor0.col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3863
SELECT DISTINCT cor0.col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL 64 * + col0 FROM tab2
----
448
4992
5056

query I rowsort
SELECT + col0 * + col1 * + ( col2 ) + + col2 AS col1 FROM tab2 AS cor0
----
119678
51072
5886

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + 43 * col2 + col0 col0 FROM tab2 AS cor0
----
1118
1161
1634

query I rowsort
SELECT DISTINCT + col1 + col2 * + col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - col0 * col2 + cor0.col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3869
SELECT ALL - CAST( NULL AS DECIMAL ) * ( - col0 + + col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3869
SELECT ALL - CAST ( NULL AS REAL ) * ( - col0 + + col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + col1 ) + + col1 + col0 FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT ALL col0 * + 38 * - 28 AS col0 FROM tab0
----
-25536
-37240
-94696

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3872
SELECT ALL - col2 * - 87 * col2 + tab2.col1 + CAST( col2 AS SIGNED ) col0 FROM tab2
----
125683
58897
63481

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3872
SELECT ALL - col2 * - 87 * col2 + tab2.col1 + CAST ( col2 AS INTEGER ) col0 FROM tab2
----
125683
58897
63481

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col1 FROM tab2, tab1 cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT ALL + col0 + 44 FROM tab0
----
133
68
79

query I rowsort
SELECT DISTINCT - 93 AS col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
-93

query I rowsort
SELECT DISTINCT - 47 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 ) col0 FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col1 col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - 46 - + col1 * - col0 AS col1 FROM tab2
----
1297
171
4556

onlyif mysql # use DIV operator for integer division
query I rowsort label-3880
SELECT + 30 - + col1 DIV - 41 FROM tab2
----
30
30
31

skipif mysql # not compatible
query I rowsort label-3880
SELECT + 30 - + col1 / - 41 FROM tab2
----
30
30
31

query I rowsort
SELECT - ( + col2 ) + - 11 * + col1 * col1 FROM tab0 AS cor0
----
-103500
-81389
-91173

onlyif mysql # use DIV operator for integer division
query I rowsort label-3882
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-3882
SELECT + - col0 / + col0 col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col1 + col1 * + col1 + col2 AS col0 FROM tab1 AS cor0
----
147
252
704

query I rowsort
SELECT 28 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

onlyif mysql # use DIV operator for integer division
query I rowsort label-3886
SELECT DISTINCT + col2 DIV col2 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3886
SELECT DISTINCT + col2 / col2 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL 55 + col1 AS col2 FROM tab2 cor0
----
114
72
86

query I rowsort
SELECT ALL + - col0 * cor0.col2 + ( - col0 ) FROM tab1 cor0
----
-165
-3712
-7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3889
SELECT DISTINCT + col2 + CAST( col1 AS SIGNED ) * col1 * col2 FROM tab1 AS cor0
----
16320
36558
5757

skipif mysql # not compatible
query I rowsort label-3889
SELECT DISTINCT + col2 + CAST ( col1 AS INTEGER ) * col1 * col2 FROM tab1 AS cor0
----
16320
36558
5757

query I rowsort
SELECT ALL + col2 + 58 AS col0 FROM tab1
----
112
115
154

query I rowsort
SELECT ALL cor0.col2 * col2 * col0 AS col0 FROM tab1 cor0
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 5 + col2 col2 FROM tab0 AS cor0
----
463
486
537

query I rowsort
SELECT ALL - 91 * 95 FROM tab0
----
-8645
-8645
-8645

query I rowsort
SELECT ALL - 57 * + cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b1e807eeef9377dda7f27d358d84877

onlyif mysql # use DIV operator for integer division
query I rowsort label-3895
SELECT DISTINCT ( - 31 ) DIV col2 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3895
SELECT DISTINCT ( - 31 ) / col2 AS col0 FROM tab1
----
0

query I rowsort
SELECT - 73 + col2 AS col2 FROM tab1
----
-16
-19
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3897
SELECT ( col2 ) + col0 DIV col2 AS col0 FROM tab0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-3897
SELECT ( col2 ) + col0 / col2 AS col0 FROM tab0
----
33
36
83

query I rowsort
SELECT ALL col1 * + 11 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT - 1 + + col0 * - col2 + - col1 AS col0 FROM tab2 AS cor0
----
-2088
-221
-3020

query I rowsort
SELECT DISTINCT - ( 54 ) + col1 * col1 AS col1 FROM tab2 cor0
----
235
3427
907

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3901
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * 33 * cor0.col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3901
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * 33 * cor0.col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3902
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3902
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT + 53 * - col0 FROM tab0 cor0
----
-1272
-1855
-4717

query I rowsort
SELECT DISTINCT - col1 * col1 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT DISTINCT - - 69 - col1 AS col0 FROM tab0 AS cor0
----
-17
-22
-28

query I rowsort
SELECT - + cor0.col1 + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL 77 AS col2 FROM tab2 cor0
----
77
77
77

query I rowsort
SELECT DISTINCT + col1 + - col1 * 22 FROM tab0 AS cor0
----
-1806
-1911
-2037

query I rowsort
SELECT + 71 * col0 AS col0 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT DISTINCT ( + 1 ) + - col0 AS col1 FROM tab2
----
-6
-77
-78

query I rowsort
SELECT ALL + 36 * tab0.col2 + + col0 * - col0 AS col1 FROM tab0
----
-1189
-4969
612

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3912
SELECT DISTINCT - cor0.col1 * col0 + CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-3912
SELECT DISTINCT - cor0.col1 * col0 + CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL ( + col1 ) * - col0 + + ( col0 ) AS col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT + 56 + 93 AS col2 FROM tab2 AS cor0
----
149
149
149

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3915
SELECT CAST( ( col0 ) AS SIGNED ) AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3915
SELECT CAST ( ( col0 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3916
SELECT DISTINCT CAST( NULL AS DECIMAL ) * + 96 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-3916
SELECT DISTINCT CAST ( NULL AS REAL ) * + 96 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 cor2
----
NULL

query I rowsort
SELECT DISTINCT + 0 + cor2.col2 FROM tab2, tab1 cor0, tab1 cor1, tab0 AS cor2
----
1
33
82

query I rowsort
SELECT + col0 * - cor0.col0 * + col0 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT - ( col1 ) + - col0 AS col1 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT + 15 * 51 FROM tab0 AS cor0
----
765
765
765

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3921
SELECT ALL + CAST( NULL AS SIGNED ) * col1 * col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3921
SELECT ALL + CAST ( NULL AS INTEGER ) * col1 * col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 5 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 4f346dd2f65047c836c6957f80f0ef9e

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
-24
-35
-89

query I rowsort
SELECT - cor0.col0 * + 26 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT DISTINCT - col0 * ( ( col0 ) ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + cor0.col0 * col0 + - col2 AS col2 FROM tab2 cor0
----
22
6058
6203

query I rowsort
SELECT + col2 * 97 + col2 FROM tab2 cor0
----
2548
2646
3724

query I rowsort
SELECT ALL + col0 + col0 * - 28 AS col0 FROM tab2 AS cor0
----
-189
-2106
-2133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 11 * + col1 col2 FROM tab1 AS cor0
----
1100
1859
7436

query I rowsort
SELECT + - col2 * - 89 AS col2 FROM tab0 AS cor0
----
2937
7298
89

query I rowsort
SELECT DISTINCT ( + 17 ) FROM tab0, tab2 AS cor0
----
17

query I rowsort
SELECT ALL - 38 * col1 AS col2 FROM tab1 cor0
----
-380
-494
-988

query I rowsort
SELECT ALL - - col1 + col2 * cor0.col2 + - col0 AS col0 FROM tab1 AS cor0
----
2939
3195
9149

query I rowsort
SELECT DISTINCT + 40 + col0 FROM tab2 AS cor0
----
118
119
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-3935
SELECT ALL + ( + col1 ) + - col0 DIV 43 FROM tab1 AS cor0
----
12
26
9

skipif mysql # not compatible
query I rowsort label-3935
SELECT ALL + ( + col1 ) + - col0 / 43 FROM tab1 AS cor0
----
12
26
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 88 ) col2 FROM tab1 AS cor0
----
88
88
88

query I rowsort
SELECT ALL 15 + col1 AS col2 FROM tab2 AS cor0
----
32
46
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-3938
SELECT + cor0.col2 DIV - col0 AS col0 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3938
SELECT + cor0.col2 / - col0 AS col0 FROM tab1 cor0
----
-1
-18
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3939
SELECT ALL - 76 DIV col0 col0 FROM tab2
----
-10
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3939
SELECT ALL - 76 / col0 col0 FROM tab2
----
-10
0
0

query I rowsort
SELECT + col0 * cor0.col1 - - col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + + 47 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1128
1645
4183

query I rowsort
SELECT + + col1 + - col1 * + 50 AS col1 FROM tab1 AS cor0
----
-1274
-490
-637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3943
SELECT col0 * col1 - + CAST( - col0 AS SIGNED ) * col0 FROM tab0 AS cor0
----
16020
2640
4620

skipif mysql # not compatible
query I rowsort label-3943
SELECT col0 * col1 - + CAST ( - col0 AS INTEGER ) * col0 FROM tab0 AS cor0
----
16020
2640
4620

query I rowsort
SELECT DISTINCT - + col2 + ( 15 * + col0 ) AS col1 FROM tab0 AS cor0
----
1253
327
524

query I rowsort
SELECT - - ( + 18 ) AS col1 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT DISTINCT + 17 * 98 FROM tab2
----
1666

query I rowsort
SELECT ALL + 53 FROM tab2, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT + 43 FROM tab0, tab0 cor0
----
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 * ( - col0 ) * 53 col1 FROM tab2 AS cor0
----
4823
53742
54431

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 55 * col1 col0 FROM tab1 AS cor0
----
1430
550
715

query I rowsort
SELECT - + 55 + col0 FROM tab2 AS cor0
----
-48
23
24

query I rowsort
SELECT - 84 * cor0.col2 + 57 FROM tab0 cor0
----
-27
-2715
-6831

query I rowsort
SELECT DISTINCT + col2 * + cor0.col0 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3954
SELECT DISTINCT + - col2 * - col0 DIV CAST( + ( - col0 ) AS SIGNED ) + ( cor0.col2 ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3954
SELECT DISTINCT + - col2 * - col0 / CAST ( + ( - col0 ) AS INTEGER ) + ( cor0.col2 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + col0 * + col1 + cor0.col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + 92 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT ALL + 77 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT DISTINCT - - col1 + + 69 AS col0 FROM tab1 cor0
----
79
82
95

query I rowsort
SELECT ALL + col1 + - col1 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + col2 + col1 * - 1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-3961
SELECT col0 DIV + 85 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3961
SELECT col0 / + 85 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3962
SELECT DISTINCT - col1 DIV + tab1.col1 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-3962
SELECT DISTINCT - col1 / + tab1.col1 FROM tab1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 75 col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT ( ( + col0 ) ) * cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + - cor0.col2 * ( col0 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 87 * - col1 FROM tab0 cor0
----
-7482
-7917
-8439

query I rowsort
SELECT + - cor0.col0 * cor0.col2 + col1 * + 69 FROM tab0 cor0
----
-1019
5142
6658

onlyif mysql # use DIV operator for integer division
query I rowsort label-3969
SELECT - - col1 DIV cor0.col1 col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3969
SELECT - - col1 / cor0.col1 col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + ( 37 ) + col2 FROM tab0 AS cor0
----
119
38
70

query I rowsort
SELECT ALL - ( - col0 ) + + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + 91 + + 4 * + col1 AS col2 FROM tab2 AS cor0
----
159
215
327

query I rowsort
SELECT 11 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 37 col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT col0 * 34 FROM tab1
----
102
2176
2720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3976
SELECT CAST( - 40 * - col0 AS SIGNED ) + ( col1 ) * - col2 FROM tab1
----
-1284
1952
1990

skipif mysql # not compatible
query I rowsort label-3976
SELECT CAST ( - 40 * - col0 AS INTEGER ) + ( col1 ) * - col2 FROM tab1
----
-1284
1952
1990

query I rowsort
SELECT DISTINCT 52 * + 15 AS col2 FROM tab0
----
780

query I rowsort
SELECT ALL cor0.col0 + + 78 AS col0 FROM tab1 AS cor0
----
142
158
81

query I rowsort
SELECT ALL + - ( 95 ) FROM tab0 AS cor0
----
-95
-95
-95

query I rowsort
SELECT - ( + 98 ) + - cor0.col1 * + 59 FROM tab2 AS cor0
----
-1101
-1927
-3579

query I rowsort
SELECT col2 + + tab1.col0 AS col1 FROM tab1
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3982
SELECT ALL CAST( NULL AS SIGNED ) + col2 * col0 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3982
SELECT ALL CAST ( NULL AS INTEGER ) + col2 * col0 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 + col2 + - col2 col1 FROM tab1
----
-92
-92
-92

query I rowsort
SELECT DISTINCT col1 + + col1 * + ( + col1 ) FROM tab0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3985
SELECT DISTINCT - col0 * + col1 * + CAST( NULL AS SIGNED ) + - col1 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3985
SELECT DISTINCT - col0 * + col1 * + CAST ( NULL AS INTEGER ) + - col1 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT + 77 + col2 * col1 AS col0 FROM tab0
----
174
2915
7539

query I rowsort
SELECT 78 * col2 FROM tab0
----
2574
6396
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3988
SELECT tab0.col2 * col2 DIV + tab0.col0 FROM tab0
----
0
45
75

skipif mysql # not compatible
query I rowsort label-3988
SELECT tab0.col2 * col2 / + tab0.col0 FROM tab0
----
0
45
75

query I rowsort
SELECT DISTINCT ( col2 ) * ( col2 ) - col2 * - 10 AS col1 FROM tab2
----
1824
936
999

query I rowsort
SELECT - ( col2 ) * 67 + 58 AS col0 FROM tab0 AS cor0
----
-2153
-5436
-9

query I rowsort
SELECT DISTINCT tab2.col0 + - col1 * 30 AS col1 FROM tab2
----
-1692
-431
-923

query I rowsort
SELECT + cor0.col2 + col2 * col0 AS col0 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-3993
SELECT DISTINCT + col1 + + col0 DIV + cor0.col2 AS col2 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-3993
SELECT DISTINCT + col1 + + col0 / + cor0.col2 AS col2 FROM tab1 AS cor0
----
11
13
26

query I rowsort
SELECT ALL - col2 + + col0 * + ( + col1 ) AS col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-3995
SELECT + col0 * col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3995
SELECT + col0 * col1 / + col0 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col2 * ( 78 * cor0.col0 ) AS col1 FROM tab1 AS cor0
----
12636
284544
599040

query I rowsort
SELECT DISTINCT col2 - + cor0.col1 * + 7 AS col0 FROM tab1 cor0
----
-128
-13
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3998
SELECT - col0 DIV 34 + col2 AS col0 FROM tab0 AS cor0
----
0
33
80

skipif mysql # not compatible
query I rowsort label-3998
SELECT - col0 / 34 + col2 AS col0 FROM tab0 AS cor0
----
0
33
80

query I rowsort
SELECT + - col0 * + ( - col1 ) AS col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4000
SELECT DISTINCT - col2 DIV col2 + + col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-4000
SELECT DISTINCT - col2 / col2 + + col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT DISTINCT + - col1 * + col2 * cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
-22572
-24510
-39858

query I rowsort
SELECT + - col0 + - col1 * col2 AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4003
SELECT ALL - + cor0.col0 DIV + col2 AS col0 FROM tab1 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4003
SELECT ALL - + cor0.col0 / + col2 AS col0 FROM tab1 cor0
----
-1
0
0

query I rowsort
SELECT - col0 + 15 * col0 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT DISTINCT - col0 + + ( - cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4006
SELECT DISTINCT + col0 DIV + ( - 9 ) + col2 col1 FROM tab2 AS cor0
----
18
27
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4006
SELECT DISTINCT + col0 / + ( - 9 ) + col2 col1 FROM tab2 AS cor0
----
18
27
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-4007
SELECT ALL + - col0 + 0 DIV cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4007
SELECT ALL + - col0 + 0 / cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col0 * - col1 + col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - cor0.col1 + col1 * ( col1 + col0 ) FROM tab0 AS cor0
----
12707
16289
9374

query I rowsort
SELECT DISTINCT - - col0 * + cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT cor0.col2 * + col0 * col0 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - 11 * - col2 AS col2 FROM tab0
----
11
363
902

query I rowsort
SELECT 78 * - tab2.col2 * + col1 FROM tab2
----
-119652
-50388
-65286

query I rowsort
SELECT - + ( - col1 ) + - 31 AS col1 FROM tab0 cor0
----
55
60
66

query I rowsort
SELECT ALL - cor0.col2 + 12 - 10 * + tab0.col1 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 2d53dbe08c50a02c8b17ed820cc1984b

query I rowsort
SELECT - col0 * + ( col1 * col1 ) FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT tab0.col0 * - col2 + col1 FROM tab0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col1 * col0 col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4019
SELECT + col0 - 72 DIV - cor0.col0 AS col2 FROM tab1 AS cor0
----
27
65
80

skipif mysql # not compatible
query I rowsort label-4019
SELECT + col0 - 72 / - cor0.col0 AS col2 FROM tab1 AS cor0
----
27
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col0 + + col2 col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT 53 + col1 AS col2 FROM tab1 AS cor0
----
63
66
79

query I rowsort
SELECT - col2 * - col1 * - 27 + - col2 FROM tab2
----
-17480
-22626
-41444

query I rowsort
SELECT DISTINCT + col1 + - col2 * 0 * col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4024
SELECT DISTINCT col0 + - 28 DIV - col1 col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4024
SELECT DISTINCT col0 + - 28 / - col1 col1 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4025
SELECT col1 DIV + 13 FROM tab1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4025
SELECT col1 / + 13 FROM tab1
----
0
1
2

query I rowsort
SELECT col0 * col2 * + col1 AS col0 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4027
SELECT DISTINCT 11 + + tab1.col0 DIV + tab1.col2 + - col0 FROM tab1
----
-52
-69
8

skipif mysql # not compatible
query I rowsort label-4027
SELECT DISTINCT 11 + + tab1.col0 / + tab1.col2 + - col0 FROM tab1
----
-52
-69
8

query I rowsort
SELECT DISTINCT 30 AS col2 FROM tab1, tab1 AS cor0
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( col1 ) col2 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4030
SELECT ALL - CAST( NULL AS SIGNED ) + col1 * - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4030
SELECT ALL - CAST ( NULL AS INTEGER ) + col1 * - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 56 * + ( - col1 ) + col2 AS col2 FROM tab1 AS cor0
----
-1402
-503
-632

query I rowsort
SELECT ALL ( 33 ) * + col0 * + 76 FROM tab1 AS cor0
----
160512
200640
7524

query I rowsort
SELECT DISTINCT - cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - col2 * col0 * col0 - + col0 AS col1 FROM tab1 AS cor0
----
-233536
-489
-614480

query I rowsort
SELECT DISTINCT - 77 * col0 AS col1 FROM tab1 AS cor0
----
-231
-4928
-6160

query I rowsort
SELECT + ( - 44 ) * col2 FROM tab2 AS cor0
----
-1144
-1188
-1672

query I rowsort
SELECT - - col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4038
SELECT ALL + cor0.col0 DIV - col1 + + col2 * - ( + col1 * col1 + 11 ) FROM tab1 cor0
----
-17286
-37098
-6333

skipif mysql # not compatible
query I rowsort label-4038
SELECT ALL + cor0.col0 / - col1 + + col2 * - ( + col1 * col1 + 11 ) FROM tab1 cor0
----
-17286
-37098
-6333

query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col0 * col0 col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - 73 - col0 FROM tab1 AS cor0
----
-137
-153
-76

query I rowsort
SELECT DISTINCT + 20 * - col0 - - col0 AS col2 FROM tab0 AS cor0
----
-1691
-456
-665

query I rowsort
SELECT ALL 8 + col1 FROM tab0 AS cor0
----
105
94
99

query I rowsort
SELECT - - col2 - col0 * + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 * 15 FROM tab1 AS cor0
----
1536
864
912

query I rowsort
SELECT + 19 * 74 + col0 * 17 FROM tab0
----
1814
2001
2919

query I rowsort
SELECT - 54 * col0 AS col0 FROM tab1
----
-162
-3456
-4320

query I rowsort
SELECT - col2 * tab0.col2 + col1 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT + + col0 * col1 + col2 AS col2 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-4050
SELECT col2 DIV + cor0.col1 + col0 * col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-4050
SELECT col2 / + cor0.col1 + col0 * col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + + col1 + col1 * cor0.col1 + 47 FROM tab0 AS cor0
----
7529
8419
9553

onlyif mysql # use DIV operator for integer division
query I rowsort label-4052
SELECT - col2 DIV + col1 + + cor0.col0 col1 FROM tab1 AS cor0
----
1
59
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4052
SELECT - col2 / + col1 + + cor0.col0 col1 FROM tab1 AS cor0
----
1
59
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 - col0 * 18 col1 FROM tab1 AS cor0
----
-1159
-1424
-3

query I rowsort
SELECT + + col2 + + col1 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 20 col2 FROM tab0, tab0 AS cor0
----
20

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + tab1.col2 * - CAST ( - col0 AS REAL ) * col0 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT DISTINCT col1 * col2 + - 5 * cor0.col1 FROM tab2 AS cor0
----
1239
561
682

query I rowsort
SELECT + - col2 + ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4059
SELECT col0 DIV col1 - col0 AS col2 FROM tab2 AS cor0
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-4059
SELECT col0 / col1 - col0 AS col2 FROM tab2 AS cor0
----
-7
-75
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4060
SELECT - col1 + + col0 / - col0 - + CAST( NULL AS SIGNED ) * col2 * + tab0.col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4060
SELECT - col1 + + col0 / - col0 - + CAST ( NULL AS INTEGER ) * col2 * + tab0.col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 91 - cor0.col2 FROM tab0 AS cor0
----
-124
-173
-92

query I rowsort
SELECT col0 + 7 AS col0 FROM tab2 AS cor0
----
14
85
86

query I rowsort
SELECT + ( 0 ) + + col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL 64 + col0 AS col0 FROM tab1 AS cor0
----
128
144
67

query I rowsort
SELECT DISTINCT col1 * - col2 * - cor0.col0 + + cor0.col1 + + col0 FROM tab2 cor0
----
119789
51130
5897

query I rowsort
SELECT ALL + col0 * col2 + + tab2.col1 * col0 AS col0 FROM tab2
----
406
4345
6630

query I rowsort
SELECT ALL + + col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + 50 * 60 FROM tab2 AS cor0
----
3000
3000
3000

query I rowsort
SELECT DISTINCT + col0 * + col1 + - col1 * col1 FROM tab2 AS cor0
----
-744
1054
1121

query I rowsort
SELECT DISTINCT - col1 + - ( col0 ) FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL 94 AS col0 FROM tab1 AS cor0
----
94
94
94

query I rowsort
SELECT + + ( 43 ) FROM tab0 AS cor0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + 38 col2 FROM tab2 AS cor0
----
116
117
45

query I rowsort
SELECT - ( - col0 ) + col2 * - col1 FROM tab2
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 78 ) col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT ALL + 85 AS col1 FROM tab1 AS cor0
----
85
85
85

query I rowsort
SELECT DISTINCT - col0 + col1 AS col2 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL - col0 * - ( col0 + + ( - cor0.col1 ) ) * col0 AS col0 FROM tab0 cor0
----
-15842
-35712
-75950

query I rowsort
SELECT - + col2 * + col2 + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ( + col0 ) + - col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( + ( col1 ) ) + - ( ( + col0 ) ) + + cor0.col1 FROM tab0 AS cor0
----
148
159
93

query I rowsort
SELECT - 22 * - col1 * col2 AS col1 FROM tab2 AS cor0
----
14212
18414
33748

onlyif mysql # use DIV operator for integer division
query I rowsort label-4083
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-4083
SELECT - col1 / + col0 col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT + - 5 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT ALL - 9 + col0 * 30 FROM tab2
----
201
2331
2361

query I rowsort
SELECT - - 17 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL 51 * col2 + + 32 FROM tab2
----
1358
1409
1970

onlyif mysql # use DIV operator for integer division
query I rowsort label-4088
SELECT ALL - - col0 * col2 + 48 * ( col0 ) DIV + col2 FROM tab1 AS cor0
----
164
3701
7720

skipif mysql # not compatible
query I rowsort label-4088
SELECT ALL - - col0 * col2 + 48 * ( col0 ) / + col2 FROM tab1 AS cor0
----
164
3701
7720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4089
SELECT ALL + - 48 DIV - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4089
SELECT ALL + - 48 / - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * col2 + + 89 AS col0 FROM tab0 AS cor0
----
124
7387
881

query I rowsort
SELECT - + 36 * col1 + - ( col0 ) * col2 FROM tab1 AS cor0
----
-1098
-4008
-8148

query I rowsort
SELECT - - 53 - col0 AS col2 FROM tab1 AS cor0
----
-11
-27
50

query I rowsort
SELECT - 37 * col0 FROM tab1 AS cor0
----
-111
-2368
-2960

query I rowsort
SELECT + - col1 - col0 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - col1 * 2 FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4096
SELECT ALL col2 DIV col0 - 82 FROM tab2 AS cor0
----
-79
-82
-82

skipif mysql # not compatible
query I rowsort label-4096
SELECT ALL col2 / col0 - 82 FROM tab2 AS cor0
----
-79
-82
-82

query I rowsort
SELECT ALL col2 + + ( - col0 + col2 ) AS col1 FROM tab2 AS cor0
----
-26
-3
47

query I rowsort
SELECT + col1 * + ( 51 ) AS col1 FROM tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT DISTINCT - col1 + - 70 + col0 FROM tab2 AS cor0
----
-51
-8
-94

query I rowsort
SELECT col2 + - ( col1 ) AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL col0 * 33 + + cor0.col1 * col2 AS col2 FROM tab1 cor0
----
1503
2682
3888

query I rowsort
SELECT + 69 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to 82762d1f978d19c1dfb91e39310b5974

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4103
SELECT ALL - col0 + CAST( - col1 AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0
----
-164
-249
-679

skipif mysql # not compatible
query I rowsort label-4103
SELECT ALL - col0 + CAST ( - col1 AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0
----
-164
-249
-679

onlyif mysql # use DIV operator for integer division
query I rowsort label-4104
SELECT - + col2 * 66 + cor0.col1 DIV col0 AS col2 FROM tab2 AS cor0
----
-1716
-1778
-2508

skipif mysql # not compatible
query I rowsort label-4104
SELECT - + col2 * 66 + cor0.col1 / col0 AS col2 FROM tab2 AS cor0
----
-1716
-1778
-2508

query I rowsort
SELECT + - col2 + 17 + col0 FROM tab1 AS cor0
----
-34
1
24

query I rowsort
SELECT DISTINCT + + col1 + + 59 FROM tab0 cor0
----
145
150
156

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4107
SELECT + col1 * + ( + col0 * col2 ) + CAST( NULL AS SIGNED ) * - ( cor0.col1 ) 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-4107
SELECT + col1 * + ( + col0 * col2 ) + CAST ( NULL AS INTEGER ) * - ( cor0.col1 ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4108
SELECT col1 DIV CAST( col0 AS SIGNED ) + col0 FROM tab0 AS cor0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-4108
SELECT col1 / CAST ( col0 AS INTEGER ) + col0 FROM tab0 AS cor0
----
27
37
90

query I rowsort
SELECT + - col0 * 20 + - 75 FROM tab0 AS cor0
----
-1855
-555
-775

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 * col0 AS col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT col0 + col2 * cor0.col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + cor0.col1 * + col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col1 * 86 AS col2 FROM tab1 AS cor0
----
1118
2236
860

onlyif mysql # use DIV operator for integer division
query I rowsort label-4114
SELECT - - col1 * col2 DIV - col1 + - CAST( cor0.col2 AS SIGNED ) * col0 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

skipif mysql # not compatible
query I rowsort label-4114
SELECT - - col1 * col2 / - col1 + - CAST ( cor0.col2 AS INTEGER ) * col0 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab2 cor2, tab2 AS cor3
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT DISTINCT 42 * + col2 FROM tab1 AS cor0
----
2268
2394
4032

query I rowsort
SELECT ALL 31 * - col0 AS col0 FROM tab0 AS cor0
----
-1085
-2759
-744

query I rowsort
SELECT - col2 + - col1 - - 15 FROM tab2 cor0
----
-40
-43
-70

query I rowsort
SELECT - - 96 * col1 AS col2 FROM tab0 cor0
----
8256
8736
9312

query I rowsort
SELECT ALL 9 + + cor1.col2 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0e7cfbc81382421d2d5aaaf1088d9b3a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4121
SELECT + 44 DIV col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4121
SELECT + 44 / col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4122
SELECT DISTINCT + col1 DIV col0 + col1 * + col2 + col2 * 45 * + col2 FROM tab1
----
132632
146775
415968

skipif mysql # not compatible
query I rowsort label-4122
SELECT DISTINCT + col1 / col0 + col1 * + col2 + col2 * 45 * + col2 FROM tab1
----
132632
146775
415968

query I rowsort
SELECT 73 + col2 AS col1 FROM tab0
----
106
155
74

query I rowsort
SELECT ALL tab0.col0 + tab0.col2 * - col0 AS col0 FROM tab0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 21 * + col1 col1 FROM tab2 AS cor0
----
1239
357
651

query I rowsort
SELECT - cor0.col1 * col2 - - 52 FROM tab0 AS cor0
----
-2786
-45
-7410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 + col2 col0 FROM tab2
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + tab1.col2 * + col0 col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT + col2 AS col1 FROM tab0 WHERE ( NULL ) <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * col0 + - col0 col1 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL col1 + - col2 * + col2 AS col2 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT col0 * + col1 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT ALL col1 * col0 + + col2 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-4134
SELECT tab0.col0 + col0 DIV + col0 + + col1 FROM tab0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-4134
SELECT tab0.col0 + col0 / + col0 + + col1 FROM tab0
----
111
133
181

query I rowsort
SELECT ALL col2 * col1 + col2 + col0 AS col1 FROM tab1
----
1424
1461
691

query I rowsort
SELECT DISTINCT + col1 * col1 * col1 + + col2 AS col1 FROM tab1
----
1057
17630
2293

query I rowsort
SELECT DISTINCT - ( col2 + - col2 ) FROM tab1
----
0

query I rowsort
SELECT + - 44 * + col1 + + col1 * cor0.col1 * col1 FROM tab2 AS cor0
----
202783
28427
4165

query III rowsort
SELECT * FROM tab0 WHERE ( + col1 + col2 * col0 * - col2 ) > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4140
SELECT col2 + cor0.col2 DIV - col2 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4140
SELECT col2 + cor0.col2 / - col2 FROM tab1 AS cor0
----
53
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
137
38
96

query I rowsort
SELECT DISTINCT col0 - - col1 AS col2 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + tab2.col0 * - col0 * - col2 col1 FROM tab2
----
1350
158210
237196

query I rowsort
SELECT ALL - cor0.col2 + + col2 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + col2 + col1 * col0 + - col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT + col2 * - col1 - col2 * tab2.col0 AS col1 FROM tab2
----
-1026
-3562
-3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 * col2 col2 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT DISTINCT - col2 + tab1.col1 + col0 * col1 AS col0 FROM tab1
----
50
593
957

onlyif mysql # use DIV operator for integer division
query I rowsort label-4149
SELECT DISTINCT col0 * - col1 DIV col1 AS col1 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4149
SELECT DISTINCT col0 * - col1 / col1 AS col1 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4150
SELECT ALL col0 DIV + col1 col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4150
SELECT ALL col0 / + col1 col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col0 * + col1 * - col2 - col1 AS col1 FROM tab0
----
-3492
-664209
-68198

query I rowsort
SELECT ALL + col2 + + col1 + col0 FROM tab1
----
131
189
83

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab2 WHERE NOT col2 = ( NULL )
----

query I rowsort
SELECT ALL - col1 * - col2 + col1 + col1 FROM tab2
----
1652
680
899

query I rowsort
SELECT DISTINCT - col1 * tab1.col1 AS col2 FROM tab1
----
-100
-169
-676

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) IN ( col0 + - tab1.col1 / col0 + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4157
SELECT DISTINCT - tab1.col0 + + col2 * + tab1.col1 + - col1 DIV - col2 FROM tab1
----
1168
1401
506

skipif mysql # not compatible
query I rowsort label-4157
SELECT DISTINCT - tab1.col0 + + col2 * + tab1.col1 + - col1 / - col2 FROM tab1
----
1168
1401
506

query I rowsort
SELECT DISTINCT col1 * - tab2.col2 + - col0 AS col0 FROM tab2
----
-1612
-725
-844

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL < col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4160
SELECT col1 DIV ( col2 ) AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4160
SELECT col1 / ( col2 ) AS col2 FROM tab0 AS cor0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + 67 ) col1 FROM tab1 AS cor0
----
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 col0 FROM tab0 AS cor0
----
-11

onlyif mysql # use DIV operator for integer division
query I rowsort label-4163
SELECT DISTINCT 30 DIV - 11 AS col0 FROM tab0 cor0
----
-2

skipif mysql # not compatible
query I rowsort label-4163
SELECT DISTINCT 30 / - 11 AS col0 FROM tab0 cor0
----
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4164
SELECT ALL + col0 DIV + col0 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4164
SELECT ALL + col0 / + col0 AS col2 FROM tab1
----
1
1
1

query I rowsort
SELECT 55 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL + 5 * cor0.col1 AS col2 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT - ( col1 ) + + col2 * + col1 AS col1 FROM tab0 cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-4168
SELECT ALL - + cor0.col1 DIV - col1 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4168
SELECT ALL - + cor0.col1 / - col1 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + - col1 + col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - 50 * + col0 AS col2 FROM tab2 AS cor0
----
-350
-3900
-3950

query I rowsort
SELECT - col1 + + tab0.col2 + - col2 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4172
SELECT + col0 * tab0.col2 DIV + col2 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4172
SELECT + col0 * tab0.col2 / + col2 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT 33 FROM tab2, tab0, tab0 AS cor0
----
33

query I rowsort
SELECT ALL ( + col1 ) - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT + - col1 + 30 FROM tab1 AS cor0
----
17
20
4

query I rowsort
SELECT DISTINCT + cor0.col0 + 5 AS col1 FROM tab0 AS cor0
----
29
40
94

query I rowsort
SELECT DISTINCT - 13 * col0 AS col0 FROM tab1
----
-1040
-39
-832

query I rowsort
SELECT ALL + ( + 4 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4179
SELECT col0 DIV - cor0.col0 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4179
SELECT col0 / - cor0.col0 FROM tab2 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col1 FROM tab2 AS cor0
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4181
SELECT ALL - ( - col1 ) DIV + col1 + 4 * cor0.col0 - col1 AS col2 FROM tab1 AS cor0
----
-13
247
308

skipif mysql # not compatible
query I rowsort label-4181
SELECT ALL - ( - col1 ) / + col1 + 4 * cor0.col0 - col1 AS col2 FROM tab1 AS cor0
----
-13
247
308

query I rowsort
SELECT + + 39 + col0 AS col0 FROM tab2 cor0
----
117
118
46

query I rowsort
SELECT DISTINCT + col0 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4184
SELECT ALL - col0 + col0 DIV + col0 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-4184
SELECT ALL - col0 + col0 / + col0 FROM tab0 AS cor0
----
-23
-34
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * col1 + col2 col0 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT - 71 * col2 + 80 * col1 + col0 * + col2 FROM tab2 AS cor0
----
1664
4902
752

query I rowsort
SELECT - 95 + col1 FROM tab2 cor0
----
-36
-64
-78

query I rowsort
SELECT DISTINCT + 12 + tab1.col2 + col1 * 99 AS col2 FROM tab1
----
1059
1395
2640

query I rowsort
SELECT DISTINCT 24 + + col1 * - col1 FROM tab1
----
-145
-652
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + tab0.col0 - - col1 col0 FROM tab0
----
196
229
271

query I rowsort
SELECT - col2 + - col2 * - col1 AS col0 FROM tab2
----
1508
608
810

query I rowsort
SELECT DISTINCT col2 * col1 + col2 FROM tab0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4193
SELECT col2 + + tab0.col1 DIV col1 AS col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4193
SELECT col2 + + tab0.col1 / col1 AS col1 FROM tab0
----
2
34
83

query I rowsort
SELECT ALL col2 + cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL cor0.col1 * + col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 49 col1 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT + - col0 + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL - - cor1.col0 * 15 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c46e6aeb5711eb28cd276577b47b6dcc

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + ( + col2 ) - col1 col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT col1 * + ( col0 * col2 ) FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL + 87 FROM tab1, tab1 AS cor0, tab0, tab0 cor1
----
81 values hashing to 969f31ae779866644763e8a07f1ec501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT - col2 + + col2 * col0 * col0 AS col0 FROM tab0
----
1224
18975
649440

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4206
SELECT - CAST( col0 AS SIGNED ) + col0 * + CAST( NULL AS DECIMAL ) * col1 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4206
SELECT - CAST ( col0 AS INTEGER ) + col0 * + CAST ( NULL AS REAL ) * col1 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 6 + cor0.col2 FROM tab2 AS cor0
----
32
33
44

query I rowsort
SELECT ALL - - 26 * col0 + - col2 FROM tab1 cor0
----
1607
1984
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4209
SELECT ALL + CAST( NULL AS SIGNED ) + - col2 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4209
SELECT ALL + CAST ( NULL AS INTEGER ) + - col2 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 36 FROM tab2, tab2 cor0
----
36

query I rowsort
SELECT ALL + 90 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # use DIV operator for integer division
query I rowsort label-4212
SELECT DISTINCT - cor0.col2 DIV 96 + - col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4212
SELECT DISTINCT - cor0.col2 / 96 + - col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT col2 + 9 - - col0 FROM tab0 AS cor0
----
180
45
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4214
SELECT + CAST( + col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4214
SELECT + CAST ( + col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - 13 - col1 AS col2 FROM tab1 cor0
----
-23
-26
-39

query I rowsort
SELECT + col0 + cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4217
SELECT ALL CAST( NULL AS SIGNED ) * + ( + col0 + col0 ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4217
SELECT ALL CAST ( NULL AS INTEGER ) * + ( + col0 + col0 ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 - - ( + col1 ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + 67 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT ALL + col0 * col1 + - col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT + col1 * ( - col0 ) - ( + cor0.col2 + col1 ) AS col2 FROM tab0 AS cor0
----
-2183
-3493
-8272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4222
SELECT ( col2 ) + + col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4222
SELECT ( col2 ) + + col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 * + col0 + + col2 * - col0 FROM tab1 AS cor0
----
-15360
-324
-7296

query I rowsort
SELECT - + col1 * col1 * ( ( col2 ) ) AS col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - + 16 AS col1 FROM tab1 AS cor0
----
-16
-16
-16

onlyif mysql # use DIV operator for integer division
query I rowsort label-4226
SELECT ALL - col2 DIV ( + cor0.col1 ) FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4226
SELECT ALL - col2 / ( + cor0.col1 ) FROM tab0 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4227
SELECT ALL col0 * CAST( NULL AS SIGNED ) - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4227
SELECT ALL col0 * CAST ( NULL AS INTEGER ) - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( 87 ) FROM tab2, tab2 cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT - 81 + + col0 + + col0 AS col0 FROM tab0
----
-11
-33
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4230
SELECT - 0 DIV - 50 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4230
SELECT - 0 / - 50 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * col0 * - col0 FROM tab1 AS cor0
----
-233472
-486
-614400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4232
SELECT ALL - CAST( NULL AS SIGNED ) / 74 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4232
SELECT ALL - CAST ( NULL AS INTEGER ) / 74 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * 37 FROM tab1 AS cor0
----
-111
-2368
-2960

query I rowsort
SELECT ALL 28 FROM tab1, tab1 cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT tab2.col2 + + col2 * + col0 AS col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL cor0.col2 * 41 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0460cb0a4638c7341e74500318b00373

query I rowsort
SELECT tab0.col0 * col1 * + col0 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT ALL tab2.col1 * col0 AS col2 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4239
SELECT ALL col0 DIV CAST( col2 * + col1 AS SIGNED ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4239
SELECT ALL col0 / CAST ( col2 * + col1 AS INTEGER ) FROM tab0
----
0
0
0

query I rowsort
SELECT col0 * + cor0.col1 * col2 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + - col2 * - col1 * + col0 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4242
SELECT + col2 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4242
SELECT + col2 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * ( col0 + cor0.col0 ) FROM tab2 AS cor0
----
-12168
-12482
-98

query I rowsort
SELECT - ( col0 * + col1 ) AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + tab1.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL + 51 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4247
SELECT - CAST( - col0 AS SIGNED ) + - col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4247
SELECT - CAST ( - col0 AS INTEGER ) + - col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 + + col1 col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL + 18 + + cor0.col0 * col2 FROM tab0 AS cor0
----
53
7316
810

query I rowsort
SELECT + 70 + col2 AS col2 FROM tab1 AS cor0
----
124
127
166

onlyif mysql # use DIV operator for integer division
query I rowsort label-4251
SELECT DISTINCT - col1 + + 28 DIV - col1 FROM tab1 AS cor0
----
-12
-15
-27

skipif mysql # not compatible
query I rowsort label-4251
SELECT DISTINCT - col1 + + 28 / - col1 FROM tab1 AS cor0
----
-12
-15
-27

query I rowsort
SELECT + + 64 * col0 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT ALL + + 44 + + col0 - 62 FROM tab1 cor0
----
-15
46
62

query I rowsort
SELECT DISTINCT + - col1 + + cor0.col0 * col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT + 38 AS col1 FROM tab0
----
38

query I rowsort
SELECT 90 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT - 48 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

query I rowsort
SELECT 48 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT - 87 * col1 FROM tab0 AS cor0
----
-7482
-7917
-8439

onlyif mysql # use DIV operator for integer division
query I rowsort label-4260
SELECT ALL - col2 + - col0 DIV col0 AS col1 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4260
SELECT ALL - col2 + - col0 / col0 AS col1 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT - col2 + 41 * col1 FROM tab1 AS cor0
----
1012
353
437

query I rowsort
SELECT DISTINCT - cor0.col0 * - 80 + - col2 * cor0.col0 FROM tab0 AS cor0
----
-178
1128
2765

query I rowsort
SELECT ALL + cor0.col0 + - 63 AS col0 FROM tab0 AS cor0
----
-28
-39
26

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col2 + CAST ( col0 AS REAL ) FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4265
SELECT ALL + - col1 * - col0 + col1 * col0 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4265
SELECT ALL + - col1 * - col0 + col1 * col0 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4266
SELECT DISTINCT + col2 + - cor0.col1 DIV col0 FROM tab1 AS cor0
----
46
57
96

skipif mysql # not compatible
query I rowsort label-4266
SELECT DISTINCT + col2 + - cor0.col1 / col0 FROM tab1 AS cor0
----
46
57
96

query I rowsort
SELECT - - col2 + - 30 * col2 AS col2 FROM tab0 AS cor0
----
-2378
-29
-957

query I rowsort
SELECT + ( 50 ) + col1 + col0 * - 13 FROM tab0 AS cor0
----
-1016
-176
-308

query I rowsort
SELECT + + col2 + - 67 * - col1 * - col1 + col2 * + col0 AS col0 FROM tab0 AS cor0
----
-494707
-547447
-630367

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4270
SELECT - col2 + col2 * + col0 + + CAST( 29 AS SIGNED ) FROM tab0 AS cor0
----
63
7245
788

skipif mysql # not compatible
query I rowsort label-4270
SELECT - col2 + col2 * + col0 + + CAST ( 29 AS INTEGER ) FROM tab0 AS cor0
----
63
7245
788

query I rowsort
SELECT - 22 + ( - col2 * - col0 ) + + col2 * col0 AS col2 FROM tab0 AS cor0
----
14574
1562
48

query I rowsort
SELECT 79 * - tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to ee9d080acbb1f58082bef3a64e80577f

onlyif mysql # use DIV operator for integer division
query I rowsort label-4273
SELECT DISTINCT tab1.col2 DIV col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4273
SELECT DISTINCT tab1.col2 / col1 AS col0 FROM tab1
----
2
5
7

query I rowsort
SELECT col1 * + col0 * + col1 + 66 AS col1 FROM tab2 AS cor0
----
22897
271584
6793

query I rowsort
SELECT 29 * - 67 AS col2 FROM tab0 AS cor0
----
-1943
-1943
-1943

query I rowsort
SELECT - col2 * - col1 + col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4277
SELECT - - col2 * col0 DIV + col0 + 19 FROM tab0 cor0
----
101
20
52

skipif mysql # not compatible
query I rowsort label-4277
SELECT - - col2 * col0 / + col0 + 19 FROM tab0 cor0
----
101
20
52

query I rowsort
SELECT ALL - - col2 * + col0 + + col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - - col2 + + col1 * - 23 FROM tab0 AS cor0
----
-1945
-2011
-2230

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 * + col1 col1 FROM tab1 AS cor0
----
1300
500
650

query I rowsort
SELECT + 19 AS col2 FROM tab1, tab2 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 39241ace4c29d5a55052e1665aa36823

query I rowsort
SELECT DISTINCT - col2 + 96 FROM tab1
----
0
39
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - + 31 col0 FROM tab2 AS cor0
----
-14
0
28

query I rowsort
SELECT DISTINCT + col2 * + ( - 31 ) FROM tab2 AS cor0
----
-1178
-806
-837

query I rowsort
SELECT + col2 + - col1 + + col1 AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT col1 * - 20 + tab0.col2 FROM tab0
----
-1687
-1738
-1939

onlyif mysql # use DIV operator for integer division
query I rowsort label-4287
SELECT col1 + col2 DIV + col1 + col1 * col1 FROM tab2
----
308
3540
992

skipif mysql # not compatible
query I rowsort label-4287
SELECT col1 + col2 / + col1 + col1 * col1 FROM tab2
----
308
3540
992

query I rowsort
SELECT DISTINCT - - col0 * + ( - 81 ) + col2 - cor0.col0 FROM tab1 AS cor0
----
-192
-5191
-6464

query I rowsort
SELECT DISTINCT col0 * - 45 - col0 * - cor0.col2 FROM tab0 AS cor0
----
-1540
-288
3293

query I rowsort
SELECT ALL - col1 + + 41 FROM tab2 AS cor0
----
-18
10
24

query I rowsort
SELECT + col1 - - 57 FROM tab1 AS cor0
----
67
70
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4292
SELECT ALL + + 93 * col0 + - col2 + - col2 DIV - col0 AS col2 FROM tab2 AS cor0
----
627
7228
7309

skipif mysql # not compatible
query I rowsort label-4292
SELECT ALL + + 93 * col0 + - col2 + - col2 / - col0 AS col2 FROM tab2 AS cor0
----
627
7228
7309

query I rowsort
SELECT - ( col2 ) * col0 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT col0 * - col2 - col0 AS col0 FROM tab1 cor0
----
-165
-3712
-7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4295
SELECT DISTINCT col1 + + col2 DIV - col1 FROM tab1 AS cor0
----
24
5
6

skipif mysql # not compatible
query I rowsort label-4295
SELECT DISTINCT col1 + + col2 / - col1 FROM tab1 AS cor0
----
24
5
6

query I rowsort
SELECT ALL ( - col0 ) + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( - cor0.col2 ) + - col1 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) + + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL ( + col2 ) - cor0.col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ( cor1.col0 + - 9 ) FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 722f68295d744091e36f722bd4e3e543

query I rowsort
SELECT ALL + + col0 + + cor0.col0 * + ( col1 ) AS col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 80 + col1 col0 FROM tab1 AS cor0
----
-54
-67
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4303
SELECT 30 * + col1 DIV - col1 AS col1 FROM tab2 AS cor0
----
-30
-30
-30

skipif mysql # not compatible
query I rowsort label-4303
SELECT 30 * + col1 / - col1 AS col1 FROM tab2 AS cor0
----
-30
-30
-30

query I rowsort
SELECT ALL + - 34 AS col0 FROM tab1 AS cor0
----
-34
-34
-34

query I rowsort
SELECT ALL 2 * - col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT - col1 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT - ( + col0 ) + 34 FROM tab0 AS cor0
----
-1
-55
10

query I rowsort
SELECT ALL + ( + col2 ) * col1 * ( col0 + col0 * + col2 ) FROM tab0
----
2315808
55121794
6790

query I rowsort
SELECT DISTINCT 44 + col2 AS col0 FROM tab0 AS cor0
----
126
45
77

query I rowsort
SELECT DISTINCT + col2 + col1 AS col2 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 * - col0 ) col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ( col2 + + col0 ) FROM tab2
----
104
117
34

query I rowsort
SELECT col2 * - col0 + + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT 37 * tab0.col1 FROM tab0
----
3182
3367
3589

query I rowsort
SELECT - - cor1.col0 * - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5e05f50cc51e966d7e055a113d30a5e0

query I rowsort
SELECT + col1 * col0 - tab1.col0 FROM tab1
----
576
75
960

query I rowsort
SELECT DISTINCT - - 75 * - col2 FROM tab0 AS cor0
----
-2475
-6150
-75

query I rowsort
SELECT + + col0 * - 44 FROM tab1 AS cor0
----
-132
-2816
-3520

query I rowsort
SELECT - - col1 * - col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - col2 * ( - col0 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4321
SELECT DISTINCT 80 DIV + col2 col1 FROM tab1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4321
SELECT DISTINCT 80 / + col2 col1 FROM tab1
----
0
1

query I rowsort
SELECT - col2 + - tab2.col1 AS col2 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT + ( col2 + 56 ) AS col1 FROM tab0
----
138
57
89

query I rowsort
SELECT ALL - 76 * - col2 AS col1 FROM tab1
----
4104
4332
7296

query I rowsort
SELECT 52 FROM tab0, tab0 cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT - - 28 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT tab2.col2 * - col1 + - 49 * - col2 AS col0 FROM tab2
----
-260
1216
486

query I rowsort
SELECT DISTINCT - tab2.col0 * - col0 AS col0 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * ( + 20 ) col0 FROM tab0 cor0
----
1720
1820
1940

onlyif mysql # use DIV operator for integer division
query I rowsort label-4330
SELECT DISTINCT - + cor0.col2 DIV + 82 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4330
SELECT DISTINCT - + cor0.col2 / + 82 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT + cor0.col0 * - 32 FROM tab0 AS cor0
----
-1120
-2848
-768

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab2
----
42

query I rowsort
SELECT DISTINCT 89 * - cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
-2937
-7298
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4334
SELECT DISTINCT CAST( NULL AS SIGNED ) * + col0 + col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4334
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + col0 + col2 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 + ( cor0.col1 ) FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4336
SELECT col1 DIV 67 + + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4336
SELECT col1 / 67 + + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT col0 * ( + cor0.col1 ) * 2 + col0 AS col0 FROM tab1 cor0
----
1344
159
2160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4338
SELECT - CAST( NULL AS SIGNED ) + 70 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4338
SELECT - CAST ( NULL AS INTEGER ) + 70 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4339
SELECT CAST( - col1 AS SIGNED ) * + col2 + cor0.col0 FROM tab2 AS cor0
----
-1456
-567
-830

skipif mysql # not compatible
query I rowsort label-4339
SELECT CAST ( - col1 AS INTEGER ) * + col2 + cor0.col0 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4340
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4340
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4341
SELECT ALL + 99 DIV + col1 FROM tab2 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-4341
SELECT ALL + 99 / + col1 FROM tab2 AS cor0
----
1
3
5

query I rowsort
SELECT ALL + col0 * - col1 * ( col1 ) FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - 68 * + cor0.col0 + col0 * + col1 * col0 FROM tab2 AS cor0
----
100725
1043
353652

query I rowsort
SELECT ALL + + ( col2 ) * + col2 + - 52 * col1 AS col2 FROM tab0 AS cor0
----
-3383
-5043
1992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4345
SELECT + CAST( NULL AS SIGNED ) * 43 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4345
SELECT + CAST ( NULL AS INTEGER ) * 43 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col2 * + col1 + + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL + - cor0.col1 * col1 + - col2 AS col0 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 * - col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT - col0 * - col1 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT + 21 + cor0.col0 * 32 FROM tab2 cor0
----
245
2517
2549

query I rowsort
SELECT - - 43 AS col0 FROM tab1 cor0
----
43
43
43

query I rowsort
SELECT + - 8 * - 32 AS col2 FROM tab1 AS cor0
----
256
256
256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( ( col2 ) ) + 22 col2 FROM tab1 AS cor0
----
118
76
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4354
SELECT 17 DIV - col0 col1 FROM tab1 AS cor0
----
-5
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4354
SELECT 17 / - col0 col1 FROM tab1 AS cor0
----
-5
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4355
SELECT - + col1 + 30 * - cor0.col2 + col0 DIV + ( - 52 ) col2 FROM tab0 AS cor0
----
-1076
-127
-2552

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4355
SELECT - + col1 + 30 * - cor0.col2 + col0 / + ( - 52 ) col2 FROM tab0 AS cor0
----
-1076
-127
-2552

onlyif mysql # use DIV operator for integer division
query I rowsort label-4356
SELECT tab0.col1 * 50 DIV + tab0.col2 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 9508012177cb45a29c9234206ef61095

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4356
SELECT tab0.col1 * 50 / + tab0.col2 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 9508012177cb45a29c9234206ef61095

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab2
----
78

query I rowsort
SELECT DISTINCT col1 * 86 AS col1 FROM tab2
----
1462
2666
5074

query I rowsort
SELECT - ( + 95 ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT ALL + col1 + cor0.col0 AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4361
SELECT DISTINCT col2 * - col1 + - col0 * + col0 DIV col0 FROM tab2 AS cor0
----
-1612
-725
-844

skipif mysql # not compatible
query I rowsort label-4361
SELECT DISTINCT col2 * - col1 + - col0 * + col0 / col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT ALL col0 + - col0 * + col1 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT tab2.col2 - 21 AS col0 FROM tab2
----
17
5
6

query I rowsort
SELECT - 27 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT ALL - col2 * + tab1.col2 + + col2 AS col0 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT + 54 + col0 FROM tab0
----
143
78
89

query I rowsort
SELECT - cor2.col1 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to aad6a39cc782d0570960622f04a07424

query I rowsort
SELECT + col2 - col1 * - col1 * - ( + tab1.col1 ) AS col2 FROM tab1
----
-17522
-2101
-943

query I rowsort
SELECT + col0 + - 2 FROM tab1
----
1
62
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4370
SELECT 6 + + col1 DIV - col1 AS col1 FROM tab2 AS cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-4370
SELECT 6 + + col1 / - col1 AS col1 FROM tab2 AS cor0
----
5
5
5

query I rowsort
SELECT + ( - col2 ) + - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT - 73 + 1 AS col1 FROM tab0 AS cor0
----
-72
-72
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4373
SELECT ALL CAST( NULL AS SIGNED ) / + cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4373
SELECT ALL CAST ( NULL AS INTEGER ) / + cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 58 * col2 FROM tab0 cor0
----
1914
4756
58

query I rowsort
SELECT ALL col2 * col0 - col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT + 72 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 50 + cor0.col0 col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 5632a31f3e7eb3f97245acf8dd4ab44e

query I rowsort
SELECT ALL ( - col1 ) - col0 * 51 AS col0 FROM tab2
----
-388
-4037
-4046

query I rowsort
SELECT + 94 + col1 * col2 + - col2 * col0 AS col2 FROM tab0
----
156
2140
258

query I rowsort
SELECT + 99 - + cor0.col0 AS col1 FROM tab1 AS cor0
----
19
35
96

query I rowsort
SELECT - - col2 + - col0 FROM tab1 cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-4382
SELECT - col2 DIV + 64 - - col0 * + col2 * - 51 FROM tab0 AS cor0
----
-1785
-372199
-40392

skipif mysql # not compatible
query I rowsort label-4382
SELECT - col2 / + 64 - - col0 * + col2 * - 51 FROM tab0 AS cor0
----
-1785
-372199
-40392

onlyif mysql # use DIV operator for integer division
query I rowsort label-4383
SELECT ALL - col2 DIV col0 col0 FROM tab1 AS cor0
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4383
SELECT ALL - col2 / col0 col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT col2 - - ( - cor0.col2 ) AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col2 + - col1 * col0 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT cor0.col2 * - cor0.col2 + 87 FROM tab0 AS cor0
----
-1002
-6637
86

query I rowsort
SELECT DISTINCT - - col1 * ( - 95 ) + - col0 AS col0 FROM tab2 cor0
----
-1694
-2952
-5683

query I rowsort
SELECT DISTINCT col2 + 16 FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT ALL - col1 - - col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT col1 + + ( col1 ) + - col1 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL col2 * 52 AS col0 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT DISTINCT col0 * + ( - col1 ) + col2 AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT col1 * - 53 AS col1 FROM tab1
----
-1378
-530
-689

query I rowsort
SELECT - col0 + - ( col1 * + col1 ) AS col0 FROM tab1
----
-164
-249
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4395
SELECT - CAST( NULL AS SIGNED ) + + col2 / + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4395
SELECT - CAST ( NULL AS INTEGER ) + + col2 / + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( + 82 ) AS col2 FROM tab2
----
82
82
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4397
SELECT ALL - CAST( NULL AS SIGNED ) + col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4397
SELECT ALL - CAST ( NULL AS INTEGER ) + col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4398
SELECT DISTINCT + col0 DIV col0 - col2 AS col0 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-4398
SELECT DISTINCT + col0 / col0 - col2 AS col0 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT DISTINCT - + 65 + col2 FROM tab1 AS cor0
----
-11
-8
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4400
SELECT DISTINCT + 45 + col1 DIV col0 FROM tab1 AS cor0
----
45
53

skipif mysql # not compatible
query I rowsort label-4400
SELECT DISTINCT + 45 + col1 / col0 FROM tab1 AS cor0
----
45
53

query I rowsort
SELECT ALL col1 - col1 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - - cor0.col2 - col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + - cor0.col0 * - col0 + col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT - col2 + col2 * col0 * col1 AS col0 FROM tab0 AS cor0
----
3394
664036
68079

query I rowsort
SELECT DISTINCT + 23 * + col2 * - col1 + col1 + col0 AS col2 FROM tab1 AS cor0
----
-13036
-28611
-32263

query I rowsort
SELECT DISTINCT 48 + cor0.col1 AS col2 FROM tab1 cor0
----
58
61
74

query I rowsort
SELECT - - 88 - - col0 FROM tab2 AS cor0
----
166
167
95

query I rowsort
SELECT ALL cor0.col0 + col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + col1 * col2 * col2 FROM tab2 AS cor0
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 32 + + col1 * - col1 + + cor0.col2 col1 FROM tab2 AS cor0
----
-219
-3423
-902

onlyif mysql # use DIV operator for integer division
query I rowsort label-4411
SELECT - ( - col0 ) DIV + col0 + - cor0.col2 * + cor0.col0 FROM tab2 cor0
----
-188
-2027
-3001

skipif mysql # not compatible
query I rowsort label-4411
SELECT - ( - col0 ) / + col0 + - cor0.col2 * + cor0.col0 FROM tab2 cor0
----
-188
-2027
-3001

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 - col1 FROM tab2 cor0
----
-2087
-220
-3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 74 col1 FROM tab2, tab2 AS cor0
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col0 - - col2 col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-4415
SELECT DISTINCT + ( col1 ) DIV col2 FROM tab0 cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4415
SELECT DISTINCT + ( col1 ) / col2 FROM tab0 cor0
----
1
2
97

query I rowsort
SELECT DISTINCT + col2 * col1 + - col1 AS col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL - - col1 * col2 + + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL col2 * + 27 FROM tab0 AS cor0
----
2214
27
891

query I rowsort
SELECT DISTINCT - + col2 * ( col2 ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col1 * + 67 + col1 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT - col2 * ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL cor0.col0 * col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + + col1 * - col0 * - col0 AS col0 FROM tab1 AS cor0
----
234
40960
83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 23 + + cor0.col2 * - col2 + col2 col0 FROM tab0 AS cor0
----
-2231
-3034
-8735

query I rowsort
SELECT DISTINCT - col0 * - ( ( + col2 ) ) FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4426
SELECT DISTINCT - col2 DIV - col0 - cor0.col2 AS col2 FROM tab1 cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-4426
SELECT DISTINCT - col2 / - col0 - cor0.col2 AS col2 FROM tab1 cor0
----
-36
-57
-95

query I rowsort
SELECT + col2 + ( col1 ) * - col0 FROM tab0 cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4428
SELECT + 62 DIV + cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0a6cdbcfd2a425d3345c011b423f2b22

skipif mysql # not compatible
query I rowsort label-4428
SELECT + 62 / + cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0a6cdbcfd2a425d3345c011b423f2b22

query I rowsort
SELECT DISTINCT + col0 * + 20 FROM tab1 AS cor0
----
1280
1600
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col0 + - cor0.col0 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT DISTINCT - col1 + + col0 * cor0.col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + + col1 * col2 + - col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col2 col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - col0 + col2 + col1 AS col1 FROM tab1
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4436
SELECT ALL col2 DIV + col0 + col1 AS col2 FROM tab2
----
17
34
59

skipif mysql # not compatible
query I rowsort label-4436
SELECT ALL col2 / + col0 + col1 AS col2 FROM tab2
----
17
34
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col1 + + col2 col2 FROM tab0
----
63
84
95

query I rowsort
SELECT + col0 * col2 + - col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT col2 + - col2 * col2 AS col2 FROM tab0
----
-1056
-6642
0

query I rowsort
SELECT - col1 * col1 + - col0 FROM tab0
----
-7420
-8370
-9444

query I rowsort
SELECT col0 * - col2 + tab0.col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL cor0.col0 * + cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col1 * - col2 + - col2 AS col0 FROM tab2 AS cor0
----
-1560
-684
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 col2 FROM tab0, tab1 AS cor0
----
24
35
89

query I rowsort
SELECT + + col2 + + col1 * + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab0, tab2 AS cor0, tab1, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT + + cor0.col2 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 62 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
62

query I rowsort
SELECT col2 * col1 + ( + 70 + + col2 ) * col1 AS col1 FROM tab2 cor0
----
2482
3844
7198

query I rowsort
SELECT + - 71 * + col0 + 26 * + 15 AS col1 FROM tab2 AS cor0
----
-107
-5148
-5219

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 77 col0 FROM tab0 AS cor0
----
110
159
78

query I rowsort
SELECT ALL - 48 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT DISTINCT 42 AS col1 FROM tab1, tab0 AS cor0
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + 40 + + col1 * col0 col1 FROM tab2 AS cor0
----
1462
264
4720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4455
SELECT - + col0 DIV cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4455
SELECT - + col0 / cor0.col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4456
SELECT + 0 DIV 13 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4456
SELECT + 0 / 13 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4457
SELECT ALL - CAST( - col2 AS SIGNED ) + - col1 * - col1 FROM tab0 AS cor0
----
7429
8363
9410

skipif mysql # not compatible
query I rowsort label-4457
SELECT ALL - CAST ( - col2 AS INTEGER ) + - col1 * - col1 FROM tab0 AS cor0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
-86
-91
-97

query I rowsort
SELECT ALL tab0.col2 + col0 * + col0 AS col1 FROM tab0
----
1226
609
8003

query I rowsort
SELECT + + ( - col0 ) + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col2 + + col2 + - col0 FROM tab2
----
-26
-3
47

query I rowsort
SELECT ALL - 58 AS col0 FROM tab0
----
-58
-58
-58

query I rowsort
SELECT - 47 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT + tab0.col0 + 12 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 233dfb4e8be0140e4983585890e70046

query I rowsort
SELECT + 29 + col2 AS col2 FROM tab1 cor0
----
125
83
86

query I rowsort
SELECT ( cor0.col0 ) + col0 + + cor0.col2 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT 34 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1190
3026
816

query I rowsort
SELECT DISTINCT + ( col1 + - col0 ) FROM tab0
----
2
62

query I rowsort
SELECT ALL ( col0 + - col0 ) * col0 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 99 * - 33 AS col0 FROM tab0
----
-3267
-3267
-3267

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - col0 + col0 * cor0.col1 + + 18 AS col1 FROM tab2 cor0
----
1282
228
4542

query I rowsort
SELECT DISTINCT + 76 * + col0 FROM tab0 AS cor0
----
1824
2660
6764

onlyif mysql # use DIV operator for integer division
query I rowsort label-4474
SELECT ALL ( cor0.col0 ) DIV - cor0.col1 + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4474
SELECT ALL ( cor0.col0 ) / - cor0.col1 + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT 24 AS col0 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT + 23 + col2 * col2 * - col0 AS col0 FROM tab0 AS cor0
----
-12
-26113
-598413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4477
SELECT CAST( 91 AS SIGNED ) * col0 AS col1 FROM tab1
----
273
5824
7280

skipif mysql # not compatible
query I rowsort label-4477
SELECT CAST ( 91 AS INTEGER ) * col0 AS col1 FROM tab1
----
273
5824
7280

onlyif mysql # use DIV operator for integer division
query I rowsort label-4478
SELECT DISTINCT col0 DIV - 64 AS col0 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-4478
SELECT DISTINCT col0 / - 64 AS col0 FROM tab1
----
-1
0

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-10
-13
-26

query I rowsort
SELECT + 48 * col0 AS col2 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT DISTINCT + col2 * 4 AS col2 FROM tab1
----
216
228
384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * + col2 + + tab0.col1 col0 FROM tab0
----
1175
6815
98

query I rowsort
SELECT + col0 - tab2.col0 * - 52 FROM tab2
----
371
4134
4187

query I rowsort
SELECT 89 + - tab1.col1 FROM tab1
----
63
76
79

query I rowsort
SELECT DISTINCT col1 * - tab1.col1 * - ( col2 * - col0 ) + + tab1.col2 + + tab1.col0 AS col1 FROM tab1
----
-109455
-1297744
-364679

query I rowsort
SELECT DISTINCT - col2 + col2 * - col0 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT 94 * col0 + col2 FROM tab2
----
685
7358
7464

query I rowsort
SELECT + 50 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT 97 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT DISTINCT + 51 * - col1 + col2 AS col2 FROM tab0 AS cor0
----
-4353
-4559
-4946

query I rowsort
SELECT - col2 * 71 AS col2 FROM tab1 AS cor0
----
-3834
-4047
-6816

onlyif mysql # use DIV operator for integer division
query I rowsort label-4492
SELECT DISTINCT - - col0 DIV 2 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1483
715
732

skipif mysql # not compatible
query I rowsort label-4492
SELECT DISTINCT - - col0 / 2 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1483
715
732

query I rowsort
SELECT + 16 * col1 AS col1 FROM tab1 cor0
----
160
208
416

onlyif mysql # use DIV operator for integer division
query I rowsort label-4494
SELECT + - col1 * col0 DIV col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4494
SELECT + - col1 * col0 / col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col1 * - col0 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + - col1 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT - 72 DIV - ( col0 ) AS col0 FROM tab1 AS cor0
----
0
1
24

skipif mysql # not compatible
query I rowsort label-4497
SELECT - 72 / - ( col0 ) AS col0 FROM tab1 AS cor0
----
0
1
24

query I rowsort
SELECT - col1 * 25 AS col2 FROM tab2 AS cor0
----
-1475
-425
-775

query I rowsort
SELECT ( - 42 ) FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 9fa3c02ecae23525dd0e284c4751c1df

query I rowsort
SELECT col2 * 59 FROM tab2 AS cor0
----
1534
1593
2242

onlyif mysql # use DIV operator for integer division
query I rowsort label-4501
SELECT DISTINCT + - 93 DIV 57 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 cor1
----
-1

skipif mysql # not compatible
query I rowsort label-4501
SELECT DISTINCT + - 93 / 57 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 cor1
----
-1

query I rowsort
SELECT + 30 * + col0 + - col2 * - 82 * - tab2.col2 AS col0 FROM tab2
----
-116038
-53092
-59568

query I rowsort
SELECT + col2 + + 32 AS col1 FROM tab1
----
128
86
89

query I rowsort
SELECT 15 - col2 * col0 FROM tab1
----
-147
-3633
-7665

query I rowsort
SELECT DISTINCT + 42 AS col2 FROM tab0, tab1, tab2 AS cor0, tab0 AS cor1
----
42

query I rowsort
SELECT ALL - + col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 11 col1 FROM tab0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) col1 FROM tab2
----
26
27
38

query I rowsort
SELECT - + ( + col1 ) * col2 * - ( - ( - cor0.col0 ) * - 73 ) AS col0 FROM tab1 AS cor0
----
-2663040
-307476
-7288320

query I rowsort
SELECT DISTINCT 26 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4511
SELECT - ( + col2 ) DIV + 25 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4511
SELECT - ( + col2 ) / + 25 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT ( + col1 * col2 ) + col1 FROM tab1
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 * tab1.col0 + + col1 + col2 col0 FROM tab1
----
185
2307
2909

query I rowsort
SELECT DISTINCT - 88 FROM tab0, tab2, tab0 AS cor0
----
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 + - col0 col0 FROM tab0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4516
SELECT + col2 DIV - col1 + ( + col0 ) * - col0 - - tab1.col0 AS col1 FROM tab1
----
-4037
-6327
-8

skipif mysql # not compatible
query I rowsort label-4516
SELECT + col2 / - col1 + ( + col0 ) * - col0 - - tab1.col0 AS col1 FROM tab1
----
-4037
-6327
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4517
SELECT + cor0.col1 DIV 71 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-4517
SELECT + cor0.col1 / 71 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - - 13 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT 52 * - col0 FROM tab0 AS cor0
----
-1248
-1820
-4628

query I rowsort
SELECT ALL - col1 * - col0 + + 62 + - 27 AS col1 FROM tab0 AS cor0
----
2099
3430
8134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) + ( 66 ) col1 FROM tab0
----
101
155
90

query I rowsort
SELECT col2 + 58 AS col2 FROM tab0 AS cor0
----
140
59
91

query I rowsort
SELECT - col1 * col1 + col0 * col1 AS col2 FROM tab2 AS cor0
----
-744
1054
1121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + ( 30 * + cor0.col2 + cor0.col0 ) col0 FROM tab1 AS cor0
----
1620
1710
2880

onlyif mysql # use DIV operator for integer division
query I rowsort label-4525
SELECT ALL col0 DIV cor0.col2 + + ( col0 ) * col2 * col2 AS col1 FROM tab1 cor0
----
207937
737280
8748

skipif mysql # not compatible
query I rowsort label-4525
SELECT ALL col0 / cor0.col2 + + ( col0 ) * col2 * col2 AS col1 FROM tab1 cor0
----
207937
737280
8748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4526
SELECT - col0 + - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4526
SELECT - col0 + - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + col2 * 40 FROM tab1 AS cor0
----
22800
49920
56160

query I rowsort
SELECT DISTINCT + col2 + + ( 33 ) AS col2 FROM tab1 AS cor0
----
129
87
90

query I rowsort
SELECT - col0 + - ( col2 * col2 ) FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT DISTINCT col0 + + 45 AS col1 FROM tab0 AS cor0
----
134
69
80

query I rowsort
SELECT ALL - col2 * ( 18 ) FROM tab0 AS cor0
----
-1476
-18
-594

query I rowsort
SELECT cor0.col0 + + 33 AS col0 FROM tab2 AS cor0
----
111
112
40

query I rowsort
SELECT ALL + + cor0.col1 + + 84 AS col0 FROM tab1 cor0
----
110
94
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4534
SELECT ALL col0 DIV - 97 col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4534
SELECT ALL col0 / - 97 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * + 8 FROM tab2
----
208
216
304

query I rowsort
SELECT ALL + 84 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4537
SELECT ALL + + col2 * + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4537
SELECT ALL + + col2 * + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4538
SELECT ALL col2 * col0 DIV 52 FROM tab0 AS cor0
----
0
140
15

skipif mysql # not compatible
query I rowsort label-4538
SELECT ALL col2 * col0 / 52 FROM tab0 AS cor0
----
0
140
15

query I rowsort
SELECT DISTINCT - + col2 * + col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + 55 + col1 FROM tab0 cor0
----
141
146
152

query I rowsort
SELECT ALL - col1 * ( - cor0.col2 ) + cor0.col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + 24 + 85 FROM tab0 AS cor0
----
109
109
109

query I rowsort
SELECT - ( 13 ) + - col0 AS col0 FROM tab2 AS cor0
----
-20
-91
-92

query I rowsort
SELECT - - col2 + + 36 * + col0 AS col0 FROM tab0 AS cor0
----
1261
3286
897

query I rowsort
SELECT - - 9 AS col2 FROM tab1 cor0
----
9
9
9

query I rowsort
SELECT col0 + + col2 * 83 AS col1 FROM tab2 AS cor0
----
2236
2248
3233

query I rowsort
SELECT ALL + 82 + col2 FROM tab1 AS cor0
----
136
139
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + - cor0.col0 * + ( - cor0.col1 ) col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT 83 * - cor0.col0 + 71 FROM tab2 AS cor0
----
-510
-6403
-6486

query I rowsort
SELECT ALL + - 44 * - col0 FROM tab2 AS cor0
----
308
3432
3476

onlyif mysql # use DIV operator for integer division
query I rowsort label-4551
SELECT DISTINCT 10 * cor0.col1 DIV - col0 FROM tab1 AS cor0
----
-1
-86

skipif mysql # not compatible
query I rowsort label-4551
SELECT DISTINCT 10 * cor0.col1 / - col0 FROM tab1 AS cor0
----
-1
-86

query I rowsort
SELECT ALL col0 + col2 * 84 AS col2 FROM tab1 AS cor0
----
4539
4852
8144

query I rowsort
SELECT col2 + - col0 * ( col1 + + col0 ) FROM tab0
----
-15938
-2607
-4619

query I rowsort
SELECT + col1 + 2 AS col0 FROM tab1 cor0
----
12
15
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-4555
SELECT + 21 * col2 DIV - 31 FROM tab2
----
-17
-18
-25

skipif mysql # not compatible
query I rowsort label-4555
SELECT + 21 * col2 / - 31 FROM tab2
----
-17
-18
-25

query I rowsort
SELECT 78 + col2 + 7 AS col1 FROM tab1 AS cor0
----
139
142
181

query I rowsort
SELECT ALL + + 81 FROM tab2 AS cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4558
SELECT + 96 DIV col0 + col0 + ( - cor0.col2 ) * - col0 AS col0 FROM tab2 AS cor0
----
209
2107
3082

skipif mysql # not compatible
query I rowsort label-4558
SELECT + 96 / col0 + col0 + ( - cor0.col2 ) * - col0 AS col0 FROM tab2 AS cor0
----
209
2107
3082

query I rowsort
SELECT ALL col2 * col2 * 17 AS col1 FROM tab2 AS cor0
----
11492
12393
24548

onlyif mysql # use DIV operator for integer division
query I rowsort label-4560
SELECT col0 * col0 - cor0.col1 * col0 DIV - cor0.col0 FROM tab1 AS cor0
----
35
4106
6413

skipif mysql # not compatible
query I rowsort label-4560
SELECT col0 * col0 - cor0.col1 * col0 / - cor0.col0 FROM tab1 AS cor0
----
35
4106
6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-4561
SELECT DISTINCT + - cor0.col1 DIV col0 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-4561
SELECT DISTINCT + - cor0.col1 / col0 FROM tab2 AS cor0
----
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 56 * - col1 + 42 + + col1 col0 FROM tab1 AS cor0
----
1524
612
783

query I rowsort
SELECT - 96 * col1 * col1 FROM tab1
----
-16224
-64896
-9600

query I rowsort
SELECT DISTINCT - 7 * - col1 AS col0 FROM tab2
----
119
217
413

query I rowsort
SELECT ALL - tab2.col0 - col2 * col0 AS col2 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT ( + 94 ) * - col0 - + ( col0 ) FROM tab0
----
-2280
-3325
-8455

query I rowsort
SELECT ALL - ( tab2.col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL + 8 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT ALL - col1 * - col1 * 95 AS col1 FROM tab1
----
16055
64220
9500

query I rowsort
SELECT 82 + col2 * 43 FROM tab1 cor0
----
2404
2533
4210

query I rowsort
SELECT + 19 * col2 FROM tab0 cor0
----
1558
19
627

query I rowsort
SELECT 95 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT 77 * - 56 + + col1 AS col1 FROM tab0 cor0
----
-4215
-4221
-4226

query I rowsort
SELECT - col0 * ( + col1 * col0 + - 10 ) AS col2 FROM tab2 AS cor0
----
-105307
-1449
-358176

onlyif mysql # use DIV operator for integer division
query I rowsort label-4575
SELECT - 82 DIV ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4575
SELECT - 82 / ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4576
SELECT DISTINCT ( col2 ) DIV col2 AS col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4576
SELECT DISTINCT ( col2 ) / col2 AS col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT + 33 * 10 FROM tab2 AS cor0
----
330
330
330

query I rowsort
SELECT ALL + ( col1 ) * + col2 AS col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + ( - col2 ) + - col0 * - col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT + + 14 + col0 FROM tab2 AS cor0
----
21
92
93

query I rowsort
SELECT ALL + - ( col1 ) - + col1 AS col0 FROM tab2 AS cor0
----
-118
-34
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * - col2 + col1 * + col2 col0 FROM tab2 AS cor0
----
-2356
-494
648

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4584
SELECT ALL + CAST( NULL AS SIGNED ) * ( - col0 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4584
SELECT ALL + CAST ( NULL AS INTEGER ) * ( - col0 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 30 * - col0 + col1 * - col1 FROM tab0 AS cor0
----
-10459
-10951
-8116

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4586
SELECT ALL - CAST( + col0 AS SIGNED ) + + col1 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-4586
SELECT ALL - CAST ( + col0 AS INTEGER ) + + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL 99 + + col1 FROM tab0 AS cor0
----
185
190
196

query I rowsort
SELECT DISTINCT - col2 + - col1 + - col0 FROM tab1 AS cor0
----
-131
-189
-83

query I rowsort
SELECT - col2 * col0 + 41 AS col2 FROM tab2 AS cor0
----
-148
-1987
-2961

query I rowsort
SELECT + + 48 + + col1 AS col2 FROM tab0 AS cor0
----
134
139
145

query I rowsort
SELECT - ( + col1 ) + col1 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL cor1.col1 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT col0 + + cor0.col0 * col1 AS col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + 30 + tab1.col2 AS col0 FROM tab1, tab1 AS cor0
----
126
84
87

query I rowsort
SELECT + 87 + + 79 - - col0 FROM tab0
----
190
201
255

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4596
SELECT DISTINCT - col1 + - CAST( NULL AS SIGNED ) * - col2 * - col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4596
SELECT DISTINCT - col1 + - CAST ( NULL AS INTEGER ) * - col2 * - col2 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + + col0 * col2 * - col1 FROM tab1 cor0
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 * - col0 col1 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL col0 * - 6 + col0 AS col1 FROM tab0 AS cor0
----
-120
-175
-445

query I rowsort
SELECT ALL - 46 * ( col2 ) + - col0 FROM tab1 AS cor0
----
-2487
-2686
-4496

query I rowsort
SELECT DISTINCT + - ( col0 ) * - cor0.col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT 32 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT ( cor0.col2 ) AS col2 FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + col1 + + ( col2 ) col1 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT + 22 FROM tab1, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to c6f049334398e3533dd6996714479a2f

query I rowsort
SELECT ( col0 ) * + ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 76 * col2 col2 FROM tab1 AS cor0
----
-4104
-4332
-7296

query I rowsort
SELECT DISTINCT + tab0.col2 + - tab0.col2 * col1 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2, tab1, tab1 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - tab2.col1 * col1 + 64 * tab2.col2 AS col2 FROM tab2
----
-1817
2143
767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col0 col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT col2 * col2 + cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
1352
1458
2888

query I rowsort
SELECT col0 * col0 + - 7 AS col1 FROM tab2
----
42
6077
6234

query I rowsort
SELECT DISTINCT + + 87 AS col1 FROM tab0, tab1, tab0 cor0
----
87

query I rowsort
SELECT ALL - - cor0.col0 * col1 * - col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT col2 * + ( + cor0.col2 ) - 81 * col2 AS col0 FROM tab1 cor0
----
-1368
-1458
1440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * cor0.col0 col1 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4618
SELECT - + CAST( - col2 AS SIGNED ) + + col2 * - 8 col0 FROM tab0 AS cor0
----
-231
-574
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4618
SELECT - + CAST ( - col2 AS INTEGER ) + + col2 * - 8 col0 FROM tab0 AS cor0
----
-231
-574
-7

query I rowsort
SELECT + - col1 * + col0 + - col2 + - col1 FROM tab1 AS cor0
----
-1149
-158
-707

query I rowsort
SELECT col1 + col0 * 46 * - col0 FROM tab2
----
-2223
-279805
-287069

query I rowsort
SELECT ALL + 68 * tab2.col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab2, tab1 cor1
----
81 values hashing to 2e59ef262aed816c5afba2f18df4bb76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4622
SELECT ALL col0 * - tab0.col2 + - col2 DIV + CAST( 77 AS SIGNED ) + + tab0.col0 FROM tab0
----
-7210
-768
0

skipif mysql # not compatible
query I rowsort label-4622
SELECT ALL col0 * - tab0.col2 + - col2 / + CAST ( 77 AS INTEGER ) + + tab0.col0 FROM tab0
----
-7210
-768
0

query I rowsort
SELECT DISTINCT - 31 * + 94 FROM tab1 AS cor0
----
-2914

query I rowsort
SELECT - col2 - 18 * col1 AS col2 FROM tab0 AS cor0
----
-1581
-1720
-1747

query I rowsort
SELECT ALL + 32 + - ( + col2 ) AS col1 FROM tab1 AS cor0
----
-22
-25
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-4626
SELECT ALL - col2 + - 27 DIV - col2 AS col0 FROM tab0 AS cor0
----
-33
-82
26

skipif mysql # not compatible
query I rowsort label-4626
SELECT ALL - col2 + - 27 / - col2 AS col0 FROM tab0 AS cor0
----
-33
-82
26

query I rowsort
SELECT + - ( 19 ) * + col2 - - col2 * - col0 FROM tab0 AS cor0
----
-1419
-54
-8856

query I rowsort
SELECT ALL + col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - col1 + 0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - + col1 * 10 + col0 FROM tab0 AS cor0
----
-821
-836
-935

query I rowsort
SELECT - - ( 53 ) FROM tab1 AS cor0
----
53
53
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-4632
SELECT DISTINCT 9 DIV cor0.col0 FROM tab1 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-4632
SELECT DISTINCT 9 / cor0.col0 FROM tab1 AS cor0
----
0
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4633
SELECT CAST( NULL AS DECIMAL ) * - 92 + col2 * CAST( NULL AS SIGNED ) + 13 / - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4633
SELECT CAST ( NULL AS REAL ) * - 92 + col2 * CAST ( NULL AS INTEGER ) + 13 / - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - col1 ) * - col0 FROM tab1 AS cor0
----
1040
640
78

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 + ( + col1 ) AS col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4637
SELECT - ( - 65 ) DIV - tab1.col1 FROM tab1
----
-2
-5
-6

skipif mysql # not compatible
query I rowsort label-4637
SELECT - ( - 65 ) / - tab1.col1 FROM tab1
----
-2
-5
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4638
SELECT DISTINCT col2 * tab1.col1 + col1 DIV - col0 FROM tab1
----
1248
1396
570

skipif mysql # not compatible
query I rowsort label-4638
SELECT DISTINCT col2 * tab1.col1 + col1 / - col0 FROM tab1
----
1248
1396
570

query I rowsort
SELECT DISTINCT col2 * 89 + + col0 AS col0 FROM tab2
----
2392
2410
3461

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 col0 FROM tab2
----
84
84
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4641
SELECT 90 DIV + col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4641
SELECT 90 / + col0 FROM tab0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4642
SELECT 62 + - col1 * tab2.col0 * 82 + + col2 DIV col1 AS col1 FROM tab2
----
-110062
-17732
-377302

skipif mysql # not compatible
query I rowsort label-4642
SELECT 62 + - col1 * tab2.col0 * 82 + + col2 / col1 AS col1 FROM tab2
----
-110062
-17732
-377302

query I rowsort
SELECT col2 + col0 * - col0 + + col2 AS col0 FROM tab2
----
-6032
-6165
5

query I rowsort
SELECT DISTINCT ( + tab2.col0 ) + col1 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL - 61 * + tab2.col1 * + 61 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 14e865ce233874d7d3bf583aff067924

query I rowsort
SELECT DISTINCT + - col0 + 25 * col0 FROM tab2 AS cor0
----
168
1872
1896

query I rowsort
SELECT DISTINCT col0 + 94 FROM tab2
----
101
172
173

query I rowsort
SELECT - 66 + - col0 * + col0 FROM tab0 AS cor0
----
-1291
-642
-7987

query I rowsort
SELECT ( col2 ) + cor0.col0 * cor0.col2 * col1 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT ALL 1 * - cor0.col1 + 39 FROM tab2 AS cor0
----
-20
22
8

query I rowsort
SELECT DISTINCT + 50 * col0 AS col0 FROM tab1 AS cor0
----
150
3200
4000

query I rowsort
SELECT 69 + col1 + + col2 * + cor0.col0 AS col1 FROM tab2 cor0
----
2156
289
3088

query I rowsort
SELECT 99 * col2 AS col0 FROM tab0 AS cor0
----
3267
8118
99

query I rowsort
SELECT - - col2 * + col0 - col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT + 42 + col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
198
200
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-4656
SELECT ALL - col2 DIV + 20 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4656
SELECT ALL - col2 / + 20 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL col0 * 68 AS col1 FROM tab1 AS cor0
----
204
4352
5440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 15 col1 FROM tab1 AS cor0
----
-150
-195
-390

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - 71 + 63 col2 FROM tab1 AS cor0
----
-150
-4481
-5617

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4661
SELECT + col0 * - CAST( col1 AS SIGNED ) col1 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4661
SELECT + col0 * - CAST ( col1 AS INTEGER ) col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - + col2 + col0 - - 75 FROM tab2 AS cor0
----
116
127
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4663
SELECT - + col2 * - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-4663
SELECT - + col2 * - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * col0 * - col2 col0 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + - col2 * 6 FROM tab2 AS cor0
----
-156
-162
-228

query I rowsort
SELECT ALL - cor0.col2 + - 2 * + col1 FROM tab0 AS cor0
----
-195
-205
-264

query I rowsort
SELECT DISTINCT + col2 * + 47 AS col2 FROM tab1 AS cor0
----
2538
2679
4512

query I rowsort
SELECT - 54 * - 0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 79 * - col1 + - col0 FROM tab0 AS cor0
----
6770
7100
7628

query I rowsort
SELECT + - col0 * 25 AS col2 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT + cor1.col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT col2 * - col0 + col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT + col1 * + cor0.col2 + + 55 AS col1 FROM tab2 AS cor0
----
1589
701
892

query I rowsort
SELECT col0 + - col2 AS col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT 94 * - col2 AS col0 FROM tab0
----
-3102
-7708
-94

query I rowsort
SELECT DISTINCT + - col2 * cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) col1 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 87 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT + col2 - - 57 AS col2 FROM tab0 AS cor0
----
139
58
90

query I rowsort
SELECT - + col0 * + col0 + + 9 * col0 FROM tab1 cor0
----
-3520
-5680
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-4681
SELECT DISTINCT tab1.col2 DIV + 36 AS col0 FROM tab1
----
1
2

skipif mysql # not compatible
query I rowsort label-4681
SELECT DISTINCT tab1.col2 / + 36 AS col0 FROM tab1
----
1
2

query I rowsort
SELECT - tab0.col1 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2, tab2 AS cor1
----
243 values hashing to 7f0405f8197238fbd342972ef0bcee12

query I rowsort
SELECT + 85 + col0 AS col0 FROM tab0
----
109
120
174

query I rowsort
SELECT + ( + 65 * col1 + col0 ) FROM tab0
----
5614
6004
6340

query I rowsort
SELECT ALL col2 * 48 AS col1 FROM tab2
----
1248
1296
1824

query I rowsort
SELECT ALL 83 * tab1.col1 AS col2 FROM tab1
----
1079
2158
830

query I rowsort
SELECT + - col0 * col0 * - ( + col1 * col0 ) FROM tab0 AS cor0
----
1188864
4158875
64152179

onlyif mysql # use DIV operator for integer division
query I rowsort label-4688
SELECT + ( - col0 ) DIV - 96 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4688
SELECT + ( - col0 ) / - 96 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT tab0.col2 * col0 * - 57 + col2 FROM tab0
----
-1994
-415904
-45111

query I rowsort
SELECT - + 43 + - col1 FROM tab2 AS cor0
----
-102
-60
-74

query I rowsort
SELECT ALL - cor0.col0 * - 50 + + col1 AS col0 FROM tab1 AS cor0
----
176
3210
4013

onlyif mysql # use DIV operator for integer division
query I rowsort label-4692
SELECT DISTINCT + col0 DIV 13 col1 FROM tab0 AS cor0
----
1
2
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4692
SELECT DISTINCT + col0 / 13 col1 FROM tab0 AS cor0
----
1
2
6

query I rowsort
SELECT + col2 * - 49 FROM tab2 AS cor0
----
-1274
-1323
-1862

query I rowsort
SELECT DISTINCT + col1 * 35 AS col2 FROM tab0
----
3010
3185
3395

onlyif mysql # use DIV operator for integer division
query I rowsort label-4695
SELECT + - cor0.col0 DIV - col2 AS col2 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4695
SELECT + - cor0.col0 / - col2 AS col2 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - col1 * 38 + + col0 FROM tab0 AS cor0
----
-3244
-3369
-3651

query I rowsort
SELECT DISTINCT col0 * + 88 - + col2 FROM tab0 AS cor0
----
2079
3079
7750

query I rowsort
SELECT - col1 + - 76 FROM tab2 AS cor0
----
-107
-135
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4699
SELECT ALL col1 DIV - cor0.col0 + ( - col2 ) FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-4699
SELECT ALL col1 / - cor0.col0 + ( - col2 ) FROM tab2 AS cor0
----
-26
-31
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 * - cor0.col2 col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 833b308314c997992e3d8575f1340a9f

query I rowsort
SELECT - col1 + - 14 * col1 * - col0 AS col1 FROM tab2 AS cor0
----
18785
3007
64369

query I rowsort
SELECT - - 44 * col2 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT cor0.col0 + cor0.col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 651bd87d0835272922fb073806a0b5a0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4704
SELECT - ( + 87 ) DIV col1 - col1 AS col1 FROM tab0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-4704
SELECT - ( + 87 ) / col1 - col1 AS col1 FROM tab0
----
-87
-91
-97

query I rowsort
SELECT - 41 + + col0 * - col1 * col2 AS col2 FROM tab2
----
-119693
-51075
-5900

query I rowsort
SELECT ALL + col1 * 98 * col0 FROM tab2 cor0
----
131614
21266
450996

query I rowsort
SELECT ALL 63 + + col1 * + col2 FROM tab2 AS cor0
----
1597
709
900

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL - - cor2.col1 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to 42b04a30acb32fcd35bf97afdee87fe6

query I rowsort
SELECT ALL col1 + - col0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT - col0 * - col2 + + col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - - col1 * cor0.col1 AS col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - - col0 * - col2 + + 65 AS col2 FROM tab2 AS cor0
----
-124
-1963
-2937

query I rowsort
SELECT DISTINCT - col1 * col2 + - col1 * + ( col2 ) FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT ALL cor0.col1 + - col0 * col2 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + - col1 * + col1 + - cor0.col0 * col2 FROM tab0 AS cor0
----
-15579
-8188
-9444

query I rowsort
SELECT DISTINCT ( col2 ) + + ( cor0.col1 * + col0 ) AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT tab2.col1 * 22 * col2 + col2 * + col2 * - tab2.col1 FROM tab2
----
-10336
-4185
-6136

query I rowsort
SELECT DISTINCT tab0.col0 * - col2 + - col2 * col0 FROM tab0
----
-14596
-1584
-70

query I rowsort
SELECT DISTINCT - - 50 FROM tab1, tab0, tab1 cor0
----
50

query I rowsort
SELECT col2 + col0 + - col1 AS col1 FROM tab0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4722
SELECT DISTINCT col1 DIV 52 + + col2 FROM tab2
----
27
38

skipif mysql # not compatible
query I rowsort label-4722
SELECT DISTINCT col1 / 52 + + col2 FROM tab2
----
27
38

query I rowsort
SELECT ALL col2 * - 93 + - col2 AS col2 FROM tab0
----
-3102
-7708
-94

query I rowsort
SELECT ALL - col2 + ( col2 * + col0 ) AS col0 FROM tab1 cor0
----
108
3591
7584

query I rowsort
SELECT + col1 + - 54 + col2 FROM tab0 cor0
----
119
44
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT + col1 DIV + col1 + 58 AS col1 FROM tab2 AS cor0
----
59
59
59

skipif mysql # not compatible
query I rowsort label-4726
SELECT + col1 / + col1 + 58 AS col1 FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT DISTINCT - + cor0.col2 + + 97 AS col0 FROM tab2 AS cor0
----
59
70
71

query I rowsort
SELECT DISTINCT + col0 * 58 FROM tab1 cor0
----
174
3712
4640

query I rowsort
SELECT ALL - cor0.col1 * + 83 + col2 * + col1 + + col0 AS col0 FROM tab1 AS cor0
----
-196
-751
249

query I rowsort
SELECT col0 * ( + cor0.col1 ) AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL cor0.col0 + col2 + col2 FROM tab0 AS cor0
----
253
37
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4732
SELECT ALL col0 * - ( + 76 ) - col0 * col1 DIV col0 AS col0 FROM tab0 AS cor0
----
-1910
-2757
-6855

skipif mysql # not compatible
query I rowsort label-4732
SELECT ALL col0 * - ( + 76 ) - col0 * col1 / col0 AS col0 FROM tab0 AS cor0
----
-1910
-2757
-6855

query I rowsort
SELECT ALL + col1 + + 43 AS col0 FROM tab0 AS cor0
----
129
134
140

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4734
SELECT ALL CAST( + col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4734
SELECT ALL CAST ( + col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - cor0.col0 + - 56 * - col1 FROM tab2 cor0
----
1729
3226
873

query I rowsort
SELECT ALL - - col2 * 14 FROM tab1 cor0
----
1344
756
798

query I rowsort
SELECT + ( col0 ) * col0 + col2 FROM tab1 AS cor0
----
4153
63
6496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4738
SELECT DISTINCT CAST( NULL AS SIGNED ) * + cor0.col2 col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4738
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + cor0.col2 col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - + ( + col0 ) + cor0.col2 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - + cor0.col2 * - col1 - 27 FROM tab2 AS cor0
----
1507
619
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-4741
SELECT ALL + + 24 - col0 DIV - ( - col0 ) FROM tab0 AS cor0
----
23
23
23

skipif mysql # not compatible
query I rowsort label-4741
SELECT ALL + + 24 - col0 / - ( - col0 ) FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT - 32 + - col2 AS col0 FROM tab1 AS cor0
----
-128
-86
-89

query I rowsort
SELECT DISTINCT - 72 * - col2 + 27 AS col0 FROM tab0 AS cor0
----
2403
5931
99

query I rowsort
SELECT DISTINCT + - 92 + col1 AS col2 FROM tab0 AS cor0
----
-1
-6
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4745
SELECT DISTINCT - 25 DIV - col0 + + col1 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-4745
SELECT DISTINCT - 25 / - col0 + + col1 FROM tab2 AS cor0
----
17
34
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4746
SELECT DISTINCT 9 * col1 DIV - 2 FROM tab1 AS cor0
----
-117
-45
-58

skipif mysql # not compatible
query I rowsort label-4746
SELECT DISTINCT 9 * col1 / - 2 FROM tab1 AS cor0
----
-117
-45
-58

query I rowsort
SELECT - 26 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 4e49eac022daeae6f88f610644ba3754

query I rowsort
SELECT - col1 * 34 AS col1 FROM tab1 AS cor0
----
-340
-442
-884

query I rowsort
SELECT - col1 + 81 FROM tab0 AS cor0
----
-10
-16
-5

query I rowsort
SELECT ALL + cor0.col1 * cor0.col2 + - cor0.col1 + + cor0.col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + - cor0.col1 + col1 FROM tab2 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4752
SELECT + CAST( NULL AS SIGNED ) + ( + tab1.col2 ) * tab1.col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4752
SELECT + CAST ( NULL AS INTEGER ) + ( + tab1.col2 ) * tab1.col0 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 77 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

onlyif mysql # use DIV operator for integer division
query I rowsort label-4754
SELECT DISTINCT - 10 DIV col0 + - col2 AS col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4754
SELECT DISTINCT - 10 / col0 + - col2 AS col2 FROM tab0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4755
SELECT + col2 + col2 DIV - col0 AS col1 FROM tab1
----
36
57
95

skipif mysql # not compatible
query I rowsort label-4755
SELECT + col2 + col2 / - col0 AS col1 FROM tab1
----
36
57
95

query I rowsort
SELECT - 81 + col1 * + col0 AS col2 FROM tab0 cor0
----
1983
3314
8018

query I rowsort
SELECT ALL 44 * - 18 FROM tab2
----
-792
-792
-792

query I rowsort
SELECT ALL - 2 * + col2 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT DISTINCT - col0 + - cor0.col2 AS col1 FROM tab0 cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4760
SELECT - cor0.col1 * col0 DIV cor0.col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4760
SELECT - cor0.col1 * col0 / cor0.col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - 50 + cor0.col0 FROM tab1 AS cor0
----
-47
14
30

query I rowsort
SELECT - col1 * + col2 + + col0 AS col1 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - cor0.col0 * - 17 + - col2 * col2 FROM tab2 AS cor0
----
-101
-610
650

query I rowsort
SELECT - ( - col2 ) + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col2 * + ( - col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 2 * col0 + - ( 42 + + col0 ) AS col1 FROM tab0 AS cor0
----
-114
-147
-309

query I rowsort
SELECT ALL + ( + cor0.col0 ) * + col0 + cor0.col2 FROM tab1 AS cor0
----
4153
63
6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * + col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - col0 + cor0.col1 * + 65 FROM tab1 AS cor0
----
1687
586
765

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4770
SELECT ALL col1 + - col1 * CAST( col2 * - col0 AS SIGNED ) col2 FROM tab0 cor0
----
3492
664209
68198

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4770
SELECT ALL col1 + - col1 * CAST ( col2 * - col0 AS INTEGER ) col2 FROM tab0 cor0
----
3492
664209
68198

query I rowsort
SELECT ALL 31 + - col2 AS col1 FROM tab2 AS cor0
----
-7
4
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4772
SELECT DISTINCT col0 DIV col0 - - ( - col2 + + col0 ) AS col2 FROM tab0 AS cor0
----
-8
35
8

skipif mysql # not compatible
query I rowsort label-4772
SELECT DISTINCT col0 / col0 - - ( - col2 + + col0 ) AS col2 FROM tab0 AS cor0
----
-8
35
8

query I rowsort
SELECT col0 * + ( col2 + col2 * 39 ) FROM tab0 AS cor0
----
1400
291920
31680

query I rowsort
SELECT + col0 * - ( ( col1 ) ) + col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT - col0 + + 47 * - col0 FROM tab1 AS cor0
----
-144
-3072
-3840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4776
SELECT + col0 + col1 DIV col0 FROM tab0 AS cor0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-4776
SELECT + col0 + col1 / col0 FROM tab0 AS cor0
----
27
37
90

query I rowsort
SELECT + + col2 * + 65 + 40 * col2 FROM tab2 AS cor0
----
2730
2835
3990

query I rowsort
SELECT - col2 * + col2 + + col1 + + cor0.col2 FROM tab0 AS cor0
----
-6551
-970
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 29 + 33 * col1 col1 FROM tab0 AS cor0
----
3534
4216
5584

query I rowsort
SELECT ALL - col0 * - 20 AS col0 FROM tab2
----
140
1560
1580

query I rowsort
SELECT DISTINCT + + col2 + 97 - cor0.col2 * col0 FROM tab1 AS cor0
----
-11
-3494
-7487

query I rowsort
SELECT DISTINCT + - col1 * cor0.col0 * - col0 + + ( ( - col0 ) ) * + ( col2 * cor0.col2 ) + col0 * + col1 FROM tab0 AS cor0
----
122185
130474
25464

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4783
SELECT ALL - + CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4783
SELECT ALL - + CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col2 - + 21 * col0 AS col2 FROM tab0
----
-1787
-471
-734

query I rowsort
SELECT ALL + col2 * + 80 + col1 * tab0.col0 FROM tab0
----
14659
3475
4704

query I rowsort
SELECT DISTINCT - 39 * + col1 AS col0 FROM tab0 AS cor0
----
-3354
-3549
-3783

query I rowsort
SELECT col2 + + col0 * col0 AS col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + + cor0.col1 + + ( - col0 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - cor0.col0 + - ( col2 ) FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + col1 + ( col1 ) * col0 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - - 38 * col2 + + col1 * ( + col2 ) FROM tab2 AS cor0
----
1863
2090
2522

query I rowsort
SELECT - + col2 * - ( col2 ) * col2 + + col0 FROM tab1 AS cor0
----
157467
185257
884816

query I rowsort
SELECT DISTINCT - col1 * tab2.col1 + col0 AS col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT DISTINCT + col1 * col2 + + col0 * col0 FROM tab1
----
1413
4666
7648

query I rowsort
SELECT - col1 * 51 * 56 + col2 + tab2.col2 FROM tab2
----
-168452
-48476
-88482

query I rowsort
SELECT DISTINCT tab0.col0 + + ( + 8 + + col0 ) FROM tab0
----
186
56
78

query I rowsort
SELECT 4 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + tab2.col0 * + col1 * col1 col2 FROM tab2
----
22910
271596
6734

query I rowsort
SELECT col2 * - 84 AS col1 FROM tab2
----
-2184
-2268
-3192

query I rowsort
SELECT + col2 * - col1 - 28 * + col1 FROM tab1
----
-1612
-2132
-850

query I rowsort
SELECT ALL cor0.col1 * - col0 + cor0.col1 * col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - ( col1 ) + col0 - cor0.col0 * col2 FROM tab2 AS cor0
----
-2009
-213
-2940

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4804
SELECT - + CAST( + col2 AS SIGNED ) * - col1 + + ( - 32 ) FROM tab2 AS cor0
----
1502
614
805

skipif mysql # not compatible
query I rowsort label-4804
SELECT - + CAST ( + col2 AS INTEGER ) * - col1 + + ( - 32 ) FROM tab2 AS cor0
----
1502
614
805

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4805
SELECT ALL + CAST( NULL AS DECIMAL ) + - col0 * col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4805
SELECT ALL + CAST ( NULL AS REAL ) + - col0 * col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col0 - + 54 AS col0 FROM tab0 AS cor0
----
-19
-30
35

query I rowsort
SELECT ALL + - 83 FROM tab2 cor0
----
-83
-83
-83

query I rowsort
SELECT 13 * ( col0 ) FROM tab0 AS cor0
----
1157
312
455

query I rowsort
SELECT DISTINCT + col1 * ( + col0 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( col0 ) col2 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4811
SELECT - ( - col2 ) * col0 + - CAST( NULL AS SIGNED ) * ( cor0.col2 ) + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4811
SELECT - ( - col2 ) * col0 + - CAST ( NULL AS INTEGER ) * ( cor0.col2 ) + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col2 + - col1 * col1 + 40 * + col0 FROM tab1
----
-502
2517
3127

query I rowsort
SELECT - col2 + col1 * col0 * col2 - - col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT 13 * col0 AS col2 FROM tab2
----
1014
1027
91

query I rowsort
SELECT DISTINCT 61 * 33 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
2013

query I rowsort
SELECT - col0 * cor0.col0 * + 46 AS col0 FROM tab0 cor0
----
-26496
-364366
-56350

onlyif mysql # use DIV operator for integer division
query I rowsort label-4817
SELECT 68 DIV col1 AS col0 FROM tab1
----
2
5
6

skipif mysql # not compatible
query I rowsort label-4817
SELECT 68 / col1 AS col0 FROM tab1
----
2
5
6

query I rowsort
SELECT ALL - col0 * + col1 - 9 AS col2 FROM tab1
----
-1049
-649
-87

query I rowsort
SELECT - col1 * 32 AS col2 FROM tab1 AS cor0
----
-320
-416
-832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4820
SELECT col0 * CAST( NULL AS SIGNED ) + 66 * - col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4820
SELECT col0 * CAST ( NULL AS INTEGER ) + 66 * - col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab1.col1 + + tab1.col2 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL cor0.col2 + col2 * + 62 FROM tab2 AS cor0
----
1638
1701
2394

query I rowsort
SELECT ALL - col2 * - 17 AS col0 FROM tab2 AS cor0
----
442
459
646

query I rowsort
SELECT ALL col0 * ( + 74 ) FROM tab1 cor0
----
222
4736
5920

onlyif mysql # use DIV operator for integer division
query I rowsort label-4825
SELECT - + col1 DIV + cor0.col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4825
SELECT - + col1 / + cor0.col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + 78 * + col2 * ( - cor0.col2 ) FROM tab1 AS cor0
----
-227448
-253422
-718848

query I rowsort
SELECT ALL - col2 + + ( col1 + + cor0.col2 ) * ( - col1 ) * + col2 FROM tab0 AS cor0
----
-1291008
-337755
-9507

query I rowsort
SELECT + - col2 * - col1 + + 90 - col2 * col0 FROM tab2 cor0
----
-2266
-404
738

query I rowsort
SELECT 42 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT DISTINCT col2 + ( + tab0.col1 ) AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT col2 + + col2 + 45 FROM tab0
----
111
209
47

query I rowsort
SELECT col0 * col2 * - col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col0 + + ( - col2 ) AS col1 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col0 + 92 * + 89 FROM tab1 AS cor0
----
8108
8124
8185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4835
SELECT ALL + col0 * CAST( 65 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
455
5070
5135

skipif mysql # not compatible
query I rowsort label-4835
SELECT ALL + col0 * CAST ( 65 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
455
5070
5135

query I rowsort
SELECT ALL + - col0 + 80 * col0 FROM tab1 AS cor0
----
237
5056
6320

query I rowsort
SELECT 98 + col0 FROM tab0
----
122
133
187

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab2, tab0 AS cor0
----
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-4839
SELECT ALL - ( col2 ) DIV + cor0.col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4839
SELECT ALL - ( col2 ) / + cor0.col0 FROM tab2 AS cor0
----
-3
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4840
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 18 + - col1 AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4840
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 18 + - col1 AS col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL 11 * + col2 + col0 * 98 AS col0 FROM tab0 AS cor0
----
2715
3441
9624

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-86
-91
-97

query I rowsort
SELECT - 25 * + cor0.col0 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT DISTINCT - col2 + col2 + - cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col0 + cor0.col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 40 + cor0.col0 AS col0 FROM tab0 AS cor0
----
129
64
75

query I rowsort
SELECT ALL - col2 + + col1 * ( col2 ) FROM tab1 cor0
----
1152
1350
513

onlyif mysql # use DIV operator for integer division
query I rowsort label-4848
SELECT ALL - - ( + col1 ) * + col1 + col1 DIV + cor0.col2 + + col1 col1 FROM tab1 AS cor0
----
110
182
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4848
SELECT ALL - - ( + col1 ) * + col1 + col1 / + cor0.col2 + + col1 col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT col0 * + col1 - col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL + col0 + cor0.col0 + 96 FROM tab0 AS cor0
----
144
166
274

query I rowsort
SELECT + - 65 * + col1 FROM tab1 AS cor0
----
-1690
-650
-845

onlyif mysql # use DIV operator for integer division
query I rowsort label-4852
SELECT 50 * col2 DIV col0 FROM tab0 cor0
----
1
46
68

skipif mysql # not compatible
query I rowsort label-4852
SELECT 50 * col2 / col0 FROM tab0 cor0
----
1
46
68

query I rowsort
SELECT DISTINCT + + 53 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1301
1457
623

query I rowsort
SELECT 96 * + col0 - + col0 FROM tab0
----
2280
3325
8455

query I rowsort
SELECT 32 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

query I rowsort
SELECT DISTINCT 64 * col1 + + 73 AS col2 FROM tab2 AS cor0
----
1161
2057
3849

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4857
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4857
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - - 98 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT col1 + cor0.col0 + - ( + col0 ) * cor0.col2 * - ( - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-233398
-457
-614307

query I rowsort
SELECT - cor0.col1 + + 44 FROM tab2, tab2 AS cor0
----
9 values hashing to 4bd7b10a825235f506389de17ff02ba3

query I rowsort
SELECT - 6 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 8be8910507908e6353d02a545b748252

query I rowsort
SELECT DISTINCT + 42 * - col0 * - col2 FROM tab1
----
153216
322560
6804

query I rowsort
SELECT + tab1.col1 * col0 * 48 AS col0 FROM tab1
----
30720
3744
49920

query I rowsort
SELECT ALL 78 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 col2 FROM tab2, tab1 AS cor0
----
26
27
38

query I rowsort
SELECT + - ( + col0 ) * - col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT col2 + ( - col2 ) * + col0 * 68 FROM tab1 AS cor0
----
-10962
-248007
-522144

query I rowsort
SELECT + 18 + + 73 FROM tab0 cor0
----
91
91
91

query I rowsort
SELECT ALL - - 34 * + col2 AS col1 FROM tab2 AS cor0
----
1292
884
918

query I rowsort
SELECT col0 * 14 * col0 AS col1 FROM tab1 cor0
----
126
57344
89600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4871
SELECT CAST( - col0 AS SIGNED ) * col0 + - col2 * col0 + col1 FROM tab0 AS cor0
----
-1163
-1282
-15128

skipif mysql # not compatible
query I rowsort label-4871
SELECT CAST ( - col0 AS INTEGER ) * col0 + - col2 * col0 + col1 FROM tab0 AS cor0
----
-1163
-1282
-15128

query I rowsort
SELECT DISTINCT + col0 * + col2 * + 31 + - tab0.col1 * + ( 36 ) AS col0 FROM tab0
----
-2407
21456
222962

onlyif mysql # use DIV operator for integer division
query I rowsort label-4873
SELECT - col0 + + 4 DIV col0 + col0 * - col0 FROM tab0
----
-1260
-600
-8010

skipif mysql # not compatible
query I rowsort label-4873
SELECT - col0 + + 4 / col0 + col0 * - col0 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT ALL - col2 + 5 FROM tab1
----
-49
-52
-91

query I rowsort
SELECT + col0 * col2 * - col1 AS col0 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT col1 + + 65 FROM tab1
----
75
78
91

query I rowsort
SELECT DISTINCT - 19 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-19

query I rowsort
SELECT + tab2.col0 * 46 AS col1 FROM tab2
----
322
3588
3634

query I rowsort
SELECT 99 * cor0.col0 AS col2 FROM tab2 AS cor0
----
693
7722
7821

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - 79 * - col0 + col2 + CAST ( col1 AS REAL ) FROM tab0 AS cor0
----
2015
2863
7204

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4881
SELECT - CAST( NULL AS SIGNED ) * - col2 + + col2 col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4881
SELECT - CAST ( NULL AS INTEGER ) * - col2 + + col2 col1 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4882
SELECT ALL col1 + 59 DIV col1 AS col2 FROM tab2 AS cor0
----
20
32
60

skipif mysql # not compatible
query I rowsort label-4882
SELECT ALL col1 + 59 / col1 AS col2 FROM tab2 AS cor0
----
20
32
60

query I rowsort
SELECT DISTINCT - 37 - 82 AS col2 FROM tab2 cor0
----
-119

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4884
SELECT + CAST( col2 AS SIGNED ) * - col0 * cor0.col2 - cor0.col0 FROM tab2 AS cor0
----
-114155
-5110
-52806

skipif mysql # not compatible
query I rowsort label-4884
SELECT + CAST ( col2 AS INTEGER ) * - col0 * cor0.col2 - cor0.col0 FROM tab2 AS cor0
----
-114155
-5110
-52806

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( + col0 ) NOT IN ( col0 / - col1 + - col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT tab2.col2 + col2 * col2 AS col1 FROM tab2 WHERE NOT NULL = col2
----

query III rowsort
SELECT * FROM tab0 WHERE col2 NOT BETWEEN + col0 AND NULL
----
35
97
1
89
91
82

query I rowsort
SELECT DISTINCT + col1 FROM tab2 cor0 WHERE ( NULL ) < ( NULL )
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( col1 - col0 ) < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col2 + + col0 + tab1.col2 col2 FROM tab1
----
2973
3370
9392

query I rowsort
SELECT DISTINCT + col2 + col1 + - tab2.col2 FROM tab2
----
17
31
59

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) < ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4893
SELECT - col2 DIV + col1 + tab2.col1 + col1 AS col1 FROM tab2
----
118
32
62

skipif mysql # not compatible
query I rowsort label-4893
SELECT - col2 / + col1 + tab2.col1 + col1 AS col1 FROM tab2
----
118
32
62

query I rowsort
SELECT ALL tab0.col1 + + col0 - tab0.col2 * col2 AS col1 FROM tab0
----
-6544
-979
131

query I rowsort
SELECT tab0.col0 * + tab0.col2 * col1 AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT col1 * - col0 + - col1 AS col1 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT - col2 FROM tab1 WHERE tab1.col2 * col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - col0 / + col1 FROM tab0 WHERE NOT ( NULL ) >= + col0
----

query I rowsort
SELECT col0 + + col0 * + tab1.col1 AS col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL col2 + + col1 * col2 AS col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL - tab2.col0 FROM tab2 WHERE NOT + col1 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 + - col0 + col1 AS col1 FROM tab0 WHERE + col0 * col2 * tab0.col1 NOT BETWEEN NULL AND ( col0 )
----
86
91
97

query I rowsort
SELECT DISTINCT + col2 + + tab0.col0 AS col2 FROM tab0
----
171
36
57

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL IN ( - col1 )
----

query I rowsort
SELECT DISTINCT col0 * col1 + col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT col2 * col0 FROM tab1 WHERE NOT NULL < NULL
----

query I rowsort
SELECT col0 * col1 - + cor0.col2 * - col1 FROM tab0 AS cor0
----
15561
3492
4902

onlyif mysql # use DIV operator for integer division
query I rowsort label-4908
SELECT col2 + col1 DIV col0 + + col1 * col1 * + col1 FROM tab1
----
1057
17638
2293

skipif mysql # not compatible
query I rowsort label-4908
SELECT col2 + col1 / col0 + + col1 * col1 * + col1 FROM tab1
----
1057
17638
2293

query I rowsort
SELECT col1 * - col0 + col0 * col2 AS col1 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT + cor0.col2 * cor0.col1 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT col0 FROM tab2 AS cor0 WHERE + col2 BETWEEN - col1 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4912
SELECT DISTINCT + col0 DIV col2 + - col1 FROM tab0 AS cor0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-4912
SELECT DISTINCT + col0 / col2 + - col1 FROM tab0 AS cor0
----
-62
-86
-90

query I rowsort
SELECT DISTINCT col0 FROM tab1 cor0 WHERE NULL <= + col2
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT ( col1 + col0 ) IN ( + col1 * + cor0.col2 * + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT + col2 + col2 AS col0 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT col2 * - col2 - 3 FROM tab2 cor0
----
-1447
-679
-732

query I rowsort
SELECT DISTINCT col2 * col0 * - 15 AS col1 FROM tab2 AS cor0
----
-2835
-30420
-45030

query I rowsort
SELECT - col0 + 83 AS col2 FROM tab0 AS cor0
----
-6
48
59

query I rowsort
SELECT ALL - col0 * - ( cor0.col0 ) AS col1 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-4920
SELECT DISTINCT col2 * cor0.col1 + + col0 DIV col2 FROM tab1 AS cor0
----
1248
1404
571

skipif mysql # not compatible
query I rowsort label-4920
SELECT DISTINCT col2 * cor0.col1 + + col0 / col2 FROM tab1 AS cor0
----
1248
1404
571

query I rowsort
SELECT ALL cor0.col2 * - col0 + - col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT - col1 - 78 FROM tab1 AS cor0
----
-104
-88
-91

query I rowsort
SELECT ALL - 87 * col0 AS col2 FROM tab1
----
-261
-5568
-6960

query I rowsort
SELECT - - col1 - col1 * cor0.col0 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT + - col2 * + ( col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + col1 + - col0 * 18 AS col1 FROM tab0 AS cor0
----
-1511
-346
-533

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4927
SELECT ALL - - col2 / - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4927
SELECT ALL - - col2 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + ( col0 ) * cor0.col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL + col2 * col0 * - 10 AS col0 FROM tab1 AS cor0
----
-1620
-36480
-76800

query I rowsort
SELECT DISTINCT - col2 + + col1 * + col1 + - col1 FROM tab1
----
33
596
60

query I rowsort
SELECT - - col1 + ( - col0 ) FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-4932
SELECT DISTINCT 66 DIV + cor0.col1 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4932
SELECT DISTINCT 66 / + cor0.col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-4934
SELECT DISTINCT col0 DIV col2 + - col1 AS col1 FROM tab0 AS cor0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-4934
SELECT DISTINCT col0 / col2 + - col1 AS col1 FROM tab0 AS cor0
----
-62
-86
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4935
SELECT ALL CAST( NULL AS SIGNED ) * col2 - cor0.col2 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-4935
SELECT ALL CAST ( NULL AS INTEGER ) * col2 - cor0.col2 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - ( col0 ) - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + ( - col0 ) * cor0.col0 + col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL - col1 * col1 * + col0 AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT + tab2.col0 + tab2.col1 * + col2 + col2 * col2 AS col2 FROM tab2
----
1573
2169
2288

onlyif mysql # use DIV operator for integer division
query I rowsort label-4941
SELECT ALL col0 + col2 DIV + tab1.col0 FROM tab1
----
21
64
81

skipif mysql # not compatible
query I rowsort label-4941
SELECT ALL col0 + col2 / + tab1.col0 FROM tab1
----
21
64
81

query I rowsort
SELECT - - 49 * tab1.col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to c0814725a31e269a92b3ffab3e52c0e5

query I rowsort
SELECT 58 + col1 + col1 AS col1 FROM tab2
----
120
176
92

query I rowsort
SELECT ALL + 69 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query I rowsort
SELECT ALL 97 - col2 AS col0 FROM tab0
----
15
64
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4946
SELECT + ( col1 ) DIV + col2 + - 99 * col0 * 22 FROM tab1
----
-139392
-174240
-6534

skipif mysql # not compatible
query I rowsort label-4946
SELECT + ( col1 ) / + col2 + - 99 * col0 * 22 FROM tab1
----
-139392
-174240
-6534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4947
SELECT ALL + CAST( NULL AS SIGNED ) * 91 col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4947
SELECT ALL + CAST ( NULL AS INTEGER ) * 91 col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + + col1 + + col2 * 96 * col2 FROM tab2 AS cor0
----
138641
64955
70015

query I rowsort
SELECT + + 94 * 55 AS col1 FROM tab0 AS cor0
----
5170
5170
5170

query I rowsort
SELECT + + col2 + ( col0 ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - ( col0 ) - + col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4952
SELECT DISTINCT col0 DIV col2 + col1 AS col0 FROM tab0 AS cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-4952
SELECT DISTINCT col0 / col2 + col1 AS col0 FROM tab0 AS cor0
----
132
86
92

query I rowsort
SELECT DISTINCT + col0 * - cor0.col0 + + col2 - - 82 FROM tab0 cor0
----
-1142
-461
-7757

query I rowsort
SELECT - col1 * + col1 + col2 + col0 AS col1 FROM tab1 AS cor0
----
-619
21
7

query I rowsort
SELECT col1 * 35 * col2 FROM tab0 AS cor0
----
261170
3395
99330

query I rowsort
SELECT 33 * cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to e7820be5709e09416ae743ae8b4ffc47

query I rowsort
SELECT ALL + + col0 + - 26 AS col1 FROM tab1 AS cor0
----
-23
38
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-4958
SELECT + - col2 * + col2 + cor0.col2 * col2 + col0 DIV + 20 FROM tab0 AS cor0
----
1
1
4

skipif mysql # not compatible
query I rowsort label-4958
SELECT + - col2 * + col2 + cor0.col2 * col2 + col0 / + 20 FROM tab0 AS cor0
----
1
1
4

query I rowsort
SELECT ALL 15 + + tab0.col1 * + col2 * - tab0.col1 + + col1 FROM tab0
----
-243967
-678936
-9297

query I rowsort
SELECT col0 + ( - cor0.col2 ) + + col0 * col1 AS col2 FROM tab0 AS cor0
----
2055
3429
8106

query I rowsort
SELECT cor0.col0 * col1 + + 95 + col2 FROM tab2 cor0
----
1476
339
4723

query I rowsort
SELECT ALL col2 * col2 * - col1 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0, tab1, tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col1 * ( - col0 ) * - col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT ALL 62 FROM tab0, tab2 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT ALL + col0 * 67 AS col2 FROM tab1 AS cor0
----
201
4288
5360

query I rowsort
SELECT ALL - col0 + 64 * + col1 AS col1 FROM tab2 AS cor0
----
1009
1977
3698

query I rowsort
SELECT - col1 * 78 FROM tab1 AS cor0
----
-1014
-2028
-780

query I rowsort
SELECT ALL col1 * + 53 AS col0 FROM tab0 AS cor0
----
4558
4823
5141

query I rowsort
SELECT + - cor0.col2 + ( + cor0.col2 ) * + cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
169
2080
3043

query I rowsort
SELECT ALL - 87 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - ( ( - col1 ) * - col1 ) col2 FROM tab0
----
-244068
-679042
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4973
SELECT + col1 DIV ( - 99 + - col2 ) AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4973
SELECT + col1 / ( - 99 + - col2 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - col0 * 10 AS col1 FROM tab2 cor0
----
-70
-780
-790

query I rowsort
SELECT - - 45 * - col2 + - col0 FROM tab2 AS cor0
----
-1222
-1248
-1789

query I rowsort
SELECT + cor1.col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4977
SELECT + + ( + col0 ) + + cor0.col0 * CAST( - col0 AS SIGNED ) FROM tab1 AS cor0
----
-4032
-6
-6320

skipif mysql # not compatible
query I rowsort label-4977
SELECT + + ( + col0 ) + + cor0.col0 * CAST ( - col0 AS INTEGER ) FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT - 35 + - col1 FROM tab1 AS cor0
----
-45
-48
-61

query I rowsort
SELECT + - ( + 47 ) + - col2 FROM tab2 AS cor0
----
-73
-74
-85

query I rowsort
SELECT 16 AS col0 FROM tab2, tab0, tab0 cor0
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT - 1 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL 20 - cor0.col2 FROM tab0 cor0
----
-13
-62
19

query I rowsort
SELECT ( - col2 ) * cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4984
SELECT + col2 + - col1 DIV 47 FROM tab0 AS cor0
----
-1
32
81

skipif mysql # not compatible
query I rowsort label-4984
SELECT + col2 + - col1 / 47 FROM tab0 AS cor0
----
-1
32
81

query I rowsort
SELECT col0 * col1 + - col0 * - col1 AS col1 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT + col1 + ( + 78 ) * + cor0.col1 * + ( cor0.col0 + - col0 ) AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4987
SELECT + - col0 + CAST( NULL AS SIGNED ) * 38 + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4987
SELECT + - col0 + CAST ( NULL AS INTEGER ) * 38 + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4988
SELECT + col0 DIV - col0 col2 FROM tab2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4988
SELECT + col0 / - col0 col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 58 * col2 + col2 AS col0 FROM tab0
----
-1881
-4674
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - tab1.col2 + + col1 col0 FROM tab1
----
-25
-3
17

query I rowsort
SELECT 51 * + col0 * - tab0.col0 AS col2 FROM tab0
----
-29376
-403971
-62475

query I rowsort
SELECT DISTINCT + col0 * - col0 + col1 AS col1 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT - - 52 + cor0.col1 * + 5 + 40 AS col2 FROM tab0 AS cor0
----
522
547
577

query I rowsort
SELECT - + col1 + col1 * cor0.col1 AS col0 FROM tab2 cor0
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 * col2 * - col0 + - 80 col1 FROM tab1 AS cor0
----
-36560
-4292
-99920

query I rowsort
SELECT ALL - ( - cor1.col1 ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col1 col2 FROM tab0, tab2 cor0, tab1 cor1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4998
SELECT + 42 DIV - col1 FROM tab1
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-4998
SELECT + 42 / - col1 FROM tab1
----
-1
-3
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 * col2 + - col2 col0 FROM tab1
----
108
3591
7584

query I rowsort
SELECT 16 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT + ( + col1 ) AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT + 69 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query I rowsort
SELECT DISTINCT + tab1.col2 * tab1.col2 FROM tab1
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) + col0 * - 40 col1 FROM tab2 AS cor0
----
-273
-3042
-3081

query I rowsort
SELECT - 74 * - ( col2 ) * col0 FROM tab0 AS cor0
----
2590
540052
58608

query I rowsort
SELECT DISTINCT - 3 AS col0 FROM tab2, tab0 AS cor0
----
-3

query I rowsort
SELECT + col1 * - ( + 7 + col0 ) FROM tab2 cor0
----
-1462
-434
-5015

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 * - 9 col1 FROM tab0 AS cor0
----
66564
74529
84681

query I rowsort
SELECT DISTINCT - col1 * ( - tab0.col1 ) AS col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT col0 - - 66 AS col1 FROM tab0
----
101
155
90

query I rowsort
SELECT + col0 * 32 AS col2 FROM tab0 AS cor0
----
1120
2848
768

query I rowsort
SELECT ALL + col2 - - col2 * + tab2.col2 AS col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT - ( - ( + col1 ) ) + + 47 + 4 * col1 FROM tab0
----
477
502
532

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5014
SELECT ALL 16 * col2 + cor0.col2 + - CAST( NULL AS SIGNED ) * cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5014
SELECT ALL 16 * col2 + cor0.col2 + - CAST ( NULL AS INTEGER ) * cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5015
SELECT ALL + + 99 DIV - col1 col1 FROM tab2 cor0
----
-1
-3
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5015
SELECT ALL + + 99 / - col1 col1 FROM tab2 cor0
----
-1
-3
-5

query I rowsort
SELECT DISTINCT + 88 * 30 FROM tab0 AS cor0
----
2640

query I rowsort
SELECT ALL - col2 * ( col2 ) + - col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL 16 AS col2 FROM tab0 cor0
----
16
16
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5019
SELECT CAST( 40 AS SIGNED ) * cor0.col2 * + col2 col1 FROM tab1 AS cor0
----
116640
129960
368640

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5019
SELECT CAST ( 40 AS INTEGER ) * cor0.col2 * + col2 col1 FROM tab1 AS cor0
----
116640
129960
368640

query I rowsort
SELECT - + cor0.col2 * + 68 FROM tab0 AS cor0
----
-2244
-5576
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 29 col2 FROM tab1, tab2 AS cor0
----
29

query I rowsort
SELECT - 68 + + col1 AS col0 FROM tab2 AS cor0
----
-37
-51
-9

query I rowsort
SELECT DISTINCT - ( - col2 ) + col1 * col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + 6 - - ( + cor0.col0 ) AS col1 FROM tab2 AS cor0
----
13
84
85

query I rowsort
SELECT DISTINCT + + 47 + col1 AS col1 FROM tab1 AS cor0
----
57
60
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-5026
SELECT - + 10 DIV 6 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5026
SELECT - + 10 / 6 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col2 * + ( col1 * - col1 ) + col0 AS col2 FROM tab2
----
-10903
-25940
-90428

onlyif mysql # use DIV operator for integer division
query I rowsort label-5028
SELECT ALL - col2 + - 40 DIV - col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5028
SELECT ALL - col2 + - 40 / - col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - ( - 94 ) * + col2 AS col2 FROM tab1 cor0
----
5076
5358
9024

query I rowsort
SELECT + cor0.col0 + - col1 + 26 FROM tab2 cor0
----
2
45
88

query I rowsort
SELECT ALL + col2 * col1 * - col1 AS col0 FROM tab0 cor0
----
-244068
-679042
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5032
SELECT DISTINCT + - cor0.col2 DIV col1 col0 FROM tab1 AS cor0
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5032
SELECT DISTINCT + - cor0.col2 / col1 col0 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT - 61 + - col0 + 75 AS col1 FROM tab0 AS cor0
----
-10
-21
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-5034
SELECT ALL - - col0 + col0 DIV ( 26 ) FROM tab0 cor0
----
24
36
92

skipif mysql # not compatible
query I rowsort label-5034
SELECT ALL - - col0 + col0 / ( 26 ) FROM tab0 cor0
----
24
36
92

query I rowsort
SELECT + - cor0.col1 - + cor0.col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT 69 - - col2 FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT ALL - + cor0.col2 + + col2 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 14 * + cor0.col2 * 34 + col2 FROM tab0 AS cor0
----
15741
39114
477

onlyif mysql # use DIV operator for integer division
query I rowsort label-5039
SELECT + - col2 DIV - col2 - + 32 AS col2 FROM tab1 AS cor0
----
-31
-31
-31

skipif mysql # not compatible
query I rowsort label-5039
SELECT + - col2 / - col2 - + 32 AS col2 FROM tab1 AS cor0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - 70 AS col0 FROM tab2, tab1 AS cor0
----
-70

query I rowsort
SELECT - cor0.col1 + cor0.col2 AS col2 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT - 39 - - col0 * col1 FROM tab2 AS cor0
----
1304
178
4563

query I rowsort
SELECT DISTINCT 18 * col1 * + 84 + + col2 FROM tab0 AS cor0
----
130065
137674
146665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5044
SELECT - col2 + CAST( + 4 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-50
-53
-92

skipif mysql # not compatible
query I rowsort label-5044
SELECT - col2 + CAST ( + 4 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-50
-53
-92

query I rowsort
SELECT + col0 * 88 + 71 * col1 AS col1 FROM tab1 cor0
----
2110
6342
7963

query I rowsort
SELECT ALL col0 + 75 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT ALL - col0 + + 5 AS col1 FROM tab0 AS cor0
----
-19
-30
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 + + col2 + + col1 * - cor0.col0 col2 FROM tab1 cor0
----
-10160
-2940
-3832

query I rowsort
SELECT DISTINCT - + cor0.col1 * cor0.col1 AS col0 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT 87 * - col1 FROM tab0
----
-7482
-7917
-8439

query I rowsort
SELECT - - col2 * col1 + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - + col0 + + 81 FROM tab1 AS cor0
----
1
17
78

query I rowsort
SELECT DISTINCT + + col1 - ( - col0 ) * - col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT col0 + 43 AS col1 FROM tab1 AS cor0
----
107
123
46

query I rowsort
SELECT DISTINCT + + col1 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - + cor0.col0 + ( + 24 ) AS col1 FROM tab1 AS cor0
----
-40
-56
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-5057
SELECT DISTINCT + + col1 * cor0.col2 + cor0.col0 DIV - col0 col0 FROM tab1 AS cor0
----
1247
1403
569

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5057
SELECT DISTINCT + + col1 * cor0.col2 + cor0.col0 / - col0 col0 FROM tab1 AS cor0
----
1247
1403
569

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5058
SELECT ALL - - ( + 91 ) + + col1 / + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5058
SELECT ALL - - ( + 91 ) + + col1 / + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + ( - cor0.col1 ) + col2 * col2 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT cor0.col2 + 81 * + 62 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9c4bbbb948c76fc7db9d08dc47a42025

onlyif mysql # use DIV operator for integer division
query I rowsort label-5061
SELECT ALL + col0 + + col0 DIV + CAST( + 10 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
7
85
86

skipif mysql # not compatible
query I rowsort label-5061
SELECT ALL + col0 + + col0 / + CAST ( + 10 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
7
85
86

query I rowsort
SELECT - ( col0 ) * + col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col0 - - col0 * + ( col1 ) AS col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - 71 * col0 AS col0 FROM tab0 AS cor0
----
-1704
-2485
-6319

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * cor0.col0 + + col0 col2 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT 26 + + col2 FROM tab0 AS cor0
----
108
27
59

query I rowsort
SELECT DISTINCT + - col2 - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - 84 + - col1 FROM tab2 AS cor0
----
-101
-115
-143

query I rowsort
SELECT ALL cor0.col2 + + cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 5484e660e65aa37f29a1eca3fc30f5cc

query I rowsort
SELECT - - col1 * - 73 + col1 FROM tab1 AS cor0
----
-1872
-720
-936

query I rowsort
SELECT + 10 FROM tab0, tab1 cor0, tab1 AS cor1, tab2 cor2
----
81 values hashing to bf75e71325a06683558cf93fd725ad16

query I rowsort
SELECT - + 93 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-3069
-7626
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5073
SELECT DISTINCT 75 DIV col1 AS col0 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5073
SELECT DISTINCT 75 / col1 AS col0 FROM tab1 cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5074
SELECT col2 DIV 66 AS col1 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5074
SELECT col2 / 66 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 + - col1 - cor0.col0 * + col2 FROM tab0 AS cor0
----
-7300
-854
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5076
SELECT ALL + 18 * - 81 + + cor0.col1 - + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5076
SELECT ALL + 18 * - 81 + + cor0.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-5077
SELECT DISTINCT CAST( NULL AS SIGNED ) + - cor0.col2 AS col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5077
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - cor0.col2 AS col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-5079
SELECT - col2 + + CAST( col0 AS SIGNED ) DIV col1 FROM tab1
----
-51
-54
-90

skipif mysql # not compatible
query I rowsort label-5079
SELECT - col2 + + CAST ( col0 AS INTEGER ) / col1 FROM tab1
----
-51
-54
-90

query I rowsort
SELECT ALL 72 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query IIIIIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab2 AS cor2, tab0
----
13122 values hashing to 5c43cb75b4d55a5789fb7975a4448ded

onlyif mysql # use DIV operator for integer division
query I rowsort label-5082
SELECT ( - tab0.col0 ) DIV tab0.col0 + col2 * + col0 AS col0 FROM tab0
----
34
7297
791

skipif mysql # not compatible
query I rowsort label-5082
SELECT ( - tab0.col0 ) / tab0.col0 + col2 * + col0 AS col0 FROM tab0
----
34
7297
791

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5083
SELECT + col2 + col2 * - col2 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5083
SELECT + col2 + col2 * - col2 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 55 + 80 FROM tab1
----
135
135
135

query I rowsort
SELECT DISTINCT ( - col1 ) + col1 AS col2 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5086
SELECT ALL ( - col2 ) + col1 DIV col0 + col2 * col0 FROM tab2
----
166
2002
2964

skipif mysql # not compatible
query I rowsort label-5086
SELECT ALL ( - col2 ) + col1 / col0 + col2 * col0 FROM tab2
----
166
2002
2964

query I rowsort
SELECT + 51 + - cor0.col1 * + 35 FROM tab0 AS cor0
----
-2959
-3134
-3344

query I rowsort
SELECT + + cor0.col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL 49 * + col1 FROM tab0 AS cor0
----
4214
4459
4753

onlyif mysql # use DIV operator for integer division
query I rowsort label-5090
SELECT 5 + tab1.col2 DIV - col2 + 62 AS col1 FROM tab1
----
66
66
66

skipif mysql # not compatible
query I rowsort label-5090
SELECT 5 + tab1.col2 / - col2 + 62 AS col1 FROM tab1
----
66
66
66

query I rowsort
SELECT ( + 1 ) FROM tab1
----
1
1
1

query I rowsort
SELECT cor0.col2 - + tab2.col0 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to b032c2cb3f3f9c03ae8f2399010fea78

query I rowsort
SELECT ALL - 35 + col1 + col1 FROM tab0
----
137
147
159

query I rowsort
SELECT - ( + col0 ) + col0 * 78 AS col1 FROM tab1 AS cor0
----
231
4928
6160

query I rowsort
SELECT 18 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT col1 * + col2 + + ( 96 ) AS col1 FROM tab1 AS cor0
----
1344
1500
666

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5097
SELECT - + col0 * + col2 * - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
119652
51034
5859

skipif mysql # not compatible
query I rowsort label-5097
SELECT - + col0 * + col2 * - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL + 11 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT ALL + 27 * - col2 AS col2 FROM tab2
----
-1026
-702
-729

query I rowsort
SELECT ALL + col1 * - tab0.col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 70 + 53 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
123

query I rowsort
SELECT - 37 + - col2 * ( col2 ) FROM tab2 AS cor0
----
-1481
-713
-766

query I rowsort
SELECT 85 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5104
SELECT DISTINCT + col2 DIV 5 FROM tab0
----
0
16
6

skipif mysql # not compatible
query I rowsort label-5104
SELECT DISTINCT + col2 / 5 FROM tab0
----
0
16
6

query I rowsort
SELECT ALL - 40 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 01aad4539198a6509248e086869f90a6

query I rowsort
SELECT DISTINCT - + col0 * + ( + col0 + + col0 ) * - col2 AS col1 FROM tab0 AS cor0
----
1299044
2450
38016

onlyif mysql # use DIV operator for integer division
query I rowsort label-5107
SELECT DISTINCT + + col0 DIV ( col0 + col2 ) AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5107
SELECT DISTINCT + + col0 / ( col0 + col2 ) AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + 78 * cor1.col2 * 25 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 372cf85f21babe3e916dc6ad9c0f44bb

onlyif mysql # use DIV operator for integer division
query I rowsort label-5109
SELECT + ( col2 ) DIV - col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5109
SELECT + ( col2 ) / - col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ( - 81 ) * col2 FROM tab1 AS cor0
----
-4374
-4617
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-5111
SELECT - ( col1 ) * col2 DIV - col0 FROM tab1 AS cor0
----
15
468
8

skipif mysql # not compatible
query I rowsort label-5111
SELECT - ( col1 ) * col2 / - col0 FROM tab1 AS cor0
----
15
468
8

query I rowsort
SELECT + col1 + - ( + col2 ) * 92 FROM tab2 AS cor0
----
-2333
-2453
-3479

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 col1 FROM tab1 AS cor0
----
-35
-35
-35

query I rowsort
SELECT + col1 + - col1 * 23 FROM tab1 AS cor0
----
-220
-286
-572

query I rowsort
SELECT ALL - cor0.col1 * 68 * col2 - - col2 FROM tab0 AS cor0
----
-192951
-507334
-6595

onlyif mysql # use DIV operator for integer division
query I rowsort label-5116
SELECT DISTINCT tab1.col2 DIV col1 - 83 * + col1 AS col2 FROM tab1
----
-1072
-2156
-825

skipif mysql # not compatible
query I rowsort label-5116
SELECT DISTINCT tab1.col2 / col1 - 83 * + col1 AS col2 FROM tab1
----
-1072
-2156
-825

query I rowsort
SELECT + col0 - 37 FROM tab2 AS cor0
----
-30
41
42

query I rowsort
SELECT - + 98 * cor0.col1 * 75 FROM tab2, tab1 cor0
----
9 values hashing to 05dcb0ff1f04d699769bfaa3bb376eff

query I rowsort
SELECT ALL + col2 + - 27 AS col0 FROM tab1 AS cor0
----
27
30
69

query I rowsort
SELECT - + col2 * col0 + col0 FROM tab0 cor0
----
-7209
-768
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5121
SELECT ALL - CAST( - col2 AS SIGNED ) + + col2 FROM tab0 AS cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-5121
SELECT ALL - CAST ( - col2 AS INTEGER ) + + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL col2 + + 6 * col0 FROM tab1 AS cor0
----
441
576
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5123
SELECT DISTINCT - CAST( + col0 AS SIGNED ) * col2 + col1 + col0 AS col0 FROM tab1 cor0
----
-133
-3574
-7587

skipif mysql # not compatible
query I rowsort label-5123
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) * col2 + col1 + col0 AS col0 FROM tab1 cor0
----
-133
-3574
-7587

onlyif mysql # use DIV operator for integer division
query I rowsort label-5124
SELECT col2 + 84 - - 47 DIV tab1.col0 FROM tab1
----
141
153
180

skipif mysql # not compatible
query I rowsort label-5124
SELECT col2 + 84 - - 47 / tab1.col0 FROM tab1
----
141
153
180

query I rowsort
SELECT - col2 + 44 FROM tab0
----
-38
11
43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5126
SELECT ALL - col2 * col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5126
SELECT ALL - col2 * col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) * - 69 FROM tab1 AS cor0
----
-1794
-690
-897

query I rowsort
SELECT ALL cor0.col1 * col2 * - col1 FROM tab0 cor0
----
-244068
-679042
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5131
SELECT CAST( 69 AS SIGNED ) AS col1 FROM tab0
----
69
69
69

skipif mysql # not compatible
query I rowsort label-5131
SELECT CAST ( 69 AS INTEGER ) AS col1 FROM tab0
----
69
69
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5132
SELECT DISTINCT + CAST( + col2 AS SIGNED ) * col1 AS col1 FROM tab1
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-5132
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) * col1 AS col1 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5133
SELECT ( col1 ) * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5133
SELECT ( col1 ) * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 9 * col1 * col1 FROM tab1
----
1521
6084
900

query I rowsort
SELECT 29 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT DISTINCT col2 + ( - col0 ) * + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5137
SELECT ALL + col0 * + CAST( - cor0.col2 AS SIGNED ) FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-5137
SELECT ALL + col0 * + CAST ( - cor0.col2 AS INTEGER ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 60 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + tab0.col0 ) col0 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL col1 * + 5 FROM tab0 AS cor0
----
430
455
485

query I rowsort
SELECT DISTINCT + col0 * - ( + col1 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + - col1 * 80 * - col2 AS col1 FROM tab1 AS cor0
----
112320
45600
99840

query I rowsort
SELECT + - col2 * 57 AS col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

query I rowsort
SELECT ALL - - col2 * 30 + ( + col0 ) FROM tab2 AS cor0
----
1219
817
858

query I rowsort
SELECT ALL - + col2 + - col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5146
SELECT DISTINCT - cor0.col2 DIV - ( col1 ) FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-5146
SELECT DISTINCT - cor0.col2 / - ( col1 ) FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT ALL col0 + - col2 * col2 * col2 FROM tab2 AS cor0
----
-17498
-19676
-54793

onlyif mysql # use DIV operator for integer division
query I rowsort label-5148
SELECT + + cor0.col1 DIV + ( + cor0.col0 ) AS col2 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5148
SELECT + + cor0.col1 / + ( + cor0.col0 ) AS col2 FROM tab2 cor0
----
0
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5149
SELECT col2 * - 57 * + col0 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5149
SELECT col2 * - 57 * + col0 + + CAST ( NULL AS REAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 15 * + ( col0 ) + - 2 AS col1 FROM tab1
----
1198
43
958

query I rowsort
SELECT ALL - ( col0 ) * col2 + - col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT - 2 + + 84 AS col2 FROM tab1 AS cor0
----
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5153
SELECT + CAST( NULL AS SIGNED ) * 21 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5153
SELECT + CAST ( NULL AS INTEGER ) * 21 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5154
SELECT ALL col2 DIV cor0.col2 - col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-5154
SELECT ALL col2 / cor0.col2 - col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - 56 + + col0 FROM tab1 AS cor0
----
-53
24
8

query I rowsort
SELECT - ( + col0 ) + + col0 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 + + ( - col1 ) + + col2 * - 23 * col2 col2 FROM tab0 AS cor0
----
-154652
-23
-25047

query I rowsort
SELECT DISTINCT ( + col2 ) * - col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) + + cor0.col1 col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - ( col0 ) + + col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
36
673
89

skipif mysql # not compatible
query I rowsort
SELECT - col1 * ( + col0 ) + + CAST ( - col1 AS REAL ) FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5162
SELECT + cor0.col1 * + col1 * - col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5162
SELECT + cor0.col1 * + col1 * - col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 3 + col0 FROM tab2 AS cor0
----
10
81
82

query I rowsort
SELECT + + col2 * col2 + col1 * - col1 * - col2 FROM tab1 AS cor0
----
25440
39420
8949

query I rowsort
SELECT + cor0.col1 * col2 + col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-5166
SELECT DISTINCT - col1 * col0 DIV 72 AS col0 FROM tab1 cor0
----
-1
-14
-8

skipif mysql # not compatible
query I rowsort label-5166
SELECT DISTINCT - col1 * col0 / 72 AS col0 FROM tab1 cor0
----
-1
-14
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-5167
SELECT - 35 * col0 * tab2.col0 - col0 DIV 47 AS col2 FROM tab2
----
-1715
-212941
-218436

skipif mysql # not compatible
query I rowsort label-5167
SELECT - 35 * col0 * tab2.col0 - col0 / 47 AS col2 FROM tab2
----
-1715
-212941
-218436

query I rowsort
SELECT - - col0 + - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL + + cor0.col1 + - col0 * + ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - 86 * - 39 + col0 AS col0 FROM tab2
----
3361
3432
3433

query I rowsort
SELECT ALL col1 + - 71 AS col2 FROM tab0
----
15
20
26

query I rowsort
SELECT col0 + + ( tab1.col0 ) + col0 FROM tab1
----
192
240
9

query I rowsort
SELECT 36 * + tab2.col1 + col2 AS col0 FROM tab2
----
1143
2150
650

query I rowsort
SELECT + ( + 9 ) + col1 FROM tab2
----
26
40
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5175
SELECT CAST( col2 AS SIGNED ) * + tab0.col2 + - CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5175
SELECT CAST ( col2 AS INTEGER ) * + tab0.col2 + - CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * - col0 + - col0 AS col2 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT ALL - - cor0.col2 + col1 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL - col0 * cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT + 10 + - col0 AS col2 FROM tab2 cor0
----
-68
-69
3

query I rowsort
SELECT ALL - 12 * - 85 AS col2 FROM tab0 AS cor0
----
1020
1020
1020

query I rowsort
SELECT ALL - 4 FROM tab0, tab1 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT 14 * + tab0.col2 * col1 FROM tab0
----
104468
1358
39732

query I rowsort
SELECT + cor0.col0 + col0 + - 21 * - 48 FROM tab0 AS cor0
----
1056
1078
1186

query I rowsort
SELECT DISTINCT + + 95 FROM tab1 AS cor0
----
95

query I rowsort
SELECT ALL col1 * cor0.col2 * col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + + 58 * col0 AS col2 FROM tab1 AS cor0
----
174
3712
4640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 67 * + col2 + + ( 56 ) * col1 col1 FROM tab2 AS cor0
----
3498
3545
5046

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5188
SELECT - + 16 * + col0 + CAST( NULL AS SIGNED ) * 4 / col2 + - ( col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5188
SELECT - + 16 * + col0 + CAST ( NULL AS INTEGER ) * 4 / col2 + - ( col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + + 98 * + col0 - col2 * + cor0.col0 FROM tab2 AS cor0
----
4740
497
5616

query I rowsort
SELECT 57 * + col1 AS col0 FROM tab0 AS cor0
----
4902
5187
5529

query I rowsort
SELECT ALL col0 * col2 + + col2 AS col0 FROM tab2 cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT ALL + col1 * col1 + + 91 - - cor0.col2 FROM tab2 AS cor0
----
1079
3598
418

query I rowsort
SELECT ALL - cor0.col0 * - col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col1 + + 20 + 59 FROM tab1 AS cor0
----
105
89
92

query I rowsort
SELECT ALL + col2 + - ( - ( col2 ) ) AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + - cor0.col0 + + ( col2 ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + col1 * - ( + ( col1 ) ) + col2 FROM tab1 AS cor0
----
-43
-622
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-5200
SELECT - + col2 DIV - 39 AS col0 FROM tab0 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5200
SELECT - + col2 / - 39 AS col0 FROM tab0 AS cor0
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5201
SELECT col0 DIV 46 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5201
SELECT col0 / 46 AS col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - col1 + + 45 AS col2 FROM tab0
----
-41
-46
-52

query I rowsort
SELECT + ( 79 ) + col2 FROM tab2 AS cor0
----
105
106
117

query I rowsort
SELECT tab1.col1 + 38 AS col2 FROM tab1
----
48
51
64

query I rowsort
SELECT + - cor0.col1 + col1 AS col1 FROM tab1 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5206
SELECT + CAST( col1 AS SIGNED ) + + col0 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-5206
SELECT + CAST ( col1 AS INTEGER ) + + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + ( - col2 ) + col0 * col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL 57 * - col0 + col1 FROM tab1 AS cor0
----
-145
-3638
-4547

query I rowsort
SELECT col2 + 2 * col1 FROM tab2 AS cor0
----
144
72
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5210
SELECT - CAST( NULL AS SIGNED ) * - 66 col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5210
SELECT - CAST ( NULL AS INTEGER ) * - 66 col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 2 * col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - 46 FROM tab0, tab0 cor0
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

query I rowsort
SELECT - col2 * + col2 + - 60 FROM tab0 AS cor0
----
-1149
-61
-6784

query I rowsort
SELECT + col1 * + col2 * + col1 AS col2 FROM tab2
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 7 col0 FROM tab1, tab2 cor0
----
7

query I rowsort
SELECT col1 + 59 * col1 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT ALL + col2 * tab2.col0 * col0 AS col1 FROM tab2
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5218
SELECT ALL + cor0.col2 DIV col1 + + col0 + - col2 FROM tab1 AS cor0
----
-49
-9
12

skipif mysql # not compatible
query I rowsort label-5218
SELECT ALL + cor0.col2 / col1 + + col0 + - col2 FROM tab1 AS cor0
----
-49
-9
12

query I rowsort
SELECT DISTINCT col0 * + col0 - - cor0.col1 * col0 AS col0 FROM tab2 cor0
----
10686
266
7584

query I rowsort
SELECT - col1 * col2 * - col2 AS col2 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 WHERE NOT + col0 <> ( NULL )
----

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NOT - col2 < - col0 * col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-5223
SELECT ALL col1 + - tab0.col2 DIV + tab0.col0 col0 FROM tab0
----
85
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5223
SELECT ALL col1 + - tab0.col2 / + tab0.col0 col0 FROM tab0
----
85
91
97

query I rowsort
SELECT DISTINCT tab0.col1 * - col0 + + col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT - tab0.col1 * - col2 - - col2 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - col0 + - tab1.col0 + col2 FROM tab1
----
-64
-71
48

query I rowsort
SELECT col0 + col0 + - col1 AS col1 FROM tab2
----
-17
141
97

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT + + col2 * col1 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-5230
SELECT - cor0.col2 DIV - col2 + + col1 FROM tab0 cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5230
SELECT - cor0.col2 / - col2 + + col1 FROM tab0 cor0
----
87
92
98

query I rowsort
SELECT col1 * col2 * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + + col2 + col1 * - cor0.col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL + col0 * - col0 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-12
-4160
-6480

query III rowsort
SELECT * FROM tab2 cor0 WHERE col0 IN ( col0 * col0 ) OR NOT NULL BETWEEN NULL AND ( col1 + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col2 col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT - + col1 + - col0 * + cor0.col0 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT DISTINCT col2 + tab1.col2 * col1 AS col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT DISTINCT - col2 + col2 * col1 AS col0 FROM tab0
----
2805
7380
96

query I rowsort
SELECT col1 * col1 * + col0 + - col2 * col1 FROM tab1
----
12272
5830
624

query I rowsort
SELECT DISTINCT col1 * col1 + col2 * tab1.col0 FROM tab1
----
3748
7849
838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 - - tab0.col2 col0 FROM tab0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5242
SELECT cor0.col2 * col1 + CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-5242
SELECT cor0.col2 * col1 + CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-5243
SELECT ALL + col2 * col0 + + 61 DIV + col0 FROM tab2 cor0
----
197
2028
3002

skipif mysql # not compatible
query I rowsort label-5243
SELECT ALL + col2 * col0 + + 61 / + col0 FROM tab2 cor0
----
197
2028
3002

query I rowsort
SELECT ALL + - 55 + + col2 + + col0 FROM tab1 AS cor0
----
121
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5245
SELECT ALL + + 21 - col1 DIV col1 AS col0 FROM tab1 AS cor0
----
20
20
20

skipif mysql # not compatible
query I rowsort label-5245
SELECT ALL + + 21 - col1 / col1 AS col0 FROM tab1 AS cor0
----
20
20
20

query I rowsort
SELECT DISTINCT - 26 * col1 FROM tab1 AS cor0
----
-260
-338
-676

query I rowsort
SELECT DISTINCT + col0 * col2 * col1 FROM tab1 WHERE NOT NULL IN ( + col1 + + tab1.col0 + + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col2 - - tab2.col2 col1 FROM tab2
----
130
155
61

query I rowsort
SELECT col2 + col1 - + tab2.col1 FROM tab2
----
26
27
38

query I rowsort
SELECT + col2 / - col2 + + col0 * col0 FROM tab2 WHERE NULL < ( - col1 * tab2.col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 * col0 * - tab2.col2 + col0 col2 FROM tab2
----
-119515
-50938
-5821

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5252
SELECT + + cor0.col0 + - col1 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5252
SELECT + + cor0.col0 + - col1 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + + 66 col2 FROM tab0
----
163
2904
7528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 + + col1 * 99 ) col0 FROM tab0
----
8547
9091
9604

query I rowsort
SELECT 57 * col1 AS col1 FROM tab2
----
1767
3363
969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 64 col2 FROM tab1 AS cor0
----
3456
3648
6144

query I rowsort
SELECT DISTINCT col1 + + col0 * + col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT col0 * col0 * - col0 FROM tab2
----
-343
-474552
-493039

onlyif mysql # use DIV operator for integer division
query I rowsort label-5259
SELECT ALL col1 DIV - col2 + col0 + + col1 FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-5259
SELECT ALL col1 / - col2 + col0 + + col1 FROM tab1
----
29
74
93

query I rowsort
SELECT - col0 * col1 * tab1.col2 FROM tab1
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-5261
SELECT tab2.col2 * + col2 + - col0 DIV + col1 AS col2 FROM tab2
----
1440
675
729

skipif mysql # not compatible
query I rowsort label-5261
SELECT tab2.col2 * + col2 + - col0 / + col1 AS col2 FROM tab2
----
1440
675
729

query I rowsort
SELECT DISTINCT col0 + col2 * col0 * + col0 FROM tab1 WHERE NOT - col0 * col1 - - col1 <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5263
SELECT ALL col1 * + col0 + tab1.col2 DIV - tab1.col0 FROM tab1
----
1039
60
640

skipif mysql # not compatible
query I rowsort label-5263
SELECT ALL col1 * + col0 + tab1.col2 / - tab1.col0 FROM tab1
----
1039
60
640

onlyif mysql # use DIV operator for integer division
query I rowsort label-5264
SELECT col2 DIV col0 + + col1 FROM tab2
----
17
34
59

skipif mysql # not compatible
query I rowsort label-5264
SELECT col2 / col0 + + col1 FROM tab2
----
17
34
59

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col2 FROM tab2
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5266
SELECT col0 * col2 DIV + col0 + - col1 * - col2 + - col0 AS col1 FROM tab0
----
2847
63
7455

skipif mysql # not compatible
query I rowsort label-5266
SELECT col0 * col2 / + col0 + - col1 * - col2 + - col0 AS col1 FROM tab0
----
2847
63
7455

query I rowsort
SELECT + col0 + - tab1.col1 + - tab1.col2 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 WHERE NOT - col2 <= col0 * - col2 * - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5269
SELECT DISTINCT col0 * col0 + - col1 DIV col0 + - col0 DIV + col1 FROM tab1
----
1
4090
6394

skipif mysql # not compatible
query I rowsort label-5269
SELECT DISTINCT col0 * col0 + - col1 / col0 + - col0 / + col1 FROM tab1
----
1
4090
6394

onlyif mysql # use DIV operator for integer division
query I rowsort label-5270
SELECT DISTINCT tab2.col1 * col0 DIV - col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5270
SELECT DISTINCT tab2.col1 * col0 / - col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT col2 + + col1 * col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT ALL + col2 + - col0 * col0 AS col0 FROM tab1
----
-4039
-6304
45

query III rowsort
SELECT * FROM tab2 WHERE NOT ( col1 + tab2.col2 ) IN ( col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-5274
SELECT col1 DIV - col0 + + col2 AS col2 FROM tab2
----
23
26
38

skipif mysql # not compatible
query I rowsort label-5274
SELECT col1 / - col0 + + col2 AS col2 FROM tab2
----
23
26
38

query I rowsort
SELECT ALL tab2.col0 + col2 + + col0 FROM tab2
----
182
196
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-5276
SELECT tab0.col1 DIV + col0 + + tab0.col2 FROM tab0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-5276
SELECT tab0.col1 / + col0 + + tab0.col2 FROM tab0
----
3
36
83

query I rowsort
SELECT DISTINCT col2 * + col2 + + col0 AS col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT - col0 * + tab0.col0 + - col2 * col2 * col0 FROM tab0 WHERE ( - col2 + + col0 * col1 ) < + col0
----

query I rowsort
SELECT + tab1.col1 * - col0 * col2 AS col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT + col0 * col0 + + col0 FROM tab2
----
56
6162
6320

query I rowsort
SELECT col2 + + cor0.col2 AS col0 FROM tab1 cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5282
SELECT ALL - cor0.col2 + CAST( NULL AS SIGNED ) FROM tab1, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5282
SELECT ALL - cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab1, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 49 * col0 col2 FROM tab0
----
1176
1715
4361

query I rowsort
SELECT DISTINCT 3 * - tab1.col2 AS col2 FROM tab1
----
-162
-171
-288

onlyif mysql # use DIV operator for integer division
query I rowsort label-5285
SELECT + col1 DIV ( - col2 ) col1 FROM tab0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5285
SELECT + col1 / ( - col2 ) col1 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT ALL ( tab1.col0 ) FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 5ec52b92c3c8d78cc0a61df3fc16f18b

onlyif mysql # use DIV operator for integer division
query I rowsort label-5288
SELECT ALL col1 DIV ( - 69 ) AS col1 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5288
SELECT ALL col1 / ( - 69 ) AS col1 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - 22 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col1 + + col1 * - cor0.col1 col1 FROM tab1 AS cor0
----
-1417
-2080
-670

onlyif mysql # use DIV operator for integer division
query I rowsort label-5291
SELECT ALL col1 DIV 99 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5291
SELECT ALL col1 / 99 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT col1 * - ( + cor0.col2 ) FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5293
SELECT ( + col0 ) * col1 DIV - cor0.col1 + 89 AS col0 FROM tab0 cor0
----
0
54
65

skipif mysql # not compatible
query I rowsort label-5293
SELECT ( + col0 ) * col1 / - cor0.col1 + 89 AS col0 FROM tab0 cor0
----
0
54
65

query I rowsort
SELECT ALL + - col2 * col0 + + col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT + 49 * - 88 FROM tab1 AS cor0
----
-4312
-4312
-4312

query I rowsort
SELECT DISTINCT + - col2 - + 49 FROM tab2 cor0
----
-75
-76
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) col1 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5298
SELECT ALL 83 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5298
SELECT ALL 83 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 8 + cor0.col1 AS col2 FROM tab0 cor0
----
78
83
89

query I rowsort
SELECT - 39 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT DISTINCT tab1.col1 * col2 * 11 AS col0 FROM tab1
----
13728
15444
6270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 21 + col1 col2 FROM tab0 AS cor0
----
107
112
118

query I rowsort
SELECT - - 2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT - col2 + col2 * col1 * 37 AS col1 FROM tab2 AS cor0
----
23864
30942
56732

query I rowsort
SELECT 43 AS col1 FROM tab1 cor0
----
43
43
43

query I rowsort
SELECT 22 + - col0 FROM tab1 AS cor0
----
-42
-58
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-5307
SELECT + - col1 + - col1 DIV + ( + 85 + col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5307
SELECT + - col1 + - col1 / + ( + 85 + col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - - col2 * + cor0.col2 + - ( + col1 * - col1 ) FROM tab1 cor0
----
3349
3592
9385

query I rowsort
SELECT + cor1.col2 * + cor0.col2 * 19 + - 8 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 4dec75d01cf2407466ff2f58a435c564

query I rowsort
SELECT + col0 * - 60 AS col2 FROM tab2 cor0
----
-420
-4680
-4740

query I rowsort
SELECT DISTINCT cor0.col2 + + 64 AS col2 FROM tab2 AS cor0
----
102
90
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-5312
SELECT DISTINCT - cor0.col1 + 19 DIV + col0 FROM tab1 AS cor0
----
-10
-13
-20

skipif mysql # not compatible
query I rowsort label-5312
SELECT DISTINCT - cor0.col1 + 19 / + col0 FROM tab1 AS cor0
----
-10
-13
-20

query I rowsort
SELECT 14 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 55 AS REAL ) * col0 col0 FROM tab1 AS cor0
----
-165
-3520
-4400

query I rowsort
SELECT - ( - 33 ) FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT - 20 * cor0.col1 - col1 FROM tab1 cor0
----
-210
-273
-546

query I rowsort
SELECT DISTINCT - col0 * + 17 + + col2 * + tab0.col0 FROM tab0
----
-560
384
5785

query I rowsort
SELECT ( 30 ) + - col1 * 80 * - col0 FROM tab2 AS cor0
----
107470
17390
368190

query I rowsort
SELECT ALL + ( + tab2.col0 ) AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL 20 * col0 FROM tab1
----
1280
1600
60

query I rowsort
SELECT + tab1.col2 * 49 AS col0 FROM tab1
----
2646
2793
4704

query I rowsort
SELECT ALL - 93 * - col2 AS col1 FROM tab2 AS cor0
----
2418
2511
3534

query I rowsort
SELECT + cor2.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5324
SELECT DISTINCT 13 DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5324
SELECT DISTINCT 13 / + col1 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5325
SELECT ALL col0 + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5325
SELECT ALL col0 + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col2 * 65 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT ( cor0.col0 ) * col2 * + 0 + cor0.col2 * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL ( - col0 ) - cor0.col2 * + cor0.col1 * col2 FROM tab0 cor0
----
-132
-611973
-93678

query I rowsort
SELECT DISTINCT + col0 + + col0 * ( col1 ) - + col2 * 78 AS col2 FROM tab0
----
-486
1792
3352

query I rowsort
SELECT DISTINCT + col1 * col1 + + tab1.col1 - - col0 AS col0 FROM tab1
----
174
262
705

query I rowsort
SELECT - 81 * - col1 AS col1 FROM tab0
----
6966
7371
7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-5333
SELECT ALL 71 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5333
SELECT ALL 71 / + col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5334
SELECT tab2.col0 + + CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5334
SELECT tab2.col0 + + CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col1 - + tab2.col2 AS col2 FROM tab2
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5336
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5336
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - col2 + - col2 * - 59 FROM tab2 AS cor0
----
1508
1566
2204

query I rowsort
SELECT + 18 * col1 AS col0 FROM tab1 AS cor0
----
180
234
468

query I rowsort
SELECT - col0 - + cor0.col0 * 56 * col2 FROM tab2 AS cor0
----
-10591
-113646
-168191

query I rowsort
SELECT + col0 + 16 AS col1 FROM tab2 AS cor0
----
23
94
95

query I rowsort
SELECT ALL - + cor0.col1 * + 53 + - col1 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT col1 * - col2 * col2 + - cor0.col0 * + 9 * + col0 AS col0 FROM tab2 AS cor0
----
-23040
-80717
-94640

query I rowsort
SELECT + col2 * - col2 + - col2 FROM tab2 AS cor0
----
-1482
-702
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - cor0.col2 col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + 23 * col2 FROM tab1
----
1242
1311
2208

query I rowsort
SELECT ALL + + col1 + col1 + ( - col2 ) * + col0 FROM tab2 cor0
----
-127
-1910
-2968

query I rowsort
SELECT DISTINCT cor0.col2 + - 69 FROM tab0 AS cor0
----
-36
-68
13

query I rowsort
SELECT col1 * - 89 - - col2 * + col1 AS col1 FROM tab2 AS cor0
----
-1922
-3717
-867

query I rowsort
SELECT ALL - col2 + + col1 * 68 + col2 AS col0 FROM tab0 AS cor0
----
5848
6188
6596

query I rowsort
SELECT ALL - col0 * - ( - col1 ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + col1 * - 57 + cor0.col1 AS col1 FROM tab2 cor0
----
-1736
-3304
-952

query I rowsort
SELECT ALL - col0 + 25 * + col0 FROM tab1
----
1536
1920
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + ( + col1 ) + + col1 col0 FROM tab1 AS cor0
----
-2
-37
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5354
SELECT col0 * ( + col1 ) - - cor0.col0 DIV + col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-5354
SELECT col0 * ( + col1 ) - - cor0.col0 / + col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col1 + - col1 * ( tab0.col0 ) * - col0 FROM tab0
----
118728
49450
720720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5356
SELECT col1 + ( - 3 ) + - col1 * CAST( - 37 AS SIGNED ) FROM tab2
----
1175
2239
643

skipif mysql # not compatible
query I rowsort label-5356
SELECT col1 + ( - 3 ) + - col1 * CAST ( - 37 AS INTEGER ) FROM tab2
----
1175
2239
643

query I rowsort
SELECT col2 * col1 + - ( col2 ) FROM tab2
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-5358
SELECT DISTINCT col2 * 6 + col2 DIV col0 AS col1 FROM tab0
----
199
492
6

skipif mysql # not compatible
query I rowsort label-5358
SELECT DISTINCT col2 * 6 + col2 / col0 AS col1 FROM tab0
----
199
492
6

query I rowsort
SELECT ALL + col1 * ( - col1 ) + - col0 * + 42 * - 94 FROM tab2 AS cor0
----
26675
304463
311603

query I rowsort
SELECT ALL + cor0.col2 * + col2 + 15 - col2 AS col1 FROM tab2 cor0
----
1421
665
717

query I rowsort
SELECT - 60 FROM tab1, tab2 cor0, tab1 cor1
----
27 values hashing to 1a0b29f8e6f82c54623a665ba4af8fd1

query I rowsort
SELECT DISTINCT - col0 + col0 * 2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + + col2 * + col2 + col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + - col2 + - col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT - 87 + - 14 AS col0 FROM tab1 AS cor0
----
-101
-101
-101

query I rowsort
SELECT ALL - 64 * cor0.col2 AS col2 FROM tab0 cor0
----
-2112
-5248
-64

query I rowsort
SELECT ALL + + 11 + col1 * - col2 FROM tab2 AS cor0
----
-1523
-635
-826

onlyif mysql # use DIV operator for integer division
query I rowsort label-5368
SELECT DISTINCT - - ( - col0 ) DIV cor0.col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5368
SELECT DISTINCT - - ( - col0 ) / cor0.col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL - col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5370
SELECT - - col0 * cor0.col2 DIV + col1 AS col2 FROM tab2 AS cor0
----
176
34
6

skipif mysql # not compatible
query I rowsort label-5370
SELECT - - col0 * cor0.col2 / + col1 AS col2 FROM tab2 AS cor0
----
176
34
6

query I rowsort
SELECT ALL + - 80 AS col1 FROM tab0 cor0
----
-80
-80
-80

query I rowsort
SELECT - col1 + + 81 FROM tab2
----
22
50
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-5373
SELECT - col2 DIV - 21 + 58 + col2 FROM tab1
----
114
117
158

skipif mysql # not compatible
query I rowsort label-5373
SELECT - col2 / - 21 + 58 + col2 FROM tab1
----
114
117
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 90 col2 FROM tab2
----
1530
2790
5310

query I rowsort
SELECT DISTINCT + tab1.col0 * ( - col1 ) + tab1.col1 AS col0 FROM tab1
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - col2 * + tab1.col1 col1 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL col2 * + col1 + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT col2 * - col1 + col2 * + 24 AS col2 FROM tab0 cor0
----
-2046
-5494
-73

query I rowsort
SELECT DISTINCT - 63 * - col1 + - ( cor0.col0 ) AS col2 FROM tab2 AS cor0
----
1946
3639
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-5380
SELECT ALL cor0.col0 DIV col0 - + 99 FROM tab0 AS cor0
----
-98
-98
-98

skipif mysql # not compatible
query I rowsort label-5380
SELECT ALL cor0.col0 / col0 - + 99 FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT - - col1 + col2 * - col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - col0 + - cor0.col1 * + col0 * col1 FROM tab1 AS cor0
----
-13600
-2031
-6464

onlyif mysql # use DIV operator for integer division
query I rowsort label-5383
SELECT DISTINCT + - col1 - cor0.col2 DIV - 36 AS col2 FROM tab1 cor0
----
-11
-25
-9

skipif mysql # not compatible
query I rowsort label-5383
SELECT DISTINCT + - col1 - cor0.col2 / - 36 AS col2 FROM tab1 cor0
----
-11
-25
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5384
SELECT ALL + - col2 + + col1 DIV ( ( cor0.col1 ) ) + col0 * 62 AS col0 FROM tab0 AS cor0
----
1456
2170
5437

skipif mysql # not compatible
query I rowsort label-5384
SELECT ALL + - col2 + + col1 / ( ( cor0.col1 ) ) + col0 * 62 AS col0 FROM tab0 AS cor0
----
1456
2170
5437

query I rowsort
SELECT 31 FROM tab1 cor0
----
31
31
31

query I rowsort
SELECT ALL - tab0.col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT 89 + + col0 * 29 FROM tab1 cor0
----
176
1945
2409

query I rowsort
SELECT DISTINCT + 40 * + col2 AS col2 FROM tab0 cor0
----
1320
3280
40

query I rowsort
SELECT cor0.col0 * 55 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 6be1b8c1696f971d9450ab3d191e63e7

query I rowsort
SELECT DISTINCT ( + 79 ) FROM tab2
----
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5391
SELECT CAST( - col2 AS SIGNED ) * col0 AS col1 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-5391
SELECT CAST ( - col2 AS INTEGER ) * col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL 70 * col2 AS col0 FROM tab0 AS cor0
----
2310
5740
70

query I rowsort
SELECT - ( 12 ) * cor0.col1 + col0 AS col2 FROM tab2 AS cor0
----
-125
-365
-630

query I rowsort
SELECT - + ( + cor0.col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - ( - col1 ) * 19 * - col2 FROM tab2 AS cor0
----
-12274
-15903
-29146

query I rowsort
SELECT DISTINCT ( + 98 ) FROM tab1
----
98

query I rowsort
SELECT + ( col1 + + col0 * tab2.col0 ) FROM tab2
----
6143
6258
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5398
SELECT ALL CAST( - 9 AS SIGNED ) AS col1 FROM tab0
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-5398
SELECT ALL CAST ( - 9 AS INTEGER ) AS col1 FROM tab0
----
-9
-9
-9

query I rowsort
SELECT ALL col0 * + ( col1 ) + + col1 * + col0 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT DISTINCT col1 * + col0 + 99 * 35 + col2 * - col1 * col1 AS col2 FROM tab0
----
-238539
-2549
-667478

query I rowsort
SELECT - col0 - + ( col1 + - col1 ) * + col2 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5402
SELECT DISTINCT ( col2 ) * - CAST( - 69 AS SIGNED ) + - col2 FROM tab0
----
2244
5576
68

skipif mysql # not compatible
query I rowsort label-5402
SELECT DISTINCT ( col2 ) * - CAST ( - 69 AS INTEGER ) + - col2 FROM tab0
----
2244
5576
68

query I rowsort
SELECT DISTINCT - 8 + col2 * - ( + col1 ) FROM tab0
----
-105
-2846
-7470

query I rowsort
SELECT - col2 * tab1.col2 + - col0 FROM tab1
----
-2919
-3313
-9296

query I rowsort
SELECT DISTINCT - col0 + + 70 * - col0 AS col2 FROM tab2 AS cor0
----
-497
-5538
-5609

query I rowsort
SELECT + col0 * col0 - 54 AS col2 FROM tab0 AS cor0
----
1171
522
7867

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5407
SELECT ALL - CAST( NULL AS SIGNED ) * + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5407
SELECT ALL - CAST ( NULL AS INTEGER ) * + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + cor0.col2 + - col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - col1 * ( + 44 ) FROM tab1
----
-1144
-440
-572

query I rowsort
SELECT ALL 95 + - 86 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT + cor0.col2 + cor0.col2 + col2 FROM tab2 cor0
----
114
78
81

query I rowsort
SELECT + ( - 46 ) + cor0.col0 AS col2 FROM tab1 AS cor0
----
-43
18
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5413
SELECT ALL 7 DIV + col0 - + col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-24

skipif mysql # not compatible
query I rowsort label-5413
SELECT ALL 7 / + col0 - + col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5414
SELECT DISTINCT CAST( 9 AS SIGNED ) + col1 AS col1 FROM tab1 AS cor0
----
19
22
35

skipif mysql # not compatible
query I rowsort label-5414
SELECT DISTINCT CAST ( 9 AS INTEGER ) + col1 AS col1 FROM tab1 AS cor0
----
19
22
35

query I rowsort
SELECT + 20 * col1 + - col0 * - col2 FROM tab1 AS cor0
----
3848
682
7940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + 69 col2 FROM tab2 cor0
----
100
128
86

query I rowsort
SELECT DISTINCT - + col0 * cor0.col1 - - col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL col0 - - 99 AS col0 FROM tab2
----
106
177
178

query I rowsort
SELECT ALL + col0 * 65 - - col0 FROM tab1
----
198
4224
5280

query I rowsort
SELECT - col1 * + 95 + - col2 AS col1 FROM tab1 AS cor0
----
-1007
-1331
-2524

query I rowsort
SELECT + - 74 + - cor0.col1 FROM tab1 AS cor0
----
-100
-84
-87

query I rowsort
SELECT + col2 * - col2 + + col0 + - 55 AS col0 FROM tab2 cor0
----
-1420
-653
-777

query I rowsort
SELECT ALL ( - col0 ) + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * col1 * - 29 + col2 col2 FROM tab2 AS cor0
----
-100923
-27842
-8343

query I rowsort
SELECT + 38 + - col1 + cor0.col0 * - 97 FROM tab2 AS cor0
----
-672
-7587
-7642

query I rowsort
SELECT 54 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT + - col2 * 69 FROM tab1 AS cor0
----
-3726
-3933
-6624

query I rowsort
SELECT - tab1.col2 + col1 + col1 FROM tab1
----
-2
-37
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5429
SELECT col1 - col2 DIV + col1 FROM tab1
----
24
5
6

skipif mysql # not compatible
query I rowsort label-5429
SELECT col1 - col2 / + col1 FROM tab1
----
24
5
6

query I rowsort
SELECT DISTINCT - + col0 + + 75 FROM tab1 AS cor0
----
-5
11
72

query I rowsort
SELECT - - col1 * ( - col0 + col0 ) FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - 79 * - col0 col0 FROM tab0 AS cor0
----
45504
625759
96775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5433
SELECT DISTINCT 9 * col2 * CAST( NULL AS SIGNED ) + - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5433
SELECT DISTINCT 9 * col2 * CAST ( NULL AS INTEGER ) + - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + - cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + col1 + + ( - ( col2 ) + + 43 ) AS col1 FROM tab0 AS cor0
----
2074
3437
8060

query I rowsort
SELECT DISTINCT + + col2 * + col2 + + col1 - - 34 * - col1 AS col0 FROM tab0 AS cor0
----
-1749
-3200
3721

query I rowsort
SELECT ALL - 70 FROM tab2 cor0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + col0 + - cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + + 29 FROM tab1 AS cor0
----
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-5440
SELECT ALL + cor0.col1 DIV + col1 + - col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-5440
SELECT ALL + cor0.col1 / + col1 + - col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT ALL col0 * + cor0.col0 + - ( + col1 + + col0 ) * 92 FROM tab2 AS cor0
----
-2591
-3447
-6520

query I rowsort
SELECT DISTINCT col0 * cor0.col1 * col2 + col1 * col1 AS col0 FROM tab0 AS cor0
----
12804
672399
75508

query I rowsort
SELECT - col1 + + col1 * col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT ALL col0 * cor0.col2 - col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT 61 + col2 * - 16 AS col0 FROM tab2 AS cor0
----
-355
-371
-547

query I rowsort
SELECT cor0.col0 + + ( col2 ) * col2 FROM tab0 cor0
----
1113
36
6813

query I rowsort
SELECT ALL + col1 + col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + col2 + ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + + col2 + cor0.col2 AS col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL - + 55 FROM tab1, tab1 cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5451
SELECT + col1 + - ( + 48 ) * col1 + CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-1196
-460
-598

skipif mysql # not compatible
query I rowsort label-5451
SELECT + col1 + - ( + 48 ) * col1 + CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-1196
-460
-598

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5452
SELECT ALL - col0 * col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5452
SELECT ALL - col0 * col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( col1 ) - col1 AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5454
SELECT DISTINCT + CAST( col0 AS SIGNED ) + col1 AS col0 FROM tab2 cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-5454
SELECT DISTINCT + CAST ( col0 AS INTEGER ) + col1 AS col0 FROM tab2 cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5455
SELECT col0 * - col1 - col0 DIV - tab2.col1 FROM tab2
----
-1339
-217
-4601

skipif mysql # not compatible
query I rowsort label-5455
SELECT col0 * - col1 - col0 / - tab2.col1 FROM tab2
----
-1339
-217
-4601

query I rowsort
SELECT ALL ( + 36 * + col1 ) - + col2 * col1 FROM tab2
----
-34
279
590

query I rowsort
SELECT DISTINCT + 45 * + col2 - col2 AS col2 FROM tab0
----
1452
3608
44

query I rowsort
SELECT ALL + col1 - + col2 * tab0.col1 AS col2 FROM tab0
----
-2752
-7371
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5459
SELECT ALL CAST( - 12 * col0 AS SIGNED ) - + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5459
SELECT ALL CAST ( - 12 * col0 AS INTEGER ) - + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - + 81 + - col0 AS col2 FROM tab1 AS cor0
----
-145
-161
-84

query I rowsort
SELECT - ( col0 + col1 * col0 ) FROM tab1
----
-1120
-704
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) + col2 * ( - cor0.col2 ) col0 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL cor1.col0 + - 25 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to f4be5edbd9c0cfdb63a93748e57b4ffb

query I rowsort
SELECT ALL - col1 * 17 FROM tab1 cor0
----
-170
-221
-442

query I rowsort
SELECT ALL col2 + 94 + + col1 AS col0 FROM tab1 cor0
----
161
174
203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5466
SELECT + col0 - + col0 / - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5466
SELECT + col0 - + col0 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * col2 * - ( - ( + col1 ) ) FROM tab2 AS cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 3bcd07d22b62d2042b499253b1c13d9e

query I rowsort
SELECT 22 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT + - 62 + - col2 AS col1 FROM tab2 AS cor0
----
-100
-88
-89

query I rowsort
SELECT + col2 + col0 * + 55 AS col0 FROM tab0 AS cor0
----
1353
1926
4977

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5472
SELECT ALL + col0 * - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5472
SELECT ALL + col0 * - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5473
SELECT DISTINCT - col2 + 32 * 84 DIV col1 + - cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
1251
574
7868

skipif mysql # not compatible
query I rowsort label-5473
SELECT DISTINCT - col2 + 32 * 84 / col1 + - cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
1251
574
7868

query I rowsort
SELECT ALL + + col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - 42 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

onlyif mysql # use DIV operator for integer division
query I rowsort label-5476
SELECT DISTINCT col2 DIV ( + cor0.col0 ) FROM tab2 cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-5476
SELECT DISTINCT col2 / ( + cor0.col0 ) FROM tab2 cor0
----
0
3

query I rowsort
SELECT DISTINCT + col1 + + ( col1 ) * col1 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5478
SELECT ALL + ( - col2 ) * col0 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5478
SELECT ALL + ( - col2 ) * col0 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * - ( col1 ) AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5480
SELECT DISTINCT + 66 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5480
SELECT DISTINCT + 66 / cor0.col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - - col0 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - ( col0 ) * col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - ( 91 ) AS col0 FROM tab2 cor0
----
-91

query I rowsort
SELECT + + col1 + + 26 * col0 AS col1 FROM tab0 AS cor0
----
1007
2405
710

query I rowsort
SELECT ALL - - cor0.col1 * col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 12 FROM tab2 cor0
----
12

query I rowsort
SELECT col0 - - tab1.col0 AS col1 FROM tab1
----
128
160
6

query I rowsort
SELECT 98 * - 30 FROM tab1 AS cor0
----
-2940
-2940
-2940

onlyif mysql # use DIV operator for integer division
query I rowsort label-5490
SELECT - - col2 DIV 82 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5490
SELECT - - col2 / 82 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + 16 FROM tab2, tab1, tab2 AS cor0, tab1 AS cor1
----
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5492
SELECT DISTINCT col0 * CAST( NULL AS DECIMAL ) * - tab2.col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5492
SELECT DISTINCT col0 * CAST ( NULL AS REAL ) * - tab2.col2 FROM tab2
----
NULL

query I rowsort
SELECT ALL + 13 * col0 FROM tab0
----
1157
312
455

query I rowsort
SELECT + - 25 + col1 FROM tab1 AS cor0
----
-12
-15
1

query I rowsort
SELECT 26 * col0 + cor0.col0 FROM tab2 AS cor0
----
189
2106
2133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - ( + 17 ) * + col0 col0 FROM tab0 AS cor0
----
-1424
-384
-560

query I rowsort
SELECT + col0 + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + col0 * - 5 + - col0 * col0 FROM tab2 AS cor0
----
-6474
-6636
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5499
SELECT col1 DIV 60 + - col1 * + col0 FROM tab0 AS cor0
----
-2063
-3394
-8098

skipif mysql # not compatible
query I rowsort label-5499
SELECT col1 / 60 + - col1 * + col0 FROM tab0 AS cor0
----
-2063
-3394
-8098

query I rowsort
SELECT + col0 + col1 * 17 AS col2 FROM tab0 AS cor0
----
1486
1636
1684

query I rowsort
SELECT - col0 * - 94 * col2 FROM tab2 cor0
----
17766
190632
282188

query I rowsort
SELECT + 8 * col2 FROM tab2
----
208
216
304

onlyif mysql # use DIV operator for integer division
query I rowsort label-5503
SELECT + - ( col1 ) DIV col0 - col2 AS col0 FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-5503
SELECT + - ( col1 ) / col0 - col2 AS col0 FROM tab2 AS cor0
----
-26
-31
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5504
SELECT DISTINCT 99 DIV col1 + col0 AS col2 FROM tab1 AS cor0
----
6
73
87

skipif mysql # not compatible
query I rowsort label-5504
SELECT DISTINCT 99 / col1 + col0 AS col2 FROM tab1 AS cor0
----
6
73
87

query I rowsort
SELECT 12 * + 65 FROM tab0 AS cor0
----
780
780
780

query I rowsort
SELECT ALL + col2 * col0 * col1 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT 65 + col1 * col0 + + 18 FROM tab2 AS cor0
----
1426
300
4685

query I rowsort
SELECT + ( + 50 ) AS col0 FROM tab2 AS cor0
----
50
50
50

query I rowsort
SELECT + cor0.col0 + - col2 * col2 FROM tab2 AS cor0
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-5510
SELECT ALL col1 * col2 + col0 DIV + col0 + - col2 col1 FROM tab1 AS cor0
----
1153
1351
514

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5510
SELECT ALL col1 * col2 + col0 / + col0 + - col2 col1 FROM tab1 AS cor0
----
1153
1351
514

query I rowsort
SELECT + + 79 - + col0 AS col2 FROM tab0 AS cor0
----
-10
44
55

query I rowsort
SELECT + 84 + col0 * col0 FROM tab1 AS cor0
----
4180
6484
93

query I rowsort
SELECT + + 70 AS col2 FROM tab2 AS cor0
----
70
70
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5514
SELECT - tab0.col1 + - ( ( + col2 ) ) DIV 32 FROM tab0
----
-87
-93
-97

skipif mysql # not compatible
query I rowsort label-5514
SELECT - tab0.col1 + - ( ( + col2 ) ) / 32 FROM tab0
----
-87
-93
-97

query I rowsort
SELECT 1 * col2 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT + + cor0.col0 * - col0 + ( col1 ) + col1 FROM tab0 AS cor0
----
-1031
-404
-7739

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0, tab0, tab2 cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT DISTINCT - col1 - + cor0.col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT col0 + - col0 + col2 FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5520
SELECT - CAST( tab0.col0 AS SIGNED ) AS col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5520
SELECT - CAST ( tab0.col0 AS INTEGER ) AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + col2 + col0 * col2 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT 71 * col1 AS col1 FROM tab2
----
1207
2201
4189

onlyif mysql # use DIV operator for integer division
query I rowsort label-5523
SELECT ALL col1 DIV tab1.col2 - col1 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5523
SELECT ALL col1 / tab1.col2 - col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT tab1.col2 * ( ( - col2 ) ) + - col2 * col0 AS col1 FROM tab1
----
-16896
-3078
-6897

query I rowsort
SELECT ALL 81 * - tab0.col1 FROM tab0
----
-6966
-7371
-7857

query I rowsort
SELECT - 52 AS col2 FROM tab1
----
-52
-52
-52

query I rowsort
SELECT ALL 40 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT + 2 * - 44 FROM tab1 AS cor0
----
-88
-88
-88

query I rowsort
SELECT + col0 + - ( col2 ) - col0 * ( 70 * - col1 ) FROM tab1
----
44807
5409
72784

query I rowsort
SELECT ALL col1 + + col0 + col1 AS col2 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col2 - col1 FROM tab2 AS cor0
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * - col2 col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + col0 + ( - ( + col1 ) * 36 ) FROM tab0 AS cor0
----
-3072
-3187
-3457

query I rowsort
SELECT ALL + col0 + + 11 * col2 AS col1 FROM tab2 cor0
----
304
364
497

query I rowsort
SELECT ALL - col1 * 94 * - ( col0 ) + ( + col2 * + col1 ) FROM tab0 AS cor0
----
196854
319227
768768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5536
SELECT DISTINCT - + cor0.col0 + + col1 DIV col0 AS col2 FROM tab2 cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-5536
SELECT DISTINCT - + cor0.col0 + + col1 / col0 AS col2 FROM tab2 cor0
----
-3
-78
-79

query I rowsort
SELECT ALL - 61 * + col1 FROM tab2 cor0
----
-1037
-1891
-3599

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 52 * col2 col2 FROM tab0 AS cor0
----
1716
4264
52

query I rowsort
SELECT + col0 + + cor0.col2 + col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL - 29 + cor0.col2 * col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-114105
-5132
-52757

query I rowsort
SELECT col1 * + col1 * 36 FROM tab1
----
24336
3600
6084

query I rowsort
SELECT ALL col0 - - 95 AS col0 FROM tab2
----
102
173
174

query I rowsort
SELECT DISTINCT tab0.col1 * col2 - + tab0.col1 * + col2 AS col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT + + col0 + + col1 * + col2 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT ALL + col1 * - col1 + + 36 FROM tab1 AS cor0
----
-133
-64
-640

query I rowsort
SELECT ALL - 23 - col2 * 89 * col2 FROM tab0 AS cor0
----
-112
-598459
-96944

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
3645 values hashing to 028fd38910121a0fa7c5b9a24c207cf0

query I rowsort
SELECT ALL - + col2 - - cor0.col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + 74 * - col0 FROM tab1 AS cor0
----
-222
-4736
-5920

onlyif mysql # use DIV operator for integer division
query I rowsort label-5550
SELECT + 5 + + col2 DIV - cor0.col0 FROM tab1 AS cor0
----
-13
4
5

skipif mysql # not compatible
query I rowsort label-5550
SELECT + 5 + + col2 / - cor0.col0 FROM tab1 AS cor0
----
-13
4
5

query I rowsort
SELECT + ( + col0 ) * + col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 34 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
34

query I rowsort
SELECT + col1 * + ( - 49 * col1 ) AS col1 FROM tab2 AS cor0
----
-14161
-170569
-47089

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5554
SELECT - col0 * + CAST( + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-5554
SELECT - col0 * + CAST ( + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5555
SELECT DISTINCT - - cor0.col1 / CAST( NULL AS SIGNED ) + + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5555
SELECT DISTINCT - - cor0.col1 / CAST ( NULL AS INTEGER ) + + col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col2 * + ( - cor0.col2 ) AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + 1 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT ALL - cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5559
SELECT - col0 * - CAST( NULL AS DECIMAL ) + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5559
SELECT - col0 * - CAST ( NULL AS REAL ) + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5560
SELECT + col0 DIV col0 + col0 * - col0 * - col0 FROM tab1
----
262145
28
512001

skipif mysql # not compatible
query I rowsort label-5560
SELECT + col0 / col0 + col0 * - col0 * - col0 FROM tab1
----
262145
28
512001

query I rowsort
SELECT DISTINCT + col1 * + col1 + tab2.col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT - col0 + ( + col1 ) + - 18 * 88 FROM tab2
----
-1560
-1603
-1646

query I rowsort
SELECT DISTINCT + 83 + + col2 FROM tab1
----
137
140
179

onlyif mysql # use DIV operator for integer division
query I rowsort label-5564
SELECT - ( col0 ) DIV col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5564
SELECT - ( col0 ) / col2 AS col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + 12 * + col0 + tab2.col1 * ( tab2.col2 ) + col1 AS col1 FROM tab2
----
1611
2529
952

query I rowsort
SELECT ( - 32 ) + - col1 FROM tab0
----
-118
-123
-129

query I rowsort
SELECT - col0 * - 54 AS col2 FROM tab1
----
162
3456
4320

query I rowsort
SELECT - + 66 + cor0.col1 * - col1 AS col2 FROM tab2 AS cor0
----
-1027
-3547
-355

query I rowsort
SELECT DISTINCT ( - col1 ) + - col2 * 0 FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * col2 + col2 col0 FROM tab0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-5571
SELECT DISTINCT + col1 DIV col0 + col0 * + ( + ( col2 ) ) col2 FROM tab0 AS cor0
----
37
7299
795

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5571
SELECT DISTINCT + col1 / col0 + col0 * + ( + ( col2 ) ) col2 FROM tab0 AS cor0
----
37
7299
795

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL 46 * 96 AS col1 FROM tab1 AS cor0
----
4416
4416
4416

query I rowsort
SELECT DISTINCT 23 + + col1 FROM tab2
----
40
54
82

query I rowsort
SELECT DISTINCT - 14 * col0 + col2 + 21 AS col2 FROM tab2
----
-1045
-1047
-50

onlyif mysql # use DIV operator for integer division
query I rowsort label-5576
SELECT ALL + + col2 + + cor0.col0 DIV 99 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5576
SELECT ALL + + col2 + + cor0.col0 / 99 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 72 col1 FROM tab1 AS cor0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 89 * + col2 AS col2 FROM tab0 cor0
----
-2937
-7298
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5579
SELECT col2 * col0 + 2 + + col2 * col2 DIV + 73 AS col2 FROM tab1 AS cor0
----
203
3694
7808

skipif mysql # not compatible
query I rowsort label-5579
SELECT col2 * col0 + 2 + + col2 * col2 / + 73 AS col2 FROM tab1 AS cor0
----
203
3694
7808

onlyif mysql # use DIV operator for integer division
query I rowsort label-5580
SELECT 66 DIV + cor0.col0 FROM tab0 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5580
SELECT 66 / + cor0.col0 FROM tab0 cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 * + cor0.col1 col1 FROM tab1 AS cor0
----
-110
-143
-286

onlyif mysql # use DIV operator for integer division
query I rowsort label-5582
SELECT + + col1 + col2 * ( - cor0.col2 * col1 ) + col1 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
-611792
-93565
2

skipif mysql # not compatible
query I rowsort label-5582
SELECT + + col1 + col2 * ( - cor0.col2 * col1 ) + col1 / cor0.col0 AS col2 FROM tab0 AS cor0
----
-611792
-93565
2

query I rowsort
SELECT col0 + + col0 + col1 * 7 FROM tab1 AS cor0
----
188
198
251

query I rowsort
SELECT 38 * + col1 FROM tab2 AS cor0
----
1178
2242
646

skipif mysql # not compatible
query I rowsort
SELECT ALL 94 + - col1 * CAST ( 86 * + col0 AS REAL ) AS col2 FROM tab1 AS cor0
----
-54946
-6614
-89346

query I rowsort
SELECT ALL + - 36 FROM tab0 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ALL + + 86 FROM tab1 cor0
----
86
86
86

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab2, tab1 AS cor0
----
19

query I rowsort
SELECT ALL 62 * col1 * col0 FROM tab1
----
39680
4836
64480

query I rowsort
SELECT DISTINCT col0 * col0 - - ( col1 ) * tab1.col2 * col1 AS col2 FROM tab1
----
22624
36513
9796

query I rowsort
SELECT ALL col1 - col0 * - col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + 99 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT ALL cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + - cor0.col2 * col0 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 - col2 col2 FROM tab0 AS cor0
----
-48
1
33

query I rowsort
SELECT DISTINCT col0 * 1 * - col1 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 * tab1.col2 + 14 FROM tab1
----
1262
1418
584

query I rowsort
SELECT ALL - col0 * + col1 + - ( cor0.col0 ) * col0 * - col2 FROM tab1 AS cor0
----
232832
408
613360

query I rowsort
SELECT DISTINCT col1 * col1 * col1 FROM tab2
----
205379
29791
4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-5601
SELECT + col1 DIV + ( + col1 ) AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5601
SELECT + col1 / + ( + col1 ) AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + col1 * + 59 AS col2 FROM tab1 AS cor0
----
-1534
-590
-767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 * col0 col1 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT - + ( col1 ) * + cor0.col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col2 + + ( col0 ) * - 31 FROM tab0 AS cor0
----
-1084
-2677
-711

onlyif mysql # use DIV operator for integer division
query I rowsort label-5606
SELECT DISTINCT col0 DIV col0 AS col2 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5606
SELECT DISTINCT col0 / col0 AS col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL + ( 89 ) FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT 23 * - col1 FROM tab2 AS cor0
----
-1357
-391
-713

query I rowsort
SELECT + 49 * + col2 + + col2 AS col1 FROM tab1 AS cor0
----
2700
2850
4800

query I rowsort
SELECT + col2 + col2 * + col0 * 13 FROM tab0 AS cor0
----
10329
456
94956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + 48 col2 FROM tab0
----
1152
1680
4272

onlyif mysql # use DIV operator for integer division
query I rowsort label-5612
SELECT ALL + col1 + + 35 DIV cor0.col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5612
SELECT ALL + col1 + + 35 / cor0.col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT 55 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL - + col2 * + col1 + - col0 AS col1 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-5615
SELECT 93 DIV + col1 AS col2 FROM tab2 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-5615
SELECT 93 / + col1 AS col2 FROM tab2 AS cor0
----
1
3
5

query I rowsort
SELECT - 19 * col0 AS col2 FROM tab2 AS cor0
----
-133
-1482
-1501

query I rowsort
SELECT DISTINCT 14 AS col1 FROM tab1 cor0
----
14

query I rowsort
SELECT DISTINCT + 58 * col0 AS col1 FROM tab0 AS cor0
----
1392
2030
5162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) * ( col2 ) col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 col1 FROM tab2
----
65
65
65

query I rowsort
SELECT + ( 88 ) FROM tab1
----
88
88
88

query I rowsort
SELECT DISTINCT + - col1 * col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col2 * - 50 FROM tab2
----
-1300
-1350
-1900

query I rowsort
SELECT DISTINCT - 64 * col2 AS col0 FROM tab2 AS cor0
----
-1664
-1728
-2432

query I rowsort
SELECT - - col0 * + 43 AS col1 FROM tab0 AS cor0
----
1032
1505
3827

query I rowsort
SELECT - + cor0.col1 + - 30 AS col1 FROM tab0 AS cor0
----
-116
-121
-127

query I rowsort
SELECT - col0 + - cor0.col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT - + col2 * - 2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL col1 * cor0.col0 - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT + col1 * col0 + - 69 FROM tab2 AS cor0
----
1274
148
4533

query I rowsort
SELECT ALL - col1 + + 15 * + 7 * cor0.col0 + - ( - 90 + cor0.col1 ) * col0 AS col0 FROM tab2 AS cor0
----
10549
1117
14045

query I rowsort
SELECT DISTINCT - col1 + 93 AS col1 FROM tab1 AS cor0
----
67
80
83

query I rowsort
SELECT DISTINCT + - col1 - - 24 FROM tab0 AS cor0
----
-62
-67
-73

query I rowsort
SELECT - cor0.col2 + + 53 AS col1 FROM tab2 AS cor0
----
15
26
27

query I rowsort
SELECT DISTINCT col1 + cor0.col2 * col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + 69 * cor0.col2 + + col0 FROM tab0 cor0
----
104
2301
5747

query I rowsort
SELECT DISTINCT + col0 * 45 + col1 FROM tab0 AS cor0
----
1166
1672
4096

onlyif mysql # use DIV operator for integer division
query I rowsort label-5638
SELECT ALL ( - ( col2 ) ) DIV ( 33 ) AS col2 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5638
SELECT ALL ( - ( col2 ) ) / ( 33 ) AS col2 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT + ( + tab2.col2 ) - - 33 * col1 FROM tab2
----
1050
1973
599

query I rowsort
SELECT + tab2.col0 - col1 * col0 AS col2 FROM tab2
----
-1264
-210
-4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5641
SELECT DISTINCT - - col0 + + CAST( 28 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
106
107
35

skipif mysql # not compatible
query I rowsort label-5641
SELECT DISTINCT - - col0 + + CAST ( 28 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
106
107
35

query I rowsort
SELECT + col1 + - 94 AS col0 FROM tab1 AS cor0
----
-68
-81
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + + col1 col2 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL 87 * col1 FROM tab1
----
1131
2262
870

query I rowsort
SELECT DISTINCT + - tab0.col0 FROM tab0, tab2, tab1 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + col2 + - 69 * - ( + col0 ) FROM tab0 AS cor0
----
1689
2416
6223

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to ed0ce6de90f51f6f9035da5f66a6f197

query I rowsort
SELECT ALL - + col0 + + 70 * col1 * col1 FROM tab2 AS cor0
----
20151
243592
67263

query I rowsort
SELECT ALL + col2 * ( col0 ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col2 - col0 * - col0 AS col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT + col2 + col1 * 94 FROM tab2 AS cor0
----
1636
2941
5572

query I rowsort
SELECT ALL - cor0.col0 + + col1 AS col2 FROM tab0 cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5653
SELECT DISTINCT + col1 DIV - col1 + + 70 + col0 AS col1 FROM tab1 AS cor0
----
133
149
72

skipif mysql # not compatible
query I rowsort label-5653
SELECT DISTINCT + col1 / - col1 + + 70 + col0 AS col1 FROM tab1 AS cor0
----
133
149
72

query I rowsort
SELECT + col2 * 53 FROM tab2 AS cor0
----
1378
1431
2014

query I rowsort
SELECT ALL cor0.col1 * - ( cor0.col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - - 86 * + 30 AS col2 FROM tab2 AS cor0
----
2580
2580
2580

query I rowsort
SELECT + + cor0.col0 * + col1 + col1 AS col2 FROM tab2 cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5658
SELECT DISTINCT CAST( - col0 AS SIGNED ) + col1 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-5658
SELECT DISTINCT CAST ( - col0 AS INTEGER ) + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + 54 AS col1 FROM tab2 AS cor0
----
54
54
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5660
SELECT - CAST( col1 AS SIGNED ) - col2 FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-5660
SELECT - CAST ( col1 AS INTEGER ) - col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT - col0 * + ( col2 ) * col1 + col1 AS col1 FROM tab0 AS cor0
----
-3298
-664027
-68026

onlyif mysql # use DIV operator for integer division
query I rowsort label-5662
SELECT DISTINCT + col1 DIV + 54 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5662
SELECT DISTINCT + col1 / + 54 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT + + col0 + cor0.col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + tab2.col1 * ( tab2.col0 * + col2 ) + + col1 AS col1 FROM tab2
----
119711
51051
5890

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5665
SELECT ALL col1 * col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5665
SELECT ALL col1 * col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 + - col1 AS col2 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5667
SELECT ALL col0 * col1 DIV + col0 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5667
SELECT ALL col0 * col1 / + col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + + ( col2 ) * - cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ( col1 ) * - col1 + - 19 + - col0 AS col1 FROM tab0 AS cor0
----
-7439
-8389
-9463

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5670
SELECT DISTINCT col0 * col2 + + CAST( 0 AS SIGNED ) FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5670
SELECT DISTINCT col0 * col2 + + CAST ( 0 AS INTEGER ) FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT - 30 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a96370a8187089b6b83ce9bfbade5142

query I rowsort
SELECT 67 - + col0 FROM tab1 AS cor0
----
-13
3
64

query I rowsort
SELECT + + cor0.col2 * + col1 * col1 + col2 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT DISTINCT + 33 + col0 AS col1 FROM tab0 AS cor0
----
122
57
68

query I rowsort
SELECT ALL + - cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 36 + col1 FROM tab1 AS cor0
----
46
49
62

query I rowsort
SELECT - + 86 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-2838
-7052
-86

query I rowsort
SELECT + - col1 * - ( ( col1 ) ) + + cor0.col1 * - col1 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT DISTINCT + - col1 * + 75 * col2 + + cor0.col0 - + col0 FROM tab0 cor0
----
-212850
-559650
-7275

query I rowsort
SELECT - 48 - - col1 FROM tab1 cor0
----
-22
-35
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 * + col2 + col2 col2 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT 55 * 57 + col2 FROM tab0 AS cor0
----
3136
3168
3217

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL col0 * col2 + - col2 AS col0 FROM tab1
----
108
3591
7584

query I rowsort
SELECT + tab1.col0 + - col0 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5688
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + - tab2.col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5688
SELECT DISTINCT - CAST ( NULL AS REAL ) + - tab2.col0 FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5689
SELECT DISTINCT - ( + col2 ) * col1 + - 88 DIV tab0.col2 AS col0 FROM tab0
----
-185
-2840
-7463

skipif mysql # not compatible
query I rowsort label-5689
SELECT DISTINCT - ( + col2 ) * col1 + - 88 / tab0.col2 AS col0 FROM tab0
----
-185
-2840
-7463

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab1, tab0 AS cor0
----
47

query I rowsort
SELECT 89 * - col0 AS col0 FROM tab2
----
-623
-6942
-7031

query I rowsort
SELECT - col1 * - cor0.col2 + + 94 FROM tab2 AS cor0
----
1628
740
931

onlyif mysql # use DIV operator for integer division
query I rowsort label-5693
SELECT tab0.col1 DIV 51 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5693
SELECT tab0.col1 / 51 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT ( col1 ) * - cor0.col0 + 58 AS col1 FROM tab2 AS cor0
----
-1285
-159
-4544

query I rowsort
SELECT DISTINCT - - col2 - + 54 FROM tab1 AS cor0
----
0
3
42

query I rowsort
SELECT - cor0.col0 * 87 FROM tab2 AS cor0
----
-609
-6786
-6873

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 * - col1 col2 FROM tab2 cor0
----
-1275
-2325
-4425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 * col2 + + 26 col1 FROM tab1 AS cor0
----
3968
4187
7034

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5699
SELECT - col0 * - col1 + - CAST( NULL AS DECIMAL ) / + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5699
SELECT - col0 * - col1 + - CAST ( NULL AS REAL ) / + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) * 19 + + 2 col1 FROM tab2 cor0
----
135
1484
1503

query I rowsort
SELECT - 64 + + col1 AS col1 FROM tab1 AS cor0
----
-38
-51
-54

query I rowsort
SELECT DISTINCT - col2 * - col1 + - ( + col0 ) AS col2 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-5703
SELECT ALL col2 - + col2 DIV 66 AS col2 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5703
SELECT ALL col2 - + col2 / 66 AS col2 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 + - col0 ) col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT 64 * cor0.col2 + - 94 FROM tab0, tab1, tab2 AS cor0
----
1570
1634
2338

query I rowsort
SELECT DISTINCT 73 + col0 + 19 * - col1 AS col2 FROM tab2
----
-171
-509
-970

onlyif mysql # use DIV operator for integer division
query I rowsort label-5707
SELECT ALL - col2 DIV - col2 + + col2 * - col2 * + col0 FROM tab0
----
-26135
-34
-598435

skipif mysql # not compatible
query I rowsort label-5707
SELECT ALL - col2 / - col2 + + col2 * - col2 * + col0 FROM tab0
----
-26135
-34
-598435

query I rowsort
SELECT + col1 * - 94 AS col2 FROM tab1 AS cor0
----
-1222
-2444
-940

query I rowsort
SELECT col2 + col2 * 97 FROM tab2 cor0
----
2548
2646
3724

query I rowsort
SELECT DISTINCT - col1 * + col0 * + col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT - + cor0.col1 + + col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col1 * 22 AS col0 FROM tab1 cor0
----
-220
-286
-572

query I rowsort
SELECT ALL - cor0.col2 * + 62 FROM tab2 AS cor0
----
-1612
-1674
-2356

query I rowsort
SELECT - col2 + col1 + + cor0.col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 col0 FROM tab2
----
52

query I rowsort
SELECT - + ( cor0.col2 ) - - col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT col0 - + ( col0 + + col2 ) * - col0 AS col1 FROM tab2 AS cor0
----
245
8190
9322

query I rowsort
SELECT - ( col1 ) * col0 + col1 AS col1 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + col2 * - 78 AS col1 FROM tab0 AS cor0
----
-2574
-6396
-78

query I rowsort
SELECT ALL + 17 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT - col0 * + col1 + 87 + + 69 AS col0 FROM tab1 AS cor0
----
-484
-884
78

query I rowsort
SELECT col1 * + col1 * col0 + - 87 FROM tab1 AS cor0
----
13433
1941
6313

onlyif mysql # use DIV operator for integer division
query I rowsort label-5724
SELECT DISTINCT + ( + col1 ) DIV - col1 col0 FROM tab1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5724
SELECT DISTINCT + ( + col1 ) / - col1 col0 FROM tab1
----
-1

query I rowsort
SELECT DISTINCT + ( - col0 ) * + col0 + - col1 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT DISTINCT - cor0.col1 + 41 * + col2 FROM tab2 AS cor0
----
1007
1076
1541

query I rowsort
SELECT ALL - - col2 * - 74 + - col0 FROM tab0 AS cor0
----
-109
-2466
-6157

query I rowsort
SELECT ALL col2 + 37 * + cor0.col0 - col2 * col0 FROM tab1 AS cor0
----
-1223
-4624
3

query I rowsort
SELECT ALL 86 + + 84 * col2 FROM tab0 cor0
----
170
2858
6974

query I rowsort
SELECT DISTINCT - - 52 * col0 FROM tab2 AS cor0
----
364
4056
4108

query I rowsort
SELECT ALL cor0.col0 * - 77 FROM tab1 AS cor0
----
-231
-4928
-6160

onlyif mysql # use DIV operator for integer division
query I rowsort label-5732
SELECT ALL - col1 DIV 38 + col1 + cor0.col2 AS col1 FROM tab2 cor0
----
55
58
84

skipif mysql # not compatible
query I rowsort label-5732
SELECT ALL - col1 / 38 + col1 + cor0.col2 AS col1 FROM tab2 cor0
----
55
58
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col2 ) col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + - 38 * ( col2 ) + - col0 AS col2 FROM tab0 cor0
----
-1278
-3205
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5735
SELECT DISTINCT - + CAST( 54 AS SIGNED ) * + col0 AS col0 FROM tab2 AS cor0
----
-378
-4212
-4266

skipif mysql # not compatible
query I rowsort label-5735
SELECT DISTINCT - + CAST ( 54 AS INTEGER ) * + col0 AS col0 FROM tab2 AS cor0
----
-378
-4212
-4266

query I rowsort
SELECT DISTINCT col0 + ( 3 ) + col0 AS col2 FROM tab0
----
181
51
73

query I rowsort
SELECT DISTINCT + ( col0 * + col0 ) AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT cor1.col2 * - cor1.col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to b784d6344043bb09325bf01c321ac1ec

query I rowsort
SELECT DISTINCT col2 * col0 + col0 * ( col2 + cor0.col0 ) FROM tab2 AS cor0
----
10140
12245
427

query I rowsort
SELECT DISTINCT - - 33 + cor0.col2 - col1 AS col0 FROM tab2 AS cor0
----
0
29
54

query I rowsort
SELECT ALL + 74 AS col0 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT DISTINCT - 29 + + cor0.col1 FROM tab0 cor0
----
57
62
68

query I rowsort
SELECT DISTINCT col1 - + 42 * - col1 FROM tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT - ( - 30 ) AS col1 FROM tab0 AS cor0
----
30
30
30

query I rowsort
SELECT ALL + - col0 * col1 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-5746
SELECT ALL col0 + - tab1.col1 - + col1 DIV 99 AS col0 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-5746
SELECT ALL col0 + - tab1.col1 - + col1 / 99 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + 5 * col0 + + 60 + - 66 * col2 AS col2 FROM tab1
----
-3382
-3489
-5876

query I rowsort
SELECT + - 8 FROM tab2, tab1 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5749
SELECT tab2.col1 DIV - 68 + 86 DIV - col1 FROM tab2
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-5749
SELECT tab2.col1 / - 68 + 86 / - col1 FROM tab2
----
-1
-2
-5

query I rowsort
SELECT DISTINCT col1 + ( col1 * + col2 ) AS col2 FROM tab0
----
194
2924
7553

query I rowsort
SELECT + cor2.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT DISTINCT - col0 + 47 * col0 FROM tab2 AS cor0
----
322
3588
3634

query I rowsort
SELECT + col2 * 13 AS col0 FROM tab1 AS cor0
----
1248
702
741

onlyif mysql # use DIV operator for integer division
query I rowsort label-5754
SELECT DISTINCT col1 DIV - CAST( - cor0.col2 * - col0 + 87 AS SIGNED ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5754
SELECT DISTINCT col1 / - CAST ( - cor0.col2 * - col0 + 87 AS INTEGER ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT col2 * ( - col1 ) + - cor0.col0 * - cor0.col1 + col2 * + col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - col0 + 45 * 93 + col0 * col0 FROM tab1 AS cor0
----
10505
4191
8217

query I rowsort
SELECT ALL cor0.col1 * + 36 FROM tab2 AS cor0
----
1116
2124
612

query I rowsort
SELECT DISTINCT - cor0.col1 + - 52 * - col0 FROM tab0 AS cor0
----
1162
1723
4537

query I rowsort
SELECT - col2 * 73 + + 81 FROM tab1 AS cor0
----
-3861
-4080
-6927

query I rowsort
SELECT + - cor0.col0 * 36 - + 72 * col0 FROM tab2 AS cor0
----
-756
-8424
-8532

onlyif mysql # use DIV operator for integer division
query I rowsort label-5761
SELECT - cor0.col2 DIV 1 + col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-5761
SELECT - cor0.col2 / 1 + col2 / col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5762
SELECT ALL - + col2 * CAST( 85 AS SIGNED ) FROM tab2 AS cor0
----
-2210
-2295
-3230

skipif mysql # not compatible
query I rowsort label-5762
SELECT ALL - + col2 * CAST ( 85 AS INTEGER ) FROM tab2 AS cor0
----
-2210
-2295
-3230

query I rowsort
SELECT DISTINCT + - cor0.col2 + - ( cor0.col0 ) FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - col1 + 69 * col2 AS col0 FROM tab0 AS cor0
----
-28
2191
5567

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5765
SELECT + col2 * CAST( - col0 AS SIGNED ) + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

skipif mysql # not compatible
query I rowsort label-5765
SELECT + col2 * CAST ( - col0 AS INTEGER ) + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL + cor0.col0 * - 52 * - ( + col0 ) AS col0 FROM tab0 AS cor0
----
29952
411892
63700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5767
SELECT - col2 * CAST( - col2 + col2 AS SIGNED ) * 0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5767
SELECT - col2 * CAST ( - col2 + col2 AS INTEGER ) * 0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5768
SELECT DISTINCT col2 * + CAST( col0 AS SIGNED ) * col0 AS col0 FROM tab1 cor0
----
233472
486
614400

skipif mysql # not compatible
query I rowsort label-5768
SELECT DISTINCT col2 * + CAST ( col0 AS INTEGER ) * col0 AS col0 FROM tab1 cor0
----
233472
486
614400

query I rowsort
SELECT col0 * + col1 - 48 FROM tab0 AS cor0
----
2016
3347
8051

onlyif mysql # use DIV operator for integer division
query I rowsort label-5770
SELECT ALL + - col2 DIV 86 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5770
SELECT ALL + - col2 / 86 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + - 74 * col0 FROM tab1 AS cor0
----
-219
-4672
-5840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) * col1 col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5773
SELECT CAST( - col0 AS SIGNED ) + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-5773
SELECT CAST ( - col0 AS INTEGER ) + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + + col1 * col0 + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + 72 + + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 765edb99c0b97dffc91a059697db17fc

query I rowsort
SELECT ALL + col1 * + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 26 + cor0.col2 col1 FROM tab0 AS cor0
----
108
27
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5778
SELECT ALL + col2 DIV - cor0.col0 + + col0 col2 FROM tab2 cor0
----
4
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5778
SELECT ALL + col2 / - cor0.col0 + + col0 col2 FROM tab2 cor0
----
4
78
79

query I rowsort
SELECT DISTINCT - 5 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
-5

query I rowsort
SELECT 71 * + col2 + - ( - col0 ) * col1 FROM tab0
----
13921
3466
4407

query I rowsort
SELECT ALL + 31 + col2 * - 88 * 85 FROM tab0 AS cor0
----
-246809
-613329
-7449

query I rowsort
SELECT + 56 * + col1 AS col1 FROM tab2 AS cor0
----
1736
3304
952

query I rowsort
SELECT DISTINCT - col1 + - col1 - 1 AS col2 FROM tab1 AS cor0
----
-21
-27
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * cor0.col2 col0 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5785
SELECT + col0 DIV + cor0.col0 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5785
SELECT + col0 / + cor0.col0 FROM tab0 cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5786
SELECT ALL - ( - tab2.col2 ) DIV - tab2.col1 col0 FROM tab2
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5786
SELECT ALL - ( - tab2.col2 ) / - tab2.col1 col0 FROM tab2
----
-2
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5787
SELECT DISTINCT - col0 + CAST( NULL AS DECIMAL ) * 63 + - col1 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5787
SELECT DISTINCT - col0 + CAST ( NULL AS REAL ) * 63 + - col1 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - - col2 * - col0 + 34 FROM tab0 AS cor0
----
-1
-7264
-758

query I rowsort
SELECT DISTINCT - 88 AS col0 FROM tab2, tab1, tab0 AS cor0
----
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5790
SELECT + col0 DIV - 46 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-5790
SELECT + col0 / - 46 FROM tab2 AS cor0
----
-1
-1
0

query I rowsort
SELECT + 31 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-7
4
5

query I rowsort
SELECT + - col1 + col1 * col0 * + col1 AS col2 FROM tab1 AS cor0
----
13507
2002
6390

query I rowsort
SELECT ALL + + col1 * + col1 * + ( + cor0.col0 ) FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + + col0 + - col2 * ( 72 ) FROM tab1 AS cor0
----
-3885
-4040
-6832

onlyif mysql # use DIV operator for integer division
query I rowsort label-5795
SELECT + col2 DIV ( - col1 ) AS col2 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5795
SELECT + col2 / ( - col1 ) AS col2 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT + + cor0.col0 * + 6 + + col1 FROM tab1 AS cor0
----
394
44
493

query I rowsort
SELECT - + col0 * + 52 AS col0 FROM tab1 AS cor0
----
-156
-3328
-4160

query I rowsort
SELECT DISTINCT col0 * + 97 AS col0 FROM tab0
----
2328
3395
8633

query I rowsort
SELECT ALL 14 * + ( + col2 + cor0.col1 ) * + col1 FROM tab0 AS cor0
----
133084
143276
220402

query I rowsort
SELECT DISTINCT col2 * 81 FROM tab2
----
2106
2187
3078

query I rowsort
SELECT + + col0 * + col2 + - col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + + col0 + 57 * col0 FROM tab1 cor0
----
174
3712
4640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + + col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + col0 * - 10 AS col2 FROM tab1
----
-30
-640
-800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5805
SELECT ALL - CAST( NULL AS DECIMAL ) + + 92 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5805
SELECT ALL - CAST ( NULL AS REAL ) + + 92 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + ( - col2 ) col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL 4 + - cor0.col0 FROM tab0 AS cor0
----
-20
-31
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5808
SELECT col0 DIV + 62 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5808
SELECT col0 / + 62 FROM tab0
----
0
0
1

query I rowsort
SELECT DISTINCT + col0 * + col0 + - tab2.col2 FROM tab2
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-5810
SELECT ALL col1 DIV col0 + - tab0.col1 * - col2 + col1 AS col1 FROM tab0
----
196
2927
7554

skipif mysql # not compatible
query I rowsort label-5810
SELECT ALL col1 / col0 + - tab0.col1 * - col2 + col1 AS col1 FROM tab0
----
196
2927
7554

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) AS col2 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 col0 FROM tab0
----
15
15
15

query I rowsort
SELECT DISTINCT ( + 38 * col0 ) + col0 * - col0 AS col2 FROM tab1
----
-1664
-3360
105

query I rowsort
SELECT - 23 FROM tab2, tab0 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT + ( - 36 ) + - cor0.col0 * - cor0.col0 FROM tab0 AS cor0
----
1189
540
7885

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5816
SELECT + CAST( col2 * col0 AS SIGNED ) AS col1 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5816
SELECT + CAST ( col2 * col0 AS INTEGER ) AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col1 + + 67 FROM tab2
----
126
84
98

query I rowsort
SELECT - 71 + 39 AS col1 FROM tab0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT - 34 + - col1 * - col1 * - tab2.col0 AS col2 FROM tab2
----
-22865
-271552
-6761

query I rowsort
SELECT DISTINCT - 37 AS col1 FROM tab2, tab2 AS cor0
----
-37

query I rowsort
SELECT ALL - cor0.col1 + col0 * col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT + + col2 + 37 FROM tab0 AS cor0
----
119
38
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5823
SELECT ALL - - col1 * CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-5823
SELECT ALL - - col1 * CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - cor0.col1 + + 0 * - 69 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - cor0.col2 * 19 col1 FROM tab2 AS cor0
----
-12274
-15903
-29146

query I rowsort
SELECT + + col1 * - col0 + ( 37 ) AS col0 FROM tab0 AS cor0
----
-2027
-3358
-8062

query I rowsort
SELECT + 16 - col2 * - tab2.col2 AS col1 FROM tab2
----
1460
692
745

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5828
SELECT DISTINCT col0 + 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-5828
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

query I rowsort
SELECT - col0 * col1 - 62 FROM tab0 AS cor0
----
-2126
-3457
-8161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5830
SELECT cor0.col1 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5830
SELECT cor0.col1 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 + + cor0.col0 * 39 AS col2 FROM tab2 AS cor0
----
300
3068
3119

query I rowsort
SELECT ALL + col2 + col1 * + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col1 * 3 AS col0 FROM tab2 AS cor0
----
-177
-51
-93

query I rowsort
SELECT ALL cor0.col2 * - 89 AS col2 FROM tab0 AS cor0
----
-2937
-7298
-89

query I rowsort
SELECT col1 * + 3 + col0 FROM tab0 AS cor0
----
282
326
362

query I rowsort
SELECT - col1 - ( col1 ) FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5837
SELECT DISTINCT col1 + + CAST( - col0 + col2 AS SIGNED ) * + cor0.col0 FROM tab0 AS cor0
----
-1093
-532
302

skipif mysql # not compatible
query I rowsort label-5837
SELECT DISTINCT col1 + + CAST ( - col0 + col2 AS INTEGER ) * + cor0.col0 FROM tab0 AS cor0
----
-1093
-532
302

query I rowsort
SELECT ALL + 15 * col2 FROM tab0 AS cor0
----
1230
15
495

onlyif mysql # use DIV operator for integer division
query I rowsort label-5839
SELECT DISTINCT col1 DIV col0 + 63 FROM tab0
----
64
65
66

skipif mysql # not compatible
query I rowsort label-5839
SELECT DISTINCT col1 / col0 + 63 FROM tab0
----
64
65
66

query I rowsort
SELECT col1 * + col2 * - 70 AS col2 FROM tab1
----
-39900
-87360
-98280

query I rowsort
SELECT 73 + - col2 AS col1 FROM tab2 cor0
----
35
46
47

query I rowsort
SELECT ALL ( + cor0.col1 ) + col0 * col0 AS col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + 55 * + col0 * - cor0.col1 FROM tab1 AS cor0
----
-35200
-4290
-57200

query I rowsort
SELECT + col1 * 5 + + 67 AS col2 FROM tab1 AS cor0
----
117
132
197

query I rowsort
SELECT - col1 * + ( 47 ) + + col2 FROM tab2 cor0
----
-1430
-2747
-761

query I rowsort
SELECT - col0 + - col1 * col2 + cor0.col2 FROM tab2 AS cor0
----
-1586
-687
-817

query I rowsort
SELECT ALL col1 * 74 + col1 AS col2 FROM tab2 AS cor0
----
1275
2325
4425

query I rowsort
SELECT col0 * - 3 * col2 AS col2 FROM tab0 AS cor0
----
-105
-21894
-2376

query I rowsort
SELECT ALL - + col0 + 94 AS col2 FROM tab2 AS cor0
----
15
16
87

query I rowsort
SELECT ALL + col0 * - ( col2 ) + col1 + - col2 FROM tab0 AS cor0
----
-7289
-739
61

query I rowsort
SELECT DISTINCT + 93 + + tab2.col2 FROM tab2
----
119
120
131

query I rowsort
SELECT DISTINCT col2 + tab2.col0 * + tab2.col1 + - 91 FROM tab2
----
1290
153
4537

query I rowsort
SELECT col2 + 82 AS col2 FROM tab1 AS cor0
----
136
139
178

onlyif mysql # use DIV operator for integer division
query I rowsort label-5854
SELECT ALL col2 + col2 * col0 DIV - col1 FROM tab2
----
-138
-8
21

skipif mysql # not compatible
query I rowsort label-5854
SELECT ALL col2 + col2 * col0 / - col1 FROM tab2
----
-138
-8
21

query I rowsort
SELECT DISTINCT col1 * + col1 * + 38 + - col0 AS col1 FROM tab0
----
281024
314589
357507

query I rowsort
SELECT DISTINCT - - cor0.col1 * 95 FROM tab2 AS cor0
----
1615
2945
5605

query I rowsort
SELECT ALL + 89 * + col0 FROM tab0 AS cor0
----
2136
3115
7921

query I rowsort
SELECT ALL + cor0.col2 + - col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT - col1 + - 2 * col1 FROM tab1 AS cor0
----
-30
-39
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5860
SELECT - + CAST( col2 AS SIGNED ) * - col1 * + cor0.col0 AS col1 FROM tab1 cor0
----
36480
4212
99840

skipif mysql # not compatible
query I rowsort label-5860
SELECT - + CAST ( col2 AS INTEGER ) * - col1 * + cor0.col0 AS col1 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + col2 + - col1 + col2 AS col1 FROM tab1 AS cor0
----
104
179
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5862
SELECT + CAST( 39 AS SIGNED ) FROM tab0 AS cor0
----
39
39
39

skipif mysql # not compatible
query I rowsort label-5862
SELECT + CAST ( 39 AS INTEGER ) FROM tab0 AS cor0
----
39
39
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-5863
SELECT col2 - col0 DIV col1 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5863
SELECT col2 - col0 / col1 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - col1 * - 28 * - col2 + + col0 * col2 FROM tab0
----
-201638
-2681
-78672

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 34 col1 FROM tab1 AS cor0
----
34

query I rowsort
SELECT + col1 * col0 + col1 * tab1.col1 + - col1 AS col2 FROM tab1
----
1196
728
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5867
SELECT CAST( 4 AS SIGNED ) * col1 + + col1 + - col2 FROM tab2
----
128
269
47

skipif mysql # not compatible
query I rowsort label-5867
SELECT CAST ( 4 AS INTEGER ) * col1 + + col1 + - col2 FROM tab2
----
128
269
47

query I rowsort
SELECT + 41 + - col1 * - 72 AS col2 FROM tab1 AS cor0
----
1913
761
977

query I rowsort
SELECT - ( + col2 ) * tab0.col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT - col2 * col0 + col1 + + col2 FROM tab2 AS cor0
----
-131
-1943
-2947

query I rowsort
SELECT DISTINCT - - col0 + col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
26
27
38

query I rowsort
SELECT - ( + col2 ) + + col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - - 93 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT ALL col0 * col1 + col0 AS col1 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - + ( cor0.col0 ) + 66 AS col2 FROM tab2 AS cor0
----
-12
-13
59

query I rowsort
SELECT DISTINCT - col2 * 75 FROM tab1 AS cor0
----
-4050
-4275
-7200

query I rowsort
SELECT + col0 + ( col1 ) + - col1 * - col0 FROM tab2 AS cor0
----
1439
255
4739

query I rowsort
SELECT col0 * - col1 + cor0.col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-5881
SELECT col1 + col2 DIV + col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-5881
SELECT col1 + col2 / + col1 FROM tab1 AS cor0
----
15
20
28

query I rowsort
SELECT DISTINCT + - col0 * + ( cor0.col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5883
SELECT - ( col0 ) DIV + cor0.col0 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5883
SELECT - ( col0 ) / + cor0.col0 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 5 * - col0 AS col1 FROM tab0 AS cor0
----
120
175
445

query I rowsort
SELECT DISTINCT - 58 + col1 * - col0 AS col2 FROM tab0 cor0
----
-2122
-3453
-8157

query I rowsort
SELECT DISTINCT - + col0 * + col1 - col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - 42 * 89 AS col1 FROM tab2 cor0
----
-3738
-3738
-3738

query I rowsort
SELECT - + 25 AS col0 FROM tab2 AS cor0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + col1 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL 91 * + col2 - + col0 AS col1 FROM tab2 AS cor0
----
2288
2450
3379

query I rowsort
SELECT - ( - ( + col0 ) * 18 + + col0 ) AS col2 FROM tab2
----
119
1326
1343

onlyif mysql # use DIV operator for integer division
query I rowsort label-5892
SELECT DISTINCT - col1 DIV 57 col0 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5892
SELECT DISTINCT - col1 / 57 col0 FROM tab0
----
-1

query I rowsort
SELECT ALL ( - 6 ) AS col0 FROM tab0 AS cor0
----
-6
-6
-6

query I rowsort
SELECT + + ( - col1 ) * + col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - col1 * - ( + cor0.col1 ) FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT col0 * + cor0.col0 - + col1 AS col0 FROM tab1 AS cor0
----
-17
4086
6387

onlyif mysql # use DIV operator for integer division
query I rowsort label-5897
SELECT col0 + col1 + + 98 * col1 DIV col1 FROM tab2 AS cor0
----
136
194
235

skipif mysql # not compatible
query I rowsort label-5897
SELECT col0 + col1 + + 98 * col1 / col1 FROM tab2 AS cor0
----
136
194
235

query I rowsort
SELECT + col2 + - col0 * 71 + cor0.col0 FROM tab1 AS cor0
----
-156
-4423
-5504

query IIIIIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0, tab0 AS cor2, tab1 cor3
----
13122 values hashing to 5f7f11e604877371b39c7df9f3984218

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5900
SELECT - + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5900
SELECT - + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - tab2.col1 ) + col1 col0 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT col2 + col2 * + col1 AS col1 FROM tab1
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-5903
SELECT DISTINCT - 1 DIV 96 + tab0.col0 AS col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5903
SELECT DISTINCT - 1 / 96 + tab0.col0 AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab2, tab1 AS cor0
----
16

query I rowsort
SELECT - 3 * 67 + + col0 * col1 FROM tab2 cor0
----
1142
16
4401

query I rowsort
SELECT col0 * col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - + 84 * - col0 AS col1 FROM tab1 AS cor0
----
252
5376
6720

query I rowsort
SELECT 88 * + col1 * col2 AS col1 FROM tab0 AS cor0
----
249744
656656
8536

query I rowsort
SELECT - col0 * + ( + col1 ) * col1 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - - col0 * - 26 + + col2 * - col2 + + col1 * + col0 FROM tab2 AS cor0
----
-2155
-694
1898

query I rowsort
SELECT cor0.col2 * - cor0.col0 + col2 + cor0.col1 FROM tab2 AS cor0
----
-131
-1943
-2947

query I rowsort
SELECT 60 * col2 * - col2 + - col1 * col2 AS col2 FROM tab1
----
-176364
-195510
-554208

query I rowsort
SELECT + col0 * col1 * - 84 FROM tab2
----
-112812
-18228
-386568

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5914
SELECT DISTINCT + col2 * - col2 + - CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5914
SELECT DISTINCT + col2 * - col2 + - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - col1 * col2 * 42 + col0 AS col1 FROM tab0
----
-119172
-313315
-4039

onlyif mysql # use DIV operator for integer division
query I rowsort label-5916
SELECT DISTINCT 13 + col0 * + col1 + - 78 DIV tab0.col1 AS col2 FROM tab0
----
2077
3408
8112

skipif mysql # not compatible
query I rowsort label-5916
SELECT DISTINCT 13 + col0 * + col1 + - 78 / tab0.col1 AS col2 FROM tab0
----
2077
3408
8112

onlyif mysql # use DIV operator for integer division
query I rowsort label-5917
SELECT - cor0.col1 DIV + col0 - col1 * + col0 FROM tab0 AS cor0
----
-2067
-3397
-8100

skipif mysql # not compatible
query I rowsort label-5917
SELECT - cor0.col1 / + col0 - col1 * + col0 FROM tab0 AS cor0
----
-2067
-3397
-8100

query I rowsort
SELECT ALL + col0 + - col2 AS col1 FROM tab1 cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5920
SELECT col1 DIV 83 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5920
SELECT col1 / 83 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT - cor0.col2 + - 59 FROM tab0 AS cor0
----
-141
-60
-92

query I rowsort
SELECT ALL + col2 + 46 * + 33 + + col1 FROM tab0 AS cor0
----
1616
1637
1691

query I rowsort
SELECT + ( + 41 ) * cor1.col2 * + 18 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 62b3c4d4fa5673656ce1eb0f66513fcc

query I rowsort
SELECT DISTINCT + col1 + - ( + col2 ) * - col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - + 12 FROM tab1 cor0
----
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-5926
SELECT cor0.col0 DIV + col0 - - col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-5926
SELECT cor0.col0 / + col0 - - col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT + col1 * 76 + + col1 + ( col2 ) AS col2 FROM tab1 AS cor0
----
1097
2056
827

query I rowsort
SELECT - col2 + col2 * + col2 FROM tab2 AS cor0
----
1406
650
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - col2 ) col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + + cor0.col2 * col0 + - col1 AS col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + ( col0 ) * - col0 * ( ( + col2 ) * - col2 ) + cor0.col1 AS col1 FROM tab1 cor0
----
13307914
26270
58982413

query I rowsort
SELECT DISTINCT - 68 + col0 FROM tab0 cor0
----
-33
-44
21

query I rowsort
SELECT ALL + 71 + + 84 AS col1 FROM tab1 AS cor0
----
155
155
155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5934
SELECT ALL cor0.col2 + 85 * col1 * - CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
-175407
-288574
-688333

skipif mysql # not compatible
query I rowsort label-5934
SELECT ALL cor0.col2 + 85 * col1 * - CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
-175407
-288574
-688333

query I rowsort
SELECT DISTINCT - col1 * - col2 * 84 - - col2 * - 51 FROM tab2
----
127530
52326
68931

query I rowsort
SELECT + col1 + 33 - col0 * - col1 FROM tab0
----
2183
3525
8223

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5937
SELECT col0 + CAST( + 77 AS SIGNED ) * - col1 FROM tab2
----
-1230
-2380
-4465

skipif mysql # not compatible
query I rowsort label-5937
SELECT col0 + CAST ( + 77 AS INTEGER ) * - col1 FROM tab2
----
-1230
-2380
-4465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - - ( + col2 ) col1 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5939
SELECT + tab1.col0 DIV - 95 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5939
SELECT + tab1.col0 / - 95 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5940
SELECT ALL cor0.col1 DIV + col1 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5940
SELECT ALL cor0.col1 / + col1 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + 30 * - col2 * - ( 27 ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
-20982
-21863
-30701

query I rowsort
SELECT DISTINCT + + cor0.col1 * - col1 + - col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT DISTINCT 49 + col0 * - 25 AS col1 FROM tab0 AS cor0
----
-2176
-551
-826

query I rowsort
SELECT + + 78 * col0 AS col1 FROM tab2 AS cor0
----
546
6084
6162

query I rowsort
SELECT DISTINCT - 80 + + cor0.col2 FROM tab0 AS cor0
----
-47
-79
2

query I rowsort
SELECT ALL + 65 AS col2 FROM tab0
----
65
65
65

query I rowsort
SELECT - 99 * 34 FROM tab0
----
-3366
-3366
-3366

query I rowsort
SELECT 64 * - col0 FROM tab1
----
-192
-4096
-5120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col2 + + col1 col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col0 + col1 + col0 * + col1 * + col0 AS col2 FROM tab2 AS cor0
----
106193
1557
359093

query I rowsort
SELECT DISTINCT + col0 * - tab0.col2 * + col2 AS col1 FROM tab0
----
-26136
-35
-598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - cor0.col0 * - col2 col1 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT col2 * + col0 * col2 AS col0 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT - - col2 * col2 * + col1 + - col0 AS col0 FROM tab2 AS cor0
----
22592
24469
39806

query I rowsort
SELECT ALL - col1 + col1 * + col2 FROM tab1 cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT + col1 + - cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col0 * + cor0.col1 * - col0 col2 FROM tab1 AS cor0
----
180
40903
83104

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col0 col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col2 * - col1 + col1 AS col0 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT - cor0.col0 * col2 + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL + col0 + col1 * col1 AS col0 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT + col2 * - col2 - + col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT + + col1 * col2 + col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT + - col1 + col0 * + col2 AS col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - 87 + col0 * col2 FROM tab1
----
3561
75
7593

onlyif mysql # use DIV operator for integer division
query I rowsort label-5967
SELECT 63 + + col0 DIV col2 FROM tab0 AS cor0
----
63
64
98

skipif mysql # not compatible
query I rowsort label-5967
SELECT 63 + + col0 / col2 FROM tab0 AS cor0
----
63
64
98

query I rowsort
SELECT DISTINCT col1 * - col2 * - col2 FROM tab0 cor0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 31 + col2 col1 FROM tab2 AS cor0
----
57
58
69

query I rowsort
SELECT ALL + 35 + - col0 AS col0 FROM tab1 AS cor0
----
-29
-45
32

query I rowsort
SELECT ALL col1 * col2 * col2 AS col1 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT 83 * col0 FROM tab1 AS cor0
----
249
5312
6640

query I rowsort
SELECT ALL + col1 + - col0 + - cor0.col2 * + col0 AS col0 FROM tab1 AS cor0
----
-139
-3702
-7747

query I rowsort
SELECT DISTINCT + col1 * col1 * - col1 + col2 AS col1 FROM tab2 AS cor0
----
-205353
-29764
-4875

onlyif mysql # use DIV operator for integer division
query I rowsort label-5975
SELECT + tab1.col2 + + tab1.col2 * col1 DIV - col2 FROM tab1
----
28
47
83

skipif mysql # not compatible
query I rowsort label-5975
SELECT + tab1.col2 + + tab1.col2 * col1 / - col2 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT tab2.col0 / col1 FROM tab2 WHERE NULL NOT IN ( - col1 )
----

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 WHERE ( - col2 + col1 ) <> col0
----
-10
-13
-26

query I rowsort
SELECT - col1 FROM tab0 WHERE NOT NULL IN ( col1 )
----

query I rowsort
SELECT + col0 * + col0 * col2 + col2 FROM tab2 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT DISTINCT col2 * col1 * col2 AS col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT col1 * + col1 + col2 * + col2 + + col2 * tab2.col2 AS col1 FROM tab2
----
2419
3177
4833

query I rowsort
SELECT ALL + col1 * col2 + col0 FROM tab2
----
1612
725
844

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE tab1.col0 <= ( + col0 + col1 * col1 + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT + col2 * - col2 + - col2 AS col0 FROM tab2
----
-1482
-702
-756

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) NOT BETWEEN NULL AND col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5986
SELECT DISTINCT col0 + col0 DIV col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5986
SELECT DISTINCT col0 + col0 / col1 FROM tab0
----
24
35
89

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT BETWEEN col2 / col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5988
SELECT - tab2.col2 + + tab2.col0 * col0 DIV col0 AS col2 FROM tab2
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-5988
SELECT - tab2.col2 + + tab2.col0 * col0 / col0 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT col0 * tab2.col2 + - col1 FROM tab2
----
158
1969
2985

query III rowsort
SELECT * FROM tab2 WHERE - col2 = col1
----

query I rowsort
SELECT DISTINCT - tab0.col0 - - tab0.col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
2
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5992
SELECT col2 * + col1 + - cor0.col2 * col2 DIV col0 AS col1 FROM tab0 AS cor0
----
2793
7387
97

skipif mysql # not compatible
query I rowsort label-5992
SELECT col2 * + col1 + - cor0.col2 * col2 / col0 AS col1 FROM tab0 AS cor0
----
2793
7387
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5993
SELECT ALL col2 DIV - col1 + - col2 + - col0 AS col2 FROM tab0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-5993
SELECT ALL col2 / - col1 + - col2 + - col0 AS col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT - col0 + col2 * col2 AS col1 FROM tab2
----
1365
598
722

query I rowsort
SELECT ALL - col2 * col1 + - col2 AS col0 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT + col2 * - col1 * col0 + tab1.col0 * + col1 AS col2 FROM tab1
----
-35840
-4134
-98800

query I rowsort
SELECT ALL - col0 * - col1 + + col0 * col2 AS col2 FROM tab1
----
240
4288
8720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col0 FROM tab0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col0 * col0 + + col1 * + cor0.col2 AS col1 FROM tab0 cor0
----
1322
15383
3414

query I rowsort
SELECT col1 * + col1 + - col0 * cor0.col1 + col2 * col0 AS col2 FROM tab2 AS cor0
----
1948
907
933

query I rowsort
SELECT col0 AS col1 FROM tab1 WHERE NOT NULL BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6002
SELECT DISTINCT col0 DIV col1 + - col0 FROM tab2 AS cor0
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-6002
SELECT DISTINCT col0 / col1 + - col0 FROM tab2 AS cor0
----
-7
-75
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 28 col1 FROM tab2 AS cor0
----
28
28
28

query I rowsort
SELECT DISTINCT - 53 * + col0 + cor0.col1 * + col0 + col1 * - 30 * 23 AS col0 FROM tab0 AS cor0
----
-58548
-59408
-65390

query I rowsort
SELECT + col0 * - col2 + col0 * 22 + col1 FROM tab1 AS cor0
----
-2230
-5907
-70

query I rowsort
SELECT ALL 91 + col2 * + 49 AS col0 FROM tab1 AS cor0
----
2737
2884
4795

query I rowsort
SELECT col1 * col1 - + ( - 32 ) AS col2 FROM tab2 AS cor0
----
321
3513
993

query I rowsort
SELECT + + 66 + col2 AS col1 FROM tab1 cor0
----
120
123
162

query I rowsort
SELECT 53 + cor0.col1 * + 88 FROM tab2 AS cor0
----
1549
2781
5245

query I rowsort
SELECT DISTINCT ( 22 ) AS col2 FROM tab0
----
22

query I rowsort
SELECT + - col2 - + col2 AS col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL col2 + col1 * - 55 FROM tab0 AS cor0
----
-4697
-4923
-5334

query I rowsort
SELECT - col2 * col1 + - cor0.col0 FROM tab1 AS cor0
----
-1328
-1407
-634

onlyif mysql # use DIV operator for integer division
query I rowsort label-6014
SELECT - tab1.col2 DIV + col0 AS col1 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-6014
SELECT - tab1.col2 / + col0 AS col1 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT + col2 + - 23 * col2 AS col2 FROM tab0 AS cor0
----
-1804
-22
-726

query I rowsort
SELECT DISTINCT - col1 + tab0.col2 - col1 FROM tab0
----
-100
-139
-193

query I rowsort
SELECT ALL + 43 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to f99537dcc805430f79ac82ef70a4bd59

query I rowsort
SELECT + cor1.col0 FROM tab2 cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6020
SELECT + CAST( - col0 * col0 AS SIGNED ) col1 FROM tab2
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6020
SELECT + CAST ( - col0 * col0 AS INTEGER ) col1 FROM tab2
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6021
SELECT + CAST( + col1 AS SIGNED ) - - col2 col2 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6021
SELECT + CAST ( + col1 AS INTEGER ) - - col2 col2 FROM tab0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6022
SELECT DISTINCT - CAST( col0 AS SIGNED ) AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6022
SELECT DISTINCT - CAST ( col0 AS INTEGER ) AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - + ( - col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - tab2.col2 AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * ( - col0 ) col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 83 * col0 AS col2 FROM tab0 AS cor0
----
1992
2905
7387

query I rowsort
SELECT 77 * cor0.col2 AS col0 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT DISTINCT - 54 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
-1296
-1890
-4806

query I rowsort
SELECT 32 + col0 FROM tab2
----
110
111
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + tab2.col1 ) col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6031
SELECT DISTINCT + col0 * col2 + + ( col2 ) DIV + col1 AS col0 FROM tab1 AS cor0
----
164
3653
7687

skipif mysql # not compatible
query I rowsort label-6031
SELECT DISTINCT + col0 * col2 + + ( col2 ) / + col1 AS col0 FROM tab1 AS cor0
----
164
3653
7687

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col0 ) col2 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6033
SELECT DISTINCT + col2 - col0 DIV - 85 col1 FROM tab0 AS cor0
----
1
33
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6033
SELECT DISTINCT + col2 - col0 / - 85 col1 FROM tab0 AS cor0
----
1
33
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + ( col2 ) * col2 + - 95 * col0 AS col2 FROM tab0 AS cor0
----
-1191
-1731
-3324

query I rowsort
SELECT DISTINCT + ( - col2 ) * - col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col0 + col0 * cor0.col1 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6038
SELECT + CAST( NULL AS SIGNED ) FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6038
SELECT + CAST ( NULL AS INTEGER ) FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ( col1 ) + - cor0.col0 * ( - col1 ) AS col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-6040
SELECT col0 + + col2 DIV - col2 - col0 AS col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6040
SELECT col0 + + col2 / - col2 - col0 AS col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT col2 + - ( col2 ) AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6042
SELECT DISTINCT - - col0 * + col0 DIV + col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-6042
SELECT DISTINCT - - col0 * + col0 / + col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + - cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - + 20 AS col2 FROM tab1 AS cor0
----
-20
-20
-20

query I rowsort
SELECT ( ( col2 ) ) * - col1 + col0 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT 24 * col1 + - col0 FROM tab0 AS cor0
----
2040
2095
2293

query I rowsort
SELECT ALL - + 67 + + col1 * col0 AS col0 FROM tab1 AS cor0
----
11
573
973

query I rowsort
SELECT + col0 * col1 + 29 * - col0 AS col0 FROM tab1
----
-1216
-1280
-9

query I rowsort
SELECT ALL + col0 * tab0.col0 + + col1 * + col1 FROM tab0
----
10634
16202
7972

query I rowsort
SELECT DISTINCT + + col1 + - ( 51 ) AS col0 FROM tab2 cor0
----
-20
-34
8

query I rowsort
SELECT ALL - - col1 * + cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - 48 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 15 col2 FROM tab1 AS cor0
----
150
195
390

query I rowsort
SELECT DISTINCT cor1.col0 * tab1.col2 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
9 values hashing to 844087611670bb7fd62286733e4f81ac

query I rowsort
SELECT DISTINCT + 3 + ( cor1.col2 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
57
60
99

query I rowsort
SELECT ALL + 36 * - 44 + tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to b91753d5793f61d79471bcda0c81d15e

query I rowsort
SELECT DISTINCT + cor0.col1 + 25 AS col1 FROM tab2 cor0
----
42
56
84

query I rowsort
SELECT ALL + col1 + + cor0.col1 * + ( col2 ) FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + col2 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - 25 + col2 + col1 * + ( tab1.col1 ) FROM tab1
----
132
240
705

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6061
SELECT CAST( NULL AS SIGNED ) - + col0 * + col1 * tab0.col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6061
SELECT CAST ( NULL AS INTEGER ) - + col0 * + col1 * tab0.col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 5 + tab1.col0 * tab1.col0 AS col0 FROM tab1
----
4
4091
6395

query I rowsort
SELECT tab0.col2 * + tab0.col1 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

query I rowsort
SELECT DISTINCT ( col1 * col0 ) + - col0 + col1 AS col0 FROM tab2
----
1281
241
4583

query I rowsort
SELECT DISTINCT - 29 + - col0 AS col1 FROM tab2
----
-107
-108
-36

query I rowsort
SELECT - 8 + ( tab0.col1 + - col2 ) AS col1 FROM tab0
----
1
45
88

query I rowsort
SELECT DISTINCT - tab2.col0 + tab2.col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL col2 + - col1 * - col1 * + 79 FROM tab0
----
584317
654281
743312

query I rowsort
SELECT ALL + + 76 * - 50 AS col0 FROM tab1 AS cor0
----
-3800
-3800
-3800

query I rowsort
SELECT + - 5 * 56 AS col2 FROM tab2 AS cor0
----
-280
-280
-280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6071
SELECT tab0.col2 * col2 + col0 + CAST( col1 AS SIGNED ) * col2 AS col2 FROM tab0
----
133
14275
3951

skipif mysql # not compatible
query I rowsort label-6071
SELECT tab0.col2 * col2 + col0 + CAST ( col1 AS INTEGER ) * col2 AS col2 FROM tab0
----
133
14275
3951

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6072
SELECT ( + 95 ) * col1 * - 94 + ( - col0 ) + - CAST( - col0 + - col0 AS SIGNED ) FROM tab0
----
-767956
-812541
-866175

skipif mysql # not compatible
query I rowsort label-6072
SELECT ( + 95 ) * col1 * - 94 + ( - col0 ) + - CAST ( - col0 + - col0 AS INTEGER ) FROM tab0
----
-767956
-812541
-866175

query I rowsort
SELECT DISTINCT - tab2.col0 + + 64 FROM tab2
----
-14
-15
57

query I rowsort
SELECT ALL - cor0.col1 * - col0 * - col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + ( - col2 ) * 27 FROM tab2 AS cor0
----
-1026
-702
-729

query I rowsort
SELECT ( + col1 ) + cor0.col0 + col0 * col0 AS col1 FROM tab1 AS cor0
----
38
4170
6493

query I rowsort
SELECT ALL - 9 AS col2 FROM tab0 AS cor0
----
-9
-9
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6078
SELECT ALL col0 * - col0 + + col0 DIV cor0.col1 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-6078
SELECT ALL col0 * - col0 + + col0 / cor0.col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + + 39 - col0 AS col0 FROM tab0 cor0
----
-50
15
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 col1 FROM tab1
----
24
24
24

query I rowsort
SELECT DISTINCT - - 59 * + col2 AS col1 FROM tab2 AS cor0
----
1534
1593
2242

query I rowsort
SELECT + col0 * col2 + - 29 FROM tab1 AS cor0
----
133
3619
7651

query I rowsort
SELECT col1 * + col1 + + 9 AS col0 FROM tab2 AS cor0
----
298
3490
970

query I rowsort
SELECT 7 * - col2 AS col0 FROM tab1 AS cor0
----
-378
-399
-672

query I rowsort
SELECT DISTINCT - 54 * cor0.col0 FROM tab1 AS cor0
----
-162
-3456
-4320

query I rowsort
SELECT DISTINCT - col0 + + col2 - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1080
-35
-6731

query I rowsort
SELECT DISTINCT - + cor0.col1 + + col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6088
SELECT + col0 * col1 + - CAST( NULL AS SIGNED ) * col0 * cor0.col0 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6088
SELECT + col0 * col1 + - CAST ( NULL AS INTEGER ) * col0 * cor0.col0 col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 70 + col2 AS col2 FROM tab0 AS cor0
----
103
152
71

query I rowsort
SELECT col2 * tab1.col2 * - 73 FROM tab1
----
-212868
-237177
-672768

query I rowsort
SELECT DISTINCT - - col1 * col1 + 98 AS col2 FROM tab1 AS cor0
----
198
267
774

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6092
SELECT - + col0 + - CAST( NULL AS SIGNED ) + 85 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6092
SELECT - + col0 + - CAST ( NULL AS INTEGER ) + 85 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + ( + col2 ) * - cor0.col0 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6094
SELECT col0 * - CAST( col1 AS SIGNED ) col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6094
SELECT col0 * - CAST ( col1 AS INTEGER ) col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6095
SELECT - col0 DIV cor0.col0 - + col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-6095
SELECT - col0 / cor0.col0 - + col2 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT ALL + 17 * col2 + col1 FROM tab2 AS cor0
----
490
501
663

query I rowsort
SELECT ALL + 39 + - col2 * col2 AS col1 FROM tab0 AS cor0
----
-1050
-6685
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 50 col0 FROM tab2 AS cor0
----
50
50
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-6099
SELECT - ( - col2 ) + + col2 DIV + 42 + col1 FROM tab2 cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-6099
SELECT - ( - col2 ) + + col2 / + 42 + col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT - - col0 + - 38 AS col0 FROM tab1 AS cor0
----
-35
26
42

query I rowsort
SELECT ALL - col2 + 26 FROM tab1 AS cor0
----
-28
-31
-70

query I rowsort
SELECT - - 47 * col1 AS col2 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT - ( - col1 ) * col0 * - col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - ( - col1 ) * + col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + ( col0 ) + col1 * + col1 + - col2 AS col2 FROM tab1 cor0
----
107
153
625

onlyif mysql # use DIV operator for integer division
query I rowsort label-6106
SELECT ALL - ( - 73 ) DIV col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6106
SELECT ALL - ( - 73 ) / col1 AS col2 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6107
SELECT DISTINCT col2 DIV + ( + tab0.col2 * ( - tab0.col2 ) ) AS col2 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6107
SELECT DISTINCT col2 / + ( + tab0.col2 * ( - tab0.col2 ) ) AS col2 FROM tab0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6108
SELECT - col1 DIV ( + col1 + col1 ) col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6108
SELECT - col1 / ( + col1 + col1 ) col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col0 + - col2 AS col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 + + ( + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL - - col0 * + 4 FROM tab0 AS cor0
----
140
356
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + ( - col2 ) + col1 col1 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT - + col2 + ( col0 ) AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + - col1 * + 64 AS col2 FROM tab2 AS cor0
----
-1088
-1984
-3776

query I rowsort
SELECT ALL cor0.col0 + 80 FROM tab1 AS cor0
----
144
160
83

query I rowsort
SELECT ALL - 53 * - cor0.col2 * - cor0.col0 + - col1 AS col1 FROM tab2 AS cor0
----
-10048
-107543
-159123

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col1 ) * - col2 + + ( col2 ) col0 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT + + ( - col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - col0 * + col0 + + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - 85 + col2 * col0 AS col2 FROM tab2 cor0
----
104
1943
2917

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-10
-13
-26

query I rowsort
SELECT ALL + 73 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT + + 58 AS col0 FROM tab0 AS cor0
----
58
58
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-6124
SELECT DISTINCT col0 + tab0.col0 DIV col0 AS col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6124
SELECT DISTINCT col0 + tab0.col0 / col0 AS col0 FROM tab0
----
25
36
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6125
SELECT ALL + cor0.col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6125
SELECT ALL + cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6126
SELECT DISTINCT + col1 DIV + 81 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6126
SELECT DISTINCT + col1 / + 81 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + + cor0.col1 * + 73 FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT ALL + 96 + tab0.col0 * + col2 AS col0 FROM tab0
----
131
7394
888

query I rowsort
SELECT DISTINCT + col2 + col2 * col1 FROM tab2
----
1560
684
864

query I rowsort
SELECT - col0 * 11 + 88 FROM tab1
----
-616
-792
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-6131
SELECT ALL cor0.col0 + cor0.col1 * cor0.col1 DIV + col2 col1 FROM tab0 cor0
----
189
248
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6131
SELECT ALL cor0.col0 + cor0.col1 * cor0.col1 / + col2 col1 FROM tab0 cor0
----
189
248
9444

query I rowsort
SELECT col1 * 78 AS col2 FROM tab0 AS cor0
----
6708
7098
7566

query I rowsort
SELECT col2 * - 55 + + col0 FROM tab0 AS cor0
----
-1791
-20
-4421

query I rowsort
SELECT ALL col0 + + ( col2 ) AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col1 * 44 - + col1 FROM tab0 AS cor0
----
3698
3913
4171

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6136
SELECT DISTINCT - CAST( NULL AS DECIMAL ) / - col2 - col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6136
SELECT DISTINCT - CAST ( NULL AS REAL ) / - col2 - col2 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6137
SELECT - tab1.col0 DIV col1 AS col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-6137
SELECT - tab1.col0 / col1 AS col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT col0 * 68 AS col1 FROM tab2
----
476
5304
5372

query I rowsort
SELECT tab1.col2 * tab1.col1 - - col1 FROM tab1
----
1261
1430
580

query I rowsort
SELECT ALL + col1 - col0 * + col1 * col2 FROM tab0
----
-3298
-664027
-68026

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6141
SELECT + CAST( NULL AS SIGNED ) * col1 - - col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6141
SELECT + CAST ( NULL AS INTEGER ) * col1 - - col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 - 56 FROM tab0 AS cor0
----
-23
-55
26

query I rowsort
SELECT ALL - 46 - col2 AS col1 FROM tab2 AS cor0
----
-72
-73
-84

query I rowsort
SELECT ALL - 45 + - col1 AS col0 FROM tab1 AS cor0
----
-55
-58
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-6145
SELECT DISTINCT cor0.col1 DIV col1 + + col1 * - 39 FROM tab2 AS cor0
----
-1208
-2300
-662

skipif mysql # not compatible
query I rowsort label-6145
SELECT DISTINCT cor0.col1 / col1 + + col1 * - 39 FROM tab2 AS cor0
----
-1208
-2300
-662

query I rowsort
SELECT ALL + col0 * - col2 + col0 + - col1 AS col1 FROM tab0 cor0
----
-7300
-854
-97

query I rowsort
SELECT - col2 * col2 * ( col2 * col2 ) + + 75 FROM tab2 AS cor0
----
-2085061
-456901
-531366

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6148
SELECT ALL - 28 * col2 * CAST( - 42 * col0 + - ( col1 ) * - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-149240
-504252
3222856

skipif mysql # not compatible
query I rowsort label-6148
SELECT ALL - 28 * col2 * CAST ( - 42 * col0 + - ( col1 ) * - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-149240
-504252
3222856

query I rowsort
SELECT DISTINCT col0 * ( col0 ) * ( col0 ) AS col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT - 97 * + 3 * tab2.col2 AS col1 FROM tab2
----
-11058
-7566
-7857

query I rowsort
SELECT ALL + col1 * col1 - - 88 * - col1 FROM tab1 AS cor0
----
-1612
-780
-975

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col2 ) col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - - col0 * col0 - + 78 FROM tab0 AS cor0
----
1147
498
7843

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT col0 + - 93 + cor0.col1 * 56 FROM tab1 AS cor0
----
1366
531
715

query I rowsort
SELECT DISTINCT 97 + - col0 AS col0 FROM tab0 AS cor0
----
62
73
8

query I rowsort
SELECT - col0 * - col2 + - col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - - 82 AS col0 FROM tab2 AS cor0
----
82

query I rowsort
SELECT ALL - ( 85 ) FROM tab1 AS cor0
----
-85
-85
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6160
SELECT ALL + CAST( NULL AS DECIMAL ) + - col2 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6160
SELECT ALL + CAST ( NULL AS REAL ) + - col2 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 * col2 * col0 FROM tab2 AS cor0
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 94 + col2 * col0 col1 FROM tab1 AS cor0
----
3554
68
7586

query I rowsort
SELECT DISTINCT + ( 4 ) AS col0 FROM tab2, tab1, tab1 AS cor0
----
4

query I rowsort
SELECT - col2 + + ( 20 ) * + col2 FROM tab0 AS cor0
----
1558
19
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6165
SELECT - - col2 * + CAST( NULL AS SIGNED ) + 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-6165
SELECT - - col2 * + CAST ( NULL AS INTEGER ) + col1 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 37 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT DISTINCT + cor0.col1 * + ( 6 ) - + cor0.col1 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT DISTINCT col1 * - col2 + col1 - cor0.col2 * + ( + col1 ) AS col1 FROM tab0 AS cor0
----
-14833
-5590
-97

query I rowsort
SELECT + - col1 - 19 FROM tab1 AS cor0
----
-29
-32
-45

query I rowsort
SELECT ALL - - col2 + 49 * col1 FROM tab0 AS cor0
----
4247
4541
4754

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 + CAST ( - col0 AS REAL ) / col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT + cor0.col0 - + col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT col2 * col2 + - ( col2 ) FROM tab0
----
0
1056
6642

onlyif mysql # use DIV operator for integer division
query I rowsort label-6174
SELECT ALL + col0 - col1 DIV 97 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6174
SELECT ALL + col0 - col1 / 97 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6175
SELECT ALL col1 - col1 DIV - 60 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-6175
SELECT ALL col1 - col1 / - 60 FROM tab0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6176
SELECT ALL + col2 DIV + col0 - col0 FROM tab1
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-6176
SELECT ALL + col2 / + col0 - col0 FROM tab1
----
-64
-79
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 + + cor0.col2 col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + + col1 col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - + col1 * - 49 FROM tab1 cor0
----
1274
490
637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6180
SELECT - col0 * CAST( + col0 AS SIGNED ) * - col1 - col2 FROM tab0 AS cor0
----
118824
49503
720729

skipif mysql # not compatible
query I rowsort label-6180
SELECT - col0 * CAST ( + col0 AS INTEGER ) * - col1 - col2 FROM tab0 AS cor0
----
118824
49503
720729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + + 70 col1 FROM tab1 AS cor0
----
80
83
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * 94 + + col1 col0 FROM tab1 AS cor0
----
5102
5368
9037

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 AS col2 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT ALL cor0.col1 - - col2 * - 38 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
1427
277415
30182

onlyif mysql # use DIV operator for integer division
query I rowsort label-6185
SELECT + col2 DIV 67 + col2 DIV col2 AS col0 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-6185
SELECT + col2 / 67 + col2 / col2 AS col0 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT DISTINCT col0 * + 81 + 83 FROM tab2
----
6401
6482
650

query I rowsort
SELECT DISTINCT + col1 * tab1.col2 + tab1.col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + - 83 * - col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
13446
302784
637440

query I rowsort
SELECT tab0.col0 + + col2 + col0 AS col0 FROM tab0
----
260
71
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6190
SELECT ALL - cor0.col2 * CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6190
SELECT ALL - cor0.col2 * CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( col1 ) col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT + 58 * + 59 FROM tab1, tab0 AS cor0
----
9 values hashing to b299c23b3900d709ba73964fe1ef01f5

query I rowsort
SELECT DISTINCT - + cor0.col2 + cor0.col1 * col1 AS col2 FROM tab0 cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 + + col2 col2 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6195
SELECT + - 46 * + col0 + - cor0.col0 DIV ( + col0 ) FROM tab0 AS cor0
----
-1105
-1611
-4095

skipif mysql # not compatible
query I rowsort label-6195
SELECT + - 46 * + col0 + - cor0.col0 / ( + col0 ) FROM tab0 AS cor0
----
-1105
-1611
-4095

query I rowsort
SELECT - 64 + 2 AS col2 FROM tab0 AS cor0
----
-62
-62
-62

query I rowsort
SELECT + ( + col2 * + col1 ) AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ( + cor0.col2 ) + - col0 * - col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + col2 * col1 + cor0.col1 AS col2 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT + - 31 * + 93 FROM tab0 AS cor0
----
-2883
-2883
-2883

query I rowsort
SELECT + col2 - col2 * col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 14 + 99 * cor1.col2 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e4bc200f9ec511ba1b59fac9d2608f1b

query I rowsort
SELECT ALL col1 + cor0.col2 * - 52 FROM tab2 AS cor0
----
-1293
-1373
-1959

query I rowsort
SELECT col1 * - col1 * + ( - col2 ) FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL - col0 * col1 + + cor0.col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT + 81 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2673
-6642
-81

query I rowsort
SELECT ALL + col1 * + col2 + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT col2 + - cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + col2 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - col1 * ( - col0 ) * - col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - - col0 * 16 AS col0 FROM tab1 cor0
----
1024
1280
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6212
SELECT + - col0 * + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6212
SELECT + - col0 * + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - col1 * + tab2.col1 + col2 AS col0 FROM tab2
----
205405
29818
4951

query I rowsort
SELECT - 3 AS col1 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 65b7e16aaa7821ace3a45a9846ffa166

query I rowsort
SELECT 20 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 8550664862df5be7a3d3f6037537d2d8

query I rowsort
SELECT DISTINCT 75 + - col0 AS col0 FROM tab1
----
-5
11
72

query I rowsort
SELECT 21 + col1 FROM tab0
----
107
112
118

query I rowsort
SELECT + col1 * + 35 * - col1 AS col0 FROM tab1 AS cor0
----
-23660
-3500
-5915

query I rowsort
SELECT + col2 * - 10 FROM tab0 cor0
----
-10
-330
-820

query I rowsort
SELECT DISTINCT col0 - - col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + col0 + - 72 AS col2 FROM tab1 AS cor0
----
-69
-8
8

query I rowsort
SELECT ALL col0 * - 36 + 38 FROM tab2 cor0
----
-214
-2770
-2806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + 62 col1 FROM tab1 cor0
----
1612
620
806

query I rowsort
SELECT DISTINCT col2 - + col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - col1 * col1 - + col0 AS col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT ALL + col1 + + 92 * - col0 FROM tab1 AS cor0
----
-250
-5878
-7347

query I rowsort
SELECT DISTINCT - - col0 + - col2 * - 20 FROM tab1 AS cor0
----
1083
1204
2000

onlyif mysql # use DIV operator for integer division
query I rowsort label-6228
SELECT DISTINCT - col0 * col0 DIV + col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6228
SELECT DISTINCT - col0 * col0 / + col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL col1 + col2 + tab1.col2 FROM tab1
----
124
134
205

query I rowsort
SELECT + col0 + - col2 + + col1 * - col1 AS col1 FROM tab0
----
-7405
-8274
-9375

onlyif mysql # use DIV operator for integer division
query I rowsort label-6231
SELECT + col1 DIV tab2.col1 + + col1 * tab2.col1 FROM tab2
----
290
3482
962

skipif mysql # not compatible
query I rowsort label-6231
SELECT + col1 / tab2.col1 + + col1 * tab2.col1 FROM tab2
----
290
3482
962

query I rowsort
SELECT col1 + + tab1.col2 * col1 - + col2 AS col2 FROM tab1
----
1165
1376
523

query I rowsort
SELECT - col2 FROM tab1 WHERE NOT col2 * col2 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab1 WHERE col2 = + col1
----

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab0 WHERE col0 * + col2 + col1 * col2 + + col0 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 WHERE NOT NULL IN ( - col1 / - col2 )
----

query I rowsort
SELECT DISTINCT col0 + - col0 * - col0 + - col2 FROM tab2
----
29
6136
6282

query I rowsort
SELECT col1 * + tab1.col2 + col0 FROM tab1
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 * col0 col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6240
SELECT ALL tab1.col1 + col0 DIV - col1 + col0 FROM tab1
----
29
68
87

skipif mysql # not compatible
query I rowsort label-6240
SELECT ALL tab1.col1 + col0 / - col1 + col0 FROM tab1
----
29
68
87

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 WHERE NOT + col2 + - col1 + + col2 <> NULL
----

query I rowsort
SELECT col1 * - col0 + - col0 FROM tab2
----
-1422
-224
-4680

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL NOT IN ( + col1 )
----

query I rowsort
SELECT ALL col1 + - col1 + col2 AS col2 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - tab1.col1 col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col0 AS col2 FROM tab0 WHERE NOT NULL IN ( - col0 )
----

query I rowsort
SELECT DISTINCT - col0 * - col2 * - tab2.col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT - - col1 * + col2 + - col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + tab0.col2 + col0 * + col1 col1 FROM tab0 WHERE ( col1 ) <> ( - col1 * + col2 * + col1 )
----
15397
2856
3430

query III rowsort
SELECT ALL * FROM tab1 WHERE ( col1 * col2 ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col0 * + col0 - col0 FROM tab0
----
1190
552
7832

query I rowsort
SELECT ALL + - ( col1 ) * 94 + col2 * + col2 - col1 AS col1 FROM tab0 AS cor0
----
-1921
-7081
-9214

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col2 <= NULL
----

query I rowsort
SELECT DISTINCT + col1 + col1 * col1 * col1 FROM tab2 AS cor0
----
205438
29822
4930

query I rowsort
SELECT ALL + - col0 * cor0.col0 + - col2 FROM tab2 cor0
----
-6110
-6279
-76

skipif mysql # not compatible
query I rowsort
SELECT ALL ( + col2 ) * col0 * col2 + col2 * + CAST ( - col1 AS REAL ) FROM tab1 cor0
----
207366
7344
736032

query I rowsort
SELECT DISTINCT - - 28 FROM tab2 AS cor0
----
28

query I rowsort
SELECT ALL - - 42 * col1 + + col2 FROM tab2 AS cor0
----
1329
2504
752

query I rowsort
SELECT DISTINCT col1 + col0 * col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - + col2 * col1 * + col2 + + 94 FROM tab0 AS cor0
----
-3
-611790
-93560

query I rowsort
SELECT DISTINCT 48 * col2 FROM tab0 AS cor0
----
1584
3936
48

query I rowsort
SELECT ALL + 93 * + col2 AS col1 FROM tab0 AS cor0
----
3069
7626
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6263
SELECT ALL ( col1 ) + ( col0 ) * - col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6263
SELECT ALL ( col1 ) + ( col0 ) * - col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * col1 + col2 + 40 AS col0 FROM tab2
----
-1468
-568
-770

query I rowsort
SELECT ALL 74 * - col1 AS col0 FROM tab2 cor0
----
-1258
-2294
-4366

query I rowsort
SELECT - col1 + col0 * - col1 FROM tab1 cor0
----
-104
-1053
-650

query I rowsort
SELECT - 89 * col1 FROM tab2 AS cor0
----
-1513
-2759
-5251

query I rowsort
SELECT ALL + col1 * - col1 * - col0 + col2 * col1 + - col2 AS col1 FROM tab1 AS cor0
----
14672
3378
6913

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6269
SELECT + col2 * col1 * - CAST( + 5 AS SIGNED ) AS col2 FROM tab1 cor0
----
-2850
-6240
-7020

skipif mysql # not compatible
query I rowsort label-6269
SELECT + col2 * col1 * - CAST ( + 5 AS INTEGER ) AS col2 FROM tab1 cor0
----
-2850
-6240
-7020

query I rowsort
SELECT DISTINCT + - 74 AS col1 FROM tab2 cor0
----
-74

query I rowsort
SELECT - col0 * ( - col2 ) + - col0 AS col1 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT - + cor0.col2 + - col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT col0 + + col1 * + ( + col2 ) FROM tab1
----
1328
1407
634

query I rowsort
SELECT - 34 - col1 * col1 AS col2 FROM tab0
----
-7430
-8315
-9443

query I rowsort
SELECT DISTINCT + 55 AS col1 FROM tab1, tab1 AS cor0
----
55

query I rowsort
SELECT ALL cor0.col1 + 38 * - col1 FROM tab1 AS cor0
----
-370
-481
-962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 2 col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + 93 + - 72 FROM tab2 AS cor0
----
21
21
21

query I rowsort
SELECT ALL + 91 - col1 AS col0 FROM tab1 AS cor0
----
65
78
81

query I rowsort
SELECT DISTINCT + - 66 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-6281
SELECT DISTINCT cor1.col1 DIV + ( cor1.col1 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
1

skipif mysql # not compatible
query I rowsort label-6281
SELECT DISTINCT cor1.col1 / + ( cor1.col1 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6282
SELECT ALL - 71 + tab0.col2 + - col2 * - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6282
SELECT ALL - 71 + tab0.col2 + - col2 * - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 6 - - col1 * col0 * - col0 AS col1 FROM tab2
----
-106091
-1513
-358950

query I rowsort
SELECT - cor0.col2 * cor0.col1 * cor1.col2 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a73367ecb1bb35150ef6d5aed78078b7

query I rowsort
SELECT DISTINCT - 13 + col0 AS col1 FROM tab1
----
-10
51
67

query I rowsort
SELECT + ( col2 ) + col2 + 7 FROM tab2
----
59
61
83

query I rowsort
SELECT + col2 * col1 * + col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT DISTINCT col2 + + col2 + col0 FROM tab0
----
253
37
90

query I rowsort
SELECT ALL - 13 + col2 + col1 * - col0 FROM tab1
----
-37
-596
-957

query I rowsort
SELECT - + col0 * col1 + - col0 FROM tab0 cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-6291
SELECT DISTINCT + col2 DIV - cor0.col1 AS col0 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6291
SELECT DISTINCT + col2 / - cor0.col1 AS col0 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT ALL - 29 + cor0.col2 FROM tab1 AS cor0
----
25
28
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-6293
SELECT + + col1 DIV cor0.col0 + col1 * + col0 * + col0 + + col0 FROM tab0 cor0
----
118862
49563
720901

skipif mysql # not compatible
query I rowsort label-6293
SELECT + + col1 / cor0.col0 + col1 * + col0 * + col0 + + col0 FROM tab0 cor0
----
118862
49563
720901

query I rowsort
SELECT ALL - 29 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-1102
-754
-783

query I rowsort
SELECT ALL 23 * - col2 + col0 + - col1 * col2 FROM tab2 AS cor0
----
-1441
-1451
-2054

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + - col0 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL col1 + col0 * col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - col1 + - col2 * - col0 * col0 + col0 AS col1 FROM tab1 AS cor0
----
233526
463
614467

query I rowsort
SELECT + 82 + tab2.col2 + + col2 FROM tab2
----
134
136
158

query I rowsort
SELECT - col2 * cor0.col2 + - col1 AS col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT - - col0 * - col0 + - col2 FROM tab1 AS cor0
----
-4153
-63
-6496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6302
SELECT DISTINCT CAST( NULL AS SIGNED ) + + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6302
SELECT DISTINCT CAST ( NULL AS INTEGER ) + + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + 44 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ALL + 55 + ( + col0 ) * - col0 AS col1 FROM tab0 AS cor0
----
-1170
-521
-7866

query I rowsort
SELECT + cor0.col0 + col2 * - col1 FROM tab2 cor0
----
-1456
-567
-830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6306
SELECT - CAST( NULL AS DECIMAL ) * - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6306
SELECT - CAST ( NULL AS REAL ) * - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 + ( + col2 ) + + col0 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT 38 * col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT ALL col1 + - 84 * cor0.col0 AS col1 FROM tab2 cor0
----
-557
-6493
-6619

query I rowsort
SELECT + col0 * col1 - - col2 AS col0 FROM tab0 cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-6311
SELECT - - col2 DIV col2 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6311
SELECT - - col2 / col2 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL col0 * 78 AS col1 FROM tab2
----
546
6084
6162

query I rowsort
SELECT - col0 + col1 - + col2 AS col0 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT + + ( - col0 ) * + col0 * col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT col0 * col0 + + col0 * - col1 FROM tab2 AS cor0
----
-168
1482
4898

onlyif mysql # use DIV operator for integer division
query I rowsort label-6316
SELECT + 35 DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-6316
SELECT + 35 / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL - cor0.col0 FROM tab2, tab0, tab0 cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6318
SELECT CAST( NULL AS SIGNED ) * col1 * + col2 + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6318
SELECT CAST ( NULL AS INTEGER ) * col1 * + col2 + col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6319
SELECT ALL + tab1.col0 DIV col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6319
SELECT ALL + tab1.col0 / col0 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab2, tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - ( + 52 ) FROM tab0
----
-52

query I rowsort
SELECT ALL ( 61 ) FROM tab0
----
61
61
61

query I rowsort
SELECT ALL ( - 57 ) * col0 AS col0 FROM tab0
----
-1368
-1995
-5073

query I rowsort
SELECT + col0 + col0 AS col0 FROM tab1 AS cor0 WHERE col0 + col0 BETWEEN - col1 AND ( col1 * col1 - col2 )
----
6

query I rowsort
SELECT DISTINCT + col1 / - col0 FROM tab1 WHERE NULL <> - col0
----

query I rowsort
SELECT + tab1.col2 * col2 FROM tab1 WHERE NOT ( NULL ) BETWEEN + col0 AND ( + col0 * - tab1.col0 )
----

query IIIIII rowsort
SELECT * FROM tab0, tab1 cor0 WHERE NULL NOT BETWEEN ( NULL ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6328
SELECT col2 DIV + col1 - tab2.col2 * col2 col1 FROM tab2
----
-1442
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6328
SELECT col2 / + col1 - tab2.col2 * col2 col1 FROM tab2
----
-1442
-676
-729

query I rowsort
SELECT DISTINCT col1 + - tab2.col1 * - col1 AS col0 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT - col0 * + col0 * tab0.col2 AS col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT col2 * - col2 + col1 * col1 FROM tab2
----
-1155
232
2805

onlyif mysql # use DIV operator for integer division
query I rowsort label-6332
SELECT - col1 DIV col0 - - col2 AS col2 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-6332
SELECT - col1 / col0 - - col2 AS col2 FROM tab1
----
46
57
96

query I rowsort
SELECT - col0 FROM tab0 WHERE NOT NULL < col2 * + col0
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT + col1 NOT IN ( + col2 )
----

query I rowsort
SELECT ALL tab2.col0 * - tab2.col1 + + col1 AS col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT ALL + tab2.col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT col2 * + col2 * col2 AS col1 FROM tab0
----
1
35937
551368

query I rowsort
SELECT - cor0.col1 * - col1 + col0 FROM tab2 AS cor0
----
3559
368
968

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab1 AS cor0 WHERE NOT ( NULL ) = ( NULL )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE + col2 * col0 + col2 > col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT * FROM tab2 WHERE ( + col0 * - col0 + + col0 ) BETWEEN + col2 + col2 AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col1 col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + col1 * ( col2 ) AS col1 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 86 * - col1 col0 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT ALL - 86 - - col1 FROM tab2 cor0
----
-27
-55
-69

query I rowsort
SELECT ALL + + cor0.col0 + col1 + col1 FROM tab1 AS cor0
----
106
55
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6347
SELECT DISTINCT CAST( NULL AS SIGNED ) - 78 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6347
SELECT DISTINCT CAST ( NULL AS INTEGER ) - 78 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + ( + ( - cor0.col0 ) ) * 58 + - col0 AS col1 FROM tab1 AS cor0
----
-177
-3776
-4720

query I rowsort
SELECT DISTINCT - + col2 + + 53 * col2 * - 54 FROM tab1 AS cor0
----
-154602
-163191
-274848

query I rowsort
SELECT col1 + ( + col2 ) AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT ALL + 92 + - 19 AS col2 FROM tab2 cor0
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 * - col2 + col0 col0 FROM tab1 AS cor0
----
-2319
-2387
-4048

query I rowsort
SELECT 10 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ALL - col2 * - tab1.col1 + + col0 FROM tab1
----
1328
1407
634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6355
SELECT + 93 * + 82 + - col0 * CAST( cor0.col2 * - col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
16374
215562
744906

skipif mysql # not compatible
query I rowsort label-6355
SELECT + 93 * + 82 + - col0 * CAST ( cor0.col2 * - col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
16374
215562
744906

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6356
SELECT CAST( + col1 AS SIGNED ) AS col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6356
SELECT CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL + ( 6 ) * + col2 FROM tab1 AS cor0
----
324
342
576

query I rowsort
SELECT - col2 * 61 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2046
-5084
-62

query I rowsort
SELECT - col2 * - col0 + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - - col0 + 6 * + cor0.col2 FROM tab1 AS cor0
----
327
406
656

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT - - cor0.col1 + + col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + col0 * ( cor0.col1 ) + cor0.col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT - col0 * cor0.col0 + 98 AS col1 FROM tab1 AS cor0
----
-3998
-6302
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - 16 + + col1 col0 FROM tab0 AS cor0
----
-1290
-1365
-1455

query I rowsort
SELECT DISTINCT col0 + ( - col0 ) AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + - cor0.col0 + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6368
SELECT + col1 DIV + ( + col0 ) AS col2 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6368
SELECT + col1 / + ( + col0 ) AS col2 FROM tab2
----
0
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6369
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6369
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6370
SELECT ALL + col2 + - 47 * + col0 DIV + col0 FROM tab2 AS cor0
----
-20
-21
-9

skipif mysql # not compatible
query I rowsort label-6370
SELECT ALL + col2 + - 47 * + col0 / + col0 FROM tab2 AS cor0
----
-20
-21
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 0 col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + 42 AS col1 FROM tab0 AS cor0
----
-1386
-3444
-42

query I rowsort
SELECT + col2 * - col0 * - col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL + col2 * - 83 * - col0 AS col1 FROM tab0 AS cor0
----
2905
605734
65736

query I rowsort
SELECT ALL + + 21 AS col1 FROM tab0 AS cor0
----
21
21
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6376
SELECT ALL + 76 DIV + col0 + col1 AS col2 FROM tab1 AS cor0
----
11
13
51

skipif mysql # not compatible
query I rowsort label-6376
SELECT ALL + 76 / + col0 + col1 AS col2 FROM tab1 AS cor0
----
11
13
51

query I rowsort
SELECT + 52 * - col0 AS col1 FROM tab0 AS cor0
----
-1248
-1820
-4628

query I rowsort
SELECT DISTINCT + - 13 * - ( col0 ) AS col1 FROM tab0 AS cor0
----
1157
312
455

query I rowsort
SELECT col0 + ( + col1 ) * col2 + ( + col1 ) FROM tab0
----
229
2948
7642

query I rowsort
SELECT DISTINCT col1 + + 12 - col0 FROM tab2
----
-50
-7
36

query I rowsort
SELECT ALL - 98 + cor0.col2 * col1 AS col0 FROM tab0 cor0
----
-1
2740
7364

query I rowsort
SELECT DISTINCT + - 50 + col2 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
166
2004
2990

query I rowsort
SELECT DISTINCT + - col0 * col1 - - 3 * col2 * col0 FROM tab1 cor0
----
10304
22000
408

query I rowsort
SELECT - 34 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6385
SELECT col1 DIV cor0.col1 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6385
SELECT col1 / cor0.col1 FROM tab1 cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6386
SELECT DISTINCT + col2 * col1 + CAST( 81 AS SIGNED ) * + col1 + - cor0.col0 FROM tab1 AS cor0
----
1316
2221
3507

skipif mysql # not compatible
query I rowsort label-6386
SELECT DISTINCT + col2 * col1 + CAST ( 81 AS INTEGER ) * + col1 + - cor0.col0 FROM tab1 AS cor0
----
1316
2221
3507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 * + col0 + - col0 col1 FROM tab2 AS cor0
----
644
7176
7268

query I rowsort
SELECT DISTINCT + ( col2 + col2 * + col1 ) FROM tab1
----
1344
1458
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6389
SELECT col0 - + col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6389
SELECT col0 - + col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col2 + - col1 * - col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT ALL + col0 + + 47 AS col1 FROM tab2 cor0
----
125
126
54

query I rowsort
SELECT ALL col0 * - col2 + col2 * col1 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT col1 + tab0.col1 * ( col2 ) AS col2 FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6394
SELECT ALL + 27 DIV col1 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6394
SELECT ALL + 27 / col1 FROM tab2
----
0
0
1

query I rowsort
SELECT ALL tab2.col0 * + 35 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 041bd8a38e4a8610d022df2fab72a685

onlyif mysql # use DIV operator for integer division
query I rowsort label-6396
SELECT ALL + 93 DIV - col1 FROM tab2
----
-1
-3
-5

skipif mysql # not compatible
query I rowsort label-6396
SELECT ALL + 93 / - col1 FROM tab2
----
-1
-3
-5

query I rowsort
SELECT ALL ( col2 ) * col2 + cor0.col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT col0 + + tab2.col2 + ( col1 * col1 ) AS col0 FROM tab2
----
3585
406
995

query I rowsort
SELECT DISTINCT + 81 * - col1 FROM tab0
----
-6966
-7371
-7857

query I rowsort
SELECT DISTINCT ( cor1.col1 ) AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT - 40 FROM tab2, tab1 AS cor0
----
-40

query I rowsort
SELECT DISTINCT col0 + ( col0 ) FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 39 col1 FROM tab2 AS cor0
----
-273
-3042
-3081

query I rowsort
SELECT + cor0.col1 + col0 * col2 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-6405
SELECT DISTINCT CAST( ( + col2 ) AS SIGNED ) DIV col2 AS col0 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-6405
SELECT DISTINCT CAST ( ( + col2 ) AS INTEGER ) / col2 AS col0 FROM tab1 cor0
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6406
SELECT + - CAST( NULL AS SIGNED ) / - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6406
SELECT + - CAST ( NULL AS INTEGER ) / - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 59 * + col0 AS col1 FROM tab2 AS cor0
----
413
4602
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-6408
SELECT DISTINCT - - 1 DIV col1 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6408
SELECT DISTINCT - - 1 / col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + ( col2 ) * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6410
SELECT CAST( NULL AS SIGNED ) * - 3 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6410
SELECT CAST ( NULL AS INTEGER ) * - 3 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - ( col1 ) AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT col1 - 29 FROM tab0
----
57
62
68

query I rowsort
SELECT + col2 + + 30 FROM tab1 AS cor0
----
126
84
87

query I rowsort
SELECT + 94 FROM tab0 cor0
----
94
94
94

query I rowsort
SELECT - - 45 + ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
123
124
52

query I rowsort
SELECT DISTINCT + - col0 + 50 FROM tab0 AS cor0
----
-39
15
26

query I rowsort
SELECT ( - 17 ) AS col2 FROM tab2
----
-17
-17
-17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6418
SELECT CAST( col1 AS SIGNED ) + - col0 * 19 FROM tab0 cor0
----
-1600
-370
-568

skipif mysql # not compatible
query I rowsort label-6418
SELECT CAST ( col1 AS INTEGER ) + - col0 * 19 FROM tab0 cor0
----
-1600
-370
-568

query I rowsort
SELECT + - 47 * 51 FROM tab2 AS cor0
----
-2397
-2397
-2397

query I rowsort
SELECT + - 52 + cor0.col2 FROM tab2 AS cor0
----
-14
-25
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 2 * - col0 col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - cor0.col2 + col0 * ( col2 ) AS col0 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-6423
SELECT + ( col0 ) * 91 DIV col2 col1 FROM tab0 AS cor0
----
3185
66
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6423
SELECT + ( col0 ) * 91 / col2 col1 FROM tab0 AS cor0
----
3185
66
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + 13 col0 FROM tab1 AS cor0
----
23
26
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + 49 col0 FROM tab0 AS cor0
----
135
140
146

query I rowsort
SELECT + - col2 * cor0.col2 + - col2 FROM tab2 cor0
----
-1482
-702
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 95 + - cor0.col1 col2 FROM tab2 AS cor0
----
-2529
-2596
-3627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6428
SELECT tab1.col1 DIV + col1 col1 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6428
SELECT tab1.col1 / + col1 col1 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) * + 78 col1 FROM tab2
----
-546
-6084
-6162

query I rowsort
SELECT ALL 13 - + 92 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

query I rowsort
SELECT 21 * - col1 AS col0 FROM tab0
----
-1806
-1911
-2037

query I rowsort
SELECT + col2 * - 11 + col2 * col2 FROM tab1 AS cor0
----
2322
2622
8160

query I rowsort
SELECT - - col1 - col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( col1 ) + + col1 FROM tab0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + cor0.col0 col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + tab2.col1 * - 19 FROM tab2
----
-1121
-323
-589

query I rowsort
SELECT ALL - col0 + + col1 * + col0 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL + + col1 * ( + ( + col1 ) * ( 74 ) ) + col1 * + 95 FROM tab1 AS cor0
----
13741
52494
8350

query I rowsort
SELECT DISTINCT col1 + + 33 * col2 FROM tab0 AS cor0
----
1175
130
2797

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
-35

query I rowsort
SELECT ALL + cor0.col2 * col0 * - ( + 56 ) FROM tab1 AS cor0
----
-204288
-430080
-9072

query I rowsort
SELECT ALL - cor0.col2 * - col1 AS col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-6443
SELECT ALL 43 * col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
43
43
43

skipif mysql # not compatible
query I rowsort label-6443
SELECT ALL 43 * col1 / cor0.col1 AS col2 FROM tab1 AS cor0
----
43
43
43

query I rowsort
SELECT ALL - - ( col0 ) * col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - + cor0.col2 - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT - col1 * + ( - col0 ) * cor0.col0 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-6447
SELECT - - col0 DIV col0 + - col2 + col0 AS col0 FROM tab1 AS cor0
----
-15
-50
8

skipif mysql # not compatible
query I rowsort label-6447
SELECT - - col0 / col0 + - col2 + col0 AS col0 FROM tab1 AS cor0
----
-15
-50
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6448
SELECT cor0.col2 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6448
SELECT cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6449
SELECT ALL col0 DIV - col1 - + col0 FROM tab1
----
-3
-70
-86

skipif mysql # not compatible
query I rowsort label-6449
SELECT ALL col0 / - col1 - + col0 FROM tab1
----
-3
-70
-86

query I rowsort
SELECT 41 + tab0.col2 * ( tab0.col1 ) * col1 + col1 AS col2 FROM tab0
----
244195
679174
9547

query I rowsort
SELECT ALL col0 + + col2 + col0 * - col1 AS col1 FROM tab1
----
-21
-519
-864

query I rowsort
SELECT + tab2.col2 - - col0 AS col1 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6453
SELECT DISTINCT ( + col2 ) * cor0.col0 DIV + col1 FROM tab1 AS cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-6453
SELECT DISTINCT ( + col2 ) * cor0.col0 / + col1 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT ALL 87 + col1 * + col2 AS col0 FROM tab2 AS cor0
----
1621
733
924

query I rowsort
SELECT ( + 95 ) FROM tab0 AS cor0
----
95
95
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6456
SELECT DISTINCT - 16 + ( + cor0.col1 * ( + cor0.col0 ) ) + + col1 DIV - ( - col1 ) AS col2 FROM tab2 AS cor0
----
1328
202
4587

skipif mysql # not compatible
query I rowsort label-6456
SELECT DISTINCT - 16 + ( + cor0.col1 * ( + cor0.col0 ) ) + + col1 / - ( - col1 ) AS col2 FROM tab2 AS cor0
----
1328
202
4587

query I rowsort
SELECT ALL cor0.col1 - col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 36 + - 41 FROM tab2 cor0
----
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6459
SELECT ALL + ( ( + col1 ) ) * col0 + col0 DIV col2 AS col0 FROM tab0 AS cor0
----
2064
3430
8100

skipif mysql # not compatible
query I rowsort label-6459
SELECT ALL + ( ( + col1 ) ) * col0 + col0 / col2 AS col0 FROM tab0 AS cor0
----
2064
3430
8100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col2 ) + 76 col2 FROM tab2, tab1 AS cor0
----
130
133
172

query I rowsort
SELECT - 0 * 12 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - + col2 * cor0.col0 * col2 AS col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT - 30 + - 50 FROM tab0 AS cor0
----
-80
-80
-80

query I rowsort
SELECT 70 - tab0.col1 FROM tab0
----
-16
-21
-27

query I rowsort
SELECT DISTINCT + 2 * 66 FROM tab1
----
132

query I rowsort
SELECT - ( + col1 + tab0.col1 ) FROM tab0
----
-172
-182
-194

query I rowsort
SELECT ALL col2 + col0 * - ( - 46 ) FROM tab1 AS cor0
----
192
3001
3776

onlyif mysql # use DIV operator for integer division
query I rowsort label-6468
SELECT DISTINCT col1 DIV - col1 + col0 * col2 FROM tab0 AS cor0
----
34
7297
791

skipif mysql # not compatible
query I rowsort label-6468
SELECT DISTINCT col1 / - col1 + col0 * col2 FROM tab0 AS cor0
----
34
7297
791

query I rowsort
SELECT ALL + 50 * - col2 - + col2 * 89 FROM tab1 cor0
----
-13344
-7506
-7923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + cor0.col2 col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + tab2.col0 AS col2 FROM tab2, tab0, tab0 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6472
SELECT ALL - 92 DIV + col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-13

skipif mysql # not compatible
query I rowsort label-6472
SELECT ALL - 92 / + col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-13

query I rowsort
SELECT + 52 + col2 AS col1 FROM tab0 AS cor0
----
134
53
85

query I rowsort
SELECT DISTINCT + + 22 + col0 FROM tab2 AS cor0
----
100
101
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 9 + - col1 col2 FROM tab1 AS cor0
----
-1
-17
-4

query I rowsort
SELECT DISTINCT - ( - col0 ) * col0 + col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL - - ( - col2 ) * col2 + col2 AS col1 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL + col0 + - col1 * col1 AS col1 FROM tab2
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-6479
SELECT - col1 + - 95 + col0 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
-104
-107
-120

skipif mysql # not compatible
query I rowsort label-6479
SELECT - col1 + - 95 + col0 / cor0.col0 AS col2 FROM tab1 AS cor0
----
-104
-107
-120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + - col0 * + col1 col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + + col1 * ( - col1 ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - - col1 * 30 FROM tab1 cor0
----
300
390
780

query I rowsort
SELECT + cor0.col0 + ( - col1 * col1 ) + cor0.col2 AS col0 FROM tab1 AS cor0
----
-619
21
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6484
SELECT DISTINCT col0 * + CAST( 59 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1416
2065
5251

skipif mysql # not compatible
query I rowsort label-6484
SELECT DISTINCT col0 * + CAST ( 59 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1416
2065
5251

query I rowsort
SELECT cor0.col2 * ( - cor0.col1 ) + col1 + col2 AS col1 FROM tab1 cor0
----
-1139
-1324
-503

query I rowsort
SELECT - col1 + + 44 FROM tab1 AS cor0
----
18
31
34

query I rowsort
SELECT ALL + col2 * col1 + - col0 * col0 * - 40 AS col2 FROM tab1 AS cor0
----
164410
1764
257248

query I rowsort
SELECT - col2 * cor0.col0 + cor0.col1 * - ( col1 ) + col1 AS col1 FROM tab2 cor0
----
-1119
-3274
-5450

query I rowsort
SELECT DISTINCT + 24 * + col0 - - col0 FROM tab2 AS cor0
----
175
1950
1975

query I rowsort
SELECT DISTINCT - + 24 * col2 + + col2 * + col0 - 66 FROM tab1 cor0
----
-1200
2214
5310

query I rowsort
SELECT + - 48 * col2 + cor0.col1 FROM tab0 cor0
----
-1498
-3845
49

query I rowsort
SELECT DISTINCT + + col0 + cor0.col0 * - col2 FROM tab1 cor0
----
-159
-3584
-7600

query I rowsort
SELECT + + 15 * col1 AS col1 FROM tab0 AS cor0
----
1290
1365
1455

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6494
SELECT + + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6494
SELECT + + CAST ( NULL AS REAL ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 19 + 89 FROM tab1 AS cor0
----
108
108
108

query I rowsort
SELECT - col2 + - ( - col2 * - 24 ) AS col0 FROM tab1 AS cor0
----
-1350
-1425
-2400

query I rowsort
SELECT + + col2 + + 1 FROM tab2 cor0
----
27
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6498
SELECT col1 DIV - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6498
SELECT col1 / - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6499
SELECT DISTINCT - ( col2 ) DIV col2 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-6499
SELECT DISTINCT - ( col2 ) / col2 FROM tab1
----
-1

query I rowsort
SELECT DISTINCT + 95 * col2 FROM tab2
----
2470
2565
3610

query I rowsort
SELECT + cor0.col1 * ( - col2 ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6502
SELECT + - col1 DIV col1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6502
SELECT + - col1 / col1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col1 * 48 + col2 FROM tab2 AS cor0
----
1515
2858
854

query I rowsort
SELECT DISTINCT - 26 AS col0 FROM tab2, tab1 cor0
----
-26

query I rowsort
SELECT + col2 + col2 * 38 FROM tab0 cor0
----
1287
3198
39

query I rowsort
SELECT ALL - ( + 20 ) + + cor0.col0 * - 9 FROM tab2, tab2 AS cor0
----
9 values hashing to 9fe46328682f2165a5a325e5ffbd3bb0

query I rowsort
SELECT col2 * - col1 + - ( + col1 ) * col2 AS col0 FROM tab0 AS cor0
----
-14924
-194
-5676

query I rowsort
SELECT col0 + col2 + tab0.col0 AS col0 FROM tab0
----
260
71
81

query I rowsort
SELECT + + 66 FROM tab1, tab0 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6510
SELECT ALL 66 * + col1 + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6510
SELECT ALL 66 * + col1 + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * - 94 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to bfa34bea1b8efa20269b4a97bb718e7c

query I rowsort
SELECT + 86 + - col0 AS col0 FROM tab1 AS cor0
----
22
6
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 15 col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT col0 + + 67 AS col1 FROM tab0 AS cor0
----
102
156
91

query I rowsort
SELECT DISTINCT col0 + 20 FROM tab2
----
27
98
99

query I rowsort
SELECT DISTINCT + - col1 + - col2 * + col1 + col0 FROM tab2 AS cor0
----
-1515
-584
-861

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - col2 - - ( - col1 ) col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT - col1 * + 27 FROM tab2 cor0
----
-1593
-459
-837

query I rowsort
SELECT - - cor0.col0 + ( col0 ) * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL + col0 * 76 AS col1 FROM tab1
----
228
4864
6080

onlyif mysql # use DIV operator for integer division
query I rowsort label-6521
SELECT 27 DIV - col2 col1 FROM tab0
----
-27
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6521
SELECT 27 / - col2 col1 FROM tab0
----
-27
0
0

query I rowsort
SELECT + 96 * - col1 AS col1 FROM tab1
----
-1248
-2496
-960

query I rowsort
SELECT DISTINCT + col2 * + tab2.col0 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT 30 * - cor0.col0 FROM tab1 AS cor0
----
-1920
-2400
-90

query I rowsort
SELECT DISTINCT 17 FROM tab2, tab2 AS cor0
----
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6526
SELECT + CAST( NULL AS SIGNED ) + 76 col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6526
SELECT + CAST ( NULL AS INTEGER ) + 76 col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 95 * col0 - - 42 AS col1 FROM tab2 AS cor0
----
-623
-7368
-7463

query I rowsort
SELECT cor0.col0 * - cor0.col0 - + col2 AS col1 FROM tab1 AS cor0
----
-4153
-63
-6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-6529
SELECT - 8 + col0 DIV + col1 FROM tab1 cor0
----
-2
-2
-8

skipif mysql # not compatible
query I rowsort label-6529
SELECT - 8 + col0 / + col1 FROM tab1 cor0
----
-2
-2
-8

query I rowsort
SELECT col1 * col0 - col0 * col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 51 * + col2 FROM tab2 AS cor0
----
1326
1377
1938

query I rowsort
SELECT + col0 * - 35 AS col1 FROM tab2
----
-245
-2730
-2765

query I rowsort
SELECT ALL + col2 * 67 + - col1 AS col2 FROM tab1
----
3592
3809
6419

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6534
SELECT - col1 * cor0.col2 + CAST( col0 AS SIGNED ) * col1 FROM tab1 AS cor0
----
-1326
-208
70

skipif mysql # not compatible
query I rowsort label-6534
SELECT - col1 * cor0.col2 + CAST ( col0 AS INTEGER ) * col1 FROM tab1 AS cor0
----
-1326
-208
70

query I rowsort
SELECT ALL ( 59 ) + col2 AS col0 FROM tab2
----
85
86
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6536
SELECT ALL + col1 DIV + tab1.col0 AS col2 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6536
SELECT ALL + col1 / + tab1.col0 AS col2 FROM tab1
----
0
0
8

query I rowsort
SELECT col0 + 12 * tab1.col1 FROM tab1
----
184
236
315

query I rowsort
SELECT DISTINCT col1 * ( col0 + + col1 ) FROM tab2
----
1178
1632
8083

query I rowsort
SELECT col1 * 98 AS col0 FROM tab0 cor0
----
8428
8918
9506

query I rowsort
SELECT - col1 * + 71 AS col0 FROM tab0 cor0
----
-6106
-6461
-6887

query I rowsort
SELECT ALL - 7 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT DISTINCT ( - 6 ) FROM tab0 AS cor0
----
-6

query I rowsort
SELECT DISTINCT + + 53 * col1 AS col1 FROM tab1 AS cor0
----
1378
530
689

query I rowsort
SELECT DISTINCT - col0 * ( + col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - - 17 * - col2 FROM tab0 AS cor0
----
-1394
-17
-561

query I rowsort
SELECT - col2 * col2 - - col1 FROM tab2 cor0
----
-1427
-617
-698

query I rowsort
SELECT + col2 + - col1 * - col0 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 65 col1 FROM tab0
----
5590
5915
6305

query I rowsort
SELECT cor0.col1 * - cor0.col0 * ( + col2 * cor0.col2 ) + + 13 AS col1 FROM tab1 AS cor0
----
-2079347
-227435
-9584627

query I rowsort
SELECT - 54 + - col2 AS col2 FROM tab0 AS cor0
----
-136
-55
-87

query I rowsort
SELECT 83 * cor0.col2 * cor0.col2 + col1 AS col0 FROM tab0 AS cor0
----
180
558183
90473

query I rowsort
SELECT col1 + - col1 * ( - ( col2 ) ) FROM tab2 AS cor0
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 77 col2 FROM tab1
----
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab0.col2 col1 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 + col1 col2 FROM tab0 AS cor0
----
110
115
121

onlyif mysql # use DIV operator for integer division
query I rowsort label-6556
SELECT + + col2 DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6556
SELECT + + col2 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT ALL - 73 * col2 FROM tab0 AS cor0
----
-2409
-5986
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6558
SELECT + + col0 + col1 DIV col1 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-6558
SELECT + + col0 + col1 / col1 FROM tab2 AS cor0
----
79
8
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6559
SELECT + 20 DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6559
SELECT + 20 / cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT DISTINCT - - col0 * col0 + - 55 FROM tab0 AS cor0
----
1170
521
7866

query I rowsort
SELECT ALL + + col0 * col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT col0 * col1 + + col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - - col2 - - cor0.col2 * + col0 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-6565
SELECT DISTINCT - cor0.col0 DIV col1 + 58 FROM tab2 AS cor0
----
54
57
58

skipif mysql # not compatible
query I rowsort label-6565
SELECT DISTINCT - cor0.col0 / col1 + 58 FROM tab2 AS cor0
----
54
57
58

query I rowsort
SELECT ALL cor0.col1 * + col2 - 73 FROM tab2 AS cor0
----
1461
573
764

onlyif mysql # use DIV operator for integer division
query I rowsort label-6567
SELECT DISTINCT - - col2 DIV + cor0.col2 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6567
SELECT DISTINCT - - col2 / + cor0.col2 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 81 col1 FROM tab1 cor0
----
107
91
94

query I rowsort
SELECT ALL + col2 * + cor0.col1 + + 44 + col0 * - col0 FROM tab2 AS cor0
----
-4506
-5551
832

query I rowsort
SELECT ALL + + col2 + - 57 FROM tab2 AS cor0
----
-19
-30
-31

query I rowsort
SELECT DISTINCT - cor0.col1 * 10 - - 45 FROM tab0 AS cor0
----
-815
-865
-925

onlyif mysql # use DIV operator for integer division
query I rowsort label-6572
SELECT ALL col2 DIV 84 + 3 * + col1 * col2 AS col0 FROM tab0 AS cor0
----
22386
291
8514

skipif mysql # not compatible
query I rowsort label-6572
SELECT ALL col2 / 84 + 3 * + col1 * col2 AS col0 FROM tab0 AS cor0
----
22386
291
8514

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + cor0.col0 * CAST ( ( + col1 ) AS REAL ) + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - col0 * + 87 + - col1 AS col2 FROM tab1 AS cor0
----
-287
-5578
-6973

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + cor0.col0 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT tab2.col2 * col0 + tab2.col2 AS col1 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT ( - col2 ) + + col0 AS col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT DISTINCT + col1 * - tab2.col0 + tab2.col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT col2 + col2 * col2 AS col0 FROM tab0
----
1122
2
6806

query I rowsort
SELECT col2 * tab2.col2 + col2 AS col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT DISTINCT - col1 * col2 + - col1 * + ( - col2 ) FROM tab0
----
0

query I rowsort
SELECT - tab2.col2 + + 82 FROM tab2, tab2 AS cor0
----
9 values hashing to 525177b827b1f6492c8d41811b1ce1e3

query I rowsort
SELECT ALL + cor0.col2 * ( - 73 ) AS col1 FROM tab0 AS cor0
----
-2409
-5986
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6584
SELECT DISTINCT col1 DIV - 22 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6584
SELECT DISTINCT col1 / - 22 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT cor0.col2 + - ( + col0 ) FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL - + col0 * 59 + col0 * col1 AS col0 FROM tab0 AS cor0
----
1330
2848
648

query I rowsort
SELECT DISTINCT - col0 * ( col2 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6588
SELECT - CAST( 97 AS SIGNED ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

skipif mysql # not compatible
query I rowsort label-6588
SELECT - CAST ( 97 AS INTEGER ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

query I rowsort
SELECT col0 * - 7 + + col1 + + col2 * + tab1.col1 FROM tab1
----
132
1409
701

query I rowsort
SELECT DISTINCT col0 - ( + col2 ) FROM tab0
----
-9
34
7

query I rowsort
SELECT - tab0.col2 - + cor0.col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
81 values hashing to 9a132d4616782968963a77d264ab39ad

query I rowsort
SELECT ALL + cor0.col2 * - col0 + - cor0.col0 * - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * col0 - col0 AS col2 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT + + col2 + + col2 + col1 AS col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT ALL - ( col1 ) * + ( + col1 ) * col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6596
SELECT col1 * + tab1.col0 + CAST( NULL AS SIGNED ) * col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6596
SELECT col1 * + tab1.col0 + CAST ( NULL AS INTEGER ) * col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6597
SELECT - col1 + col1 DIV col1 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-6597
SELECT - col1 + col1 / col1 FROM tab2
----
-16
-30
-58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6598
SELECT DISTINCT + col0 + col0 * + 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-6598
SELECT DISTINCT + col0 + col0 * + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT tab1.col0 + col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT col1 * col0 * 44 FROM tab1 AS cor0
----
28160
3432
45760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6601
SELECT - cor0.col2 DIV + cor0.col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6601
SELECT - cor0.col2 / + cor0.col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT ALL - col0 * - 59 + col0 FROM tab0 AS cor0
----
1440
2100
5340

query I rowsort
SELECT ALL + - 93 * - col0 FROM tab0 AS cor0
----
2232
3255
8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 9 + cor0.col1 + + col2 col2 FROM tab1 AS cor0
----
100
58
71

query I rowsort
SELECT + + 84 + - col0 AS col0 FROM tab0 AS cor0
----
-5
49
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6606
SELECT + col0 * - col0 + + col1 * + 53 + col1 DIV - col0 AS col0 FROM tab0 AS cor0
----
-3099
3914
3979

skipif mysql # not compatible
query I rowsort label-6606
SELECT + col0 * - col0 + + col1 * + 53 + col1 / - col0 AS col0 FROM tab0 AS cor0
----
-3099
3914
3979

query I rowsort
SELECT + + 39 + cor0.col1 * col0 + - col2 AS col2 FROM tab1 AS cor0
----
622
63
983

query I rowsort
SELECT DISTINCT + + 41 FROM tab0 cor0
----
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-6609
SELECT + col2 DIV + ( + col1 ) + col0 AS col2 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-6609
SELECT + col2 / + ( + col1 ) + col0 AS col2 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT + ( + 64 ) + - col1 AS col0 FROM tab1 AS cor0
----
38
51
54

query I rowsort
SELECT - 72 * 61 FROM tab0 cor0
----
-4392
-4392
-4392

query I rowsort
SELECT + 57 * - col1 AS col0 FROM tab0 AS cor0
----
-4902
-5187
-5529

query I rowsort
SELECT DISTINCT - cor0.col2 * 36 FROM tab0 AS cor0
----
-1188
-2952
-36

query I rowsort
SELECT ALL + cor0.col0 + - 59 FROM tab2 AS cor0
----
-52
19
20

query I rowsort
SELECT + col0 * 8 + + col2 * col0 AS col1 FROM tab2 cor0
----
245
2652
3634

query I rowsort
SELECT ALL - col1 + + col1 * - col2 FROM tab1 cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 * - 34 FROM tab2 AS cor0
----
-1027
-1980
-540

query I rowsort
SELECT DISTINCT col0 + + ( + 52 ) FROM tab2
----
130
131
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6619
SELECT DISTINCT - tab1.col0 DIV col0 + 40 * - col2 AS col0 FROM tab1
----
-2161
-2281
-3841

skipif mysql # not compatible
query I rowsort label-6619
SELECT DISTINCT - tab1.col0 / col0 + 40 * - col2 AS col0 FROM tab1
----
-2161
-2281
-3841

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6620
SELECT DISTINCT tab1.col1 + - CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6620
SELECT DISTINCT tab1.col1 + - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL col2 * col1 + ( - col2 ) + - CAST ( col2 AS REAL ) col2 FROM tab1
----
1056
1296
456

query I rowsort
SELECT 52 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT 96 + - 58 FROM tab2, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 * CAST ( col1 AS REAL ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL + + col0 * + 92 + cor0.col0 AS col1 FROM tab1 cor0
----
279
5952
7440

query I rowsort
SELECT col1 - - 70 * ( - col2 ) FROM tab0 AS cor0
----
-2224
-5649
27

query I rowsort
SELECT - ( 4 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT - col2 * 4 FROM tab2
----
-104
-108
-152

query I rowsort
SELECT col1 + - 74 AS col2 FROM tab0
----
12
17
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-6630
SELECT col0 * col2 DIV + col1 AS col0 FROM tab0
----
0
80
9

skipif mysql # not compatible
query I rowsort label-6630
SELECT col0 * col2 / + col1 AS col0 FROM tab0
----
0
80
9

query I rowsort
SELECT DISTINCT + ( ( col1 ) ) * - 63 + 67 * + col1 AS col0 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab0, tab1 AS cor0
----
36

query I rowsort
SELECT + col1 + - 83 FROM tab1 AS cor0
----
-57
-70
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6634
SELECT + - CAST( NULL AS SIGNED ) + - 78 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6634
SELECT + - CAST ( NULL AS INTEGER ) + - 78 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6635
SELECT + CAST( + col2 AS SIGNED ) + + col1 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-6635
SELECT + CAST ( + col2 AS INTEGER ) + + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + 98 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT DISTINCT - 26 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 + col2 col2 FROM tab0 AS cor0
----
-17
-66
-98

query I rowsort
SELECT - 1 AS col0 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 85 - tab0.col1 FROM tab0
----
-1
-12
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 75 col2 FROM tab2
----
-75
-75
-75

query I rowsort
SELECT ALL - ( col2 ) * ( + col1 + tab1.col2 ) AS col0 FROM tab1
----
-10464
-3819
-4320

query I rowsort
SELECT ALL + col0 + - col0 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - + col2 * - 14 AS col1 FROM tab1 AS cor0
----
1344
756
798

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 DISTINCT 59 + col0 * 13 AS col1 FROM tab1
----
1099
891
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6648
SELECT ALL - col2 * col2 + ( col1 ) DIV + col0 + 46 FROM tab2 AS cor0
----
-1398
-630
-679

skipif mysql # not compatible
query I rowsort label-6648
SELECT ALL - col2 * col2 + ( col1 ) / + col0 + 46 FROM tab2 AS cor0
----
-1398
-630
-679

query I rowsort
SELECT + cor0.col0 * + 61 FROM tab0, tab2 AS cor0
----
9 values hashing to bce0f30388fbe230afc2a73eefc8459d

query I rowsort
SELECT tab2.col0 + - 46 * - ( + col1 ) FROM tab2
----
1433
2792
861

onlyif mysql # use DIV operator for integer division
query I rowsort label-6651
SELECT DISTINCT - - col0 + + 26 DIV + 66 + col2 * + col2 FROM tab0 AS cor0
----
1113
36
6813

skipif mysql # not compatible
query I rowsort label-6651
SELECT DISTINCT - - col0 + + 26 / + 66 + col2 * + col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT - + col0 * + ( + 90 ) AS col2 FROM tab2 AS cor0
----
-630
-7020
-7110

query I rowsort
SELECT DISTINCT col2 * - 7 * cor0.col1 AS col1 FROM tab0 AS cor0
----
-19866
-52234
-679

query I rowsort
SELECT DISTINCT col2 * - col0 + col1 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL col1 + cor0.col2 * 8 AS col0 FROM tab2 AS cor0
----
247
267
321

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + - 88 col2 FROM tab0 cor0
----
2750
7374
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6657
SELECT - col2 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6657
SELECT - col2 * + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6658
SELECT + + col1 * CAST( NULL AS SIGNED ) / ( col1 * col2 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6658
SELECT + + col1 * CAST ( NULL AS INTEGER ) / ( col1 * col2 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( + 70 ) - tab2.col1 * - col1 * tab2.col2 AS col1 FROM tab2
----
10912
25877
90436

query I rowsort
SELECT DISTINCT - col2 + + tab2.col2 - - col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + 28 AS col2 FROM tab2
----
28
28
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6662
SELECT ALL col0 - + col0 DIV col1 FROM tab2
----
7
75
77

skipif mysql # not compatible
query I rowsort label-6662
SELECT ALL col0 - + col0 / col1 FROM tab2
----
7
75
77

query I rowsort
SELECT col0 * + col1 + + col0 AS col2 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT 52 * + col1 AS col1 FROM tab1
----
1352
520
676

query I rowsort
SELECT + 60 + + col0 * 47 AS col0 FROM tab2 AS cor0
----
3726
3773
389

query I rowsort
SELECT DISTINCT + col1 - + cor0.col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - 30 + col1 AS col2 FROM tab1 cor0
----
-17
-20
-4

skipif mysql # not compatible
query I rowsort
SELECT + col1 + - col1 * CAST ( - col1 * col1 AS REAL ) FROM tab2 AS cor0
----
205438
29822
4930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6669
SELECT ALL + col0 + + col1 / CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6669
SELECT ALL + col0 + + col1 / CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + - col1 * 66 AS col2 FROM tab1 AS cor0
----
-1742
-670
-871

query I rowsort
SELECT + 36 * col2 + col2 FROM tab0 AS cor0
----
1221
3034
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6672
SELECT CAST( - col0 AS SIGNED ) * + tab0.col2 AS col2 FROM tab0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-6672
SELECT CAST ( - col0 AS INTEGER ) * + tab0.col2 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + 15 + + col1 FROM tab2 AS cor0
----
32
46
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6674
SELECT + CAST( NULL AS SIGNED ) / ( col0 ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6674
SELECT + CAST ( NULL AS INTEGER ) / ( col0 ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 62 FROM tab2 cor0
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + - cor0.col0 + 50 col1 FROM tab1 cor0
----
50
50
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-6677
SELECT DISTINCT ( + col2 ) DIV + col0 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-6677
SELECT DISTINCT ( + col2 ) / + col0 FROM tab2 AS cor0
----
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6678
SELECT DISTINCT - - col1 DIV cor0.col1 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-6678
SELECT DISTINCT - - col1 / cor0.col1 FROM tab1 cor0
----
1

query I rowsort
SELECT 76 + col0 FROM tab2
----
154
155
83

query I rowsort
SELECT 32 + col2 * 59 AS col0 FROM tab1
----
3218
3395
5696

query I rowsort
SELECT - col1 * col2 + + ( col1 ) + col0 AS col2 FROM tab0 cor0
----
-2728
-7282
35

query I rowsort
SELECT - col0 * col1 + col1 + - 17 FROM tab1 AS cor0
----
-1044
-647
-69

query I rowsort
SELECT ALL + - ( - col0 ) + + cor0.col0 * 21 FROM tab1 AS cor0
----
1408
1760
66

query I rowsort
SELECT - col2 + 98 * col0 + - col2 AS col0 FROM tab1 AS cor0
----
186
6158
7648

query I rowsort
SELECT - col2 * col0 + - 12 * + cor0.col2 * col0 FROM tab2 AS cor0
----
-2457
-26364
-39026

query I rowsort
SELECT ALL + col1 * col1 - cor0.col1 FROM tab0 cor0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT col0 + ( 58 ) FROM tab1 AS cor0
----
122
138
61

query I rowsort
SELECT ALL 60 * + col0 + + ( 50 ) FROM tab0
----
1490
2150
5390

query I rowsort
SELECT - + ( cor0.col2 ) FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - - ( 37 ) + - col2 AS col1 FROM tab1 AS cor0
----
-17
-20
-59

query I rowsort
SELECT DISTINCT - + ( 76 ) * cor0.col2 + + cor0.col2 * - col1 FROM tab0 cor0
----
-13694
-173
-5346

query I rowsort
SELECT DISTINCT + + col1 * + 56 + - col2 FROM tab1 AS cor0
----
1402
503
632

query I rowsort
SELECT ALL + - col0 * 72 AS col2 FROM tab1 AS cor0
----
-216
-4608
-5760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6694
SELECT - 98 * - col0 DIV col0 col2 FROM tab1 cor0
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6694
SELECT - 98 * - col0 / col0 col2 FROM tab1 cor0
----
98
98
98

query I rowsort
SELECT DISTINCT + 83 * - col2 AS col2 FROM tab1 AS cor0
----
-4482
-4731
-7968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6696
SELECT ALL CAST( NULL AS SIGNED ) * col1 + col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6696
SELECT ALL CAST ( NULL AS INTEGER ) * col1 + col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 86 + col0 FROM tab0 AS cor0
----
-51
-62
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6698
SELECT + col1 + cor0.col0 DIV - col2 FROM tab1 cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-6698
SELECT + col1 + cor0.col0 / - col2 FROM tab1 cor0
----
13
26
9

query I rowsort
SELECT DISTINCT col1 * ( tab2.col2 ) FROM tab2
----
1534
646
837

query I rowsort
SELECT col0 - ( - col2 ) FROM tab2
----
104
117
34

query I rowsort
SELECT ALL - - col1 * ( + col0 ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col1 + + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + ( - col0 ) + - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + col2 + + 13 AS col0 FROM tab1 AS cor0
----
109
67
70

query I rowsort
SELECT ALL 55 * 35 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 76cec113a191afa9d01d553835158c20

query I rowsort
SELECT + col0 + col2 * 21 + - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-1347
-3339
-6288

onlyif mysql # use DIV operator for integer division
query I rowsort label-6707
SELECT ALL tab1.col1 * - 11 * col1 + - col0 * col0 DIV + col0 - tab1.col2 FROM tab1
----
-1221
-2035
-7493

skipif mysql # not compatible
query I rowsort label-6707
SELECT ALL tab1.col1 * - 11 * col1 + - col0 * col0 / + col0 - tab1.col2 FROM tab1
----
-1221
-2035
-7493

query I rowsort
SELECT DISTINCT col1 + - 77 AS col1 FROM tab0
----
14
20
9

query I rowsort
SELECT 71 * col0 FROM tab2
----
497
5538
5609

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6710
SELECT + CAST( NULL AS SIGNED ) / col0 + + col1 + + ( col2 ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6710
SELECT + CAST ( NULL AS INTEGER ) / col0 + + col1 + + ( col2 ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 98 * 17 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 632112ea6f1970bd55522e016e105b96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6712
SELECT tab0.col0 * col0 DIV - col2 FROM tab0
----
-1225
-17
-96

skipif mysql # not compatible
query I rowsort label-6712
SELECT tab0.col0 * col0 / - col2 FROM tab0
----
-1225
-17
-96

query I rowsort
SELECT - + ( - 90 ) * + col0 + col2 * ( - col0 + 0 ) FROM tab1 cor0
----
-480
108
2112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 93 + col1 col1 FROM tab0
----
8084
8554
9118

query I rowsort
SELECT DISTINCT - col2 + - col0 * - tab1.col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT DISTINCT + + cor0.col1 + - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT col2 - - ( + col0 ) AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6718
SELECT col1 DIV - CAST( col2 AS SIGNED ) col1 FROM tab0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6718
SELECT col1 / - CAST ( col2 AS INTEGER ) col1 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT - + col0 * 70 + col2 AS col1 FROM tab0 AS cor0
----
-1647
-2449
-6148

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to 07504092eb64a26979c0bde05f7718cb

query I rowsort
SELECT cor0.col2 * 52 * + cor0.col1 + + 62 FROM tab0 AS cor0
----
147638
388086
5106

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) - col2 * + cor0.col0 col2 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT - - 78 * - col0 AS col0 FROM tab2 cor0
----
-546
-6084
-6162

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
83

query I rowsort
SELECT + ( - 71 ) AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3907e0aa4f29c002120742c4abb3e23a

query I rowsort
SELECT + - col1 * - col1 + + 42 AS col2 FROM tab2 AS cor0
----
1003
331
3523

query I rowsort
SELECT ALL + cor0.col2 - - col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT cor0.col2 + + col2 * + ( + col1 ) FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - 69 + + col2 * 98 AS col1 FROM tab0 AS cor0
----
29
3165
7967

onlyif mysql # use DIV operator for integer division
query I rowsort label-6730
SELECT DISTINCT + col2 DIV + col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-6730
SELECT DISTINCT + col2 / + col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
7
78
81

query I rowsort
SELECT - ( + col2 ) * 18 AS col2 FROM tab2 AS cor0
----
-468
-486
-684

query I rowsort
SELECT + cor0.col2 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT - + col0 - - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6734
SELECT DISTINCT - - col2 + 62 * + cor0.col1 - col1 DIV 18 FROM tab0 AS cor0
----
5361
5719
6010

skipif mysql # not compatible
query I rowsort label-6734
SELECT DISTINCT - - col2 + 62 * + cor0.col1 - col1 / 18 FROM tab0 AS cor0
----
5361
5719
6010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6735
SELECT + - cor0.col1 - CAST( NULL AS SIGNED ) * + col2 * + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6735
SELECT + - cor0.col1 - CAST ( NULL AS INTEGER ) * + col2 * + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6736
SELECT col1 DIV + 76 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6736
SELECT col1 / + 76 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6737
SELECT + col0 * CAST( NULL AS SIGNED ) + + 60 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6737
SELECT + col0 * CAST ( NULL AS INTEGER ) + + 60 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * cor0.col0 * col1 FROM tab1 cor0
----
234
40960
83200

query I rowsort
SELECT + cor0.col1 * - 44 * + col1 FROM tab2 cor0
----
-12716
-153164
-42284

query I rowsort
SELECT ALL col1 + - 27 AS col1 FROM tab1 cor0
----
-1
-14
-17

query I rowsort
SELECT col1 + - cor0.col1 * col2 FROM tab0 cor0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6742
SELECT - - ( col2 ) DIV col2 + + ( col0 ) * + col0 FROM tab1 AS cor0
----
10
4097
6401

skipif mysql # not compatible
query I rowsort label-6742
SELECT - - ( col2 ) / col2 + + ( col0 ) * + col0 FROM tab1 AS cor0
----
10
4097
6401

query I rowsort
SELECT DISTINCT - - cor0.col0 * + 82 FROM tab2 AS cor0
----
574
6396
6478

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + cor0.col0 AS REAL ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT 16 * + col2 AS col1 FROM tab2 AS cor0
----
416
432
608

onlyif mysql # use DIV operator for integer division
query I rowsort label-6746
SELECT DISTINCT col2 + cor0.col0 * + col1 DIV ( cor0.col1 ) FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6746
SELECT DISTINCT col2 + cor0.col0 * + col1 / ( cor0.col1 ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ( 79 ) FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT - col0 + col2 * + ( 13 ) FROM tab1 AS cor0
----
1168
677
699

query I rowsort
SELECT ALL + col2 * + col2 - + col2 * + col0 * - col1 FROM tab2 AS cor0
----
120328
52478
6588

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
3645 values hashing to 76de18c5bf2cf2620e1f411d7bde86e7

query I rowsort
SELECT DISTINCT - 32 AS col1 FROM tab2, tab0, tab2 AS cor0
----
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col2 FROM tab1
----
6
6
6

query I rowsort
SELECT ALL + col2 * col0 * - col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT - col1 * + col2 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col2 * col2 + + 45 * 42 + + col1 * col2 FROM tab2
----
3456
3980
4100

query I rowsort
SELECT DISTINCT - - 60 + col1 AS col1 FROM tab0 AS cor0
----
146
151
157

onlyif mysql # use DIV operator for integer division
query I rowsort label-6757
SELECT ALL + - col1 + col0 DIV cor0.col0 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-6757
SELECT ALL + - col1 + col0 / cor0.col0 FROM tab1 AS cor0
----
-12
-25
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6758
SELECT DISTINCT - CAST( NULL AS SIGNED ) * ( col0 ) + + col2 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6758
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * ( col0 ) + + col2 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col2 * col2 * + col0 AS col0 FROM tab2
----
-114076
-5103
-52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6760
SELECT DISTINCT col2 * - CAST( NULL AS SIGNED ) * + col0 - + col0 * + ( 87 ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6760
SELECT DISTINCT col2 * - CAST ( NULL AS INTEGER ) * + col0 - + col0 * + ( 87 ) FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + 74 AS col2 FROM tab0, tab0 AS cor0
----
74

query I rowsort
SELECT ALL col2 * 47 + col0 AS col0 FROM tab0
----
1575
3943
82

query I rowsort
SELECT DISTINCT - 17 + - 65 * - col1 + - col1 FROM tab1
----
1647
623
815

onlyif mysql # use DIV operator for integer division
query I rowsort label-6764
SELECT DISTINCT + col0 * + col0 + - col0 DIV + col1 col0 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6764
SELECT DISTINCT + col0 * + col0 + - col0 / + col1 col0 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-6765
SELECT - 81 DIV col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-27

skipif mysql # not compatible
query I rowsort label-6765
SELECT - 81 / col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col1 col1 FROM tab0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6767
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col0 / - col0 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6767
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col0 / - col0 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab0, tab2, tab1 AS cor0
----
86

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 FROM tab1, tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col2 * + col2 + - ( + col1 ) FROM tab1 AS cor0
----
2890
3239
9203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6771
SELECT DISTINCT - col0 * 72 + - cor0.col0 + col0 * + CAST( - col2 AS SIGNED ) FROM tab1 cor0
----
-13520
-381
-8320

skipif mysql # not compatible
query I rowsort label-6771
SELECT DISTINCT - col0 * 72 + - cor0.col0 + col0 * + CAST ( - col2 AS INTEGER ) FROM tab1 cor0
----
-13520
-381
-8320

query I rowsort
SELECT ALL - col0 * + ( cor0.col1 * cor0.col2 ) FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT tab0.col2 * + col2 * + 82 FROM tab0
----
551368
82
89298

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 21 col0 FROM tab2
----
21

query I rowsort
SELECT - col0 * col2 + tab2.col0 AS col2 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT + 96 * - col0 + + col0 FROM tab0
----
-2280
-3325
-8455

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 - + col2 col2 FROM tab0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6778
SELECT ALL CAST( NULL AS SIGNED ) * 23 FROM tab2 cor0 CROSS JOIN tab0, tab0 cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-6778
SELECT ALL CAST ( NULL AS INTEGER ) * 23 FROM tab2 cor0 CROSS JOIN tab0, tab0 cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ALL - col0 * + 58 AS col2 FROM tab2 AS cor0
----
-406
-4524
-4582

query I rowsort
SELECT + + col2 - - cor0.col2 * + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-3394
-664036
-68079

query I rowsort
SELECT ALL + - col2 * + col1 + col1 + col2 * - ( col0 ) FROM tab2 AS cor0
----
-3503
-3631
-995

query I rowsort
SELECT + cor0.col0 * 49 - col1 AS col2 FROM tab2 AS cor0
----
312
3763
3854

query I rowsort
SELECT - - col0 - + ( - cor0.col0 ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + - col2 - cor0.col1 * + 78 FROM tab0 AS cor0
----
-6741
-7180
-7567

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * ( tab2.col1 ) col2 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT + + cor0.col1 + + 3 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to e74fcc39b2d76dfdc4375c6f529960aa

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6787
SELECT ALL - tab1.col0 - CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6787
SELECT ALL - tab1.col0 - CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 63 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT ALL col0 + 92 FROM tab1
----
156
172
95

query I rowsort
SELECT ALL - col1 * 16 - col1 * - col0 AS col0 FROM tab2 AS cor0
----
-279
1071
3658

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col0 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6792
SELECT ALL + cor0.col1 * + ( + col1 ) DIV + col1 + col2 DIV - col2 - + col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6792
SELECT ALL + cor0.col1 * + ( + col1 ) / + col1 + col2 / - col2 - + col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + + cor0.col1 + + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6794
SELECT + CAST( cor0.col0 AS SIGNED ) + col2 * - col1 FROM tab2 AS cor0
----
-1456
-567
-830

skipif mysql # not compatible
query I rowsort label-6794
SELECT + CAST ( cor0.col0 AS INTEGER ) + col2 * - col1 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-6795
SELECT ALL - col2 DIV - ( + col1 + + ( - ( col0 ) ) ) AS col1 FROM tab0 cor0
----
0
0
41

skipif mysql # not compatible
query I rowsort label-6795
SELECT ALL - col2 / - ( + col1 + + ( - ( col0 ) ) ) AS col1 FROM tab0 cor0
----
0
0
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6796
SELECT DISTINCT + cor0.col1 * + cor0.col2 * + col0 + + CAST( + col2 AS SIGNED ) * - cor0.col1 AS col0 FROM tab1 AS cor0
----
2808
35910
98592

skipif mysql # not compatible
query I rowsort label-6796
SELECT DISTINCT + cor0.col1 * + cor0.col2 * + col0 + + CAST ( + col2 AS INTEGER ) * - cor0.col1 AS col0 FROM tab1 AS cor0
----
2808
35910
98592

query I rowsort
SELECT DISTINCT - ( + 98 ) - + col2 AS col1 FROM tab1 AS cor0
----
-152
-155
-194

query I rowsort
SELECT DISTINCT - + 95 * - 79 FROM tab2 AS cor0
----
7505

query I rowsort
SELECT ALL - 65 * 67 FROM tab0 cor0
----
-4355
-4355
-4355

query I rowsort
SELECT DISTINCT + 66 + col2 FROM tab0 AS cor0
----
148
67
99

query I rowsort
SELECT DISTINCT - col2 - 65 AS col1 FROM tab1 AS cor0
----
-119
-122
-161

query I rowsort
SELECT DISTINCT col0 * col0 + cor0.col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT + - col0 + - 37 AS col1 FROM tab2 AS cor0
----
-115
-116
-44

query I rowsort
SELECT - + col1 * + col0 + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + cor0.col1 + - col0 * - cor0.col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col2 * + col1 + - col2 * + col2 AS col2 FROM tab0 AS cor0
----
-14186
-3927
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6807
SELECT DISTINCT - col1 + + 13 DIV - col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6807
SELECT DISTINCT - col1 + + 13 / - col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - ( 74 ) * - col0 + - 93 FROM tab1 AS cor0
----
129
4643
5827

onlyif mysql # use DIV operator for integer division
query I rowsort label-6809
SELECT + col2 DIV - col1 AS col0 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6809
SELECT + col2 / - col1 AS col0 FROM tab1 cor0
----
-2
-5
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6810
SELECT DISTINCT - - cor0.col0 + col2 / - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6810
SELECT DISTINCT - - cor0.col0 + col2 / - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 71 + + col1 FROM tab0 AS cor0
----
157
162
168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6812
SELECT cor0.col2 * col0 * CAST( - col0 * + col0 AS SIGNED ) col1 FROM tab1 cor0
----
-1458
-14942208
-49152000

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6812
SELECT cor0.col2 * col0 * CAST ( - col0 * + col0 AS INTEGER ) col1 FROM tab1 cor0
----
-1458
-14942208
-49152000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6813
SELECT col2 * tab0.col2 + + CAST( + ( - col0 ) AS SIGNED ) FROM tab0
----
-34
1065
6635

skipif mysql # not compatible
query I rowsort label-6813
SELECT col2 * tab0.col2 + + CAST ( + ( - col0 ) AS INTEGER ) FROM tab0
----
-34
1065
6635

query I rowsort
SELECT - + cor1.col1 * cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d85bc2e8ce42c10576fce198c34232af

query I rowsort
SELECT + 2 * cor0.col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL - - 31 + cor0.col2 * - col1 FROM tab1 cor0
----
-1217
-1373
-539

query I rowsort
SELECT DISTINCT - - ( - col1 ) * - 43 FROM tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT + col2 * - col0 * + col1 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + + ( + col2 ) + ( + ( col2 ) ) FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT ALL col2 * col2 * - 32 AS col0 FROM tab1 AS cor0
----
-103968
-294912
-93312

query I rowsort
SELECT ALL + - col0 * col1 * col1 + cor0.col0 FROM tab1 AS cor0
----
-13440
-2025
-6336

query I rowsort
SELECT DISTINCT 72 * col1 FROM tab2 cor0
----
1224
2232
4248

query I rowsort
SELECT - col0 * ( 88 + cor0.col2 ) * ( + 22 + cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-39445
-426816
-597240

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL - - 30 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT + ( col2 ) + col2 AS col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT - + ( - col2 ) AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + col2 * - col1 + 93 FROM tab2 AS cor0
----
-1441
-553
-744

query I rowsort
SELECT - 48 AS col0 FROM tab2
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + ( col2 + col2 ) FROM tab2
----
52
54
76

query I rowsort
SELECT ALL + cor0.col0 + + col0 * cor0.col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + cor0.col0 * + col1 - - col2 FROM tab2 cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6833
SELECT + + ( cor0.col2 ) DIV col2 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6833
SELECT + + ( cor0.col2 ) / col2 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + + 58 * - col2 + col0 + + col0 FROM tab1 AS cor0
----
-3126
-3178
-5408

query I rowsort
SELECT col1 + ( 57 ) FROM tab0 AS cor0
----
143
148
154

onlyif mysql # use DIV operator for integer division
query I rowsort label-6836
SELECT DISTINCT col2 * col2 + col1 - cor0.col2 * col1 DIV + col0 AS col1 FROM tab0 cor0
----
1057
6732
96

skipif mysql # not compatible
query I rowsort label-6836
SELECT DISTINCT col2 * col2 + col1 - cor0.col2 * col1 / + col0 AS col1 FROM tab0 cor0
----
1057
6732
96

query I rowsort
SELECT ALL col2 + + 33 AS col2 FROM tab0 AS cor0
----
115
34
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-6838
SELECT DISTINCT - col2 * 25 + col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
-1349
-1424
-2399

skipif mysql # not compatible
query I rowsort label-6838
SELECT DISTINCT - col2 * 25 + col0 / + col0 AS col1 FROM tab1 AS cor0
----
-1349
-1424
-2399

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + ( 77 ) * + col2 col1 FROM tab0 AS cor0
----
112
2565
6403

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 + tab0.col2 col1 FROM tab0, tab2 cor0
----
9 values hashing to e79055a1bddaecb58964ba2670fa1761

query I rowsort
SELECT 16 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2, tab1 AS cor3
----
243 values hashing to 80627f1b002697f113dfef55dcca461f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6842
SELECT ALL - CAST( NULL AS SIGNED ) * cor0.col1 / - col1 - + cor0.col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6842
SELECT ALL - CAST ( NULL AS INTEGER ) * cor0.col1 / - col1 - + cor0.col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - ( + col0 ) + + col0 * col0 AS col2 FROM tab2 cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-6844
SELECT ALL col0 + ( col0 ) * col2 DIV 3 AS col0 FROM tab1 AS cor0
----
1280
2640
57

skipif mysql # not compatible
query I rowsort label-6844
SELECT ALL col0 + ( col0 ) * col2 / 3 AS col0 FROM tab1 AS cor0
----
1280
2640
57

query I rowsort
SELECT DISTINCT - ( - ( col0 ) ) * cor0.col1 - + cor0.col1 * - col1 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT DISTINCT + + ( + ( + col1 ) ) * ( col1 ) - col0 * - 44 FROM tab0 cor0
----
10949
12197
8452

query I rowsort
SELECT DISTINCT + 31 AS col0 FROM tab1
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 col1 FROM tab0
----
45
45
45

query I rowsort
SELECT - - ( - 39 ) - tab1.col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 181cca8f4f3bb5ac6c45cc412aa4887a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 col2 FROM tab2 AS cor0
----
19
19
19

query I rowsort
SELECT - - 21 + col0 FROM tab1 cor0
----
101
24
85

query I rowsort
SELECT 23 + + cor0.col2 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to baccdd4eb2fb6669dcc06519f6cb9228

query I rowsort
SELECT ALL + col0 * - col2 + - tab1.col1 * tab1.col0 + + col0 * tab1.col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col0 * - 70 + col0 FROM tab1 AS cor0
----
-207
-4416
-5520

query I rowsort
SELECT + + cor0.col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + + col1 + + col1 * + ( 80 ) FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 * 30 AS col1 FROM tab2 cor0
----
-19380
-25110
-46020

onlyif mysql # use DIV operator for integer division
query I rowsort label-6858
SELECT ALL - 58 DIV - col0 AS col1 FROM tab1 AS cor0
----
0
0
19

skipif mysql # not compatible
query I rowsort label-6858
SELECT ALL - 58 / - col0 AS col1 FROM tab1 AS cor0
----
0
0
19

query I rowsort
SELECT + - col0 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + tab1.col2 - col0 col2 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col0 * col2 col0 FROM tab0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6862
SELECT col1 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6862
SELECT col1 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 41 + ( col1 ) FROM tab2 AS cor0
----
100
58
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-6864
SELECT DISTINCT col0 * tab2.col1 DIV col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6864
SELECT DISTINCT col0 * tab2.col1 / col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + tab1.col1 * + ( col0 * tab1.col2 ) FROM tab1
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6866
SELECT ( - col0 ) * col1 * + CAST( NULL AS SIGNED ) + + col0 * cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6866
SELECT ( - col0 ) * col1 * + CAST ( NULL AS INTEGER ) + + col0 * cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 68 * col0 + cor0.col2 FROM tab0 AS cor0
----
-1599
-2379
-5970

query I rowsort
SELECT ALL - col2 * - col0 AS col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL 0 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL col1 * - col0 * 42 AS col0 FROM tab1
----
-26880
-3276
-43680

query I rowsort
SELECT + 48 * col2 + + ( - col1 ) + + tab0.col2 * + col0 FROM tab0
----
-14
11143
2290

query I rowsort
SELECT col2 * col2 + 83 AS col0 FROM tab2 AS cor0
----
1527
759
812

query I rowsort
SELECT ALL - - col0 * cor0.col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6874
SELECT - ( col1 ) DIV 34 AS col1 FROM tab0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-6874
SELECT - ( col1 ) / 34 AS col1 FROM tab0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT col0 * + col2 + + col0 * + col2 AS col1 FROM tab1
----
15360
324
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-6876
SELECT - col2 DIV col0 + 66 AS col2 FROM tab0
----
65
66
66

skipif mysql # not compatible
query I rowsort label-6876
SELECT - col2 / col0 + 66 AS col2 FROM tab0
----
65
66
66

query I rowsort
SELECT ALL + - cor0.col0 * - 41 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ef9d6bc88cc4195c817dc603d1612be5

query I rowsort
SELECT DISTINCT 10 + - col2 AS col0 FROM tab2 AS cor0
----
-16
-17
-28

query I rowsort
SELECT ALL + 32 + + col2 - - col0 FROM tab1 AS cor0
----
153
208
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 14 * col0 col0 FROM tab0 AS cor0
----
1246
336
490

query I rowsort
SELECT ALL col0 + + cor0.col1 + - col1 FROM tab2 cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6882
SELECT ALL CAST( NULL AS SIGNED ) / 59 col1 FROM tab1, 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-6882
SELECT ALL CAST ( NULL AS INTEGER ) / 59 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6883
SELECT - 64 / tab2.col0 + + ( col1 ) + - tab2.col1 / - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6883
SELECT - 64 / tab2.col0 + + ( col1 ) + - tab2.col1 / - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 94 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT 22 AS col0 FROM tab1 cor0
----
22
22
22

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 cor1
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6888
SELECT ALL CAST( col0 AS SIGNED ) * col2 + + 58 * + 78 AS col1 FROM tab2 AS cor0
----
4713
6552
7526

skipif mysql # not compatible
query I rowsort label-6888
SELECT ALL CAST ( col0 AS INTEGER ) * col2 + + 58 * + 78 AS col1 FROM tab2 AS cor0
----
4713
6552
7526

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6889
SELECT ALL CAST( + col2 AS SIGNED ) * + col2 + - 93 * - col1 AS col0 FROM tab1 AS cor0
----
10425
4179
5334

skipif mysql # not compatible
query I rowsort label-6889
SELECT ALL CAST ( + col2 AS INTEGER ) * + col2 + - 93 * - col1 AS col0 FROM tab1 AS cor0
----
10425
4179
5334

query I rowsort
SELECT DISTINCT + col1 + + 59 FROM tab0 AS cor0
----
145
150
156

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * - cor0.col2 * - 18 FROM tab2 AS cor0
----
3433
36563
54053

query I rowsort
SELECT + - col1 + - 85 * col2 FROM tab1 cor0
----
-4616
-4855
-8173

query I rowsort
SELECT 93 + - 93 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + + 60 + - col1 FROM tab2 AS cor0
----
1
29
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 * col2 col2 FROM tab2 AS cor0
----
-1456
-1512
-2128

query I rowsort
SELECT + - 41 AS col1 FROM tab2 AS cor0
----
-41
-41
-41

query I rowsort
SELECT + col1 + col0 * 13 AS col2 FROM tab0 cor0
----
1248
398
552

query I rowsort
SELECT col0 * - col0 * + col2 + - tab0.col0 FROM tab0
----
-1260
-19032
-649611

query I rowsort
SELECT ALL ( tab1.col1 + + col2 ) * + 19 FROM tab1
----
1273
1520
2071

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6900
SELECT + CAST( 84 AS SIGNED ) + tab0.col2 FROM tab0
----
117
166
85

skipif mysql # not compatible
query I rowsort label-6900
SELECT + CAST ( 84 AS INTEGER ) + tab0.col2 FROM tab0
----
117
166
85

query I rowsort
SELECT 89 + + col2 * + col0 FROM tab2
----
2117
278
3091

query I rowsort
SELECT ALL - 0 AS col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT col0 * 98 - + col1 FROM tab0
----
2266
3333
8631

query I rowsort
SELECT 99 - - col0 AS col2 FROM tab0
----
123
134
188

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6906
SELECT + col1 DIV + col1 AS col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6906
SELECT + col1 / + col1 AS col0 FROM tab1 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 93 ) * - col2 col0 FROM tab2
----
-2418
-2511
-3534

query I rowsort
SELECT DISTINCT ( + col1 * ( + 71 ) ) FROM tab0
----
6106
6461
6887

query I rowsort
SELECT - - 95 * - col1 FROM tab1 cor0
----
-1235
-2470
-950

query I rowsort
SELECT + 52 * - col1 AS col2 FROM tab0 AS cor0
----
-4472
-4732
-5044

query I rowsort
SELECT ALL - cor0.col1 * + col0 * 50 AS col2 FROM tab2 AS cor0
----
-10850
-230100
-67150

query I rowsort
SELECT ALL - + 64 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 100c625e45715c20368551989514ba64

query I rowsort
SELECT ALL col1 * + tab0.col0 + - col2 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT - col1 + 30 AS col2 FROM tab1
----
17
20
4

query I rowsort
SELECT ALL 30 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT tab1.col2 * 30 FROM tab1
----
1620
1710
2880

query I rowsort
SELECT ALL - col0 * ( col2 ) + - col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT ALL - 38 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * 31 col2 FROM tab0 AS cor0
----
-1023
-2542
-31

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 + - CAST ( 19 AS REAL ) AS col2 FROM tab2
----
-26
-97
-98

query I rowsort
SELECT col1 * - col2 + 49 * col2 AS col1 FROM tab1
----
1242
2223
3456

query I rowsort
SELECT DISTINCT - 13 * 5 + col0 FROM tab2 cor0
----
-58
13
14

query I rowsort
SELECT ALL + 55 - col1 FROM tab0 AS cor0
----
-31
-36
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) + col0 * col2 col2 FROM tab0 AS cor0
----
70
7387
816

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab1, tab1 cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT col1 * + 48 + col1 AS col0 FROM tab2
----
1519
2891
833

query I rowsort
SELECT ALL + ( + 7 ) * col2 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT DISTINCT - ( 91 ) * + col1 FROM tab2 AS cor0
----
-1547
-2821
-5369

query I rowsort
SELECT cor0.col1 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + - col1 * col2 + + col0 * cor0.col0 AS col1 FROM tab0 cor0
----
-2262
1128
459

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6931
SELECT ALL - CAST( - 53 AS SIGNED ) - - cor0.col0 FROM tab0 AS cor0
----
142
77
88

skipif mysql # not compatible
query I rowsort label-6931
SELECT ALL - CAST ( - 53 AS INTEGER ) - - cor0.col0 FROM tab0 AS cor0
----
142
77
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6932
SELECT DISTINCT 41 * - col2 + cor0.col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6932
SELECT DISTINCT 41 * - col2 + cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6933
SELECT ALL - col2 * col2 + - col1 DIV cor0.col1 + col2 * col1 AS col2 FROM tab1 AS cor0
----
-1513
-2680
-7969

skipif mysql # not compatible
query I rowsort label-6933
SELECT ALL - col2 * col2 + - col1 / cor0.col1 + col2 * col1 AS col2 FROM tab1 AS cor0
----
-1513
-2680
-7969

query I rowsort
SELECT ALL + + ( col2 ) - + col0 AS col1 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + col2 AS REAL ) * col2 col0 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - col1 * + 4 FROM tab2 AS cor0
----
-124
-236
-68

query I rowsort
SELECT col1 * - 92 AS col2 FROM tab0 AS cor0
----
-7912
-8372
-8924

query I rowsort
SELECT + tab2.col1 - cor0.col2 AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to b11e55d4642e48fe8aebd959c35c60ae

query I rowsort
SELECT + col1 + 91 AS col1 FROM tab2 AS cor0
----
108
122
150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + ( - col2 + + col2 ) col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + 55 AS col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT + col2 * - 16 + col0 AS col2 FROM tab1 AS cor0
----
-1456
-848
-861

query I rowsort
SELECT DISTINCT - ( + 42 ) * + col1 FROM tab2 cor0
----
-1302
-2478
-714

query I rowsort
SELECT + ( + 7 ) + col1 AS col0 FROM tab0 cor0
----
104
93
98

query I rowsort
SELECT - ( - col0 ) * - col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - 96 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT ALL + tab0.col0 * + col0 * col1 AS col1 FROM tab0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 * + col2 col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + col0 * + col2 + ( col2 + - col2 ) * 31 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + - ( + col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 * col0 + ( + col0 * col0 ) col0 FROM tab2 AS cor0
----
6474
6636
84

query I rowsort
SELECT - - col1 * col1 + cor0.col1 * col1 AS col1 FROM tab0 cor0
----
14792
16562
18818

query I rowsort
SELECT ALL ( - col0 ) + col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT - ( + ( col1 ) ) + - ( + col1 ) * - col2 * + 45 FROM tab2
----
29053
37634
68971

query I rowsort
SELECT DISTINCT col0 + ( + col2 + + 89 ) FROM tab1
----
146
210
265

query I rowsort
SELECT + - col1 - - cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + col2 + 81 * col2 FROM tab1
----
4428
4674
7872

query I rowsort
SELECT - ( cor0.col0 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - 42 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 9894093f29c0defae91347934f060329

query I rowsort
SELECT DISTINCT + - col2 * - col2 AS col1 FROM tab0 cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-6961
SELECT ALL col2 DIV col0 col1 FROM tab2 cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6961
SELECT ALL col2 / col0 col1 FROM tab2 cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6962
SELECT - col0 + col1 DIV - col1 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-6962
SELECT - col0 + col1 / - col1 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 52 * - col1 col2 FROM tab2 AS cor0
----
1612
3068
884

query I rowsort
SELECT DISTINCT col1 * ( col2 * col2 ) + - col1 AS col1 FROM tab2 AS cor0
----
22568
24531
39825

query I rowsort
SELECT ALL + - col1 + col1 * col0 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT + 31 * + col2 FROM tab1
----
1674
1767
2976

query I rowsort
SELECT DISTINCT - + cor0.col0 + - ( col0 ) FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT - col0 + 67 * + col2 FROM tab1 AS cor0
----
3615
3755
6352

query I rowsort
SELECT - + cor0.col1 + - cor0.col1 * col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - cor0.col1 + 84 FROM tab2 AS cor0
----
25
53
67

query I rowsort
SELECT ALL - tab2.col2 + + 96 FROM tab2, tab1 AS cor0
----
9 values hashing to 8aba8fd1b1e871111a09cd5809f5d6c6

query I rowsort
SELECT ALL - col2 - - col2 * ( - col1 ) FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT ALL + 59 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT + col2 + - ( - col0 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6975
SELECT DISTINCT + col1 * - CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-6975
SELECT DISTINCT + col1 * - CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6976
SELECT ALL - - col1 + + CAST( ( col2 ) AS SIGNED ) * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-6976
SELECT ALL - - col1 + + CAST ( ( col2 ) AS INTEGER ) * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + col0 * cor0.col0 + - 9 AS col2 FROM tab1 AS cor0
----
0
4087
6391

query I rowsort
SELECT - col2 + 67 FROM tab2 AS cor0
----
29
40
41

query I rowsort
SELECT - - ( - col1 ) * - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - ( 4 ) FROM tab0 cor0
----
-4
-4
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + ( - col2 + + cor0.col2 ) col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * tab0.col0 + col0 AS col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT + - cor0.col2 + + col2 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL 75 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT ALL + col2 * col0 + ( + col0 ) FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + 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 - - 96 * + col1 col1 FROM tab1 AS cor0
----
1248
2496
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6988
SELECT + col0 DIV + col0 + col1 + - col2 FROM tab1
----
-27
-46
-82

skipif mysql # not compatible
query I rowsort label-6988
SELECT + col0 / + col0 + col1 + - col2 FROM tab1
----
-27
-46
-82

query I rowsort
SELECT col0 * col1 + - col0 - col2 * col0 FROM tab2
----
-1738
21
2496

query I rowsort
SELECT - col1 + col0 + col2 * - col1 FROM tab1
----
-1181
-1427
-516

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( - col0 * col1 + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6992
SELECT + col1 + + col2 DIV - col2 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-6992
SELECT + col1 + + col2 / - col2 FROM tab1
----
12
25
9

query I rowsort
SELECT - col2 + - tab2.col1 * + tab2.col0 AS col1 FROM tab2
----
-1381
-244
-4628

query III rowsort
SELECT * FROM tab1 WHERE NOT ( - col2 ) IN ( col2 - - tab1.col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-6995
SELECT ALL - col1 DIV col1 + col2 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-6995
SELECT ALL - col1 / col1 + col2 FROM tab2
----
25
26
37

query I rowsort
SELECT ALL + col2 FROM tab1 WHERE NOT ( NULL ) IN ( + col0 * + col2 )
----

query I rowsort
SELECT ALL + col1 + + tab2.col2 AS col1 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab1 WHERE ( NULL ) >= - col2 * + col2
----

query I rowsort
SELECT ALL - col0 * col2 - col0 FROM tab2 cor0
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-7000
SELECT ALL + col2 DIV - col0 - 35 * col0 * - col1 AS col2 FROM tab0 cor0
----
118825
283465
72239

skipif mysql # not compatible
query I rowsort label-7000
SELECT ALL + col2 / - col0 - 35 * col0 * - col1 AS col2 FROM tab0 cor0
----
118825
283465
72239

query I rowsort
SELECT ALL + 45 - + cor0.col0 * + 58 AS col1 FROM tab2 AS cor0
----
-361
-4479
-4537

onlyif mysql # use DIV operator for integer division
query I rowsort label-7002
SELECT DISTINCT 87 DIV - cor0.col1 - 5 FROM tab1 AS cor0
----
-11
-13
-8

skipif mysql # not compatible
query I rowsort label-7002
SELECT DISTINCT 87 / - cor0.col1 - 5 FROM tab1 AS cor0
----
-11
-13
-8

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab0 cor1, tab1, tab0 AS cor2
----
3645 values hashing to 5d94dfd9164033b5a92f743be8139ecc

query I rowsort
SELECT col2 * col2 FROM tab0 AS cor0 WHERE + col1 * col1 IN ( + col1 - + col1 / col1 )
----

query I rowsort
SELECT DISTINCT col0 + + col0 * - col0 FROM tab0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-7006
SELECT col1 DIV + col1 + col0 AS col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-7006
SELECT col1 / + col1 + col0 AS col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort