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)

onlyif mysql # use DIV operator for integer division
query I rowsort label-0
SELECT DISTINCT - col0 + + CAST( 60 AS SIGNED ) DIV + col0 AS col0 FROM tab1
----
-64
-80
17

skipif mysql # not compatible
query I rowsort label-0
SELECT DISTINCT - col0 + + CAST ( 60 AS INTEGER ) / + col0 AS col0 FROM tab1
----
-64
-80
17

query I rowsort
SELECT ALL - tab2.col1 + col1 * ( col1 ) FROM tab2
----
272
3422
930

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

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

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

query I rowsort
SELECT col0 * - ( - col2 * + col0 ) FROM tab0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 67 * + ( - cor0.col0 ) col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 33e66bfe952f4745b3097d3bd663d4d6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( col2 ) col1 FROM tab0
----
171
36
57

query I rowsort
SELECT - col0 * + col0 + + col0 + - col2 * + tab2.col2 AS col0 FROM tab2
----
-6682
-7606
-771

query I rowsort
SELECT col1 + + 10 * - col0 - + col1 FROM tab1
----
-30
-640
-800

query I rowsort
SELECT col2 - - col0 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT col1 - col1 * ( col1 ) * col1 FROM tab1
----
-17550
-2184
-990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 58 col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

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

query I rowsort
SELECT cor0.col0 + + col2 + + col1 * 8 * - col0 AS col2 FROM tab0 AS cor0
----
-16455
-27124
-64621

query I rowsort
SELECT DISTINCT + - ( + col0 ) * + col0 AS col1 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL col0 + 44 + col2 * + cor0.col1 * col2 FROM tab2 AS cor0
----
22650
24671
40006

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

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

query I rowsort
SELECT + - 11 * + col2 FROM tab2 AS cor0
----
-286
-297
-418

query I rowsort
SELECT ALL - 80 * 66 + col1 * 2 * - 96 FROM tab2 AS cor0
----
-11232
-16608
-8544

query I rowsort
SELECT DISTINCT 4 * col0 AS col0 FROM tab0 AS cor0
----
140
356
96

query I rowsort
SELECT col2 * + col2 + col1 + col2 FROM tab0 cor0
----
1208
6897
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-21
SELECT DISTINCT + - 32 DIV ( col1 ) FROM tab1 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-21
SELECT DISTINCT + - 32 / ( col1 ) FROM tab1 cor0
----
-1
-2
-3

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 * col2 col2 FROM tab2 AS cor0
----
-2574
-2673
-3762

query I rowsort
SELECT ALL - col1 * ( col0 ) + - col2 * + col1 * + 39 FROM tab0 AS cor0
----
-112746
-299117
-7178

query I rowsort
SELECT ALL + cor0.col0 * + 28 FROM tab2 AS cor0
----
196
2184
2212

query I rowsort
SELECT DISTINCT col0 * - ( + 30 + - col1 * 83 ) AS col0 FROM tab0
----
170592
280735
669547

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-27
SELECT DISTINCT + cor0.col0 + CAST( col2 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-27
SELECT DISTINCT + cor0.col0 + CAST ( col2 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + + col1 * col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab0, tab1 AS cor0
----
-99

query I rowsort
SELECT DISTINCT cor0.col1 * col2 FROM tab1 cor0
----
1248
1404
570

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

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

query I rowsort
SELECT 23 AS col1 FROM tab0 AS cor0
----
23
23
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-33
SELECT - CAST( - 94 AS SIGNED ) * - col2 + col0 AS col2 FROM tab1 AS cor0
----
-5073
-5294
-8944

skipif mysql # not compatible
query I rowsort label-33
SELECT - CAST ( - 94 AS INTEGER ) * - col2 + col0 AS col2 FROM tab1 AS cor0
----
-5073
-5294
-8944

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

query I rowsort
SELECT DISTINCT - + 90 FROM tab0 cor0
----
-90

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 * - 1 AS col0 FROM tab1 cor0
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - col2 * ( + 36 ) col1 FROM tab0 AS cor0
----
-1102
-2861
61

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

query I rowsort
SELECT ALL + + 20 - - col2 FROM tab1 AS cor0
----
116
74
77

query I rowsort
SELECT DISTINCT - + 59 + col2 * + 70 AS col0 FROM tab1 AS cor0
----
3721
3931
6661

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

query I rowsort
SELECT - ( col2 ) + - 88 * - col2 FROM tab0 cor0
----
2871
7134
87

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

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

query I rowsort
SELECT ALL 30 * + col2 AS col0 FROM tab0 AS cor0
----
2460
30
990

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

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

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

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

query I rowsort
SELECT - 71 + tab2.col1 FROM tab2
----
-12
-40
-54

query I rowsort
SELECT ALL 30 + - col0 FROM tab0
----
-5
-59
6

query I rowsort
SELECT ALL - col1 * + col0 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + - col1 * 77 FROM tab2 AS cor0
----
-1309
-2387
-4543

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

query I rowsort
SELECT DISTINCT + 93 * + col1 AS col0 FROM tab2 AS cor0
----
1581
2883
5487

query I rowsort
SELECT - + cor0.col1 * col1 + - ( 46 ) FROM tab1 AS cor0
----
-146
-215
-722

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

query I rowsort
SELECT ALL - + cor1.col1 + + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
6

query I rowsort
SELECT + col0 * ( + col1 ) + cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
2787
5278
946

query I rowsort
SELECT DISTINCT 88 * col0 * + col1 + tab1.col2 FROM tab1
----
56377
6918
91616

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

skipif mysql # not compatible
query I rowsort label-60
SELECT - col0 + 20 / 31 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-61
SELECT + col0 + 95 DIV - col2 FROM tab1 AS cor0
----
2
63
80

skipif mysql # not compatible
query I rowsort label-61
SELECT + col0 + 95 / - col2 FROM tab1 AS cor0
----
2
63
80

query I rowsort
SELECT + col1 * - 21 AS col1 FROM tab0 AS cor0
----
-1806
-1911
-2037

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-63
SELECT col0 * - 57 + ( col2 ) * CAST( + col2 AS SIGNED ) + + col1 AS col0 FROM tab0 AS cor0
----
-1897
-193
1742

skipif mysql # not compatible
query I rowsort label-63
SELECT col0 * - 57 + ( col2 ) * CAST ( + col2 AS INTEGER ) + + col1 AS col0 FROM tab0 AS cor0
----
-1897
-193
1742

query I rowsort
SELECT ALL tab0.col0 * + col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 14 * col2 FROM tab0
----
1148
14
462

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

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

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

query I rowsort
SELECT DISTINCT + 65 + + 3 FROM tab1, tab1 AS cor0
----
68

query I rowsort
SELECT DISTINCT 16 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
16

query I rowsort
SELECT + col0 * - 28 * + 10 FROM tab0
----
-24920
-6720
-9800

query I rowsort
SELECT + cor0.col1 * ( col1 ) + cor0.col1 AS col2 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-72
SELECT + CAST( col2 AS SIGNED ) AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-72
SELECT + CAST ( col2 AS INTEGER ) AS col0 FROM tab2
----
26
27
38

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

query I rowsort
SELECT DISTINCT - + col1 + 44 * cor0.col0 FROM tab2 AS cor0
----
277
3373
3459

query I rowsort
SELECT DISTINCT + 34 * + 75 AS col1 FROM tab2 AS cor0
----
2550

query I rowsort
SELECT + - 68 FROM tab2 AS cor0
----
-68
-68
-68

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

skipif mysql # not compatible
query I rowsort label-77
SELECT - CAST ( NULL AS REAL ) * - col1 + cor0.col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL ( 85 ) FROM tab0
----
85
85
85

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

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

query I rowsort
SELECT + col1 + - col2 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT + + ( - col0 ) - + 32 AS col1 FROM tab2 cor0
----
-110
-111
-39

query I rowsort
SELECT + col0 * + col2 * cor0.col0 - + col1 FROM tab0 AS cor0
----
1128
18922
649431

query I rowsort
SELECT - 48 + col2 * - 14 FROM tab0 AS cor0
----
-1196
-510
-62

query I rowsort
SELECT DISTINCT ( + 62 ) AS col2 FROM tab2, tab2 AS cor0
----
62

query I rowsort
SELECT DISTINCT col2 * + col2 + + col2 FROM tab2
----
1482
702
756

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

query I rowsort
SELECT ALL - col2 + tab0.col0 * col2 * col1 AS col2 FROM tab0
----
3394
664036
68079

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 * col1 + - col1 col1 FROM tab2
----
22568
24531
39825

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

query I rowsort
SELECT ALL - tab2.col1 * col0 * + col2 + + col2 * col1 AS col1 FROM tab2
----
-118118
-5022
-50388

query I rowsort
SELECT DISTINCT col0 * - col2 + col0 * - col1 FROM tab2
----
-406
-4345
-6630

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( col2 ) NOT IN ( col2 * - col2 * - col2 + + col1 )
----

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

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

query I rowsort
SELECT ALL - ( tab1.col2 ) * - col0 * col1 - - col0 AS col0 FROM tab1
----
36544
4215
99920

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - tab0.col1 col0 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT + col2 + + cor0.col2 * + col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

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

query I rowsort
SELECT col0 * + cor0.col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-107
SELECT ALL + col2 + col0 / + col2 col1 FROM tab0
----
33
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 + + tab1.col0 * - col0 col0 FROM tab1
----
-4039
-6304
45

query III rowsort
SELECT * FROM tab0 WHERE NULL BETWEEN - col2 / col1 AND ( NULL )
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-111
SELECT col0 + col2 * col1 DIV col2 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-111
SELECT col0 + col2 * col1 / col2 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - col1 * col1 + + col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL cor0.col1 - + col0 * + cor0.col2 * cor0.col1 FROM tab1 AS cor0
----
-36470
-4186
-99827

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

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

query I rowsort
SELECT + col2 * - col2 + col0 AS col2 FROM tab1
----
-2913
-3185
-9136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-117
SELECT ALL CAST( ( + col1 ) AS SIGNED ) AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-117
SELECT ALL CAST ( ( + col1 ) AS INTEGER ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + + 48 + col2 * cor0.col1 * 95 AS col0 FROM tab0 AS cor0
----
269658
708938
9263

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 cor1, tab2 cor2
----
972 values hashing to 617c9545df26d6d983e3967864e8e9e4

query I rowsort
SELECT - 16 * cor0.col0 + + col2 FROM tab2 AS cor0
----
-1222
-1226
-85

query I rowsort
SELECT DISTINCT - - ( + 98 ) + cor0.col0 FROM tab1 AS cor0
----
101
162
178

query I rowsort
SELECT ALL 52 + + col2 AS col0 FROM tab1 AS cor0
----
106
109
148

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

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

skipif mysql # not compatible
query I rowsort label-124
SELECT DISTINCT - + col1 + col1 * - ( col1 + col1 ) * + CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-181071
-21981
-51925

query I rowsort
SELECT DISTINCT + - col2 * + cor0.col1 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-126
SELECT 90 * + col0 * col1 + + CAST( 28 AS SIGNED ) AS col0 FROM tab1
----
57628
7048
93628

skipif mysql # not compatible
query I rowsort label-126
SELECT 90 * + col0 * col1 + + CAST ( 28 AS INTEGER ) AS col0 FROM tab1
----
57628
7048
93628

query I rowsort
SELECT + ( + 65 ) + col0 AS col1 FROM tab1
----
129
145
68

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

query I rowsort
SELECT ALL - col1 * - ( + 86 ) AS col2 FROM tab1 cor0
----
1118
2236
860

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

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

query I rowsort
SELECT DISTINCT + col0 * - 39 FROM tab0 AS cor0
----
-1365
-3471
-936

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

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

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

query I rowsort
SELECT DISTINCT col0 * + 6 AS col1 FROM tab0 AS cor0
----
144
210
534

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-137
SELECT + CAST( 67 AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

skipif mysql # not compatible
query I rowsort label-137
SELECT + CAST ( 67 AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT ALL + - cor0.col1 * col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + + col0 + 67 FROM tab0 AS cor0
----
102
156
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 45 col1 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT DISTINCT + 87 FROM tab1
----
87

query I rowsort
SELECT col2 * - col0 + - tab0.col0 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + 48 FROM tab1
----
48

query I rowsort
SELECT + col0 + 1 FROM tab2
----
79
8
80

query I rowsort
SELECT 69 + + col0 * - col0 FROM tab1
----
-4027
-6331
60

query I rowsort
SELECT - ( - col0 ) AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT 97 * + col2 FROM tab2
----
2522
2619
3686

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-149
SELECT ALL - 8 + col2 DIV + col1 - col0 AS col2 FROM tab1 cor0
----
-67
-81
-9

skipif mysql # not compatible
query I rowsort label-149
SELECT ALL - 8 + col2 / + col1 - col0 AS col2 FROM tab1 cor0
----
-67
-81
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-150
SELECT ALL + - ( 26 ) DIV - col0 + col1 * - col1 FROM tab1 AS cor0
----
-100
-169
-668

skipif mysql # not compatible
query I rowsort label-150
SELECT ALL + - ( 26 ) / - col0 + col1 * - col1 FROM tab1 AS cor0
----
-100
-169
-668

query I rowsort
SELECT ALL - ( col1 + - tab1.col0 * + col0 ) FROM tab1
----
-17
4086
6387

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

query I rowsort
SELECT DISTINCT + 27 + + col2 FROM tab0 AS cor0
----
109
28
60

query I rowsort
SELECT DISTINCT - 9 FROM tab2 AS cor0
----
-9

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

query I rowsort
SELECT DISTINCT + + col2 * - cor0.col1 + col2 * col2 * - col1 AS col2 FROM tab2 AS cor0
----
-23436
-25194
-41418

query I rowsort
SELECT DISTINCT - 24 * col1 + col2 + col1 AS col1 FROM tab2 AS cor0
----
-1331
-353
-686

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

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

query I rowsort
SELECT + 71 + - cor0.col0 FROM tab1 AS cor0
----
-9
68
7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-162
SELECT DISTINCT - - col0 + col0 DIV cor0.col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-162
SELECT DISTINCT - - col0 + col0 / cor0.col2 FROM tab0 AS cor0
----
24
70
90

query I rowsort
SELECT - 0 * - col0 FROM tab1
----
0
0
0

query I rowsort
SELECT 7 + col0 AS col1 FROM tab1
----
10
71
87

query I rowsort
SELECT - col2 + - 60 * - col0 FROM tab2
----
393
4654
4702

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

query I rowsort
SELECT + 73 * - col2 + + col1 AS col1 FROM tab0
----
-2323
-5895
24

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

query I rowsort
SELECT + col0 - - ( 41 ) FROM tab0 cor0
----
130
65
76

query I rowsort
SELECT DISTINCT - col1 + 21 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
1108
1187
2003

onlyif mysql # use DIV operator for integer division
query I rowsort label-171
SELECT + - cor0.col1 + - col1 DIV cor0.col0 + + col2 * + col1 FROM tab2 AS cor0
----
1475
629
802

skipif mysql # not compatible
query I rowsort label-171
SELECT + - cor0.col1 + - col1 / cor0.col0 + + col2 * + col1 FROM tab2 AS cor0
----
1475
629
802

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

query I rowsort
SELECT - - col1 * cor0.col2 + col0 + + col1 * col1 AS col2 FROM tab1 AS cor0
----
1497
2083
734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 39 col2 FROM tab0 AS cor0
----
-3354
-3549
-3783

query I rowsort
SELECT ALL - col0 + ( 39 ) FROM tab1
----
-25
-41
36

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - 50 * col2 col2 FROM tab0 cor0
----
-1683
-4182
-51

query I rowsort
SELECT DISTINCT - - col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

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

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

query I rowsort
SELECT + cor0.col1 * col1 + col1 AS col0 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT + - col0 - + col2 FROM tab2 AS cor0
----
-104
-117
-34

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + cor0.col0 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - col1 * + ( + ( col1 ) ) - col0 * + col2 FROM tab0 AS cor0
----
-15579
-8188
-9444

query I rowsort
SELECT ALL + + col0 * - 17 - + 53 FROM tab1 AS cor0
----
-104
-1141
-1413

query I rowsort
SELECT col1 + - cor0.col0 * - col1 AS col1 FROM tab0 cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 * cor0.col2 + - col2 col0 FROM tab1 cor0
----
-2916
-3249
-9216

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col1 - col0 FROM tab1 AS cor0
----
-106
-55
-84

query I rowsort
SELECT + + col2 - cor0.col2 * col1 * cor0.col1 FROM tab2 AS cor0
----
-10944
-25920
-90480

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-194
SELECT ALL - col1 + - col0 * col2 DIV col1 FROM tab0
----
-171
-95
-97

skipif mysql # not compatible
query I rowsort label-194
SELECT ALL - col1 + - col0 * col2 / col1 FROM tab0
----
-171
-95
-97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-196
SELECT DISTINCT - col1 + - ( - col0 ) * col0 DIV + col1 AS col2 FROM tab0
----
-4
-80
-85

skipif mysql # not compatible
query I rowsort label-196
SELECT DISTINCT - col1 + - ( - col0 ) * col0 / + col1 AS col2 FROM tab0
----
-4
-80
-85

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

query I rowsort
SELECT col0 + col0 + + col0 * - col0 FROM tab0 AS cor0
----
-1155
-528
-7743

query I rowsort
SELECT - col0 + + cor0.col1 + col2 AS col2 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT + - col2 + - col2 - - col1 FROM tab1 AS cor0
----
-104
-179
-82

query I rowsort
SELECT col2 - col2 AS col1 FROM tab0 AS cor0
----
0
0
0

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

query I rowsort
SELECT DISTINCT col0 + col0 * col0 + - col1 AS col0 FROM tab1
----
-14
4150
6467

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

query I rowsort
SELECT - col0 * + col2 * col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT + col1 * + col0 + col0 * col2 AS col0 FROM tab0 cor0
----
15397
2856
3430

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-208
SELECT ALL - col2 + + col2 DIV - col2 FROM tab1 cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-208
SELECT ALL - col2 + + col2 / - col2 FROM tab1 cor0
----
-55
-58
-97

query I rowsort
SELECT - ( col1 ) + - tab2.col1 * + col0 FROM tab2
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-210
SELECT DISTINCT + col0 DIV - col0 col0 FROM tab0
----
-1

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

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

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

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

query I rowsort
SELECT - col1 * 61 FROM tab1 cor0
----
-1586
-610
-793

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - 94 col0 FROM tab0 AS cor0
----
8084
8554
9118

query I rowsort
SELECT + col1 + - 28 AS col2 FROM tab1 cor0
----
-15
-18
-2

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

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

query I rowsort
SELECT DISTINCT - col0 * - 49 * - 15 FROM tab2 cor0
----
-5145
-57330
-58065

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

skipif mysql # not compatible
query I rowsort label-219
SELECT - + col0 / + col2 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
54
56
96

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

query I rowsort
SELECT - cor0.col0 + 92 * - col1 AS col2 FROM tab0 AS cor0
----
-7936
-8461
-8959

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

query I rowsort
SELECT DISTINCT col2 * col1 * + cor0.col1 FROM tab1 cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-224
SELECT DISTINCT + col1 DIV + tab1.col0 + + ( tab1.col0 ) * col1 AS col0 FROM tab1
----
1040
640
86

skipif mysql # not compatible
query I rowsort label-224
SELECT DISTINCT + col1 / + tab1.col0 + + ( tab1.col0 ) * col1 AS col0 FROM tab1
----
1040
640
86

query I rowsort
SELECT ALL 65 * col1 FROM tab0
----
5590
5915
6305

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

query I rowsort
SELECT DISTINCT + col2 + 63 + col2 AS col0 FROM tab1 AS cor0
----
171
177
255

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col1 - col2 col1 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL - ( 10 ) AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT - col0 * + col1 - col0 * - tab1.col0 AS col0 FROM tab1
----
-69
3456
5360

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

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

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

query I rowsort
SELECT DISTINCT + 52 - - tab1.col0 AS col2 FROM tab1
----
116
132
55

query I rowsort
SELECT + ( col0 ) + - cor0.col0 - - 98 AS col2 FROM tab2 cor0
----
98
98
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-236
SELECT DISTINCT + 74 * col1 * 39 + col1 * + col0 + + col1 DIV - 95 AS col2 FROM tab2
----
174876
50405
89683

skipif mysql # not compatible
query I rowsort label-236
SELECT DISTINCT + 74 * col1 * 39 + col1 * + col0 + + col1 / - 95 AS col2 FROM tab2
----
174876
50405
89683

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col0 + col0 * ( - col2 + + ( 27 ) ) col0 FROM tab0 AS cor0
----
1920
3204
4305

query I rowsort
SELECT + - col0 * col2 - - col1 * 30 * + col0 AS col0 FROM tab2 AS cor0
----
136032
37288
6321

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

query I rowsort
SELECT ALL - + 44 * col0 FROM tab0 cor0
----
-1056
-1540
-3916

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

query I rowsort
SELECT - - 65 * - col0 + - col2 AS col1 FROM tab0 AS cor0
----
-1593
-2276
-5867

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

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

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

query I rowsort
SELECT ALL + 63 FROM tab2 AS cor0
----
63
63
63

query I rowsort
SELECT ALL + 24 + col0 AS col0 FROM tab0 AS cor0
----
113
48
59

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

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

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

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

query I rowsort
SELECT DISTINCT ( col2 ) * ( + col1 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col1 * + 78 + + col2 * + col1 AS col0 FROM tab0 AS cor0
----
14560
7663
9546

onlyif mysql # use DIV operator for integer division
query I rowsort label-255
SELECT + tab0.col0 + ( tab0.col2 + col0 ) DIV + tab0.col1 AS col1 FROM tab0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-255
SELECT + tab0.col0 + ( tab0.col2 + col0 ) / + tab0.col1 AS col1 FROM tab0
----
24
35
90

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

query I rowsort
SELECT DISTINCT + + cor0.col0 * + 27 AS col1 FROM tab0 cor0
----
2403
648
945

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 + col2 * + col1 AS col0 FROM tab1 AS cor0
----
1357
1484
637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-259
SELECT col2 * - CAST( col2 AS SIGNED ) col2 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-259
SELECT col2 * - CAST ( col2 AS INTEGER ) col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + ( + col1 * - 13 ) - - col2 FROM tab2
----
-183
-376
-741

query I rowsort
SELECT ALL 30 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

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

query I rowsort
SELECT + + 74 + - col2 FROM tab1 AS cor0
----
-22
17
20

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

query I rowsort
SELECT - 19 FROM tab0, tab0 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

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

query I rowsort
SELECT ALL - ( + 84 ) * - col2 + - 48 AS col1 FROM tab2 AS cor0
----
2136
2220
3144

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

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

query I rowsort
SELECT - 4 * 56 FROM tab1 AS cor0
----
-224
-224
-224

query I rowsort
SELECT DISTINCT + 77 * col2 + col2 AS col1 FROM tab2 AS cor0
----
2028
2106
2964

query I rowsort
SELECT ALL + col0 + - col2 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
1328
1407
634

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

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

query I rowsort
SELECT DISTINCT 45 * col0 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT DISTINCT - - col1 * cor0.col2 * - col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - 30 + col2 * 53 AS col2 FROM tab0 AS cor0
----
1719
23
4316

query I rowsort
SELECT ALL col0 * col1 - - col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + 27 + col2 FROM tab2 AS cor0
----
53
54
65

query I rowsort
SELECT DISTINCT - col0 * - col0 + - col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT ALL - - 7 * - col1 * + 92 FROM tab0 cor0
----
-55384
-58604
-62468

query I rowsort
SELECT 77 - col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1266
-140
-4525

query I rowsort
SELECT ALL 34 - col0 FROM tab2 AS cor0
----
-44
-45
27

query I rowsort
SELECT + ( col1 ) * - 44 + + col1 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT + 66 + - 11 * col2 FROM tab2
----
-220
-231
-352

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

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

query I rowsort
SELECT DISTINCT tab2.col0 - + 21 AS col1 FROM tab2
----
-14
57
58

query I rowsort
SELECT + ( col2 * + col1 ) + - col0 FROM tab0
----
2814
62
7373

query I rowsort
SELECT ( col1 ) + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT col2 + - col1 * - cor0.col2 * 42 - col0 AS col2 FROM tab0 AS cor0
----
119205
313397
4040

query I rowsort
SELECT - + 20 + + col1 + - col1 * ( col2 * col1 ) FROM tab1 AS cor0
----
-16231
-36498
-5710

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-293
SELECT + col1 + col2 DIV + col2 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-293
SELECT + col1 + col2 / + col2 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT + - 20 + col0 * col0 AS col1 FROM tab1 AS cor0
----
-11
4076
6380

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-295
SELECT ALL - CAST( + 55 AS SIGNED ) FROM tab0, tab2 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

skipif mysql # not compatible
query I rowsort label-295
SELECT ALL - CAST ( + 55 AS INTEGER ) FROM tab0, tab2 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT DISTINCT 42 * tab2.col1 AS col2 FROM tab2, tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT 15 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT DISTINCT 31 * - col0 FROM tab1
----
-1984
-2480
-93

query I rowsort
SELECT DISTINCT + ( 58 + + col0 ) * 96 FROM tab2
----
13056
13152
6240

query I rowsort
SELECT ALL + 22 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT ALL - - tab2.col0 * - 82 FROM tab2, tab0, tab2 cor0
----
27 values hashing to d20b016a22c94818c3332f44df2f8610

query I rowsort
SELECT DISTINCT + ( 30 ) * col2 AS col0 FROM tab2
----
1140
780
810

query I rowsort
SELECT + ( - col1 ) AS col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + 16 + - col0 AS col0 FROM tab0 AS cor0
----
-105
-40
-51

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

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

query I rowsort
SELECT ALL + ( 15 ) * col2 + - col1 AS col1 FROM tab2 AS cor0
----
331
374
553

query I rowsort
SELECT + + col2 * - 40 + col1 * + 88 FROM tab2 AS cor0
----
-24
1648
4152

query I rowsort
SELECT ALL + ( + col0 ) + 65 FROM tab0 AS cor0
----
100
154
89

query I rowsort
SELECT 22 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT ALL 77 AS col1 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT DISTINCT - + cor0.col2 + 13 + + col0 * - col2 AS col1 FROM tab0 AS cor0
----
-23
-7367
-812

query I rowsort
SELECT DISTINCT - cor0.col2 + - 42 * ( - col1 ) * col0 + col2 AS col0 FROM tab1 AS cor0
----
26880
3276
43680

query I rowsort
SELECT - - col1 * - 8 FROM tab0 AS cor0
----
-688
-728
-776

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-317
SELECT DISTINCT - cor0.col0 * col0 DIV 28 + col1 DIV - 40 FROM tab0 cor0
----
-22
-284
-45

skipif mysql # not compatible
query I rowsort label-317
SELECT DISTINCT - cor0.col0 * col0 / 28 + col1 / - 40 FROM tab0 cor0
----
-22
-284
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-318
SELECT - - cor0.col2 DIV + 67 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-318
SELECT - - cor0.col2 / + 67 FROM tab2 AS cor0
----
0
0
0

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( + col1 ) + + cor0.col2 * 94 col2 FROM tab0 AS cor0
----
15170
191
5940

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

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

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

query I rowsort
SELECT - ( col2 ) * + col2 + 0 * col1 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col2 + - 62 AS col1 FROM tab0 AS cor0
----
-29
-61
20

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-327
SELECT DISTINCT - cor0.col2 + - col2 DIV col2 + + col1 FROM tab1 cor0
----
-29
-48
-84

skipif mysql # not compatible
query I rowsort label-327
SELECT DISTINCT - cor0.col2 + - col2 / col2 + + col1 FROM tab1 cor0
----
-29
-48
-84

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

query I rowsort
SELECT - - 23 + col1 * - col2 FROM tab0 AS cor0
----
-2815
-74
-7439

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-331
SELECT DISTINCT 84 * cor0.col1 + cor0.col2 + col1 DIV col1 AS col2 FROM tab2 AS cor0
----
1467
2632
4983

skipif mysql # not compatible
query I rowsort label-331
SELECT DISTINCT 84 * cor0.col1 + cor0.col2 + col1 / col1 AS col2 FROM tab2 AS cor0
----
1467
2632
4983

query I rowsort
SELECT ALL + + col1 + cor0.col0 AS col0 FROM tab0 cor0
----
110
132
180

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 62 col0 FROM tab0
----
-62
-62
-62

query I rowsort
SELECT 86 * col1 FROM tab2
----
1462
2666
5074

query I rowsort
SELECT ALL + ( + 29 ) * + cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5319314427cff452ca112595a8b96825

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

query I rowsort
SELECT - - 76 + - col0 FROM tab0 AS cor0
----
-13
41
52

query I rowsort
SELECT - ( - col0 ) + col1 - - 46 FROM tab2 AS cor0
----
142
183
84

query I rowsort
SELECT + 65 * - col0 * - col0 FROM tab2 AS cor0
----
3185
395460
405665

onlyif mysql # use DIV operator for integer division
query I rowsort label-342
SELECT ALL - CAST( - col2 AS SIGNED ) DIV + col1 col0 FROM tab2 AS cor0
----
0
0
2

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

query I rowsort
SELECT 21 + + 55 AS col2 FROM tab1 AS cor0
----
76
76
76

query I rowsort
SELECT ALL - + col2 * col1 + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - col1 - 87 FROM tab1 AS cor0
----
-100
-113
-97

query I rowsort
SELECT - + 4 * - 0 + - col2 * + 92 FROM tab2 AS cor0
----
-2392
-2484
-3496

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

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

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

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

skipif mysql # not compatible
query I rowsort label-349
SELECT DISTINCT + CAST ( - 60 AS REAL ) * - col2 - + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 19 * - 66 AS col2 FROM tab1 cor0
----
-1254
-1254
-1254

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-352
SELECT DISTINCT ( + col2 ) DIV + cor0.col0 + - col2 AS col1 FROM tab1 AS cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-352
SELECT DISTINCT ( + col2 ) / + cor0.col0 + - col2 AS col1 FROM tab1 AS cor0
----
-36
-57
-95

query I rowsort
SELECT 41 + cor0.col2 * + col0 FROM tab2 AS cor0
----
2069
230
3043

onlyif mysql # use DIV operator for integer division
query I rowsort label-354
SELECT + 78 DIV - 63 col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-354
SELECT + 78 / - 63 col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ( 36 ) * - col0 FROM tab1
----
-108
-2304
-2880

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

skipif mysql # not compatible
query I rowsort label-356
SELECT DISTINCT CAST ( + 48 AS INTEGER ) AS col0 FROM tab1
----
48

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 * ( col1 * + col2 ) FROM tab2 AS cor0
----
-22599
-24548
-39884

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

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

query I rowsort
SELECT DISTINCT - tab0.col1 * - col0 - - ( - col1 ) * + 67 FROM tab0
----
-3104
-3698
2002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-363
SELECT col1 * + CAST( 86 AS SIGNED ) AS col0 FROM tab2
----
1462
2666
5074

skipif mysql # not compatible
query I rowsort label-363
SELECT col1 * + CAST ( 86 AS INTEGER ) AS col0 FROM tab2
----
1462
2666
5074

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

query I rowsort
SELECT + col0 * cor0.col0 + col1 * - col0 + col0 FROM tab1 AS cor0
----
-66
3520
5440

query I rowsort
SELECT ALL - tab2.col0 - col0 AS col2 FROM tab2
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-367
SELECT - col1 * col2 + + col1 * - col2 + col2 DIV + col1 AS col2 FROM tab1 AS cor0
----
-1135
-2489
-2806

skipif mysql # not compatible
query I rowsort label-367
SELECT - col1 * col2 + + col1 * - col2 + col2 / + col1 AS col2 FROM tab1 AS cor0
----
-1135
-2489
-2806

query I rowsort
SELECT ALL + - 16 + + col2 AS col2 FROM tab2 AS cor0
----
10
11
22

query I rowsort
SELECT + tab0.col1 + 59 FROM tab0
----
145
150
156

query I rowsort
SELECT DISTINCT 20 + - col1 FROM tab1
----
-6
10
7

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-371
SELECT ( col0 ) + + col2 / col2 col2 FROM tab1
----
4
65
81

query I rowsort
SELECT DISTINCT - + 74 * - cor0.col1 AS col1 FROM tab2, tab0, tab0 AS cor0
----
6364
6734
7178

query I rowsort
SELECT + + ( 15 ) + + col0 FROM tab0 cor0
----
104
39
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 12 + col1 * + col0 - col1 col0 FROM tab1 AS cor0
----
1039
64
642

query I rowsort
SELECT ALL cor0.col0 + + 50 AS col0 FROM tab0 AS cor0
----
139
74
85

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

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

query I rowsort
SELECT ALL - 85 * 75 + col1 AS col2 FROM tab2 AS cor0
----
-6316
-6344
-6358

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

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

query I rowsort
SELECT ALL 79 AS col1 FROM tab0 AS cor0
----
79
79
79

query I rowsort
SELECT col1 * col0 + - 1 FROM tab0
----
2063
3394
8098

query I rowsort
SELECT ALL - ( col2 ) AS col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + 87 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

onlyif mysql # use DIV operator for integer division
query I rowsort label-384
SELECT col2 DIV col1 + 30 FROM tab2
----
30
30
32

skipif mysql # not compatible
query I rowsort label-384
SELECT col2 / col1 + 30 FROM tab2
----
30
30
32

query I rowsort
SELECT + ( - col1 ) AS col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - 19 + cor0.col1 AS col1 FROM tab2 AS cor0
----
-2
12
40

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab1 AS cor0
----
-58

query I rowsort
SELECT ALL - col2 * - 3 + - 76 + cor0.col1 FROM tab2 AS cor0
----
36
55
61

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

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

query I rowsort
SELECT DISTINCT + col1 + - col0 * 43 FROM tab2 AS cor0
----
-270
-3295
-3380

query I rowsort
SELECT DISTINCT + col1 * + cor0.col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-393
SELECT ALL + + col1 * col1 + + 67 DIV - col0 AS col2 FROM tab0 cor0
----
7394
8281
9408

skipif mysql # not compatible
query I rowsort label-393
SELECT ALL + + col1 * col1 + + 67 / - col0 AS col2 FROM tab0 cor0
----
7394
8281
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-394
SELECT DISTINCT + col1 + col0 DIV - 2 AS col2 FROM tab1 AS cor0
----
-22
-27
25

skipif mysql # not compatible
query I rowsort label-394
SELECT DISTINCT + col1 + col0 / - 2 AS col2 FROM tab1 AS cor0
----
-22
-27
25

query I rowsort
SELECT tab2.col2 + + col2 * - 10 FROM tab2
----
-234
-243
-342

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

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

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

query I rowsort
SELECT DISTINCT + - col2 + + col2 * + 65 AS col0 FROM tab2 AS cor0
----
1664
1728
2432

query I rowsort
SELECT - cor0.col2 * + 46 AS col2 FROM tab2 AS cor0
----
-1196
-1242
-1748

onlyif mysql # use DIV operator for integer division
query I rowsort label-400
SELECT DISTINCT - + col2 + col0 DIV col1 AS col0 FROM tab2 AS cor0
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-400
SELECT DISTINCT - + col2 + col0 / col1 AS col0 FROM tab2 AS cor0
----
-25
-27
-34

query I rowsort
SELECT ALL 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-402
SELECT DISTINCT + ( + col2 ) * CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-402
SELECT DISTINCT + ( + col2 ) * CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
1534
646
837

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

skipif mysql # not compatible
query I rowsort label-403
SELECT ( - col2 ) * CAST ( - 81 + + col1 AS INTEGER ) FROM tab1 AS cor0
----
2970
4047
6528

query I rowsort
SELECT DISTINCT - + col1 + col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - - cor0.col2 * - cor0.col0 + ( + col0 ) AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT 48 * + 15 AS col1 FROM tab0
----
720

query I rowsort
SELECT + 53 * cor0.col0 AS col0 FROM tab2 AS cor0
----
371
4134
4187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col1 + ( - tab1.col2 ) col2 FROM tab1
----
-124
-134
-205

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-410
SELECT - col1 DIV col0 AS col2 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-410
SELECT - col1 / col0 AS col2 FROM tab1
----
-8
0
0

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

query I rowsort
SELECT + col2 - 62 AS col2 FROM tab2 AS cor0
----
-24
-35
-36

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

query I rowsort
SELECT ALL + 60 FROM tab2, tab1, tab2 cor0
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT + ( 17 ) * - col1 FROM tab0 AS cor0
----
-1462
-1547
-1649

query I rowsort
SELECT ALL col0 + ( col0 ) FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 * - 93 + + col2 col0 FROM tab2
----
-2392
-2484
-3496

query I rowsort
SELECT - tab2.col0 + 6 AS col1 FROM tab2
----
-1
-72
-73

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

query I rowsort
SELECT 21 + + col1 + - cor0.col2 AS col1 FROM tab2 cor0
----
0
25
54

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

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

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

query I rowsort
SELECT ALL 86 FROM tab2, tab1 cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT ALL + 96 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT DISTINCT + col1 * ( - col0 + + col0 ) FROM tab1
----
0

query I rowsort
SELECT DISTINCT + 35 FROM tab2, tab2 AS cor0
----
35

query I rowsort
SELECT + 40 * + tab2.col1 * cor1.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 03eab739b864936101352c2a54fe0057

query I rowsort
SELECT ( - 6 ) FROM tab0
----
-6
-6
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-429
SELECT DISTINCT - CAST( + col0 AS SIGNED ) * col2 DIV - tab2.col1 FROM tab2
----
176
34
6

skipif mysql # not compatible
query I rowsort label-429
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) * col2 / - tab2.col1 FROM tab2
----
176
34
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-430
SELECT DISTINCT - CAST( - 20 + col1 AS SIGNED ) * - 93 AS col2 FROM tab1
----
-651
-930
558

skipif mysql # not compatible
query I rowsort label-430
SELECT DISTINCT - CAST ( - 20 + col1 AS INTEGER ) * - 93 AS col2 FROM tab1
----
-651
-930
558

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

query I rowsort
SELECT - tab0.col0 + + ( - col1 ) AS col0 FROM tab0
----
-110
-132
-180

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

skipif mysql # not compatible
query I rowsort label-433
SELECT ALL 1 + - ( col2 ) / - col0 FROM tab1 AS cor0
----
1
19
2

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

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

query I rowsort
SELECT - + 17 * - 95 FROM tab0 AS cor0
----
1615
1615
1615

query I rowsort
SELECT + + col0 * col0 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT - col2 + 47 AS col0 FROM tab2 cor0
----
20
21
9

query I rowsort
SELECT ALL + col2 * 58 FROM tab1 AS cor0
----
3132
3306
5568

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

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

query I rowsort
SELECT DISTINCT + 77 AS col0 FROM tab0
----
77

query I rowsort
SELECT DISTINCT + 12 * col0 AS col1 FROM tab0
----
1068
288
420

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab0 cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT - ( + 34 * col2 ) FROM tab2
----
-1292
-884
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-445
SELECT ALL 11 DIV col1 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-445
SELECT ALL 11 / col1 col0 FROM tab0
----
0
0
0

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-446
SELECT + col2 * cor0.col0 / col0 col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + 37 * + col2 + ( cor0.col1 ) FROM tab0 cor0
----
1307
134
3125

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 + + 69 col0 FROM tab2 AS cor0
----
-10
-9
62

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

query I rowsort
SELECT col0 * 64 * col1 FROM tab2
----
13888
294528
85952

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

query I rowsort
SELECT + col1 * col0 + 91 FROM tab2 AS cor0
----
1434
308
4693

query I rowsort
SELECT DISTINCT - + col2 * - col2 + + 73 FROM tab1 AS cor0
----
2989
3322
9289

query I rowsort
SELECT - col1 * ( - col0 ) * col2 - col0 FROM tab2 AS cor0
----
119574
50955
5852

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 50 ) + + col0 col0 FROM tab2 AS cor0
----
-43
28
29

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

query I rowsort
SELECT col2 + + col0 * col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + ( 3 ) * + col2 + + cor0.col1 AS col0 FROM tab2 cor0
----
112
131
137

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 + 15 * cor0.col1 col0 FROM tab0 AS cor0
----
1257
1283
1454

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * - cor0.col1 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 315ab91f9844de122b0c28cd16e982e4

query I rowsort
SELECT ALL - col2 + col2 + + col0 FROM tab0
----
24
35
89

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

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

query I rowsort
SELECT DISTINCT - col1 * - col2 + - col0 - col2 * col0 * - col0 FROM tab1
----
1887
233978
615568

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

query I rowsort
SELECT DISTINCT + tab2.col1 * col1 + col1 + col1 * - col0 / tab2.col2 FROM tab2 WHERE NOT NULL = tab2.col0 * col0 - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-467
SELECT + col2 * col2 DIV - tab0.col0 AS col1 FROM tab0
----
-45
-75
0

skipif mysql # not compatible
query I rowsort label-467
SELECT + col2 * col2 / - tab0.col0 AS col1 FROM tab0
----
-45
-75
0

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

skipif mysql # not compatible
query I rowsort label-468
SELECT col0 / col1 - + tab2.col2 FROM tab2
----
-25
-27
-34

query I rowsort
SELECT ALL col2 * col2 + - col2 - col0 AS col0 FROM tab0
----
-35
1032
6553

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE - col1 > col0 + - col1 * + col0 + - col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col0 AS col2 FROM tab0 WHERE NULL > NULL
----

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

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

query I rowsort
SELECT DISTINCT + col1 + col2 AS col0 FROM tab0 WHERE NOT col1 * col0 / + col1 NOT IN ( + col1 * + col0 )
----

query I rowsort
SELECT ALL + col0 AS col0 FROM tab0 WHERE NULL BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 + + col0 col0 FROM tab0
----
253
37
90

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE NULL < ( col2 - - col1 )
----

query I rowsort
SELECT col1 * + col1 + + col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT + tab2.col0 FROM tab2 WHERE NOT NULL >= ( NULL )
----

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

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

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

query I rowsort
SELECT ALL col0 + col0 * + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT col2 * - col2 * col0 FROM tab1
----
-207936
-737280
-8748

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

query I rowsort
SELECT DISTINCT col2 * tab2.col2 AS col1 FROM tab2
----
1444
676
729

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

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 WHERE NOT ( col2 ) IN ( - col2 )
----
-17
-31
-59

query I rowsort
SELECT col2 - + col0 AS col2 FROM tab0 WHERE NULL = NULL
----

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

query I rowsort
SELECT ALL - tab0.col1 * - col1 + + col1 AS col2 FROM tab0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-491
SELECT col1 + + col2 DIV - tab0.col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-491
SELECT col1 + + col2 / - tab0.col1 FROM tab0
----
86
91
97

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

query I rowsort
SELECT DISTINCT + col2 + - col0 * col2 AS col1 FROM tab0
----
-34
-7216
-759

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

query I rowsort
SELECT ALL + - col0 - col1 * + col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

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

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

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

query I rowsort
SELECT - col0 FROM tab2 AS cor0 WHERE + col1 IN ( col0 ) OR NULL NOT IN ( col1 )
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-502
SELECT ALL + cor0.col0 DIV cor0.col2 + - col1 FROM tab0 AS cor0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-502
SELECT ALL + cor0.col0 / cor0.col2 + - col1 FROM tab0 AS cor0
----
-62
-86
-90

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

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

query I rowsort
SELECT ALL - cor0.col2 * 9 FROM tab1 AS cor0
----
-486
-513
-864

query I rowsort
SELECT DISTINCT col2 * - ( + col2 ) + - col2 * - col0 AS col2 FROM tab0 AS cor0
----
-297
34
574

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

query I rowsort
SELECT ALL 94 * + col1 FROM tab2
----
1598
2914
5546

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

query I rowsort
SELECT ALL - + col0 + col0 * col2 AS col2 FROM tab2 AS cor0
----
182
1950
2923

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab2, tab2 cor1
----
243 values hashing to 5ac29bd6e3a9e69ed9c73ca7a34114f7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col2 FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT - col1 + col0 * + 13 FROM tab1 cor0
----
1027
13
822

onlyif mysql # use DIV operator for integer division
query I rowsort label-515
SELECT col0 DIV tab1.col1 col1 FROM tab1
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-515
SELECT col0 / tab1.col1 col1 FROM tab1
----
0
6
6

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

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

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

query I rowsort
SELECT DISTINCT + col0 + col2 + + col2 * - tab1.col1 FROM tab1
----
-1072
-1347
-449

query I rowsort
SELECT ALL tab2.col2 * col2 * col1 FROM tab2
----
22599
24548
39884

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-521
SELECT DISTINCT + col1 * + col2 * tab0.col0 + col1 * col2 + + col1 DIV tab0.col1 col1 FROM tab0
----
3493
671581
70951

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-521
SELECT DISTINCT + col1 * + col2 * tab0.col0 + col1 * col2 + + col1 / tab0.col1 col1 FROM tab0
----
3493
671581
70951

query I rowsort
SELECT DISTINCT + col2 * - col0 * + col2 AS col2 FROM tab2
----
-114076
-5103
-52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col2 + + col0 col1 FROM tab1
----
111
178
272

query I rowsort
SELECT ALL - col0 + + col1 + col1 AS col2 FROM tab1
----
-44
-54
49

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 WHERE NOT ( NULL ) < ( NULL )
----

query I rowsort
SELECT 84 AS col2 FROM tab0
----
84
84
84

query I rowsort
SELECT - col2 + - col0 * - 16 AS col2 FROM tab0
----
1342
351
559

query I rowsort
SELECT DISTINCT 53 * tab2.col0 FROM tab2
----
371
4134
4187

query I rowsort
SELECT - + col2 * col2 + 82 FROM tab1 cor0
----
-2834
-3167
-9134

query I rowsort
SELECT 87 + col2 FROM tab2 AS cor0
----
113
114
125

query I rowsort
SELECT DISTINCT - + 20 + - col2 FROM tab2 AS cor0
----
-46
-47
-58

query I rowsort
SELECT ALL - 44 - col0 FROM tab2 AS cor0
----
-122
-123
-51

query I rowsort
SELECT + 38 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT - col1 * 29 + 71 AS col1 FROM tab1 cor0
----
-219
-306
-683

query I rowsort
SELECT DISTINCT col0 + - col2 * col2 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

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

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

query I rowsort
SELECT ALL - col2 * + ( - 29 ) FROM tab0 AS cor0
----
2378
29
957

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

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

query I rowsort
SELECT - col1 + + 8 * + 45 FROM tab0 AS cor0
----
263
269
274

query I rowsort
SELECT DISTINCT + cor0.col2 + 40 AS col2 FROM tab1 AS cor0
----
136
94
97

query I rowsort
SELECT + 41 FROM tab0, tab2 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

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

query I rowsort
SELECT col1 * - 12 + + col1 FROM tab0
----
-1001
-1067
-946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

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

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

query I rowsort
SELECT + 73 * - col1 + - ( 79 ) FROM tab2 AS cor0
----
-1320
-2342
-4386

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

skipif mysql # not compatible
query I rowsort label-548
SELECT DISTINCT + 48 + col0 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + + col0 * + col1 + + col2 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

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

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

query I rowsort
SELECT ALL - col2 * + col2 + - 55 FROM tab0 AS cor0
----
-1144
-56
-6779

query I rowsort
SELECT ALL + + ( col1 ) + + col2 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-554
SELECT DISTINCT col2 * col0 - - CAST( - col1 + + col0 AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0
----
-436
4188
8551

skipif mysql # not compatible
query I rowsort label-554
SELECT DISTINCT col2 * col0 - - CAST ( - col1 + + col0 AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0
----
-436
4188
8551

query I rowsort
SELECT 53 FROM tab0, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-557
SELECT + - col2 + + 10 DIV col2 AS col0 FROM tab0 AS cor0
----
-33
-82
9

skipif mysql # not compatible
query I rowsort label-557
SELECT + - col2 + + 10 / col2 AS col0 FROM tab0 AS cor0
----
-33
-82
9

query I rowsort
SELECT + 2 + + col0 AS col2 FROM tab0
----
26
37
91

query I rowsort
SELECT ALL 4 + col2 FROM tab0
----
37
5
86

query I rowsort
SELECT - ( tab0.col2 ) * + col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT 1 + + col0 FROM tab2
----
79
8
80

query I rowsort
SELECT - col1 * - 99 + - cor0.col2 * + col1 FROM tab0 AS cor0
----
1547
5676
9506

query I rowsort
SELECT - cor0.col0 + col1 * + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-118860
-49560
-720900

query I rowsort
SELECT ALL - 63 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to fc0b533c2773a0a802e1fc8317dcebf2

query I rowsort
SELECT ALL - 70 AS col2 FROM tab2
----
-70
-70
-70

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

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

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

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

query I rowsort
SELECT - col0 * - col1 + col0 * - col0 AS col0 FROM tab1
----
-3456
-5360
69

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

query I rowsort
SELECT + ( 1 ) AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL 91 FROM tab2
----
91
91
91

query I rowsort
SELECT ALL 5 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT + 67 + tab2.col1 + + cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 7c469eb52a4e60c762185ac9a367e75b

onlyif mysql # use DIV operator for integer division
query I rowsort label-576
SELECT ALL + 27 DIV + col0 FROM tab1
----
0
0
9

skipif mysql # not compatible
query I rowsort label-576
SELECT ALL + 27 / + col0 FROM tab1
----
0
0
9

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

query I rowsort
SELECT DISTINCT + ( + 29 ) * col2 * col2 AS col2 FROM tab2
----
19604
21141
41876

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-579
SELECT CAST( ( + col1 ) + col2 AS SIGNED ) AS col1 FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-579
SELECT CAST ( ( + col1 ) + col2 AS INTEGER ) AS col1 FROM tab2
----
55
58
85

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-581
SELECT ALL + CAST( - ( - col1 ) + + col2 AS SIGNED ) FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-581
SELECT ALL + CAST ( - ( - col1 ) + + col2 AS INTEGER ) FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT 77 * col1 AS col1 FROM tab0
----
6622
7007
7469

query I rowsort
SELECT DISTINCT 47 AS col2 FROM tab1
----
47

query I rowsort
SELECT ALL 9 FROM tab1
----
9
9
9

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

query I rowsort
SELECT + col1 + col1 - - col0 AS col1 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT DISTINCT 13 AS col1 FROM tab2
----
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-588
SELECT col2 - col2 DIV - col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-588
SELECT col2 - col2 / - col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT + col2 * - col0 + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT + 7 + col2 FROM tab1 AS cor0
----
103
61
64

query I rowsort
SELECT + cor0.col0 + cor0.col2 * - col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - col1 * - col2 + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL - col2 * col1 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + + 98 * col0 FROM tab1 AS cor0
----
294
6272
7840

query I rowsort
SELECT col2 + - col2 * + 5 FROM tab0 AS cor0
----
-132
-328
-4

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

query I rowsort
SELECT ALL - col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

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

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

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

skipif mysql # not compatible
query I rowsort label-599
SELECT + CAST ( NULL AS INTEGER ) + 40 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 25 * + 59 col1 FROM tab2
----
1475

onlyif mysql # use DIV operator for integer division
query I rowsort label-601
SELECT DISTINCT + col0 DIV col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-601
SELECT DISTINCT + col0 / col2 FROM tab0
----
0
1
35

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col0 col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + 22 * cor0.col1 FROM tab1 cor0
----
220
286
572

query I rowsort
SELECT col2 + + col2 * 27 FROM tab1 AS cor0
----
1512
1596
2688

query I rowsort
SELECT - - cor0.col2 * cor0.col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-608
SELECT DISTINCT - + col1 + col1 * 87 DIV + 4 FROM tab1 AS cor0
----
207
269
539

skipif mysql # not compatible
query I rowsort label-608
SELECT DISTINCT - + col1 + col1 * 87 / + 4 FROM tab1 AS cor0
----
207
269
539

query I rowsort
SELECT DISTINCT col1 + 49 * - col2 AS col1 FROM tab0
----
-1531
-3927
48

query I rowsort
SELECT col2 * - col0 * - col0 - - col1 AS col0 FROM tab1
----
233482
512
614413

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

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

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

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

skipif mysql # not compatible
query I rowsort label-613
SELECT + - col2 * CAST ( 57 AS INTEGER ) FROM tab1 AS cor0
----
-3078
-3249
-5472

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 94 col1 FROM tab2 cor0
----
101
172
173

query I rowsort
SELECT + col1 + col0 + 25 AS col1 FROM tab0 AS cor0
----
135
157
205

query I rowsort
SELECT col0 + 68 * + col0 + + col1 FROM tab2 cor0
----
514
5441
5468

onlyif mysql # use DIV operator for integer division
query I rowsort label-617
SELECT DISTINCT - ( - col0 ) DIV cor0.col1 AS col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-617
SELECT DISTINCT - ( - col0 ) / cor0.col1 AS col0 FROM tab0 cor0
----
0

query I rowsort
SELECT + ( 62 ) * - col2 * - 17 FROM tab1 cor0
----
101184
56916
60078

onlyif mysql # use DIV operator for integer division
query I rowsort label-619
SELECT col2 DIV + 49 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-619
SELECT col2 / + 49 col2 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-620
SELECT CAST( + ( + col1 ) AS SIGNED ) AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-620
SELECT CAST ( + ( + col1 ) AS INTEGER ) AS col2 FROM tab0 AS cor0
----
86
91
97

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-625
SELECT + ( cor0.col0 ) DIV - col0 + - col1 * cor0.col0 FROM tab2 AS cor0
----
-1344
-218
-4603

skipif mysql # not compatible
query I rowsort label-625
SELECT + ( cor0.col0 ) / - col0 + - col1 * cor0.col0 FROM tab2 AS cor0
----
-1344
-218
-4603

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

query I rowsort
SELECT ALL col1 * + 59 AS col0 FROM tab0 AS cor0
----
5074
5369
5723

query I rowsort
SELECT DISTINCT + + col1 * 34 AS col0 FROM tab2 AS cor0
----
1054
2006
578

query I rowsort
SELECT col2 + - cor0.col2 FROM tab0 cor0
----
0
0
0

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

skipif mysql # not compatible
query I rowsort label-630
SELECT ALL + 31 / cor0.col1 AS col1 FROM tab2 cor0
----
0
1
1

query I rowsort
SELECT DISTINCT + 30 + col2 FROM tab2 AS cor0
----
56
57
68

query I rowsort
SELECT ALL ( col0 ) * col2 + col1 * + col0 FROM tab0 cor0
----
15397
2856
3430

onlyif mysql # use DIV operator for integer division
query I rowsort label-633
SELECT ALL - col1 * 30 + + cor0.col0 DIV - cor0.col1 - 20 FROM tab2 AS cor0
----
-1791
-534
-950

skipif mysql # not compatible
query I rowsort label-633
SELECT ALL - col1 * 30 + + cor0.col0 / - cor0.col1 - 20 FROM tab2 AS cor0
----
-1791
-534
-950

query I rowsort
SELECT + ( 0 ) * - cor0.col1 + - cor0.col1 * - ( - cor0.col2 ) FROM tab0 AS cor0
----
-2838
-7462
-97

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

query I rowsort
SELECT DISTINCT ( 21 ) + col0 FROM tab2 AS cor0
----
100
28
99

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

query I rowsort
SELECT + + 34 + - col0 FROM tab0 AS cor0
----
-1
-55
10

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 + - col2 * 30 + - col2 FROM tab0 cor0
----
-30
4182
66

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

query I rowsort
SELECT - 6 * col2 + - col2 AS col2 FROM tab0 AS cor0
----
-231
-574
-7

query I rowsort
SELECT ALL 87 + - col2 + col0 AS col0 FROM tab1 AS cor0
----
36
71
94

query I rowsort
SELECT DISTINCT - 28 * col0 FROM tab2 AS cor0
----
-196
-2184
-2212

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 * col2 col1 FROM tab0 AS cor0
----
1485
3690
45

query I rowsort
SELECT + - 80 + col0 FROM tab1 cor0
----
-16
-77
0

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

query I rowsort
SELECT ALL - col2 * col2 * ( + cor0.col1 ) FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT + 53 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT - + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT + + col0 + 16 FROM tab1 AS cor0
----
19
80
96

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-655
SELECT DISTINCT - cor0.col2 + + col0 / 27 col1 FROM tab2 AS cor0
----
-24
-27
-36

query I rowsort
SELECT ALL + cor0.col0 * + ( - 10 * - col2 ) FROM tab2 AS cor0
----
1890
20280
30020

query I rowsort
SELECT ALL + + col0 * 13 FROM tab1 AS cor0
----
1040
39
832

query I rowsort
SELECT + col0 + col2 - cor0.col1 * - col2 AS col1 FROM tab1 AS cor0
----
1424
1461
691

query I rowsort
SELECT ALL ( col2 ) - 63 FROM tab1
----
-6
-9
33

query I rowsort
SELECT + 2 + + 36 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

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

query I rowsort
SELECT ALL - col1 + ( - col1 * + col2 ) FROM tab1 cor0
----
-1261
-1430
-580

query I rowsort
SELECT - col0 * - ( 54 ) + + col2 FROM tab0 AS cor0
----
1329
1891
4888

query I rowsort
SELECT ALL tab2.col1 + - 32 * + 38 FROM tab2
----
-1157
-1185
-1199

query I rowsort
SELECT + col0 + col1 - + 90 FROM tab1
----
-16
-61
3

query I rowsort
SELECT DISTINCT - cor0.col0 * + col1 + - col0 * + 50 FROM tab1 cor0
----
-228
-3840
-5040

query I rowsort
SELECT ALL + 2 - - 0 AS col0 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT ALL col2 * + 75 + - col2 FROM tab2
----
1924
1998
2812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 78 col2 FROM tab1
----
132
135
174

query I rowsort
SELECT col1 + col2 * col2 + col2 AS col2 FROM tab2
----
1499
761
787

query I rowsort
SELECT - col2 * 61 + 70 AS col2 FROM tab2 cor0
----
-1516
-1577
-2248

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

skipif mysql # not compatible
query I rowsort label-672
SELECT ALL col1 + CAST ( NULL AS INTEGER ) + + 74 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col2 * + col2 col0 FROM tab2
----
-1365
-598
-722

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

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

query I rowsort
SELECT + col0 * 75 + col1 FROM tab2
----
556
5909
5942

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 26 * - col0 * - col2 col2 FROM tab0
----
189748
20592
910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + cor0.col0 * 32 col1 FROM tab1 AS cor0
----
2112
2640
99

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-679
SELECT ALL - 29 DIV - col1 FROM tab1 AS cor0
----
1
2
2

skipif mysql # not compatible
query I rowsort label-679
SELECT ALL - 29 / - col1 FROM tab1 AS cor0
----
1
2
2

query I rowsort
SELECT ALL - col2 * - col2 + + col0 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-681
SELECT DISTINCT + col0 DIV + col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-681
SELECT DISTINCT + col0 / + col1 FROM tab0
----
0

query I rowsort
SELECT 81 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT ALL 64 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT - - col2 * 84 * col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
13611
306496
645200

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1, tab2 cor2
----
3645 values hashing to 4805bcb9c04e49d1f6f82defa880d751

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

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

query I rowsort
SELECT ALL - - col2 * + 53 + cor0.col0 AS col1 FROM tab2 AS cor0
----
1438
1456
2093

query I rowsort
SELECT - ( - 37 ) * + col2 FROM tab0 cor0
----
1221
3034
37

query I rowsort
SELECT cor0.col0 * 21 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to d79a460be21fe4e37c6b15765bacb96b

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

skipif mysql # not compatible
query I rowsort label-691
SELECT DISTINCT + ( - 78 ) / - col2 AS col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT col1 + col1 + col2 AS col1 FROM tab0
----
195
205
264

query I rowsort
SELECT - 36 + + col1 * - col0 FROM tab1
----
-1076
-114
-676

query I rowsort
SELECT DISTINCT + 33 + + col1 FROM tab1
----
43
46
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-695
SELECT ALL + + col0 DIV - 49 + cor0.col2 AS col2 FROM tab0 cor0
----
1
33
81

skipif mysql # not compatible
query I rowsort label-695
SELECT ALL + + col0 / - 49 + cor0.col2 AS col2 FROM tab0 cor0
----
1
33
81

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

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

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

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

skipif mysql # not compatible
query I rowsort label-699
SELECT DISTINCT CAST ( 86 AS INTEGER ) FROM tab0 AS cor0
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 col2 FROM tab1, tab1 cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT col1 * - col0 + col0 * - ( col0 ) FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT DISTINCT + + cor0.col2 + 20 FROM tab1, tab0 AS cor0
----
102
21
53

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

query I rowsort
SELECT + + 63 + col1 + - 12 AS col1 FROM tab1 AS cor0
----
61
64
77

query I rowsort
SELECT DISTINCT + col1 * col1 + - col0 FROM tab2 AS cor0
----
210
3403
954

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-708
SELECT DISTINCT - col1 DIV + col1 + - col2 AS col0 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-708
SELECT DISTINCT - col1 / + col1 + - col2 AS col0 FROM tab2 AS cor0
----
-27
-28
-39

query I rowsort
SELECT ALL + col2 * col0 + ( - cor0.col0 * - col1 ) AS col2 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT col0 * cor0.col0 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-513
1197
1224

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

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

query I rowsort
SELECT DISTINCT + col1 + + col0 * - tab0.col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT 26 * col1 AS col2 FROM tab0 AS cor0
----
2236
2366
2522

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

query I rowsort
SELECT col2 * - col2 + + 21 AS col2 FROM tab2 AS cor0
----
-1423
-655
-708

query I rowsort
SELECT DISTINCT - col1 - tab1.col1 FROM tab1
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-718
SELECT col0 DIV - col1 + + cor0.col0 FROM tab2 cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-718
SELECT col0 / - col1 + + cor0.col0 FROM tab2 cor0
----
7
75
77

query I rowsort
SELECT ALL 12 AS col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

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

query I rowsort
SELECT - - col1 * col1 + + col0 + - col2 AS col0 FROM tab2 AS cor0
----
330
3533
941

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

query I rowsort
SELECT + + col2 * col1 + + ( - 80 + col2 ) FROM tab0 AS cor0
----
18
2791
7464

query I rowsort
SELECT DISTINCT - - col2 * - 10 + + cor0.col2 + + cor0.col2 * cor0.col1 * col0 AS col0 FROM tab2 AS cor0
----
119418
50692
5616

query I rowsort
SELECT ALL - - cor0.col0 * - 57 - col0 FROM tab2 cor0
----
-406
-4524
-4582

query I rowsort
SELECT DISTINCT + col2 + col2 + - cor0.col1 FROM tab0 AS cor0
----
-20
-95
73

query I rowsort
SELECT 42 * col1 * ( col0 * + col2 ) AS col2 FROM tab2
----
2143428
246078
5025384

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-728
SELECT DISTINCT col2 - - CAST( + col2 AS SIGNED ) * + cor0.col2 AS col1 FROM tab0 cor0
----
1122
2
6806

skipif mysql # not compatible
query I rowsort label-728
SELECT DISTINCT col2 - - CAST ( + col2 AS INTEGER ) * + cor0.col2 AS col1 FROM tab0 cor0
----
1122
2
6806

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab2 cor0, tab0 cor1
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

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

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

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

query I rowsort
SELECT - 42 + + col0 * - col2 FROM tab2 AS cor0
----
-2070
-231
-3044

query I rowsort
SELECT + - col1 + + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 52 * col0 + - cor0.col1 FROM tab2 AS cor0
----
333
3997
4091

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

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

query I rowsort
SELECT - col2 * 16 FROM tab2 AS cor0
----
-416
-432
-608

query I rowsort
SELECT 98 + - cor0.col1 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 162bc224ecdf92652ee668b36406a011

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

query I rowsort
SELECT - - ( 82 ) + col2 FROM tab1 AS cor0
----
136
139
178

query I rowsort
SELECT col1 + 78 FROM tab1
----
104
88
91

query I rowsort
SELECT ALL col2 * 97 * col1 FROM tab2
----
148798
62662
81189

query I rowsort
SELECT + - col1 * 93 AS col2 FROM tab2 AS cor0
----
-1581
-2883
-5487

query I rowsort
SELECT DISTINCT + + col2 * + 65 - - cor0.col0 FROM tab0 AS cor0
----
100
2169
5419

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

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

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

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

query I rowsort
SELECT ALL + col2 + 64 * - col0 FROM tab1 cor0
----
-138
-4039
-5024

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - 24 col2 FROM tab2 AS cor0
----
-7
35
7

query I rowsort
SELECT - 43 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2f72bd9cab68c8d8c38874510a290a3c

query I rowsort
SELECT ALL + col2 + 9 FROM tab0 AS cor0
----
10
42
91

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

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

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
-86
-91
-97

query I rowsort
SELECT ALL col2 * - cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT tab0.col0 - ( tab0.col1 + col2 ) AS col0 FROM tab0
----
-63
-84
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-757
SELECT col2 DIV - 7 - 38 AS col1 FROM tab0
----
-38
-42
-49

skipif mysql # not compatible
query I rowsort label-757
SELECT col2 / - 7 - 38 AS col1 FROM tab0
----
-38
-42
-49

query I rowsort
SELECT DISTINCT ( col0 ) * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-759
SELECT DISTINCT - - CAST( + 67 AS SIGNED ) * col0 FROM tab2 AS cor0
----
469
5226
5293

skipif mysql # not compatible
query I rowsort label-759
SELECT DISTINCT - - CAST ( + 67 AS INTEGER ) * col0 FROM tab2 AS cor0
----
469
5226
5293

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-762
SELECT ALL - CAST( + 28 AS SIGNED ) + - col0 AS col2 FROM tab1 AS cor0
----
-108
-31
-92

skipif mysql # not compatible
query I rowsort label-762
SELECT ALL - CAST ( + 28 AS INTEGER ) + - col0 AS col2 FROM tab1 AS cor0
----
-108
-31
-92

query I rowsort
SELECT + + 26 AS col2 FROM tab0 AS cor0
----
26
26
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-764
SELECT - col1 DIV col2 + col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-764
SELECT - col1 / col2 + col1 FROM tab1
----
10
13
26

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

skipif mysql # not compatible
query I rowsort label-765
SELECT + col0 * + col2 - + CAST ( - col0 AS INTEGER ) * col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT - 1 AS col2 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 7 * col0 * ( col0 ) FROM tab0 AS cor0
----
4032
55447
8575

query I rowsort
SELECT ALL + + 22 AS col0 FROM tab1 AS cor0
----
22
22
22

query I rowsort
SELECT ( col0 ) + ( - col2 ) - + col1 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT 74 + col2 * ( col0 ) AS col2 FROM tab2 AS cor0
----
2102
263
3076

query I rowsort
SELECT DISTINCT + 13 FROM tab2 cor0
----
13

query I rowsort
SELECT ALL - 78 AS col2 FROM tab1 cor0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) col0 FROM tab0 cor0
----
-1
-33
-82

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

skipif mysql # not compatible
query I rowsort label-774
SELECT DISTINCT + + 0 / col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 66 + ( - col2 ) + col2 FROM tab2
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - col2 * - col0 * - 43 col1 FROM tab1
----
-156854
-330227
-6940

query I rowsort
SELECT ALL - 44 + + col0 - col2 * 57 * col0 AS col1 FROM tab2
----
-10810
-115562
-171079

onlyif mysql # use DIV operator for integer division
query I rowsort label-778
SELECT ALL + col1 + col2 DIV - col0 AS col1 FROM tab0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-778
SELECT ALL + col1 + col2 / - col0 AS col1 FROM tab0
----
85
91
97

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col0 + - col2 * + CAST ( + col2 AS REAL ) AS col1 FROM tab2
----
-1365
-598
-722

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-781
SELECT ( col1 ) DIV col0 + - col2 * - col1 AS col0 FROM tab0 cor0
----
2841
7463
99

skipif mysql # not compatible
query I rowsort label-781
SELECT ( col1 ) / col0 + - col2 * - col1 AS col0 FROM tab0 cor0
----
2841
7463
99

query I rowsort
SELECT - col0 + cor0.col2 * + 49 AS col0 FROM tab2 AS cor0
----
1196
1316
1783

query I rowsort
SELECT DISTINCT + 45 + col0 AS col1 FROM tab2 cor0
----
123
124
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-784
SELECT DISTINCT col0 DIV col2 + - 62 + - col0 FROM tab1 AS cor0
----
-125
-142
-65

skipif mysql # not compatible
query I rowsort label-784
SELECT DISTINCT col0 / col2 + - 62 + - col0 FROM tab1 AS cor0
----
-125
-142
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-785
SELECT ALL + col1 - + col0 DIV - ( col2 ) AS col0 FROM tab0 AS cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-785
SELECT ALL + col1 - + col0 / - ( col2 ) AS col0 FROM tab0 AS cor0
----
132
86
92

query I rowsort
SELECT + - 23 AS col0 FROM tab0 AS cor0
----
-23
-23
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-787
SELECT + col1 + + cor0.col2 DIV - 82 FROM tab0 AS cor0
----
86
90
97

skipif mysql # not compatible
query I rowsort label-787
SELECT + col1 + + cor0.col2 / - 82 FROM tab0 AS cor0
----
86
90
97

query I rowsort
SELECT DISTINCT - 93 + col1 * + col1 AS col2 FROM tab1
----
583
7
76

query I rowsort
SELECT ALL col1 + + col2 + - ( col0 ) * - tab2.col0 FROM tab2
----
107
6169
6296

onlyif mysql # use DIV operator for integer division
query I rowsort label-790
SELECT ALL - col1 + + col2 + + col1 DIV col0 AS col1 FROM tab1
----
36
47
83

skipif mysql # not compatible
query I rowsort label-790
SELECT ALL - col1 + + col2 + + col1 / col0 AS col1 FROM tab1
----
36
47
83

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * ( col1 + col0 ) col2 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT - - cor0.col0 + + 60 FROM tab0 cor0
----
149
84
95

query I rowsort
SELECT DISTINCT 16 + + col2 + 45 FROM tab0
----
143
62
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-795
SELECT + col1 DIV - col0 AS col2 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-795
SELECT + col1 / - col0 AS col2 FROM tab0
----
-1
-2
-3

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

skipif mysql # not compatible
query I rowsort label-796
SELECT + col1 * col2 / tab1.col2 AS col2 FROM tab1
----
10
13
26

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

query I rowsort
SELECT DISTINCT + ( + col0 ) + + 17 * 96 FROM tab2
----
1639
1710
1711

query I rowsort
SELECT ALL + + col2 + + ( - 8 ) FROM tab2 cor0
----
18
19
30

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

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

query I rowsort
SELECT cor0.col0 * - col1 + - col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

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

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

skipif mysql # not compatible
query I rowsort label-804
SELECT ALL - + col1 / - col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 + 7 * 90 AS col0 FROM tab2 AS cor0
----
592
603
604

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

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

query I rowsort
SELECT + 47 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT ( 57 ) + + tab1.col2 FROM tab1
----
111
114
153

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

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

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

query I rowsort
SELECT DISTINCT + col2 * - 0 + col2 AS col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - cor0.col2 * 75 - cor0.col1 FROM tab1 cor0
----
-4076
-4285
-7213

query I rowsort
SELECT + ( 28 ) * + col2 FROM tab2 cor0
----
1064
728
756

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

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

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

skipif mysql # not compatible
query I rowsort label-815
SELECT - CAST ( + col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - col2 * 10 FROM tab0 AS cor0
----
-10
-330
-820

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

skipif mysql # not compatible
query I rowsort label-817
SELECT - + col1 / + cor0.col1 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + + col2 + col1 * 79 AS col0 FROM tab1 AS cor0
----
1123
2108
847

query I rowsort
SELECT ALL - - ( + col1 ) AS col1 FROM tab2 AS cor0
----
17
31
59

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

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

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

query I rowsort
SELECT col1 * + col1 - col2 FROM tab0 AS cor0
----
7363
8199
9408

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

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

query I rowsort
SELECT - col1 * + 18 + col2 AS col2 FROM tab2
----
-1036
-268
-531

query I rowsort
SELECT ALL - col1 + 31 AS col0 FROM tab1
----
18
21
5

query I rowsort
SELECT + 33 AS col1 FROM tab0 cor0
----
33
33
33

query I rowsort
SELECT ( - col2 * - col2 ) AS col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - col2 * - col1 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-830
SELECT DISTINCT 28 DIV ( cor0.col1 * - 37 ) FROM tab2, tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-830
SELECT DISTINCT 28 / ( cor0.col1 * - 37 ) FROM tab2, tab2 AS cor0
----
0

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

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

query I rowsort
SELECT DISTINCT + col2 * + 9 AS col1 FROM tab1
----
486
513
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 * col2 + 94 col0 FROM tab0
----
129
7392
886

onlyif mysql # use DIV operator for integer division
query I rowsort label-834
SELECT col1 DIV col0 col0 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-834
SELECT col1 / col0 col0 FROM tab2
----
0
0
4

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-836
SELECT + col0 / col1 col1 FROM tab2 AS cor0
----
0
1
4

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-838
SELECT DISTINCT - col1 DIV cor0.col1 FROM tab0 AS cor0
----
-1

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

query I rowsort
SELECT - + col2 + col0 * + col1 FROM tab2 AS cor0
----
1305
190
4576

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-841
SELECT ALL col0 DIV - 54 AS col2 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-841
SELECT ALL col0 / - 54 AS col2 FROM tab2
----
-1
-1
0

query I rowsort
SELECT - col0 * + 87 FROM tab2 AS cor0
----
-609
-6786
-6873

onlyif mysql # use DIV operator for integer division
query I rowsort label-843
SELECT - - col1 DIV 29 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-843
SELECT - - col1 / 29 AS col1 FROM tab1 AS cor0
----
0
0
0

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

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

skipif mysql # not compatible
query I rowsort label-845
SELECT - + col2 / 59 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + 69 * col2 AS col0 FROM tab1 AS cor0
----
3780
3990
6720

query I rowsort
SELECT DISTINCT - ( 35 ) + - col1 FROM tab2 AS cor0
----
-52
-66
-94

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

query I rowsort
SELECT 4 + col2 * + col1 AS col0 FROM tab0 AS cor0
----
101
2842
7466

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

skipif mysql # not compatible
query I rowsort label-850
SELECT col0 / - col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 63 + 59 * cor0.col2 + ( - col1 + + col2 ) FROM tab0 AS cor0
----
1957
26
4892

query I rowsort
SELECT + 67 AS col2 FROM tab2 cor0
----
67
67
67

query I rowsort
SELECT 29 * + tab0.col0 - + ( 36 ) * + col0 * col0 AS col1 FROM tab0
----
-20040
-282575
-43085

query I rowsort
SELECT ALL ( col0 * + 80 ) AS col2 FROM tab1
----
240
5120
6400

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

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

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

query I rowsort
SELECT DISTINCT + col0 + 95 * col0 AS col2 FROM tab1 AS cor0
----
288
6144
7680

query I rowsort
SELECT - + col2 + - 58 FROM tab2 AS cor0
----
-84
-85
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 + + 98 col2 FROM tab2 AS cor0
----
19
20
91

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

query I rowsort
SELECT ALL + 22 * col0 FROM tab1
----
1408
1760
66

query I rowsort
SELECT DISTINCT - col0 + + ( 59 * col0 ) FROM tab0 AS cor0
----
1392
2030
5162

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col0 FROM tab2, tab0, tab1 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL ( + 73 ) * - col0 + col1 * + col0 FROM tab0
----
1602
312
840

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

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

query I rowsort
SELECT - tab2.col1 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-868
SELECT ALL + 84 DIV - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-868
SELECT ALL + 84 / - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-12

query I rowsort
SELECT DISTINCT - 86 + - col1 * + col1 * ( + col1 + - col0 ) FROM tab0 AS cor0
----
-16648
-458638
-583444

query I rowsort
SELECT + 48 * - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-1251
-544
-704

onlyif mysql # use DIV operator for integer division
query I rowsort label-871
SELECT ALL - col2 DIV - col0 + - col2 * - 40 AS col0 FROM tab1 AS cor0
----
2178
2280
3841

skipif mysql # not compatible
query I rowsort label-871
SELECT ALL - col2 / - col0 + - col2 * - 40 AS col0 FROM tab1 AS cor0
----
2178
2280
3841

query I rowsort
SELECT + ( col2 ) * col1 * 31 + col2 + col2 * - col0 AS col0 FROM tab0 AS cor0
----
224106
2973
87219

query I rowsort
SELECT DISTINCT - - col2 + + cor0.col2 + col2 FROM tab1 AS cor0
----
162
171
288

query I rowsort
SELECT col0 * + col0 + + ( 79 ) * col2 FROM tab0 AS cor0
----
1304
14399
3183

query I rowsort
SELECT ALL - + cor0.col0 + col0 * 41 FROM tab1 AS cor0
----
120
2560
3200

onlyif mysql # use DIV operator for integer division
query I rowsort label-876
SELECT + - col1 + col2 DIV + cor0.col2 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-876
SELECT + - col1 + col2 / + cor0.col2 FROM tab0 cor0
----
-85
-90
-96

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

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

query I rowsort
SELECT DISTINCT + 33 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
20
23
7

query I rowsort
SELECT + col0 + col0 * cor0.col0 FROM tab0 cor0
----
1260
600
8010

query I rowsort
SELECT + - 23 + + col1 + 41 FROM tab1 cor0
----
28
31
44

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

query I rowsort
SELECT DISTINCT - col2 + - col2 * + col2 * - col2 FROM tab1 AS cor0
----
157410
185136
884640

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-885
SELECT DISTINCT - col1 + col0 + col0 DIV 33 AS col0 FROM tab0 AS cor0
----
-61
-62
0

skipif mysql # not compatible
query I rowsort label-885
SELECT DISTINCT - col1 + col0 + col0 / 33 AS col0 FROM tab0 AS cor0
----
-61
-62
0

query I rowsort
SELECT col2 + col1 * - ( 74 ) FROM tab1 AS cor0
----
-1870
-683
-866

query I rowsort
SELECT ALL - col0 + tab1.col1 + col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - 36 * col0 FROM tab2 AS cor0
----
-252
-2808
-2844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( + col0 ) * + col0 + col2 + + col1 col2 FROM tab0 AS cor0
----
-1127
-457
-7748

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

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

query I rowsort
SELECT cor0.col2 * - 62 FROM tab1 AS cor0
----
-3348
-3534
-5952

query I rowsort
SELECT col0 * ( ( cor0.col1 ) ) + col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT col0 * 25 FROM tab2 AS cor0
----
175
1950
1975

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

query I rowsort
SELECT DISTINCT - cor0.col1 * ( + col2 ) FROM tab0 AS cor0
----
-2838
-7462
-97

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-898
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT - col2 + 59 AS col0 FROM tab0 AS cor0
----
-23
26
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-901
SELECT DISTINCT - + col1 DIV ( + col0 ) + col1 * - col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-86

skipif mysql # not compatible
query I rowsort label-901
SELECT DISTINCT - + col1 / ( + col0 ) + col1 * - col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-902
SELECT DISTINCT CAST( col1 AS SIGNED ) * - col0 + 50 FROM tab0 AS cor0
----
-2014
-3345
-8049

skipif mysql # not compatible
query I rowsort label-902
SELECT DISTINCT CAST ( col1 AS INTEGER ) * - col0 + 50 FROM tab0 AS cor0
----
-2014
-3345
-8049

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

query I rowsort
SELECT - tab1.col0 - col1 * ( col0 ) * col0 AS col2 FROM tab1
----
-237
-41024
-83280

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 cor1
----
10
13
26

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

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

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

skipif mysql # not compatible
query I rowsort label-907
SELECT + + 26 / + 91 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 - - 83 * col1 * col0 FROM tab2 AS cor0
----
111390
18004
381888

query I rowsort
SELECT ALL + + col2 * - 47 FROM tab1 AS cor0
----
-2538
-2679
-4512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 31 col2 FROM tab1 AS cor0
----
31

query I rowsort
SELECT ALL - col2 * - 79 FROM tab2 cor0
----
2054
2133
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-912
SELECT DISTINCT + CAST( ( + col0 ) AS SIGNED ) * 61 AS col1 FROM tab2 AS cor0
----
427
4758
4819

skipif mysql # not compatible
query I rowsort label-912
SELECT DISTINCT + CAST ( ( + col0 ) AS INTEGER ) * 61 AS col1 FROM tab2 AS cor0
----
427
4758
4819

query I rowsort
SELECT - 66 + + col1 FROM tab2 AS cor0
----
-35
-49
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - 37 ) col1 FROM tab1 AS cor0
----
37

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

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

query I rowsort
SELECT ALL + + col2 + - 29 * - col1 AS col1 FROM tab2 AS cor0
----
1737
531
926

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

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

query I rowsort
SELECT DISTINCT + + 37 + cor0.col2 FROM tab2 AS cor0
----
63
64
75

query I rowsort
SELECT ALL + + ( 5 ) * cor0.col2 - 37 FROM tab1 AS cor0
----
233
248
443

query I rowsort
SELECT col0 + col0 * cor0.col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - col2 * + 31 FROM tab1 AS cor0
----
-1674
-1767
-2976

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

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

query I rowsort
SELECT 82 * tab0.col0 FROM tab0
----
1968
2870
7298

query I rowsort
SELECT ALL 39 - col0 * + cor0.col1 FROM tab1 AS cor0
----
-1001
-39
-601

query I rowsort
SELECT ALL 43 * + col2 AS col1 FROM tab1
----
2322
2451
4128

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

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

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

query I rowsort
SELECT DISTINCT col1 + - col2 + + col1 * col0 AS col1 FROM tab1 AS cor0
----
50
593
957

query I rowsort
SELECT ALL col2 * + 15 FROM tab0
----
1230
15
495

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-933
SELECT col1 + - col0 DIV + 66 FROM tab1 AS cor0
----
10
12
26

skipif mysql # not compatible
query I rowsort label-933
SELECT col1 + - col0 / + 66 FROM tab1 AS cor0
----
10
12
26

query I rowsort
SELECT ALL 57 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT ALL col1 * + 84 AS col2 FROM tab0
----
7224
7644
8148

query I rowsort
SELECT - + col2 + 97 AS col2 FROM tab1 cor0
----
1
40
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-937
SELECT - - col0 DIV 24 AS col0 FROM tab2 AS cor0
----
0
3
3

skipif mysql # not compatible
query I rowsort label-937
SELECT - - col0 / 24 AS col0 FROM tab2 AS cor0
----
0
3
3

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

query I rowsort
SELECT - col0 + + col2 * - ( - col1 ) * cor0.col0 AS col2 FROM tab2 AS cor0
----
119574
50955
5852

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-940
SELECT ALL - col2 * - CAST( col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-940
SELECT ALL - col2 * - CAST ( col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col2 * - col2 * - col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT - col2 * 90 FROM tab0 cor0
----
-2970
-7380
-90

query I rowsort
SELECT - 98 + col1 * + ( ( cor0.col2 ) ) FROM tab0 cor0
----
-1
2740
7364

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

query I rowsort
SELECT col1 + col2 * - 40 AS col1 FROM tab0 AS cor0
----
-1234
-3189
57

query I rowsort
SELECT cor0.col0 * col1 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT + - ( 79 ) * col2 FROM tab0 AS cor0
----
-2607
-6478
-79

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

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

query I rowsort
SELECT ALL 70 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

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

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) * - col0 + 58 * - ( - col0 ) AS col0 FROM tab0 AS cor0
----
13083
1968
3255

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

query I rowsort
SELECT 9 FROM tab0 cor0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) col1 FROM tab2
----
26
27
38

query I rowsort
SELECT - 12 * + col1 AS col0 FROM tab2
----
-204
-372
-708

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

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

query I rowsort
SELECT + ( col2 ) + cor0.col2 * col0 AS col1 FROM tab0 cor0
----
36
7380
825

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

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

query I rowsort
SELECT ALL col0 * - 22 AS col2 FROM tab0
----
-1958
-528
-770

onlyif mysql # use DIV operator for integer division
query I rowsort label-964
SELECT DISTINCT + col1 DIV - 73 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-964
SELECT DISTINCT + col1 / - 73 FROM tab0
----
-1

query I rowsort
SELECT col2 * 37 AS col0 FROM tab2
----
1406
962
999

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - col2 * - col0 col2 FROM tab1 AS cor0
----
136
3638
7667

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

query I rowsort
SELECT - 93 + - col2 * col0 FROM tab0 AS cor0
----
-128
-7391
-885

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

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

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

query I rowsort
SELECT - col2 * - 82 AS col0 FROM tab0 AS cor0
----
2706
6724
82

query I rowsort
SELECT 19 AS col1 FROM tab2 AS cor0
----
19
19
19

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

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

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

query I rowsort
SELECT + + ( 26 ) * + col0 + col0 AS col0 FROM tab1 AS cor0
----
1728
2160
81

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

query I rowsort
SELECT ALL col1 + 26 * col2 FROM tab2 cor0
----
1005
733
735

query I rowsort
SELECT - 51 FROM tab0, tab2 cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT + + 91 * + col1 * + cor0.col2 + + ( cor0.col0 ) - col1 AS col2 FROM tab0 AS cor0
----
258196
679040
8765

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

query I rowsort
SELECT DISTINCT col2 * + col2 * col1 + + 99 FROM tab2
----
22698
24647
39983

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

query I rowsort
SELECT DISTINCT 10 + + col0 FROM tab2
----
17
88
89

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

query I rowsort
SELECT ALL + 48 AS col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT DISTINCT - col2 * 35 + col2 FROM tab1
----
-1836
-1938
-3264

query I rowsort
SELECT - ( - 72 ) FROM tab2
----
72
72
72

query I rowsort
SELECT + 15 + ( col1 ) * ( + ( col1 ) ) AS col2 FROM tab0 cor0
----
7411
8296
9424

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

query I rowsort
SELECT ALL + 71 * col0 + col0 - col1 AS col1 FROM tab0 AS cor0
----
1642
2423
6317

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

skipif mysql # not compatible
query I rowsort label-994
SELECT - + CAST ( - col2 AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-995
SELECT ALL ( + col2 ) - col2 DIV col0 AS col0 FROM tab1 cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-995
SELECT ALL ( + col2 ) - col2 / col0 AS col0 FROM tab1 cor0
----
36
57
95

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

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

query I rowsort
SELECT DISTINCT + + 54 AS col0 FROM tab0 AS cor0
----
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-999
SELECT - - cor0.col0 DIV 38 + col1 col1 FROM tab1 AS cor0
----
11
15
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-999
SELECT - - cor0.col0 / 38 + col1 col1 FROM tab1 AS cor0
----
11
15
26

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

query I rowsort
SELECT - 78 + + col0 AS col0 FROM tab0
----
-43
-54
11

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1006
SELECT ALL + col0 * + CAST ( - 93 AS INTEGER ) FROM tab2 AS cor0
----
-651
-7254
-7347

query I rowsort
SELECT ALL + col2 + + col1 * 8 FROM tab2 AS cor0
----
174
275
498

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

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

query I rowsort
SELECT ALL - col2 * - 33 AS col0 FROM tab0 AS cor0
----
1089
2706
33

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

query I rowsort
SELECT - col2 + - cor0.col0 * 15 AS col0 FROM tab0 AS cor0
----
-1417
-393
-526

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1012
SELECT ALL - - cor0.col2 + + CAST( + cor0.col2 AS SIGNED ) * - col1 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif mysql # not compatible
query I rowsort label-1012
SELECT ALL - - cor0.col2 + + CAST ( + cor0.col2 AS INTEGER ) * - col1 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - col1 * - 93 AS col1 FROM tab2 cor0
----
1581
2883
5487

onlyif mysql # use DIV operator for integer division
query I rowsort label-1014
SELECT ALL + col2 + 98 DIV - col1 AS col0 FROM tab2 AS cor0
----
24
25
33

skipif mysql # not compatible
query I rowsort label-1014
SELECT ALL + col2 + 98 / - col1 AS col0 FROM tab2 AS cor0
----
24
25
33

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

query I rowsort
SELECT DISTINCT - + col2 + + 21 * col2 FROM tab0 AS cor0
----
1640
20
660

query I rowsort
SELECT ALL - - col0 * col2 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT + 72 AS col1 FROM tab0
----
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-1019
SELECT ALL + col1 + - col2 * 80 DIV + col1 FROM tab2 AS cor0
----
-161
-38
24

skipif mysql # not compatible
query I rowsort label-1019
SELECT ALL + col1 + - col2 * 80 / + col1 FROM tab2 AS cor0
----
-161
-38
24

query I rowsort
SELECT ALL + col1 * - 60 * + col1 + cor0.col2 AS col2 FROM tab2 AS cor0
----
-17302
-208834
-57633

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1023
SELECT ALL - col1 * CAST( - col2 AS SIGNED ) * col0 AS col1 FROM tab0 cor0
----
3395
664118
68112

skipif mysql # not compatible
query I rowsort label-1023
SELECT ALL - col1 * CAST ( - col2 AS INTEGER ) * col0 AS col1 FROM tab0 cor0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + 84 col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 88690b86b4088e2a9f2a0ba664caa793

query I rowsort
SELECT + col2 * col0 + - 64 FROM tab1 AS cor0
----
3584
7616
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - - col1 * col2 col0 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT ALL + col1 + - 47 * + 67 FROM tab0 AS cor0
----
-3052
-3058
-3063

query I rowsort
SELECT DISTINCT - col0 + + 59 + - 12 FROM tab1 AS cor0
----
-17
-33
44

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

skipif mysql # not compatible
query I rowsort label-1029
SELECT + + CAST ( - ( col1 ) AS INTEGER ) + - ( ( col2 ) ) AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT 44 + col1 * col1 FROM tab2 AS cor0
----
1005
333
3525

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

query I rowsort
SELECT + ( - 25 ) + col1 * + ( col1 ) AS col0 FROM tab2 AS cor0
----
264
3456
936

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - col0 + + col0 * - cor0.col1 * col1 col0 FROM tab0 AS cor0
----
-176928
-328090
-729088

query I rowsort
SELECT + 29 + + col1 AS col0 FROM tab1 AS cor0
----
39
42
55

query I rowsort
SELECT DISTINCT 47 * cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
1464
2851
878

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

query I rowsort
SELECT DISTINCT - - 13 - + col0 AS col1 FROM tab1 AS cor0
----
-51
-67
10

query I rowsort
SELECT ALL 46 AS col2 FROM tab1 AS cor0
----
46
46
46

query I rowsort
SELECT + col1 * col2 AS col0 FROM tab0 cor0
----
2838
7462
97

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

query I rowsort
SELECT DISTINCT - 1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT - + 5 + + col0 AS col2 FROM tab1 AS cor0
----
-2
59
75

query I rowsort
SELECT ALL + 56 + - col2 * 17 * - 95 FROM tab2 AS cor0
----
42046
43661
61426

query I rowsort
SELECT ALL - - cor0.col0 + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

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

query I rowsort
SELECT DISTINCT + + col0 - col2 AS col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT tab1.col0 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT ALL ( + ( col0 ) * + ( - col0 ) ) + col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT 62 + - col2 AS col1 FROM tab0 AS cor0
----
-20
29
61

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1053
SELECT ALL - cor0.col0 DIV cor0.col1 + - 54 * - ( col0 * col2 ) FROM tab2 AS cor0
----
10206
109511
162104

skipif mysql # not compatible
query I rowsort label-1053
SELECT ALL - cor0.col0 / cor0.col1 + - 54 * - ( col0 * col2 ) FROM tab2 AS cor0
----
10206
109511
162104

query I rowsort
SELECT + 14 + - col0 * ( - 87 ) AS col2 FROM tab2 AS cor0
----
623
6800
6887

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 55 col2 FROM tab1
----
55

query I rowsort
SELECT ALL + 97 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT - - 64 FROM tab1 AS cor0
----
64
64
64

query I rowsort
SELECT ALL - 99 AS col1 FROM tab1
----
-99
-99
-99

query I rowsort
SELECT + 49 * col0 FROM tab1 AS cor0
----
147
3136
3920

query I rowsort
SELECT - + col0 + col2 * + col2 AS col1 FROM tab0 AS cor0
----
-34
1065
6635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1062
SELECT DISTINCT - cor0.col2 / CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1062
SELECT DISTINCT - cor0.col2 / CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + cor0.col1 + 33 AS col2 FROM tab0 cor0
----
119
124
130

query I rowsort
SELECT ALL + col0 * 60 * - col2 AS col1 FROM tab0
----
-2100
-437880
-47520

query I rowsort
SELECT - cor0.col0 * 11 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
-30
-640
-800

query I rowsort
SELECT col0 * - 62 - 3 AS col2 FROM tab1 AS cor0
----
-189
-3971
-4963

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1068
SELECT col0 * + CAST( - col2 AS SIGNED ) * + cor0.col1 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1068
SELECT col0 * + CAST ( - col2 AS INTEGER ) * + cor0.col1 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT - col2 * 23 - col2 FROM tab2 AS cor0
----
-624
-648
-912

query I rowsort
SELECT ALL + cor0.col2 * 58 + 97 AS col2 FROM tab1 cor0
----
3229
3403
5665

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

skipif mysql # not compatible
query I rowsort label-1071
SELECT col1 + - CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + - cor0.col2 * - ( + col2 ) + + col0 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL ( - 17 ) * + cor2.col0 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 623fbbcde8aac411ea18298ee5443cb8

query I rowsort
SELECT + 58 AS col1 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT + col2 * col2 * col2 + col1 + + 2 FROM tab2 AS cor0
----
17637
19716
54891

query I rowsort
SELECT - ( + col1 ) + - col0 + + col0 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab0, tab1 AS cor0
----
-56

query I rowsort
SELECT + + ( - col0 ) + - col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT + - col0 + - col0 FROM tab0 AS cor0
----
-178
-48
-70

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

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

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

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

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

query I rowsort
SELECT + 33 + col0 AS col1 FROM tab0 AS cor0
----
122
57
68

query I rowsort
SELECT ALL + ( - col0 ) + - cor0.col2 + - 28 AS col1 FROM tab1 cor0
----
-149
-204
-85

query I rowsort
SELECT DISTINCT + 28 * col1 + + col1 * 47 + col2 AS col0 FROM tab2 AS cor0
----
1313
2352
4451

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

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

skipif mysql # not compatible
query I rowsort label-1088
SELECT ALL + + ( 73 ) * col2 - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - ( col2 ) + + cor0.col1 * + col0 AS col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-1090
SELECT ALL - 88 + col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
-87
-87
-87

skipif mysql # not compatible
query I rowsort label-1090
SELECT ALL - 88 + col1 / cor0.col1 AS col0 FROM tab1 AS cor0
----
-87
-87
-87

query I rowsort
SELECT DISTINCT cor0.col0 - 68 AS col2 FROM tab1 AS cor0
----
-4
-65
12

query I rowsort
SELECT col1 - - 83 FROM tab1 AS cor0
----
109
93
96

query I rowsort
SELECT ALL - - col1 * col1 + - col2 + col1 FROM tab0 AS cor0
----
7449
8290
9505

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

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

skipif mysql # not compatible
query I rowsort label-1095
SELECT + col0 / col1 AS col2 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT 63 + ( col2 ) AS col2 FROM tab2
----
101
89
90

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

query I rowsort
SELECT DISTINCT col1 - - 19 AS col1 FROM tab0 AS cor0
----
105
110
116

query I rowsort
SELECT - + col1 + col2 * - col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

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

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

query I rowsort
SELECT col2 - + 72 AS col1 FROM tab0 AS cor0
----
-39
-71
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT col0 * + 63 * col2 FROM tab2
----
11907
127764
189126

query I rowsort
SELECT tab2.col2 + + col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - 75 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

query I rowsort
SELECT - col1 * - col0 * + col1 AS col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT - 60 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 1a0b29f8e6f82c54623a665ba4af8fd1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * col0 * - 53 + - col1 col2 FROM tab1 AS cor0
----
-217098
-339213
-503

query I rowsort
SELECT DISTINCT + - 25 * col1 FROM tab1 AS cor0
----
-250
-325
-650

query I rowsort
SELECT DISTINCT cor0.col1 + - 61 AS col0 FROM tab0, tab0 cor0
----
25
30
36

query I rowsort
SELECT DISTINCT + + col0 * - col0 * + 44 + col2 AS col1 FROM tab0 AS cor0
----
-25311
-348442
-53899

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

query I rowsort
SELECT ALL + ( col2 + col1 ) FROM tab0
----
119
173
98

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

skipif mysql # not compatible
query I rowsort label-1114
SELECT DISTINCT - - col2 / - col2 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL 91 * + col2 FROM tab1
----
4914
5187
8736

query I rowsort
SELECT DISTINCT ( 74 ) AS col0 FROM tab1, tab0 cor0
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-1117
SELECT ALL + col1 * + ( - col1 ) * - col1 + col0 DIV - col1 AS col2 FROM tab0
----
636056
753571
912673

skipif mysql # not compatible
query I rowsort label-1117
SELECT ALL + col1 * + ( - col1 ) * - col1 + col0 / - col1 AS col2 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT ALL col2 + + col0 + - col1 FROM tab2
----
100
3
45

query I rowsort
SELECT ALL + col1 * - col2 + + col2 + + tab1.col0 FROM tab1
----
-1072
-1347
-449

query I rowsort
SELECT DISTINCT - ( - 95 ) FROM tab2 cor0
----
95

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

query I rowsort
SELECT ALL - 24 + + col1 FROM tab0 AS cor0
----
62
67
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1123
SELECT + CAST( + ( col1 ) AS SIGNED ) * col2 + + col2 + + col2 col1 FROM tab2 AS cor0
----
1586
722
891

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1123
SELECT + CAST ( + ( col1 ) AS INTEGER ) * col2 + + col2 + + col2 col1 FROM tab2 AS cor0
----
1586
722
891

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

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

query I rowsort
SELECT col1 * col0 + + 1 * - col2 FROM tab2
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-1127
SELECT col2 DIV 96 + col1 * tab1.col0 DIV - col2 FROM tab1
----
-1
-11
-9

skipif mysql # not compatible
query I rowsort label-1127
SELECT col2 / 96 + col1 * tab1.col0 / - col2 FROM tab1
----
-1
-11
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1128
SELECT DISTINCT + col2 + - ( + 64 ) DIV - col1 col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1128
SELECT DISTINCT + col2 + - ( + 64 ) / - col1 col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - 12 AS col0 FROM tab0 AS cor0
----
-12
-12
-12

query I rowsort
SELECT + col0 + 15 AS col1 FROM tab2 AS cor0
----
22
93
94

query I rowsort
SELECT + ( col1 ) * + col2 + 61 FROM tab0 cor0
----
158
2899
7523

onlyif mysql # use DIV operator for integer division
query I rowsort label-1132
SELECT ALL + col2 * - col1 + col2 DIV col1 AS col1 FROM tab2 AS cor0
----
-1534
-644
-837

skipif mysql # not compatible
query I rowsort label-1132
SELECT ALL + col2 * - col1 + col2 / col1 AS col1 FROM tab2 AS cor0
----
-1534
-644
-837

query I rowsort
SELECT ALL + - 99 FROM tab0 AS cor0
----
-99
-99
-99

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

query I rowsort
SELECT - col2 + cor0.col1 * col0 + 40 AS col1 FROM tab2 AS cor0
----
1345
230
4616

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

query I rowsort
SELECT DISTINCT - 77 + col0 * + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-22908
-271595
-6804

query I rowsort
SELECT ALL 82 FROM tab0 cor0
----
82
82
82

query I rowsort
SELECT ALL - - 53 AS col1 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT + col0 * - ( - col2 ) + - 91 + + ( + col1 + 76 * - 2 ) FROM tab2 AS cor0
----
-23
1844
2776

query I rowsort
SELECT + 25 * - col1 FROM tab2
----
-1475
-425
-775

query I rowsort
SELECT tab0.col1 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 37 AS col2 FROM tab1
----
37
37
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1144
SELECT DISTINCT CAST( + 83 AS SIGNED ) * + col0 AS col2 FROM tab0
----
1992
2905
7387

skipif mysql # not compatible
query I rowsort label-1144
SELECT DISTINCT CAST ( + 83 AS INTEGER ) * + col0 AS col2 FROM tab0
----
1992
2905
7387

query I rowsort
SELECT col2 * col1 * - col1 AS col0 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT 49 * - tab1.col1 AS col2 FROM tab1
----
-1274
-490
-637

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

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

query I rowsort
SELECT - col1 * 36 FROM tab1
----
-360
-468
-936

query I rowsort
SELECT DISTINCT - col0 + + 40 + - col1 * col1 AS col1 FROM tab2 AS cor0
----
-328
-3519
-928

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

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

query I rowsort
SELECT DISTINCT - col2 + + cor0.col1 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * col0 * + ( - col2 ) col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL 59 AS col1 FROM tab0 AS cor0
----
59
59
59

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

query I rowsort
SELECT DISTINCT ( + col2 ) * - 53 FROM tab2 AS cor0
----
-1378
-1431
-2014

onlyif mysql # use DIV operator for integer division
query I rowsort label-1157
SELECT ALL + col2 DIV - col0 col0 FROM tab2 cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1157
SELECT ALL + col2 / - col0 col0 FROM tab2 cor0
----
-3
0
0

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

query I rowsort
SELECT col1 * col0 + 29 FROM tab1 AS cor0
----
1069
107
669

onlyif mysql # use DIV operator for integer division
query I rowsort label-1160
SELECT + 11 * - col0 + col2 DIV ( 12 + col1 ) FROM tab1
----
-32
-702
-877

skipif mysql # not compatible
query I rowsort label-1160
SELECT + 11 * - col0 + col2 / ( 12 + col1 ) FROM tab1
----
-32
-702
-877

query I rowsort
SELECT col0 + 7 FROM tab2
----
14
85
86

query I rowsort
SELECT - ( + col2 ) * + col0 * + 10 FROM tab1
----
-1620
-36480
-76800

query I rowsort
SELECT - ( cor0.col1 ) + 8 FROM tab1 AS cor0
----
-18
-2
-5

query I rowsort
SELECT + + cor0.col1 + + col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + col0 + 84 * - col1 FROM tab0 AS cor0
----
-7200
-7555
-8113

query I rowsort
SELECT - col1 * col0 * - 68 + - cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
139560
230825
543434

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

skipif mysql # not compatible
query I rowsort label-1167
SELECT col2 / CAST ( NULL AS INTEGER ) + + 37 / - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * col0 + + cor0.col1 * col2 * ( + col2 ) + + col0 * ( + ( - col2 ) ) FROM tab0 AS cor0
----
3457
612685
94926

query I rowsort
SELECT ALL col1 * cor0.col1 + - col0 AS col1 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT col1 + 93 AS col2 FROM tab2 cor0
----
110
124
152

onlyif mysql # use DIV operator for integer division
query I rowsort label-1171
SELECT - col2 + col0 DIV 61 FROM tab1
----
-54
-56
-95

skipif mysql # not compatible
query I rowsort label-1171
SELECT - col2 + col0 / 61 FROM tab1
----
-54
-56
-95

query I rowsort
SELECT ALL col2 + - 67 * col1 FROM tab0
----
-5729
-6015
-6498

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1174
SELECT ALL col2 + - CAST( + col0 AS SIGNED ) DIV col2 FROM tab1 AS cor0
----
54
56
96

skipif mysql # not compatible
query I rowsort label-1174
SELECT ALL col2 + - CAST ( + col0 AS INTEGER ) / col2 FROM tab1 AS cor0
----
54
56
96

query I rowsort
SELECT - col1 - + 45 FROM tab1 AS cor0
----
-55
-58
-71

query I rowsort
SELECT ALL - cor0.col2 + + 99 AS col2 FROM tab0 cor0
----
17
66
98

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

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

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

query I rowsort
SELECT DISTINCT + - col1 - - 74 * 22 AS col1 FROM tab0 AS cor0
----
1531
1537
1542

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

query I rowsort
SELECT cor0.col0 - col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + 11 AS col2 FROM tab2 AS cor0
----
-11
-11
-11

query I rowsort
SELECT + 22 * - cor0.col2 + col1 + 10 AS col1 FROM tab2 AS cor0
----
-503
-553
-809

query I rowsort
SELECT - - ( col2 ) * col2 + + ( - cor0.col1 ) * + col0 FROM tab1 AS cor0
----
2609
2838
8176

onlyif mysql # use DIV operator for integer division
query I rowsort label-1185
SELECT + col0 DIV col2 + + 65 FROM tab1
----
65
65
66

skipif mysql # not compatible
query I rowsort label-1185
SELECT + col0 / col2 + + 65 FROM tab1
----
65
65
66

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

query I rowsort
SELECT - cor0.col2 * + 60 AS col2 FROM tab2 AS cor0
----
-1560
-1620
-2280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col0 col2 FROM tab1
----
-4096
-6400
-9

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

query I rowsort
SELECT - col1 + 9 * 36 AS col2 FROM tab2 AS cor0
----
265
293
307

query I rowsort
SELECT tab0.col1 * + tab0.col2 FROM tab0
----
2838
7462
97

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

query I rowsort
SELECT + 20 AS col2 FROM tab1
----
20
20
20

query I rowsort
SELECT DISTINCT + 51 * + tab2.col1 FROM tab2
----
1581
3009
867

query I rowsort
SELECT DISTINCT + 53 * - col0 AS col0 FROM tab1
----
-159
-3392
-4240

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

skipif mysql # not compatible
query I rowsort label-1196
SELECT DISTINCT col0 / + col0 AS col0 FROM tab2
----
1

query I rowsort
SELECT DISTINCT 10 + - tab0.col1 FROM tab0, tab2 AS cor0
----
-76
-81
-87

query I rowsort
SELECT DISTINCT col1 * 44 FROM tab2
----
1364
2596
748

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

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

query I rowsort
SELECT col2 * 64 + col0 FROM tab1 AS cor0
----
3459
3712
6224

query I rowsort
SELECT ALL col1 * col1 + + tab2.col2 + + col1 FROM tab2
----
1019
344
3566

query I rowsort
SELECT + col0 * col2 * col0 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT + - col1 * 74 AS col1 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT + col2 + - 69 AS col2 FROM tab2 AS cor0
----
-31
-42
-43

query I rowsort
SELECT - 16 AS col1 FROM tab0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT 76 + + col1 * col0 FROM tab1
----
1116
154
716

query I rowsort
SELECT col2 + - col2 * col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT ALL - ( 61 ) AS col1 FROM tab1 AS cor0
----
-61
-61
-61

query I rowsort
SELECT - - col2 * 40 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT DISTINCT 77 + ( - col0 ) AS col0 FROM tab2 AS cor0
----
-1
-2
70

query I rowsort
SELECT DISTINCT - cor0.col0 * 32 FROM tab2 cor0
----
-224
-2496
-2528

onlyif mysql # use DIV operator for integer division
query I rowsort label-1213
SELECT - 2 DIV col0 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-1213
SELECT - 2 / col0 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + 12 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT - ( + 63 ) FROM tab2 AS cor0
----
-63
-63
-63

query I rowsort
SELECT - - ( + col2 ) + - 26 FROM tab2 AS cor0
----
0
1
12

query I rowsort
SELECT 65 * col2 FROM tab1
----
3510
3705
6240

query I rowsort
SELECT + 35 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-1890
-1995
-3360

query I rowsort
SELECT ALL 28 AS col2 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

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

query I rowsort
SELECT + - cor0.col1 * col2 + 55 + - 13 * - col1 AS col0 FROM tab0 AS cor0
----
-1665
-6224
1219

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

query I rowsort
SELECT DISTINCT 55 - col1 * + col1 FROM tab2
----
-234
-3426
-906

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1224
SELECT - CAST( + 19 AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

skipif mysql # not compatible
query I rowsort label-1224
SELECT - CAST ( + 19 AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

query I rowsort
SELECT - cor0.col2 * col2 * - 31 FROM tab1 AS cor0
----
100719
285696
90396

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - col2 col0 FROM tab1 AS cor0
----
-28
-47
-83

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

query I rowsort
SELECT ALL + - 85 AS col1 FROM tab1 cor0
----
-85
-85
-85

query I rowsort
SELECT + - 64 - col0 * - col2 FROM tab0 AS cor0
----
-29
7234
728

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1231
SELECT + col1 * col2 + col2 DIV col0 AS col2 FROM tab0 AS cor0
----
2839
7462
97

skipif mysql # not compatible
query I rowsort label-1231
SELECT + col1 * col2 + col2 / col0 AS col2 FROM tab0 AS cor0
----
2839
7462
97

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

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

query I rowsort
SELECT col2 - + 67 AS col0 FROM tab0 cor0
----
-34
-66
15

query I rowsort
SELECT ALL - 82 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

query I rowsort
SELECT + - col1 + + 37 FROM tab2 AS cor0
----
-22
20
6

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

skipif mysql # not compatible
query I rowsort label-1236
SELECT + 27 + cor1.col0 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col1 * + 0 + + col2 + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

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

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

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

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

query I rowsort
SELECT + cor0.col1 + 25 * + col0 * - cor0.col1 FROM tab0 AS cor0
----
-202384
-51514
-84778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1243
SELECT CAST( 28 AS SIGNED ) * col0 + ( - col1 ) AS col2 FROM tab2
----
165
2125
2195

skipif mysql # not compatible
query I rowsort label-1243
SELECT CAST ( 28 AS INTEGER ) * col0 + ( - col1 ) AS col2 FROM tab2
----
165
2125
2195

query I rowsort
SELECT + 35 + ( col1 ) * + 30 FROM tab1 AS cor0
----
335
425
815

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

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

query I rowsort
SELECT DISTINCT - 72 FROM tab2
----
-72

query I rowsort
SELECT ( col1 * tab1.col1 ) FROM tab1
----
100
169
676

query I rowsort
SELECT ALL - 96 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

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

query I rowsort
SELECT ALL + 86 + col2 * - 38 FROM tab2 AS cor0
----
-1358
-902
-940

query I rowsort
SELECT - 66 AS col0 FROM tab0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT 35 FROM tab2
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + 12 * col2 col0 FROM tab1
----
110592
34992
38988

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1255
SELECT ALL + col1 + CAST( ( col1 ) AS SIGNED ) + - col1 AS col2 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1255
SELECT ALL + col1 + CAST ( ( col1 ) AS INTEGER ) + - col1 AS col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - col0 * col1 * + 75 + - col0 FROM tab2 AS cor0
----
-100804
-16282
-345228

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1257
SELECT ALL - cor0.col0 + CAST( + col2 AS SIGNED ) * + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-35961
-36
-551457

skipif mysql # not compatible
query I rowsort label-1257
SELECT ALL - cor0.col0 + CAST ( + col2 AS INTEGER ) * + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-35961
-36
-551457

query I rowsort
SELECT DISTINCT + 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-1259
SELECT - col2 * - CAST( + col0 AS SIGNED ) + col1 AS col2 FROM tab0 AS cor0
----
132
7389
878

skipif mysql # not compatible
query I rowsort label-1259
SELECT - col2 * - CAST ( + col0 AS INTEGER ) + col1 AS col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - - col2 + 65 FROM tab0 AS cor0
----
147
66
98

query I rowsort
SELECT DISTINCT + col1 + - 26 FROM tab2 AS cor0
----
-9
33
5

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

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

query I rowsort
SELECT - - col1 + - ( + 23 ) * + col1 FROM tab0 cor0
----
-1892
-2002
-2134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col2 + + 89 col0 FROM tab0 AS cor0
----
1178
6813
90

query I rowsort
SELECT + + col1 * col1 + - 11 AS col0 FROM tab0 AS cor0
----
7385
8270
9398

query I rowsort
SELECT ALL - col0 + + 50 AS col1 FROM tab2 AS cor0
----
-28
-29
43

query I rowsort
SELECT DISTINCT - cor0.col2 + 37 FROM tab2 AS cor0
----
-1
10
11

query I rowsort
SELECT - col2 + col0 * cor0.col2 * col0 FROM tab2 AS cor0
----
1296
158158
237120

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

query I rowsort
SELECT ALL + + col1 * + col0 + 65 + col1 AS col0 FROM tab2 AS cor0
----
1425
313
4726

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 08000767d0a951e4a7a7f8edda07fb64

query I rowsort
SELECT - 34 * 53 FROM tab0 AS cor0
----
-1802
-1802
-1802

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1276
SELECT ALL + CAST( col1 AS SIGNED ) DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1276
SELECT ALL + CAST ( col1 AS INTEGER ) / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 64 * col1 FROM tab0 AS cor0
----
-5504
-5824
-6208

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1278
SELECT - col0 + col2 * ( 90 + - col1 ) * CAST( + col0 * col2 AS SIGNED ) FROM tab1 AS cor0
----
16634816
559869
56770480

skipif mysql # not compatible
query I rowsort label-1278
SELECT - col0 + col2 * ( 90 + - col1 ) * CAST ( + col0 * col2 AS INTEGER ) FROM tab1 AS cor0
----
16634816
559869
56770480

query I rowsort
SELECT DISTINCT - col0 + + col2 + - col1 FROM tab2 AS cor0
----
-11
-111
-58

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1283
SELECT ALL - + 46 * + col2 + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-1118
-1235
-1669

skipif mysql # not compatible
query I rowsort label-1283
SELECT ALL - + 46 * + col2 + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-1118
-1235
-1669

onlyif mysql # use DIV operator for integer division
query I rowsort label-1284
SELECT 16 + + col0 DIV - 67 AS col1 FROM tab1 AS cor0
----
15
16
16

skipif mysql # not compatible
query I rowsort label-1284
SELECT 16 + + col0 / - 67 AS col1 FROM tab1 AS cor0
----
15
16
16

query I rowsort
SELECT ALL 58 * col2 + cor0.col2 * - col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
116280
54236
6669

query I rowsort
SELECT DISTINCT - - 24 + - cor0.col1 FROM tab0 cor0
----
-62
-67
-73

query I rowsort
SELECT ALL - col0 * + col0 * col2 FROM tab1 cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT + col0 - 12 AS col2 FROM tab2
----
-5
66
67

query I rowsort
SELECT ALL col0 - col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col0 - - col0 * + ( - col1 ) AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + 73 * + col0 - cor0.col2 * + ( col2 ) FROM tab2 cor0
----
-218
4323
5018

query I rowsort
SELECT ALL + col0 + col1 * + 90 AS col1 FROM tab0
----
7764
8279
8765

query I rowsort
SELECT ALL 3 + - col0 * - col2 FROM tab1
----
165
3651
7683

query I rowsort
SELECT ALL + col0 * - col2 + tab2.col2 * 68 FROM tab2
----
-260
-418
1647

query I rowsort
SELECT DISTINCT col2 * + col1 * + cor0.col2 + + cor0.col1 * col0 + + col2 * col0 AS col1 FROM tab0 AS cor0
----
3527
627281
96510

query I rowsort
SELECT col2 * - 76 + + cor0.col0 + - col2 * col2 FROM tab2 cor0
----
-2574
-2774
-4253

query I rowsort
SELECT + ( col1 ) + col2 * + ( + col2 ) + + 69 * col0 AS col0 FROM tab1
----
14749
3149
7675

query I rowsort
SELECT ALL - cor0.col1 * - col2 * + 20 AS col1 FROM tab2 AS cor0
----
12920
16740
30680

query I rowsort
SELECT + 93 AS col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

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

query I rowsort
SELECT col2 + + cor0.col2 * col2 AS col2 FROM tab2 cor0
----
1482
702
756

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 col2 FROM tab0 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

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

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

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

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

query I rowsort
SELECT DISTINCT cor1.col0 + cor1.col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-1310
SELECT DISTINCT + - 97 DIV 72 FROM tab1, tab0, tab2 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1310
SELECT DISTINCT + - 97 / 72 FROM tab1, tab0, tab2 cor0
----
-1

query I rowsort
SELECT ALL - ( + 41 ) * tab0.col1 AS col1 FROM tab0
----
-3526
-3731
-3977

query I rowsort
SELECT + + col1 + + cor0.col2 * + col2 FROM tab1 AS cor0
----
2942
3259
9229

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

query I rowsort
SELECT ALL + tab0.col2 * + 97 AS col1 FROM tab0
----
3201
7954
97

query I rowsort
SELECT DISTINCT - - 32 + - col2 FROM tab0 AS cor0
----
-1
-50
31

query I rowsort
SELECT - + 44 AS col1 FROM tab2 AS cor0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + - 90 * + cor0.col2 FROM tab0 AS cor0
----
-2970
-7380
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 30 * - col0 col2 FROM tab1 AS cor0
----
1920
2400
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1319
SELECT ALL + tab1.col0 DIV + 21 AS col2 FROM tab1
----
0
3
3

skipif mysql # not compatible
query I rowsort label-1319
SELECT ALL + tab1.col0 / + 21 AS col2 FROM tab1
----
0
3
3

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

query I rowsort
SELECT + ( - col0 ) - 95 FROM tab0 AS cor0
----
-119
-130
-184

query I rowsort
SELECT DISTINCT - 22 + col0 AS col1 FROM tab2 AS cor0
----
-15
56
57

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1324
SELECT + col1 DIV col0 + col2 - + 42 AS col1 FROM tab0 AS cor0
----
-39
-6
41

skipif mysql # not compatible
query I rowsort label-1324
SELECT + col1 / col0 + col2 - + 42 AS col1 FROM tab0 AS cor0
----
-39
-6
41

query I rowsort
SELECT ( + col1 ) * 82 + ( col1 ) AS col2 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT + 19 * + cor0.col1 FROM tab0 AS cor0
----
1634
1729
1843

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * - col1 col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

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

query I rowsort
SELECT DISTINCT 60 + cor0.col2 FROM tab2, tab2 cor0
----
86
87
98

query I rowsort
SELECT ALL + 3 - + 10 AS col2 FROM tab0
----
-7
-7
-7

query I rowsort
SELECT col0 * + 41 + - col1 AS col2 FROM tab1 AS cor0
----
2614
3267
97

query I rowsort
SELECT DISTINCT cor0.col1 * col0 + + col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + col0 * + col2 - - cor0.col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ( - cor0.col0 ) - + col2 * 22 FROM tab1 AS cor0
----
-1191
-1318
-2192

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

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

query I rowsort
SELECT - 34 + - 3 FROM tab2 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL + col2 * - col2 + + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1375
3394
975

query I rowsort
SELECT ALL + - 16 * col1 AS col0 FROM tab0 cor0
----
-1376
-1456
-1552

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

skipif mysql # not compatible
query I rowsort label-1339
SELECT DISTINCT + cor0.col2 / + col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - ( col1 ) + 58 AS col2 FROM tab2 AS cor0
----
-1
27
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-1341
SELECT + cor0.col2 * col2 DIV 44 FROM tab0 AS cor0
----
0
152
24

skipif mysql # not compatible
query I rowsort label-1341
SELECT + cor0.col2 * col2 / 44 FROM tab0 AS cor0
----
0
152
24

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 * - col0 col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT - col2 + - col0 * - ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT + col0 * cor0.col2 + ( 46 ) + col2 FROM tab0 AS cor0
----
7426
82
871

query I rowsort
SELECT + 31 * col1 AS col1 FROM tab0
----
2666
2821
3007

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

query I rowsort
SELECT 39 * - col0 + - 80 AS col2 FROM tab1
----
-197
-2576
-3200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1349
SELECT DISTINCT - col2 * col0 * CAST( - col1 AS SIGNED ) FROM tab0
----
3395
664118
68112

skipif mysql # not compatible
query I rowsort label-1349
SELECT DISTINCT - col2 * col0 * CAST ( - col1 AS INTEGER ) FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL + + cor0.col0 + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - col0 - - col0 * col2 FROM tab2 AS cor0
----
182
1950
2923

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

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

query I rowsort
SELECT ALL - tab1.col2 AS col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT + col2 - + col1 * - col0 * tab2.col1 AS col2 FROM tab2
----
22869
271544
6754

onlyif mysql # use DIV operator for integer division
query I rowsort label-1355
SELECT col2 DIV + CAST( col0 * - col1 AS SIGNED ) + - tab2.col1 AS col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1355
SELECT col2 / + CAST ( col0 * - col1 AS INTEGER ) + - tab2.col1 AS col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT tab0.col2 + - col0 * + 42 FROM tab0
----
-1469
-3656
-975

query I rowsort
SELECT col2 + - 84 FROM tab0
----
-2
-51
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1358
SELECT DISTINCT - CAST( - col2 * col0 + 28 AS SIGNED ) FROM tab1
----
134
3620
7652

skipif mysql # not compatible
query I rowsort label-1358
SELECT DISTINCT - CAST ( - col2 * col0 + 28 AS INTEGER ) FROM tab1
----
134
3620
7652

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 58 * col1 col2 FROM tab2 cor0
----
1798
3422
986

onlyif mysql # use DIV operator for integer division
query I rowsort label-1361
SELECT DISTINCT ( col2 ) DIV col2 AS col2 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1361
SELECT DISTINCT ( col2 ) / col2 AS col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL - 9 + col2 AS col0 FROM tab1 cor0
----
45
48
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 4 * col1 col2 FROM tab2 AS cor0
----
-2584
-3348
-6136

query I rowsort
SELECT DISTINCT + - ( - col1 ) FROM tab1 AS cor0
----
10
13
26

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 * + col2 col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT - col0 + col2 * + ( - col0 * col0 + - col0 ) AS col0 FROM tab0 AS cor0
----
-1295
-19824
-656909

query I rowsort
SELECT - + col1 * - col0 + + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT col1 * - 54 FROM tab1 AS cor0
----
-1404
-540
-702

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

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

query I rowsort
SELECT - tab0.col0 * col0 + + col2 AS col1 FROM tab0
----
-1224
-543
-7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col0 * - col0 col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT col1 * + col0 * col0 - - col1 * - col0 FROM tab0 AS cor0
----
115430
47472
712712

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col1 col1 FROM tab2 AS cor0
----
-24
19
62

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

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

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

query IIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 WHERE NULL > ( NULL )
----

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

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

query I rowsort
SELECT DISTINCT - col2 * + col1 * col2 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-22626
-24586
-39910

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col0 + col0 col1 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-1386
SELECT DISTINCT - + col1 + col0 DIV + cor0.col0 + - cor0.col2 * col0 * - col2 AS col1 FROM tab2 AS cor0
----
114060
5073
52670

skipif mysql # not compatible
query I rowsort label-1386
SELECT DISTINCT - + col1 + col0 / + cor0.col0 + - cor0.col2 * col0 * - col2 AS col1 FROM tab2 AS cor0
----
114060
5073
52670

query I rowsort
SELECT + col1 * col0 + cor0.col2 * - col1 * - col0 AS col0 FROM tab2 cor0
----
124254
52377
6076

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

query I rowsort
SELECT + col2 - col2 * - col2 AS col1 FROM tab1 AS cor0
----
2970
3306
9312

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

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

query I rowsort
SELECT - + col0 * col1 + col1 * + col1 AS col1 FROM tab2 AS cor0
----
-1054
-1121
744

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

query I rowsort
SELECT ALL + + col0 + - col1 + + col2 AS col2 FROM tab2 AS cor0
----
100
3
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col2 col1 FROM tab2
----
-21
33
4

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

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

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

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

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

query I rowsort
SELECT 87 * col2 AS col1 FROM tab0 AS cor0
----
2871
7134
87

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

query I rowsort
SELECT DISTINCT - + col0 * col1 + ( 35 ) FROM tab2 AS cor0
----
-1308
-182
-4567

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 * + 69 col1 FROM tab2 cor0
----
490
5460
5530

query I rowsort
SELECT DISTINCT + 60 * col2 AS col1 FROM tab1 AS cor0
----
3240
3420
5760

onlyif mysql # use DIV operator for integer division
query I rowsort label-1406
SELECT DISTINCT - 60 + col0 DIV col0 AS col1 FROM tab1 cor0
----
-59

skipif mysql # not compatible
query I rowsort label-1406
SELECT DISTINCT - 60 + col0 / col0 AS col1 FROM tab1 cor0
----
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1407
SELECT DISTINCT + col1 + col1 DIV col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1407
SELECT DISTINCT + col1 + col1 / col2 FROM tab1
----
10
13
26

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

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

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL > col0 * - col1 * col1
----

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

query I rowsort
SELECT + col2 * 89 - cor0.col2 AS col2 FROM tab2 cor0
----
2288
2376
3344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 22 * 99 col1 FROM tab2 AS cor0
----
2204
2205
2216

onlyif mysql # use DIV operator for integer division
query I rowsort label-1414
SELECT + col2 DIV + 89 + - col1 * + col1 col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1414
SELECT + col2 / + 89 + - col1 * + col1 col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col0 + - col0 * col0 AS col2 FROM tab2
----
-42
-6006
-6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-1416
SELECT col1 - col0 * tab0.col2 DIV + col2 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-1416
SELECT col1 - col0 * tab0.col2 / + col2 FROM tab0
----
2
62
62

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

query III rowsort
SELECT * FROM tab2 WHERE col1 + + col0 <= ( col2 * - col1 + col0 + + col1 )
----

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

query I rowsort
SELECT - tab2.col0 * col1 * - col1 + col2 * col2 + col0 FROM tab2
----
24354
272272
7463

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

query I rowsort
SELECT tab1.col2 * - col2 + tab1.col1 * + col0 FROM tab1
----
-2609
-2838
-8176

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

query I rowsort
SELECT ALL col2 - col1 * + tab1.col0 FROM tab1
----
-24
-583
-944

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

query I rowsort
SELECT + tab1.col0 + - col1 FROM tab1
----
-23
54
67

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

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

query I rowsort
SELECT ALL - col0 * - col1 + col1 FROM tab1
----
104
1053
650

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * col1 col0 FROM tab1
----
1261
1430
580

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

query I rowsort
SELECT DISTINCT col1 * col2 * col0 + col1 FROM tab2
----
119711
51051
5890

query I rowsort
SELECT ALL + tab2.col1 * col2 AS col0 FROM tab2 WHERE NOT NULL > col2
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - + col1 * - col2 col1 FROM tab0
----
2871
7544
98

query I rowsort
SELECT + col1 FROM tab0 WHERE NOT NULL NOT BETWEEN col1 AND NULL
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1443
SELECT DISTINCT 61 DIV col0 AS col2 FROM tab1
----
0
20

skipif mysql # not compatible
query I rowsort label-1443
SELECT DISTINCT 61 / col0 AS col2 FROM tab1
----
0
20

query I rowsort
SELECT DISTINCT 13 * col1 * 56 FROM tab0
----
62608
66248
70616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

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

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

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

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
-26
-27
-38

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

query I rowsort
SELECT + col0 * + col1 + col1 - col2 * - col0 FROM tab0 AS cor0
----
15488
2942
3527

query I rowsort
SELECT + - col2 * - col1 + - col0 - + col2 AS col1 FROM tab0 AS cor0
----
2781
61
7291

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

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

query I rowsort
SELECT - cor0.col1 + col2 - + 43 * - col2 FROM tab1 cor0
----
2350
2498
4211

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

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

query I rowsort
SELECT - col0 * 45 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-2823
-3504
-81

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab2, tab2 cor1
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query I rowsort
SELECT + 11 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT ALL - - col0 + - col1 + + col2 AS col2 FROM tab2 AS cor0
----
100
3
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1462
SELECT DISTINCT - - 69 DIV - col0 - - col2 * cor0.col2 FROM tab0 AS cor0
----
0
1087
6724

skipif mysql # not compatible
query I rowsort label-1462
SELECT DISTINCT - - 69 / - col0 - - col2 * cor0.col2 FROM tab0 AS cor0
----
0
1087
6724

query I rowsort
SELECT DISTINCT - + 46 - + col1 FROM tab1 AS cor0
----
-56
-59
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + col2 col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 - col2 * col2 * cor0.col1 FROM tab0 cor0
----
-603785
-91590
3298

query I rowsort
SELECT DISTINCT - 54 * col2 FROM tab2 AS cor0
----
-1404
-1458
-2052

query I rowsort
SELECT ALL - 55 + + col1 AS col1 FROM tab2 AS cor0
----
-24
-38
4

query I rowsort
SELECT DISTINCT - - 70 * - col2 AS col1 FROM tab2 AS cor0
----
-1820
-1890
-2660

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1472
SELECT ALL CAST( 41 + col0 AS SIGNED ) FROM tab1
----
105
121
44

skipif mysql # not compatible
query I rowsort label-1472
SELECT ALL CAST ( 41 + col0 AS INTEGER ) FROM tab1
----
105
121
44

query I rowsort
SELECT ALL - col2 + - 54 AS col1 FROM tab0
----
-136
-55
-87

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

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

query I rowsort
SELECT DISTINCT + 3 FROM tab0
----
3

query I rowsort
SELECT 73 AS col2 FROM tab1
----
73
73
73

query I rowsort
SELECT + col0 - - tab2.col2 FROM tab2
----
104
117
34

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 - - 87 + - col0 * col0 AS col1 FROM tab1 AS cor0
----
-4009
-6313
78

query I rowsort
SELECT ALL - 62 FROM tab2, tab0 cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT ALL - col0 * col2 - - col2 * col2 AS col1 FROM tab0 AS cor0
----
-34
-574
297

query I rowsort
SELECT DISTINCT 41 * ( col0 ) FROM tab1 AS cor0
----
123
2624
3280

query I rowsort
SELECT DISTINCT - col2 - 91 FROM tab2
----
-117
-118
-129

query I rowsort
SELECT col2 + 24 FROM tab1
----
120
78
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - 71 + + col2 col2 FROM tab0
----
-2310
-5740
-70

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

query I rowsort
SELECT ALL - col1 * - tab0.col2 * col1 + - col0 AS col1 FROM tab0
----
244044
678953
9374

query I rowsort
SELECT + ( 80 ) - - col0 * - col1 FROM tab0
----
-1984
-3315
-8019

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

query I rowsort
SELECT - col0 + + 65 - - cor0.col0 * col0 FROM tab0 AS cor0
----
1255
617
7897

onlyif mysql # use DIV operator for integer division
query I rowsort label-1492
SELECT DISTINCT + col1 DIV 20 + - cor0.col2 * col0 AS col0 FROM tab1 cor0
----
-161
-3648
-7680

skipif mysql # not compatible
query I rowsort label-1492
SELECT DISTINCT + col1 / 20 + - cor0.col2 * col0 AS col0 FROM tab1 cor0
----
-161
-3648
-7680

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

skipif mysql # not compatible
query I rowsort label-1493
SELECT ALL + 8 / col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1494
SELECT - CAST( - col2 AS SIGNED ) + + cor0.col0 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-1494
SELECT - CAST ( - col2 AS INTEGER ) + + cor0.col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT cor0.col2 * + col1 + col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1140
2496
2808

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + col1 col0 FROM tab2 cor0
----
118
34
62

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

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

query I rowsort
SELECT DISTINCT + 64 + + 54 AS col0 FROM tab0 AS cor0
----
118

onlyif mysql # use DIV operator for integer division
query I rowsort label-1501
SELECT + + cor0.col0 - col2 * col2 DIV 13 AS col2 FROM tab0 AS cor0
----
-428
-59
35

skipif mysql # not compatible
query I rowsort label-1501
SELECT + + cor0.col0 - col2 * col2 / 13 AS col2 FROM tab0 AS cor0
----
-428
-59
35

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

query I rowsort
SELECT DISTINCT - 18 + col1 * col0 FROM tab1 cor0
----
1022
60
622

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-1505
SELECT - 59 DIV col1 - cor0.col2 * 24 FROM tab0 AS cor0
----
-1968
-24
-792

skipif mysql # not compatible
query I rowsort label-1505
SELECT - 59 / col1 - cor0.col2 * 24 FROM tab0 AS cor0
----
-1968
-24
-792

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 + - col2 * - 17 FROM tab2 AS cor0
----
-1092
-378
0

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1508
SELECT + col0 DIV + 32 + tab2.col0 AS col1 FROM tab2
----
7
80
81

skipif mysql # not compatible
query I rowsort label-1508
SELECT + col0 / + 32 + tab2.col0 AS col1 FROM tab2
----
7
80
81

query I rowsort
SELECT + ( 36 ) FROM tab1, tab1 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT DISTINCT col0 * + col2 * col1 + col2 AS col2 FROM tab0
----
3396
664200
68145

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

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

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

query I rowsort
SELECT + cor0.col2 * - ( + col2 ) + + col2 * col0 AS col0 FROM tab0 AS cor0
----
-297
34
574

query I rowsort
SELECT DISTINCT - + 56 - col2 * col2 FROM tab0 AS cor0
----
-1145
-57
-6780

onlyif mysql # use DIV operator for integer division
query I rowsort label-1515
SELECT DISTINCT col2 + col1 DIV col1 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-1515
SELECT DISTINCT col2 + col1 / col1 FROM tab2 AS cor0
----
27
28
39

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

query I rowsort
SELECT + col0 * col0 - ( + col0 ) AS col1 FROM tab2
----
42
6006
6162

query I rowsort
SELECT ALL + 10 * + cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9cffb0f1a0812c5b73cd3a925a52dd6f

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

query I rowsort
SELECT cor0.col2 * - cor0.col2 + + 44 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 462ce0214e8b52b137a07f2ea647f690

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

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

query I rowsort
SELECT + 11 + cor0.col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1523
-635
-826

query I rowsort
SELECT DISTINCT - 21 * cor0.col2 FROM tab0 AS cor0
----
-1722
-21
-693

query I rowsort
SELECT + col1 + + 90 * + cor0.col2 FROM tab1 cor0
----
4886
5140
8653

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

skipif mysql # not compatible
query I rowsort label-1526
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 40 AS col0 FROM tab0, tab0 AS cor0
----
40

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab2 AS cor2, tab0
----
13122 values hashing to 04bc91d7d3d14bf9990f2aa8d916717b

query I rowsort
SELECT + col0 + + 36 FROM tab1 cor0
----
100
116
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-1530
SELECT + col0 DIV + 20 AS col0 FROM tab1 cor0
----
0
3
4

skipif mysql # not compatible
query I rowsort label-1530
SELECT + col0 / + 20 AS col0 FROM tab1 cor0
----
0
3
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1531
SELECT DISTINCT - - col0 DIV ( 73 ) FROM tab0 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-1531
SELECT DISTINCT - - col0 / ( 73 ) FROM tab0 cor0
----
0
1

query I rowsort
SELECT DISTINCT + col2 * 72 + col0 * col2 AS col1 FROM tab1 AS cor0
----
14592
4050
7752

query I rowsort
SELECT + 57 * col1 AS col0 FROM tab0 AS cor0
----
4902
5187
5529

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1535
SELECT + 68 DIV - 41 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1535
SELECT + 68 / - 41 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 27 * col2 + col1 AS col0 FROM tab1 AS cor0
----
1484
1549
2605

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1537
SELECT - col1 * - col0 * - ( col2 * - col0 ) + - CAST( - col1 AS SIGNED ) + cor0.col1 * + 71 * 74 col0 FROM tab0 AS cor0
----
2086618
59584707
628560

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1537
SELECT - col1 * - col0 * - ( col2 * - col0 ) + - CAST ( - col1 AS INTEGER ) + cor0.col1 * + 71 * 74 col0 FROM tab0 AS cor0
----
2086618
59584707
628560

query I rowsort
SELECT DISTINCT - col0 * col1 + + 6 FROM tab0 AS cor0
----
-2058
-3389
-8093

query I rowsort
SELECT DISTINCT - - cor0.col0 * col0 + col2 + - col0 * - col0 * - 64 FROM tab0 AS cor0
----
-36255
-498941
-77174

query I rowsort
SELECT DISTINCT + 36 * col2 AS col2 FROM tab1
----
1944
2052
3456

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1541
SELECT 88 * - col1 + - CAST( - col2 AS SIGNED ) + col1 FROM tab2 AS cor0
----
-1441
-2670
-5107

skipif mysql # not compatible
query I rowsort label-1541
SELECT 88 * - col1 + - CAST ( - col2 AS INTEGER ) + col1 FROM tab2 AS cor0
----
-1441
-2670
-5107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 83 * + col2 col2 FROM tab0 AS cor0
----
2739
6806
83

query I rowsort
SELECT + col1 * + col1 + - ( + 97 ) AS col0 FROM tab0 AS cor0
----
7299
8184
9312

query I rowsort
SELECT 40 + col2 FROM tab0
----
122
41
73

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

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

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

query I rowsort
SELECT cor1.col2 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - - col2 * - ( col0 ) * - col0 AS col2 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-1550
SELECT + col1 + + col0 DIV col0 + col0 FROM tab2 AS cor0
----
138
39
97

skipif mysql # not compatible
query I rowsort label-1550
SELECT + col1 + + col0 / col0 + col0 FROM tab2 AS cor0
----
138
39
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 * + col0 col1 FROM tab0
----
216
315
801

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

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

query I rowsort
SELECT - - 42 AS col2 FROM tab2 AS cor0
----
42
42
42

query I rowsort
SELECT 80 FROM tab2, tab0 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT + 87 * col0 FROM tab1
----
261
5568
6960

query I rowsort
SELECT + 16 FROM tab1, tab2 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 11 * + col0 col1 FROM tab2
----
77
858
869

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

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

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

query I rowsort
SELECT 29 * + col0 FROM tab2 AS cor0
----
203
2262
2291

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

query I rowsort
SELECT + - 86 * col0 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT + col0 * ( ( col2 ) + - col1 ) AS col1 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT DISTINCT col0 * + 47 FROM tab0
----
1128
1645
4183

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col1 + - col1 col0 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT + col1 + - col0 * col0 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT + 69 * - col1 AS col2 FROM tab1 AS cor0
----
-1794
-690
-897

onlyif mysql # use DIV operator for integer division
query I rowsort label-1572
SELECT + - col1 + col1 * col2 DIV + col0 AS col2 FROM tab1 AS cor0
----
-2
2
442

skipif mysql # not compatible
query I rowsort label-1572
SELECT + - col1 + col1 * col2 / + col0 AS col2 FROM tab1 AS cor0
----
-2
2
442

query I rowsort
SELECT - - col2 + 97 FROM tab2 AS cor0
----
123
124
135

query I rowsort
SELECT ALL + + col2 + - ( col0 ) AS col2 FROM tab2 cor0
----
-41
-52
20

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

query I rowsort
SELECT DISTINCT - + 95 FROM tab0 AS cor0
----
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-1577
SELECT DISTINCT + col1 + - 20 DIV - col1 FROM tab1 AS cor0
----
12
14
26

skipif mysql # not compatible
query I rowsort label-1577
SELECT DISTINCT + col1 + - 20 / - col1 FROM tab1 AS cor0
----
12
14
26

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

query I rowsort
SELECT - col2 * 3 AS col2 FROM tab1
----
-162
-171
-288

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

skipif mysql # not compatible
query I rowsort label-1580
SELECT - - CAST ( cor0.col1 AS INTEGER ) * - col0 + col0 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - - 49 + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1392
266
4651

query I rowsort
SELECT ( + col2 ) * + tab0.col1 * + 0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1583
SELECT ALL col1 * col2 + col1 * + col1 DIV col1 + - tab1.col2 FROM tab1
----
1165
1376
523

skipif mysql # not compatible
query I rowsort label-1583
SELECT ALL col1 * col2 + col1 * + col1 / col1 + - tab1.col2 FROM tab1
----
1165
1376
523

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

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL col2 * - col1 + col0 + col1 FROM tab2
----
-1397
-550
-799

query I rowsort
SELECT ALL 35 + col0 FROM tab0
----
124
59
70

query I rowsort
SELECT + col0 * ( cor0.col1 ) + col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-1589
SELECT ALL - col2 DIV cor0.col1 + - col1 FROM tab2 AS cor0
----
-19
-31
-59

skipif mysql # not compatible
query I rowsort label-1589
SELECT ALL - col2 / cor0.col1 + - col1 FROM tab2 AS cor0
----
-19
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1590
SELECT DISTINCT + col1 * col2 + col2 * col1 DIV + col0 FROM tab0 AS cor0
----
2956
7545
99

skipif mysql # not compatible
query I rowsort label-1590
SELECT DISTINCT + col1 * col2 + col2 * col1 / + col0 FROM tab0 AS cor0
----
2956
7545
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1591
SELECT ALL + CAST( 19 AS SIGNED ) * - col0 + col1 AS col1 FROM tab0 AS cor0
----
-1600
-370
-568

skipif mysql # not compatible
query I rowsort label-1591
SELECT ALL + CAST ( 19 AS INTEGER ) * - col0 + col1 AS col1 FROM tab0 AS cor0
----
-1600
-370
-568

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

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

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

query I rowsort
SELECT DISTINCT - 78 + col2 AS col2 FROM tab0 AS cor0
----
-45
-77
4

query I rowsort
SELECT - - col2 - 62 FROM tab0 AS cor0
----
-29
-61
20

query I rowsort
SELECT - 47 * - col0 + cor0.col2 FROM tab1 AS cor0
----
195
3065
3856

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

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

query I rowsort
SELECT 17 * - col0 FROM tab0 AS cor0
----
-1513
-408
-595

query I rowsort
SELECT ALL col0 * - col1 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

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

query I rowsort
SELECT + - 28 * col2 AS col0 FROM tab0 AS cor0
----
-2296
-28
-924

query I rowsort
SELECT ALL + 6 FROM tab1 AS cor0
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1605
SELECT ALL col0 DIV 52 + - col2 * col0 FROM tab0
----
-35
-7297
-792

skipif mysql # not compatible
query I rowsort label-1605
SELECT ALL col0 / 52 + - col2 * col0 FROM tab0
----
-35
-7297
-792

query I rowsort
SELECT ALL col1 + 53 FROM tab0
----
139
144
150

query I rowsort
SELECT ALL + ( 67 ) + col2 FROM tab1
----
121
124
163

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col2 + - col2 col2 FROM tab0 AS cor0
----
-36
-7380
-825

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

query I rowsort
SELECT - + cor0.col2 * - col2 * + col0 + col1 + col1 * + cor0.col2 * - col1 AS col2 FROM tab1 AS cor0
----
-27730
202246
721069

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

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

query I rowsort
SELECT + col0 * + 3 AS col2 FROM tab1 cor0
----
192
240
9

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

query I rowsort
SELECT DISTINCT col1 * - 80 AS col0 FROM tab2 cor0
----
-1360
-2480
-4720

query I rowsort
SELECT ALL + - col2 + + 43 FROM tab1 AS cor0
----
-11
-14
-53

query I rowsort
SELECT + - cor0.col2 * 14 AS col0 FROM tab0 AS cor0
----
-1148
-14
-462

query I rowsort
SELECT DISTINCT - cor0.col0 * 52 + ( - col2 ) FROM tab2 AS cor0
----
-391
-4082
-4146

onlyif mysql # use DIV operator for integer division
query I rowsort label-1619
SELECT ALL - - col1 DIV col2 + - col2 * + cor0.col1 FROM tab0 AS cor0
----
-2836
-7461
0

skipif mysql # not compatible
query I rowsort label-1619
SELECT ALL - - col1 / col2 + - col2 * + cor0.col1 FROM tab0 AS cor0
----
-2836
-7461
0

query I rowsort
SELECT + - cor0.col2 * - 48 + + 67 AS col2 FROM tab0 AS cor0
----
115
1651
4003

query I rowsort
SELECT - cor0.col0 + - cor0.col1 * + col1 - + col2 AS col2 FROM tab0 AS cor0
----
-7453
-8452
-9445

query I rowsort
SELECT col2 * 86 * 8 + + col0 * + 27 AS col0 FROM tab2 AS cor0
----
18765
19994
28277

query I rowsort
SELECT ALL - col2 * + 77 + - col0 FROM tab1 AS cor0
----
-4161
-4453
-7472

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

query I rowsort
SELECT DISTINCT + - col0 - 21 * + col0 FROM tab0 AS cor0
----
-1958
-528
-770

query I rowsort
SELECT DISTINCT - col1 + cor0.col0 * col0 AS col1 FROM tab0 AS cor0
----
1128
490
7830

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

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

query I rowsort
SELECT DISTINCT - ( 59 ) AS col0 FROM tab0, tab2 AS cor0
----
-59

query I rowsort
SELECT + ( + col1 ) * col1 + - col0 FROM tab0 AS cor0
----
7372
8192
9374

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2, tab1 cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1632
SELECT DISTINCT + col0 DIV col0 - col2 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-1632
SELECT DISTINCT + col0 / col0 - col2 FROM tab2
----
-25
-26
-37

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

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

query I rowsort
SELECT + - 74 FROM tab2 AS cor0
----
-74
-74
-74

query I rowsort
SELECT ALL - + cor0.col2 * + col0 + + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

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

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

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

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

query I rowsort
SELECT DISTINCT + 45 + - col0 * + col1 FROM tab0 cor0
----
-2019
-3350
-8054

query I rowsort
SELECT ALL + col2 + col1 * col0 * col0 FROM tab1 AS cor0
----
288
41017
83296

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

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

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

query I rowsort
SELECT ALL + 63 + + col1 FROM tab2 AS cor0
----
122
80
94

query I rowsort
SELECT ALL ( cor0.col1 ) + + cor0.col2 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 993162448d72b066e1ac9ba4caa8d8d7

query I rowsort
SELECT + 43 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 199105619049271147956de52e7f5ed4

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

query I rowsort
SELECT 50 + col1 FROM tab2
----
109
67
81

query I rowsort
SELECT DISTINCT - 14 * col2 AS col0 FROM tab0 AS cor0
----
-1148
-14
-462

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

query I rowsort
SELECT + 35 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

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

query I rowsort
SELECT + col1 * tab2.col0 + 92 * col0 FROM tab2
----
11778
861
8611

onlyif mysql # use DIV operator for integer division
query I rowsort label-1655
SELECT col2 * 90 + + tab2.col0 DIV col0 FROM tab2
----
2341
2431
3421

skipif mysql # not compatible
query I rowsort label-1655
SELECT col2 * 90 + + tab2.col0 / col0 FROM tab2
----
2341
2431
3421

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

skipif mysql # not compatible
query I rowsort label-1656
SELECT + ( col1 ) * - col1 * CAST ( NULL AS REAL ) + + col1 * + col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + + col1 * 99 AS col0 FROM tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT ALL - ( col1 ) + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + col0 * - col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 13 * - col1 - - col0 col1 FROM tab1 AS cor0
----
194
249
341

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab1, tab0 AS cor0
----
68

query I rowsort
SELECT + 18 FROM tab2, tab1 cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT - 82 - - col0 FROM tab0 AS cor0
----
-47
-58
7

query I rowsort
SELECT ALL - - 47 + col0 * - col1 FROM tab1 AS cor0
----
-31
-593
-993

onlyif mysql # use DIV operator for integer division
query I rowsort label-1665
SELECT ALL + CAST( col0 AS SIGNED ) DIV + col1 + 22 FROM tab0 AS cor0
----
22
22
22

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

query I rowsort
SELECT DISTINCT + ( - col0 + + col1 ) * 69 AS col0 FROM tab1
----
-3726
-4623
1587

query I rowsort
SELECT ALL - 40 AS col2 FROM tab2, tab1 AS cor0, tab0, tab2 cor1
----
81 values hashing to b10451aa7e22bfd12577dc60d18d9396

onlyif mysql # use DIV operator for integer division
query I rowsort label-1668
SELECT - + col2 + cor0.col1 DIV + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1668
SELECT - + col2 + cor0.col1 / + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + 35 + + tab1.col1 AS col1 FROM tab1, tab0, tab1 cor0
----
27 values hashing to d42b7f59fc86b0f66b9a62ac422f369c

query I rowsort
SELECT ALL - cor0.col1 FROM tab0, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( col1 ) col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT 83 AS col2 FROM tab2, tab0 cor0
----
83

query I rowsort
SELECT ALL col1 + - 88 * + ( - tab0.col1 ) * col2 FROM tab0
----
249830
656747
8633

query I rowsort
SELECT + 95 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + col2 + col0 col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT col1 + ( - 11 ) FROM tab2 AS cor0
----
20
48
6

query I rowsort
SELECT col1 * - col0 + 6 AS col2 FROM tab0 AS cor0
----
-2058
-3389
-8093

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

query I rowsort
SELECT ( + 23 ) - + col1 * 71 FROM tab0 AS cor0
----
-6083
-6438
-6864

query I rowsort
SELECT + col2 * 74 FROM tab2 AS cor0
----
1924
1998
2812

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col0 + + cor0.col1 col2 FROM tab1 AS cor0
----
-1027
-52
-630

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1687
SELECT DISTINCT - CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1687
SELECT DISTINCT - CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + 25 * cor0.col1 FROM tab0 AS cor0
----
2150
2275
2425

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 + tab0.col0 col0 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL + 73 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT - ( - col2 ) * cor0.col0 + - 86 FROM tab0 AS cor0
----
-51
706
7212

onlyif mysql # use DIV operator for integer division
query I rowsort label-1693
SELECT + + 57 + 57 DIV + col1 FROM tab1 cor0
----
59
61
62

skipif mysql # not compatible
query I rowsort label-1693
SELECT + + 57 + 57 / + col1 FROM tab1 cor0
----
59
61
62

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

query I rowsort
SELECT ALL col1 - - 55 AS col0 FROM tab0 AS cor0
----
141
146
152

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

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

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

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

query I rowsort
SELECT + 19 * + 44 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 9421529a350d42543180796e3cf47451

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 - 79 FROM tab2, tab1 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT ALL 83 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT col1 * - 83 AS col0 FROM tab1
----
-1079
-2158
-830

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1706
SELECT + 61 DIV + col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1706
SELECT + 61 / + col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT + 68 FROM tab0, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

onlyif mysql # use DIV operator for integer division
query I rowsort label-1708
SELECT + + col0 + col2 DIV + 19 FROM tab2 AS cor0
----
79
8
81

skipif mysql # not compatible
query I rowsort label-1708
SELECT + + col0 + col2 / + 19 FROM tab2 AS cor0
----
79
8
81

query I rowsort
SELECT - - col0 * 14 + - cor0.col0 * - col0 FROM tab1 cor0
----
4992
51
7520

query I rowsort
SELECT + 59 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL col2 + col1 * - ( col1 * - 40 ) FROM tab0
----
295873
331322
376361

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * 87 + tab1.col0 col1 FROM tab1
----
264
5632
7040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 * col0 col0 FROM tab1
----
132
2816
3520

query I rowsort
SELECT 57 * + col0 + - 53 * - col1 AS col0 FROM tab2 AS cor0
----
2042
5404
7573

query I rowsort
SELECT + 21 AS col0 FROM tab0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 * - col1 AS REAL ) col0 FROM tab2
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 60 ) col0 FROM tab2
----
-60

query I rowsort
SELECT ALL col1 * - tab0.col2 - col0 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + 98 - col2 FROM tab2
----
60
71
72

query I rowsort
SELECT + col0 + col2 - + 51 AS col1 FROM tab2
----
-17
53
66

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

query I rowsort
SELECT + 64 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT - 2 - col2 FROM tab1 AS cor0
----
-56
-59
-98

query I rowsort
SELECT - 15 + col2 + cor0.col0 FROM tab2 AS cor0
----
102
19
89

query I rowsort
SELECT - - 83 + col2 * - col0 FROM tab1 AS cor0
----
-3565
-7597
-79

query I rowsort
SELECT 82 * col2 + col1 FROM tab0 AS cor0
----
179
2792
6815

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab1 cor0, tab0 AS cor1
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT DISTINCT + 43 + col2 * + col2 - col1 FROM tab0
----
-53
1046
6676

query I rowsort
SELECT DISTINCT col0 * col0 - - 16 AS col0 FROM tab0
----
1241
592
7937

query I rowsort
SELECT DISTINCT - col1 * col1 - col0 * 13 FROM tab1
----
-1209
-715
-932

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - col2 col0 FROM tab1
----
-108
-114
-192

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

query I rowsort
SELECT col0 * - ( + col0 ) + col1 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1734
SELECT - col0 * - CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-1734
SELECT - col0 * - CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col1 * 18 * col1 FROM tab2 cor0
----
-17298
-5202
-62658

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 82 col0 FROM tab2 AS cor0
----
108
109
120

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

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

query I rowsort
SELECT ALL - col2 * 67 + - 11 AS col2 FROM tab1 AS cor0
----
-3629
-3830
-6443

query I rowsort
SELECT ALL - + col2 * + 84 FROM tab1 AS cor0
----
-4536
-4788
-8064

query I rowsort
SELECT - - col1 * - cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

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

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

query I rowsort
SELECT col0 + ( - 5 ) - + col0 AS col2 FROM tab2 AS cor0
----
-5
-5
-5

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + col1 col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + - col2 + + ( - cor0.col1 ) * + col1 * col1 AS col1 FROM tab1 AS cor0
----
-1057
-17630
-2293

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

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

query I rowsort
SELECT ALL col1 + 80 FROM tab0 AS cor0
----
166
171
177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + cor0.col1 * + col1 col2 FROM tab1 AS cor0
----
156
650
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 23 + col2 col0 FROM tab0 AS cor0
----
-22
10
59

query I rowsort
SELECT ALL - ( 24 + col2 ) * + tab2.col0 FROM tab2
----
-357
-3900
-4898

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

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

query I rowsort
SELECT DISTINCT - + ( - 16 ) * cor0.col0 - - 53 FROM tab0 AS cor0
----
1477
437
613

query I rowsort
SELECT ALL - ( col1 ) * + cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - - col0 * - col2 * cor0.col1 + - col1 AS col0 FROM tab0 AS cor0
----
-3492
-664209
-68198

query I rowsort
SELECT + - col0 * col1 + - cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT - + 57 * - ( + col0 ) + + 31 FROM tab2 AS cor0
----
430
4477
4534

query I rowsort
SELECT 50 AS col0 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT ALL - + col0 + - 73 FROM tab0 AS cor0
----
-108
-162
-97

query I rowsort
SELECT + - col1 + + 73 FROM tab1 AS cor0
----
47
60
63

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

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

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

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

query I rowsort
SELECT ALL + + col1 + - col1 * + col1 FROM tab2 AS cor0
----
-272
-3422
-930

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

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

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

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

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

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

query I rowsort
SELECT 86 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT DISTINCT col2 * + tab0.col0 * + tab0.col0 AS col0 FROM tab0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-1773
SELECT col0 DIV tab1.col1 + + tab1.col1 AS col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-1773
SELECT col0 / tab1.col1 + + tab1.col1 AS col1 FROM tab1
----
16
19
26

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1775
SELECT + col2 DIV col0 + col0 + col0 * col2 FROM tab0 AS cor0
----
70
7387
817

skipif mysql # not compatible
query I rowsort label-1775
SELECT + col2 / col0 + col0 + col0 * col2 FROM tab0 AS cor0
----
70
7387
817

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

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

query I rowsort
SELECT DISTINCT - - col1 + col1 * col1 FROM tab2 AS cor0
----
306
3540
992

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

query I rowsort
SELECT ALL - col2 * col0 + col0 - col0 * + cor0.col1 * + col2 AS col1 FROM tab1 AS cor0
----
-107440
-40064
-4371

query I rowsort
SELECT DISTINCT + + cor0.col2 * col1 + col0 * col2 * + col0 AS col1 FROM tab0 AS cor0
----
1322
21846
656984

query I rowsort
SELECT DISTINCT - col0 * + cor0.col1 + + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL cor0.col1 - - cor0.col2 FROM tab2 cor0
----
55
58
85

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

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

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

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

query I rowsort
SELECT + 84 * - col1 FROM tab2 AS cor0
----
-1428
-2604
-4956

query I rowsort
SELECT DISTINCT + 45 * cor0.col2 AS col0 FROM tab1 AS cor0
----
2430
2565
4320

query I rowsort
SELECT - col0 * - col0 - - col2 * col1 * cor0.col2 FROM tab1 AS cor0
----
126208
36586
75825

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

skipif mysql # not compatible
query I rowsort label-1791
SELECT - - 98 / col2 AS col1 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1792
SELECT DISTINCT + col0 + col2 DIV - col1 col0 FROM tab2 AS cor0
----
7
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1792
SELECT DISTINCT + col0 + col2 / - col1 col0 FROM tab2 AS cor0
----
7
77
78

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1795
SELECT - 18 * col2 DIV + col2 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-114
-72
-75

skipif mysql # not compatible
query I rowsort label-1795
SELECT - 18 * col2 / + col2 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-114
-72
-75

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

query I rowsort
SELECT ALL - 2 * col2 * + col0 FROM tab1 AS cor0
----
-15360
-324
-7296

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

query I rowsort
SELECT ALL + col1 + col1 * cor0.col2 * col2 FROM tab0 AS cor0
----
194
611975
93740

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

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

query I rowsort
SELECT col2 + col1 * + col1 * - col1 FROM tab1 cor0
----
-17522
-2101
-943

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

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

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

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

query I rowsort
SELECT col2 * - col1 - col0 FROM tab1
----
-1328
-1407
-634

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

query I rowsort
SELECT col2 AS col0 FROM tab1 WHERE ( NULL ) NOT BETWEEN ( NULL ) AND ( col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1810
SELECT DISTINCT + tab0.col0 * - col1 + col0 + col0 DIV + col2 FROM tab0
----
-2040
-3325
-8009

skipif mysql # not compatible
query I rowsort label-1810
SELECT DISTINCT + tab0.col0 * - col1 + col0 + col0 / + col2 FROM tab0
----
-2040
-3325
-8009

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

query I rowsort
SELECT col2 * col0 + col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL - tab0.col1 + col0 + col0 * + col1 FROM tab0
----
2002
3333
8097

query I rowsort
SELECT - col2 * - col1 + col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL col1 * tab1.col2 AS col0 FROM tab1
----
1248
1404
570

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

query I rowsort
SELECT tab0.col0 * + col0 * - tab0.col2 FROM tab0
----
-1225
-19008
-649522

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

query I rowsort
SELECT col2 * + col2 + - tab2.col2 + col1 FROM tab2
----
1423
709
733

query I rowsort
SELECT ALL + col0 * - col0 - + col1 AS col2 FROM tab0
----
-1322
-662
-8012

query I rowsort
SELECT + col0 + - col2 * - col1 AS col0 FROM tab1
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col2 col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + col0 * col1 - col1 FROM tab0
----
1978
3298
8008

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1824
SELECT ALL + col1 / col0 + + col2 col0 FROM tab2
----
26
31
38

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

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

query I rowsort
SELECT DISTINCT - col2 + + col0 + tab0.col2 AS col2 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * tab1.col1 col2 FROM tab1
----
100
169
676

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 / col1 + col1 = col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT col1 * tab1.col2 * col2 FROM tab1
----
119808
32490
75816

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

query I rowsort
SELECT - col1 FROM tab1 WHERE NULL NOT BETWEEN NULL AND col2
----

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

query III rowsort
SELECT ALL * FROM tab1 WHERE col0 <= NULL
----

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

skipif mysql # not compatible
query I rowsort label-1835
SELECT ALL + + col0 / - col0 - 12 FROM tab0 AS cor0
----
-13
-13
-13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1836
SELECT DISTINCT col1 + - col1 * + 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-1836
SELECT DISTINCT col1 + - col1 * + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL

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

query I rowsort
SELECT col0 - col2 * col2 AS col0 FROM tab0 WHERE col0 * + col2 / col1 NOT IN ( - col2 )
----
-1065
-6635
34

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) > NULL
----

query I rowsort
SELECT ALL - col0 + + col2 + col1 FROM tab1
----
29
3
77

query I rowsort
SELECT ALL col2 + - col2 * col0 * col2 + col0 FROM tab0
----
-26079
-598265
1

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

query I rowsort
SELECT ALL col2 + col0 * col0 FROM tab0
----
1226
609
8003

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

query I rowsort
SELECT - col0 * + col2 * col2 + col0 * - col0 * - col0 FROM tab1
----
-225280
-8721
54208

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

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL IN ( col0 * tab0.col0 )
----

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

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

query I rowsort
SELECT col0 * + col2 + col2 FROM tab0 WHERE col2 BETWEEN col2 * - col2 AND NULL
----

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

query III rowsort
SELECT * FROM tab0 WHERE - col2 BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - col2 * cor0.col2 + - col2 AS col1 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT ALL 0 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL - col1 - 64 * tab1.col1 FROM tab1
----
-1690
-650
-845

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

skipif mysql # not compatible
query I rowsort label-1857
SELECT + - col1 + + 46 / - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1859
SELECT DISTINCT - col1 * + col2 + col1 DIV col1 AS col1 FROM tab1 AS cor0
----
-1247
-1403
-569

skipif mysql # not compatible
query I rowsort label-1859
SELECT DISTINCT - col1 * + col2 + col1 / col1 AS col1 FROM tab1 AS cor0
----
-1247
-1403
-569

onlyif mysql # use DIV operator for integer division
query I rowsort label-1860
SELECT - col1 + - col2 * col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-1860
SELECT - col1 + - col2 * col2 / col2 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

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

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

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

query I rowsort
SELECT ALL + col0 + col2 * 50 FROM tab1 AS cor0
----
2703
2914
4880

query I rowsort
SELECT DISTINCT - ( col1 ) * - 52 FROM tab1 AS cor0
----
1352
520
676

query I rowsort
SELECT ( col0 ) * col0 - col0 AS col2 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT DISTINCT - 74 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
-74

query I rowsort
SELECT + 22 + - col1 * + ( - 23 ) AS col0 FROM tab1 AS cor0
----
252
321
620

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0, tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + - 30 - + col0 * - ( + col2 ) FROM tab1 AS cor0
----
132
3618
7650

query I rowsort
SELECT ALL - 83 * col2 AS col0 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT ALL + 84 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

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

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

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

query I rowsort
SELECT ALL + - col0 + + 23 FROM tab0 AS cor0
----
-1
-12
-66

query I rowsort
SELECT ALL + 97 FROM tab2, tab2 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

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

query I rowsort
SELECT ALL 9 * 22 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 16076a595f8815c5a428320c5f0d4d77

query I rowsort
SELECT DISTINCT col0 + 86 + - 74 FROM tab1 cor0
----
15
76
92

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

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

query I rowsort
SELECT ALL cor0.col0 + 31 AS col1 FROM tab0 AS cor0
----
120
55
66

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1886
SELECT DISTINCT ( - 55 ) + + cor0.col0 DIV 4 + 10 * col1 * col0 col2 FROM tab1 AS cor0
----
10365
6361
725

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1886
SELECT DISTINCT ( - 55 ) + + cor0.col0 / 4 + 10 * col1 * col0 col2 FROM tab1 AS cor0
----
10365
6361
725

onlyif mysql # use DIV operator for integer division
query I rowsort label-1887
SELECT col2 * ( - col2 ) + + col0 DIV ( - col0 ) AS col0 FROM tab2
----
-1445
-677
-730

skipif mysql # not compatible
query I rowsort label-1887
SELECT col2 * ( - col2 ) + + col0 / ( - col0 ) AS col0 FROM tab2
----
-1445
-677
-730

onlyif mysql # use DIV operator for integer division
query I rowsort label-1888
SELECT ALL + col2 DIV - 2 col1 FROM tab2
----
-13
-13
-19

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

query I rowsort
SELECT DISTINCT + col2 * col2 * + 32 FROM tab1
----
103968
294912
93312

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1, tab0, tab1 AS cor0
----
3
64
80

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

query I rowsort
SELECT ALL + 50 * cor0.col2 + col2 + col1 * + col0 FROM tab2 cor0
----
1594
3281
5928

query I rowsort
SELECT ALL + - ( col1 ) * col2 + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + ( col0 ) * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT 45 * + col0 AS col0 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT ALL 39 AS col2 FROM tab2 AS cor0
----
39
39
39

query I rowsort
SELECT DISTINCT + - 32 * col2 + col1 FROM tab1 AS cor0
----
-1702
-1814
-3059

query I rowsort
SELECT DISTINCT col2 * 82 FROM tab2
----
2132
2214
3116

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * tab1.col2 * tab1.col0 + col1 col0 FROM tab1
----
207946
737293
8774

onlyif mysql # use DIV operator for integer division
query I rowsort label-1900
SELECT ALL - ( - col1 ) DIV - col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1900
SELECT ALL - ( - col1 ) / - col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 * 19 - col1 * + tab2.col0 AS col0 FROM tab2
----
-1020
-3481
372

onlyif mysql # use DIV operator for integer division
query I rowsort label-1902
SELECT col2 * + 68 - - col0 DIV - col1 col0 FROM tab0
----
2244
5576
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1902
SELECT col2 * + 68 - - col0 / - col1 col0 FROM tab0
----
2244
5576
68

query I rowsort
SELECT + col0 * col0 * tab0.col2 + + col2 * col1 * + col0 - - tab0.col1 AS col0 FROM tab0
----
1313731
4717
87206

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1904
SELECT CAST( - col2 * + col1 + - col1 * + col0 AS SIGNED ) FROM tab0
----
-15561
-3492
-4902

skipif mysql # not compatible
query I rowsort label-1904
SELECT CAST ( - col2 * + col1 + - col1 * + col0 AS INTEGER ) FROM tab0
----
-15561
-3492
-4902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col2 col1 FROM tab0 AS cor0
----
35
7298
792

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

query I rowsort
SELECT col1 + 7 * - col2 * col0 FROM tab1
----
-1108
-25526
-53747

query I rowsort
SELECT DISTINCT tab2.col1 + - col1 AS col0 FROM tab2
----
0

query I rowsort
SELECT ALL - col0 + col2 * - ( - col2 * col2 + - col2 ) FROM tab0
----
-33
37002
558003

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 27 + + tab2.col1 + + col0 col0 FROM tab2
----
123
164
65

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

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

query I rowsort
SELECT - - col0 * + 74 FROM tab0 AS cor0
----
1776
2590
6586

query I rowsort
SELECT DISTINCT col2 * + 69 FROM tab2 AS cor0
----
1794
1863
2622

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1917
SELECT DISTINCT + col0 DIV ( col0 ) AS col0 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1917
SELECT DISTINCT + col0 / ( col0 ) AS col0 FROM tab2 AS cor0
----
1

query I rowsort
SELECT - + col0 * 89 FROM tab2 AS cor0
----
-623
-6942
-7031

query I rowsort
SELECT + col2 * ( ( col2 ) ) + + col2 * col1 AS col1 FROM tab2 AS cor0
----
1566
2090
2210

query I rowsort
SELECT DISTINCT col0 + + 91 + - col2 AS col0 FROM tab0 AS cor0
----
125
82
98

query I rowsort
SELECT DISTINCT col2 - ( 11 ) * - col0 AS col1 FROM tab0 AS cor0
----
1061
297
386

query I rowsort
SELECT ALL col1 + + 6 FROM tab2 AS cor0
----
23
37
65

query I rowsort
SELECT ALL col1 * 27 * col0 + + cor0.col2 FROM tab2 AS cor0
----
124280
36299
5886

query I rowsort
SELECT DISTINCT + col2 + col1 * cor0.col2 + - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 * ( col2 ) - - col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT 15 * col0 AS col2 FROM tab2
----
105
1170
1185

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

query I rowsort
SELECT ALL 81 + col0 * - ( col0 ) AS col2 FROM tab2
----
-6003
-6160
32

query I rowsort
SELECT ALL - col0 + - col1 + tab0.col2 * col2 AS col1 FROM tab0
----
-131
6544
979

query I rowsort
SELECT + ( col1 ) * + tab2.col2 * + col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT 67 + col2 AS col2 FROM tab2
----
105
93
94

query I rowsort
SELECT 54 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

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

query I rowsort
SELECT + col0 * + ( col0 + col1 ) AS col1 FROM tab1
----
4736
7440
87

query I rowsort
SELECT DISTINCT + col0 - + ( - cor0.col1 + col0 ) * col1 AS col2 FROM tab0 AS cor0
----
271
5356
6049

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

query I rowsort
SELECT DISTINCT - col0 + - ( col0 + + col2 ) AS col2 FROM tab2 AS cor0
----
-182
-196
-41

query I rowsort
SELECT DISTINCT - col1 * - 44 FROM tab1 AS cor0
----
1144
440
572

query I rowsort
SELECT + + col1 * - 93 + col0 * + col1 FROM tab2 AS cor0
----
-238
-2666
-885

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1940
SELECT - cor0.col2 * + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-1940
SELECT - cor0.col2 * + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + + col1 * 4 FROM tab2 cor0
----
124
236
68

query I rowsort
SELECT + col1 + 58 FROM tab1 AS cor0
----
68
71
84

query I rowsort
SELECT ALL col1 - 65 * - col2 * col0 FROM tab0 AS cor0
----
2372
474461
51566

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

query I rowsort
SELECT cor0.col1 + 92 * cor0.col0 AS col2 FROM tab0 AS cor0
----
2294
3317
8279

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

query I rowsort
SELECT - - col2 * 85 FROM tab2 AS cor0
----
2210
2295
3230

query I rowsort
SELECT DISTINCT - col1 + 34 FROM tab1 AS cor0
----
21
24
8

query I rowsort
SELECT ALL - + 23 AS col1 FROM tab0 AS cor0
----
-23
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 col1 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1951
SELECT ALL - + 26 + col2 DIV col1 FROM tab2 AS cor0
----
-24
-26
-26

skipif mysql # not compatible
query I rowsort label-1951
SELECT ALL - + 26 + col2 / col1 FROM tab2 AS cor0
----
-24
-26
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1952
SELECT DISTINCT CAST( cor0.col2 AS SIGNED ) + - cor0.col0 col1 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1952
SELECT DISTINCT CAST ( cor0.col2 AS INTEGER ) + - cor0.col0 col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - + 80 AS col2 FROM tab2 AS cor0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - col0 + + 52 FROM tab1 cor0
----
-12
-28
49

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

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

skipif mysql # not compatible
query I rowsort label-1956
SELECT + + 28 / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 79 * + col1 AS col2 FROM tab0 AS cor0
----
-6794
-7189
-7663

onlyif mysql # use DIV operator for integer division
query I rowsort label-1958
SELECT DISTINCT + 79 DIV 96 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1958
SELECT DISTINCT + 79 / 96 FROM tab0 AS cor0
----
0

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

query I rowsort
SELECT DISTINCT - 97 FROM tab1 AS cor0
----
-97

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

skipif mysql # not compatible
query I rowsort label-1961
SELECT 1 / - ( - cor0.col1 ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 85 + ( + col0 ) FROM tab0 AS cor0
----
109
120
174

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

query I rowsort
SELECT DISTINCT + ( col2 ) + - col2 * col0 * col2 FROM tab0 AS cor0
----
-26103
-34
-598354

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( cor0.col2 ) * 59 + col0 col2 FROM tab0 AS cor0
----
-1923
-24
-4749

query I rowsort
SELECT ALL - ( col2 ) * cor0.col1 + + col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1566
-2090
-2210

onlyif mysql # use DIV operator for integer division
query I rowsort label-1968
SELECT DISTINCT cor0.col0 DIV + cor0.col1 FROM tab1, tab1 cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-1968
SELECT DISTINCT cor0.col0 / + cor0.col1 FROM tab1, tab1 cor0
----
0
6

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

query I rowsort
SELECT col1 + - cor0.col2 + col2 * - col2 * col0 FROM tab2 AS cor0
----
-114097
-5099
-52695

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

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

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

query I rowsort
SELECT + 65 + col0 FROM tab1 AS cor0
----
129
145
68

query I rowsort
SELECT - col0 * - cor0.col0 + + col0 - + col2 FROM tab0 AS cor0
----
1259
567
7928

query I rowsort
SELECT col1 * cor0.col1 * + 63 AS col2 FROM tab1 cor0
----
10647
42588
6300

query I rowsort
SELECT + col1 * - col2 + col0 * col1 - + col1 AS col2 FROM tab2 AS cor0
----
-651
3009
680

query I rowsort
SELECT - ( + ( - cor1.col2 ) ) AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT col2 + + col1 * col2 * col2 AS col2 FROM tab1
----
119904
32547
75870

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT 75 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

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

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

query I rowsort
SELECT + - 72 * col0 FROM tab0 AS cor0
----
-1728
-2520
-6408

query I rowsort
SELECT ALL - 14 FROM tab2
----
-14
-14
-14

onlyif mysql # use DIV operator for integer division
query I rowsort label-1985
SELECT + cor1.col0 * 52 DIV - cor0.col1 col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 49d099220541dfe2ff3888446707ddb7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1985
SELECT + cor1.col0 * 52 / - cor0.col1 col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 49d099220541dfe2ff3888446707ddb7

query I rowsort
SELECT + 95 + 69 FROM tab0
----
164
164
164

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

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab1 cor1, tab2 cor2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

query I rowsort
SELECT DISTINCT - col1 * + 66 AS col2 FROM tab1 AS cor0
----
-1716
-660
-858

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

query I rowsort
SELECT DISTINCT col0 * col0 - col1 AS col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL - 4 AS col0 FROM tab0
----
-4
-4
-4

query I rowsort
SELECT ALL - col2 * - 33 AS col2 FROM tab1
----
1782
1881
3168

query I rowsort
SELECT ALL col2 * 0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 92 * - cor0.col0 + + col2 * + 5 col2 FROM tab2 AS cor0
----
-509
-7046
-7078

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1997
SELECT ALL - 16 DIV col0 AS col0 FROM tab2 cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-1997
SELECT ALL - 16 / col0 AS col0 FROM tab2 cor0
----
-2
0
0

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0, tab0 cor0, tab2 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT - - col2 + 73 FROM tab2 AS cor0
----
100
111
99

query I rowsort
SELECT + col2 + - 31 * + cor0.col2 FROM tab1 AS cor0
----
-1620
-1710
-2880

query I rowsort
SELECT - col1 * - tab1.col2 - 19 FROM tab1
----
1229
1385
551

query I rowsort
SELECT ALL 87 * col0 FROM tab1
----
261
5568
6960

query I rowsort
SELECT ALL - col0 + + col2 AS col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT - cor0.col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT - 94 * col1 + col0 + - col2 AS col0 FROM tab1 AS cor0
----
-1238
-2495
-933

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - 35 col0 FROM tab2 AS cor0
----
245
2730
2765

onlyif mysql # use DIV operator for integer division
query I rowsort label-2011
SELECT - col1 DIV col0 FROM tab2 cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2011
SELECT - col1 / col0 FROM tab2 cor0
----
-4
0
0

query I rowsort
SELECT + col2 * col0 * 74 FROM tab1
----
11988
269952
568320

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

query I rowsort
SELECT col1 * col0 + - col0 + col2 FROM tab1 cor0
----
1056
129
633

query I rowsort
SELECT ALL col2 * col2 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-2016
SELECT DISTINCT col2 * col0 DIV col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2016
SELECT DISTINCT col2 * col0 / col2 FROM tab0
----
24
35
89

query I rowsort
SELECT + cor0.col0 + 85 * - col2 FROM tab1 AS cor0
----
-4587
-4781
-8080

query I rowsort
SELECT DISTINCT + col2 + ( - 51 ) * - col2 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT DISTINCT + col1 * - 23 FROM tab1 AS cor0
----
-230
-299
-598

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

query I rowsort
SELECT - col0 * col0 + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL - col0 * - ( 35 ) + + col1 FROM tab0 AS cor0
----
1322
3206
926

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

query I rowsort
SELECT col0 + - ( col0 ) * - col1 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2025
SELECT col2 DIV 45 + + col0 FROM tab0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-2025
SELECT col2 / 45 + + col0 FROM tab0
----
24
35
90

query I rowsort
SELECT DISTINCT 68 * - col2 + col2 FROM tab2 AS cor0
----
-1742
-1809
-2546

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

query I rowsort
SELECT DISTINCT ( + col2 ) + + col2 * ( 69 ) FROM tab1 AS cor0
----
3780
3990
6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-2029
SELECT - tab1.col0 * - 38 + - 83 DIV col2 FROM tab1
----
113
2431
3040

skipif mysql # not compatible
query I rowsort label-2029
SELECT - tab1.col0 * - 38 + - 83 / col2 FROM tab1
----
113
2431
3040

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

query I rowsort
SELECT - 80 + - col2 * + col2 FROM tab0 AS cor0
----
-1169
-6804
-81

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

query I rowsort
SELECT DISTINCT + col1 + col0 * + 47 + - col2 AS col2 FROM tab2 AS cor0
----
333
3692
3699

query I rowsort
SELECT + 40 + col1 * - 59 FROM tab0 cor0
----
-5034
-5329
-5683

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 17 - - cor0.col0 col0 FROM tab0 AS cor0
----
18
7
72

query I rowsort
SELECT ALL - - cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

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

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

query I rowsort
SELECT 44 + - col2 AS col0 FROM tab0 AS cor0
----
-38
11
43

query I rowsort
SELECT ALL - ( col0 ) * - ( cor0.col1 * - col1 + 69 ) FROM tab1 AS cor0
----
-1821
-1984
-8000

query I rowsort
SELECT 15 - - col2 FROM tab0 AS cor0
----
16
48
97

query I rowsort
SELECT DISTINCT col1 * col1 * ( + col0 ) + - col2 FROM tab0 AS cor0
----
177471
329314
736927

query I rowsort
SELECT ALL col1 * cor0.col2 + col1 * + col2 FROM tab1 AS cor0
----
1140
2496
2808

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

query I rowsort
SELECT 24 - col0 AS col2 FROM tab0
----
-11
-65
0

query I rowsort
SELECT - col0 + col2 * + col1 + + 99 FROM tab0
----
161
2913
7472

query I rowsort
SELECT + col1 * - 67 FROM tab2
----
-1139
-2077
-3953

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( ( col2 ) ) * + col0 * col2 - - tab2.col1 * col2 * col2 col0 FROM tab2
----
138624
27702
92612

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2049
SELECT CAST( NULL AS SIGNED ) / 80 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2049
SELECT CAST ( NULL AS INTEGER ) / 80 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - col1 * tab0.col1 AS col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col0 - col0 * - 61 AS col1 FROM tab0
----
1488
2170
5518

query I rowsort
SELECT DISTINCT - tab0.col2 + + col0 * 36 FROM tab0
----
1259
3122
831

query I rowsort
SELECT + + ( + cor0.col2 ) * - 39 + - col0 FROM tab2 AS cor0
----
-1060
-1092
-1561

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

query I rowsort
SELECT - - cor0.col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2056
SELECT ALL - 56 DIV col2 + - 70 AS col1 FROM tab0 AS cor0
----
-126
-70
-71

skipif mysql # not compatible
query I rowsort label-2056
SELECT ALL - 56 / col2 + - 70 AS col1 FROM tab0 AS cor0
----
-126
-70
-71

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

skipif mysql # not compatible
query I rowsort label-2057
SELECT DISTINCT + col2 / + col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT 63 + col2 FROM tab2
----
101
89
90

query I rowsort
SELECT DISTINCT - cor1.col1 * cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-1003
-1829
-289
-3481
-527
-961

query I rowsort
SELECT ALL + 23 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT ALL + col0 + col2 * col2 AS col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + + col1 + col1 * - col0 * 58 FROM tab2 AS cor0
----
-12555
-266857
-77877

query I rowsort
SELECT + col0 - col2 * - col2 AS col0 FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2064
SELECT ALL ( + ( - col2 ) ) * CAST( + 47 AS SIGNED ) FROM tab1
----
-2538
-2679
-4512

skipif mysql # not compatible
query I rowsort label-2064
SELECT ALL ( + ( - col2 ) ) * CAST ( + 47 AS INTEGER ) FROM tab1
----
-2538
-2679
-4512

query I rowsort
SELECT ( - tab2.col1 ) AS col2 FROM tab2
----
-17
-31
-59

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2067
SELECT - ( + cor0.col1 ) + + tab1.col1 * - CAST( NULL AS DECIMAL ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2067
SELECT - ( + cor0.col1 ) + + tab1.col1 * - CAST ( NULL AS REAL ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL 16 + col0 + + col2 AS col2 FROM tab2
----
120
133
50

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

skipif mysql # not compatible
query I rowsort label-2069
SELECT ALL CAST ( + col0 AS INTEGER ) * + col1 + ( tab0.col0 ) AS col2 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2070
SELECT DISTINCT col1 * ( + col1 ) DIV - 25 AS col2 FROM tab2
----
-11
-139
-38

skipif mysql # not compatible
query I rowsort label-2070
SELECT DISTINCT col1 * ( + col1 ) / - 25 AS col2 FROM tab2
----
-11
-139
-38

query I rowsort
SELECT DISTINCT 46 + + cor0.col1 AS col0 FROM tab1, tab1 cor0
----
56
59
72

query I rowsort
SELECT col1 + + col2 * - col2 AS col2 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT 80 AS col1 FROM tab1
----
80

query I rowsort
SELECT ALL + 0 FROM tab2
----
0
0
0

query I rowsort
SELECT ( - cor0.col1 ) * cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 79ea663c5f468cc57a869fc826cf04a5

query I rowsort
SELECT ALL col1 + 51 FROM tab1 AS cor0
----
61
64
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2077
SELECT ALL col2 * CAST( + 53 AS SIGNED ) DIV + col1 + + 74 * - 57 * cor0.col2 FROM tab2 AS cor0
----
-109645
-113840
-160166

skipif mysql # not compatible
query I rowsort label-2077
SELECT ALL col2 * CAST ( + 53 AS INTEGER ) / + col1 + + 74 * - 57 * cor0.col2 FROM tab2 AS cor0
----
-109645
-113840
-160166

query I rowsort
SELECT ALL - cor0.col0 * - 17 - - col1 AS col1 FROM tab1 cor0
----
1098
1373
77

query I rowsort
SELECT DISTINCT + - col0 * 33 FROM tab1 AS cor0
----
-2112
-2640
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * cor0.col1 + + 67 col0 FROM tab1 AS cor0
----
-102
-33
-609

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

query I rowsort
SELECT ALL col2 * + col2 + - 71 AS col0 FROM tab2 AS cor0
----
1373
605
658

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * 93 col2 FROM tab0 AS cor0
----
3069
7626
93

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2085
SELECT + CAST( col0 AS SIGNED ) FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2085
SELECT + CAST ( col0 AS INTEGER ) FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL 38 * col2 AS col0 FROM tab0 AS cor0
----
1254
3116
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col2 * - col2 col0 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT DISTINCT - col1 * - 40 FROM tab1
----
1040
400
520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 + col2 col2 FROM tab1 AS cor0
----
3
45
6

query I rowsort
SELECT ALL - 81 AS col0 FROM tab0
----
-81
-81
-81

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT - + ( col1 ) * cor0.col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - + cor0.col1 * - 45 AS col1 FROM tab2 AS cor0
----
1395
2655
765

query I rowsort
SELECT - col2 * - 59 FROM tab0 cor0
----
1947
4838
59

query I rowsort
SELECT + + cor0.col2 + ( col0 ) * col2 * cor0.col1 FROM tab1 AS cor0
----
36537
4266
99936

query I rowsort
SELECT DISTINCT + 29 * - tab1.col0 FROM tab1
----
-1856
-2320
-87

query I rowsort
SELECT DISTINCT - - 92 AS col0 FROM tab2 AS cor0
----
92

query I rowsort
SELECT ALL 39 * col1 * col1 FROM tab1
----
26364
3900
6591

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 5 * col2 col2 FROM tab2 cor0
----
-130
-135
-190

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

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

query I rowsort
SELECT - col1 * 24 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT + 97 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT 57 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

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

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

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

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

query I rowsort
SELECT ALL + - 96 * - cor0.col1 * + 20 FROM tab1 AS cor0
----
19200
24960
49920

query I rowsort
SELECT DISTINCT + ( - col2 ) + 61 * ( col1 + col1 ) AS col2 FROM tab2 AS cor0
----
2036
3755
7172

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

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

query I rowsort
SELECT 74 AS col2 FROM tab1 cor0
----
74
74
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-2116
SELECT DISTINCT + - 89 + + col2 DIV - 3 FROM tab1 AS cor0
----
-107
-108
-121

skipif mysql # not compatible
query I rowsort label-2116
SELECT DISTINCT + - 89 + + col2 / - 3 FROM tab1 AS cor0
----
-107
-108
-121

query I rowsort
SELECT DISTINCT - 51 + + col0 AS col1 FROM tab2 AS cor0
----
-44
27
28

query I rowsort
SELECT - 42 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

query I rowsort
SELECT ( tab1.col0 * + col2 + + 62 ) AS col2 FROM tab1
----
224
3710
7742

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

query I rowsort
SELECT ALL 19 * col1 AS col1 FROM tab2 AS cor0
----
1121
323
589

query I rowsort
SELECT DISTINCT + 28 FROM tab0 AS cor0
----
28

query I rowsort
SELECT ALL - ( + col1 ) + + ( col0 + + col2 ) FROM tab1 cor0
----
111
163
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-2124
SELECT DISTINCT + cor0.col1 * ( + ( + col1 ) ) * - 47 + + ( - col0 ) DIV 25 AS col2 FROM tab1 cor0
----
-31772
-4702
-7946

skipif mysql # not compatible
query I rowsort label-2124
SELECT DISTINCT + cor0.col1 * ( + ( + col1 ) ) * - 47 + + ( - col0 ) / 25 AS col2 FROM tab1 cor0
----
-31772
-4702
-7946

query I rowsort
SELECT tab2.col1 - + col1 FROM tab2
----
0
0
0

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

query I rowsort
SELECT ALL + 20 * - col1 AS col2 FROM tab0 cor0
----
-1720
-1820
-1940

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

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

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab2, tab2 cor1, tab2 AS cor2, tab2 cor3
----
3645 values hashing to 3d17e101d6f341609114801ea035bed1

query I rowsort
SELECT ALL - 46 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

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

skipif mysql # not compatible
query I rowsort label-2131
SELECT DISTINCT - CAST ( NULL AS INTEGER ) - - 87 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2132
SELECT ( ( - col2 ) ) + col2 DIV col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-2132
SELECT ( ( - col2 ) ) + col2 / col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT + col0 * 42 FROM tab1 cor0
----
126
2688
3360

query I rowsort
SELECT + 12 + - 15 * - col2 FROM tab0 AS cor0
----
1242
27
507

query I rowsort
SELECT 67 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # use DIV operator for integer division
query I rowsort label-2136
SELECT DISTINCT + col0 DIV + col2 + + col1 - + 5 FROM tab0 AS cor0
----
127
81
87

skipif mysql # not compatible
query I rowsort label-2136
SELECT DISTINCT + col0 / + col2 + + col1 - + 5 FROM tab0 AS cor0
----
127
81
87

query I rowsort
SELECT + col1 * col2 * col2 + ( - 2 ) FROM tab0 cor0
----
611882
93652
95

query I rowsort
SELECT DISTINCT tab0.col0 + col1 * col1 FROM tab0
----
7420
8370
9444

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

query I rowsort
SELECT DISTINCT 18 + tab0.col1 AS col1 FROM tab0
----
104
109
115

query I rowsort
SELECT - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 99 col2 FROM tab0
----
8514
9009
9603

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

query I rowsort
SELECT DISTINCT - ( 70 ) * col0 FROM tab1 AS cor0
----
-210
-4480
-5600

query I rowsort
SELECT ALL 59 + + col0 * col2 FROM tab2
----
2087
248
3061

query I rowsort
SELECT + tab1.col0 * tab1.col1 FROM tab1, tab0 cor0
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

query I rowsort
SELECT cor1.col2 * - tab0.col1 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 9248dc8e2a9503d5bb41eb88b96ebec3

query I rowsort
SELECT DISTINCT 15 * + col2 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT ALL + - 99 + - col0 FROM tab0 AS cor0
----
-123
-134
-188

query I rowsort
SELECT DISTINCT - + 53 * col0 - - cor0.col2 AS col2 FROM tab2 AS cor0
----
-344
-4108
-4149

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

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

query I rowsort
SELECT DISTINCT - 86 - - col0 FROM tab0 AS cor0
----
-51
-62
3

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2155
SELECT DISTINCT CAST( 56 AS SIGNED ) col1 FROM tab2, tab2 AS cor0
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2155
SELECT DISTINCT CAST ( 56 AS INTEGER ) col1 FROM tab2, tab2 AS cor0
----
56

query I rowsort
SELECT ALL ( 74 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT + col1 * 83 AS col1 FROM tab1 AS cor0
----
1079
2158
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + + col2 + + ( - col1 ) * - col1 + - CAST ( col0 AS REAL ) * cor0.col1 col0 FROM tab2 AS cor0
----
-1016
-1095
771

query I rowsort
SELECT + - col1 * col0 * col1 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT cor2.col2 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
26
27
38

query I rowsort
SELECT + + cor0.col1 * 73 FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT col2 * + 73 FROM tab2 cor0
----
1898
1971
2774

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2163
SELECT DISTINCT CAST( cor0.col2 AS SIGNED ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2163
SELECT DISTINCT CAST ( cor0.col2 AS INTEGER ) FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2164
SELECT ALL ( - col0 ) - col0 DIV cor0.col1 AS col1 FROM tab2 cor0
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-2164
SELECT ALL ( - col0 ) - col0 / cor0.col1 AS col1 FROM tab2 cor0
----
-7
-79
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2165
SELECT - - CAST( NULL AS SIGNED ) - col2 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-2165
SELECT - - CAST ( NULL AS INTEGER ) - col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 - + col0 col0 FROM tab2 cor0
----
-14
-156
-158

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

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

query I rowsort
SELECT ( + col1 ) * + cor0.col2 + - 36 FROM tab1 AS cor0
----
1212
1368
534

query I rowsort
SELECT ALL 53 FROM tab0 AS cor0
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col0 + col2 col0 FROM tab0 AS cor0
----
-34
-7216
-759

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2172
SELECT DISTINCT + col2 - 64 DIV 83 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2172
SELECT DISTINCT + col2 - 64 / 83 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL col1 + col1 - + 38 * - col1 FROM tab1
----
1040
400
520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2174
SELECT DISTINCT CAST( - 64 AS SIGNED ) col2 FROM tab2, tab1 AS cor0
----
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2174
SELECT DISTINCT CAST ( - 64 AS INTEGER ) col2 FROM tab2, tab1 AS cor0
----
-64

query I rowsort
SELECT ALL - col2 - 21 * 98 AS col2 FROM tab0
----
-2059
-2091
-2140

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

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

query I rowsort
SELECT DISTINCT + col0 * col0 + col2 - - col0 FROM tab1
----
4217
6576
66

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2181
SELECT DISTINCT - - 66 DIV - col0 AS col1 FROM tab2 AS cor0
----
-9
0

skipif mysql # not compatible
query I rowsort label-2181
SELECT DISTINCT - - 66 / - col0 AS col1 FROM tab2 AS cor0
----
-9
0

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

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

query I rowsort
SELECT + col1 + col2 * - 17 AS col0 FROM tab2 AS cor0
----
-383
-428
-629

query I rowsort
SELECT + + col2 + col2 * - 94 AS col1 FROM tab2 AS cor0
----
-2418
-2511
-3534

query I rowsort
SELECT DISTINCT + 33 * + col1 * 55 FROM tab0
----
156090
165165
176055

onlyif mysql # use DIV operator for integer division
query I rowsort label-2186
SELECT DISTINCT 22 DIV + col2 FROM tab0
----
0
22

skipif mysql # not compatible
query I rowsort label-2186
SELECT DISTINCT 22 / + col2 FROM tab0
----
0
22

query I rowsort
SELECT DISTINCT - tab2.col0 FROM tab2, tab0 cor0
----
-7
-78
-79

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

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

query I rowsort
SELECT - ( col0 ) + col1 * ( + tab2.col1 ) AS col0 FROM tab2
----
210
3403
954

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab2 cor0
----
26
27
38

query I rowsort
SELECT col0 * ( + cor0.col1 ) + - col2 + + 58 * - col2 AS col2 FROM tab2 AS cor0
----
-1376
-899
3068

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

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

query I rowsort
SELECT ALL + cor0.col1 * col2 + col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2194
SELECT + cor0.col0 DIV col1 + + col2 * col2 * col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
611966
93687
98

skipif mysql # not compatible
query I rowsort label-2194
SELECT + cor0.col0 / col1 + + col2 * col2 * col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
611966
93687
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2195
SELECT ( - 91 ) DIV col0 + + col1 FROM tab2 AS cor0
----
16
18
58

skipif mysql # not compatible
query I rowsort label-2195
SELECT ( - 91 ) / col0 + + col1 FROM tab2 AS cor0
----
16
18
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2196
SELECT DISTINCT CAST( - ( col1 ) AS SIGNED ) + - cor0.col1 * + 19 col2 FROM tab0 AS cor0
----
-1720
-1820
-1940

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2196
SELECT DISTINCT CAST ( - ( col1 ) AS INTEGER ) + - cor0.col1 * + 19 col2 FROM tab0 AS cor0
----
-1720
-1820
-1940

query I rowsort
SELECT 84 AS col2 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT ALL ( + 79 ) + + col1 FROM tab1 AS cor0
----
105
89
92

query I rowsort
SELECT DISTINCT - + 58 * - col2 + cor0.col2 FROM tab1 AS cor0
----
3186
3363
5664

query I rowsort
SELECT ALL - 91 * col2 - - col0 FROM tab1 AS cor0
----
-4911
-5123
-8656

query I rowsort
SELECT ALL - + 18 * ( col2 ) * 20 + cor0.col0 - + cor0.col2 AS col0 FROM tab0 AS cor0
----
-11889
-29513
-326

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2203
SELECT DISTINCT - col1 + col0 + - cor0.col2 * ( + 54 + + col2 ) DIV col2 AS col0 FROM tab0 AS cor0
----
-117
-138
-149

skipif mysql # not compatible
query I rowsort label-2203
SELECT DISTINCT - col1 + col0 + - cor0.col2 * ( + 54 + + col2 ) / col2 AS col0 FROM tab0 AS cor0
----
-117
-138
-149

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

query I rowsort
SELECT + - 21 * col1 AS col1 FROM tab2 cor0
----
-1239
-357
-651

query I rowsort
SELECT ALL 57 * + col1 AS col1 FROM tab0
----
4902
5187
5529

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab0, tab2 cor1
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

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

query I rowsort
SELECT ALL - 60 AS col2 FROM tab2 AS cor0
----
-60
-60
-60

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col2 * + col2 col1 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT 32 * col0 + tab1.col1 FROM tab1
----
122
2058
2573

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

skipif mysql # not compatible
query I rowsort label-2213
SELECT ALL col2 + col0 / 72 FROM tab0 AS cor0
----
1
33
83

query I rowsort
SELECT - col2 + + col2 * + 88 FROM tab2 AS cor0
----
2262
2349
3306

query I rowsort
SELECT ALL 86 + col0 FROM tab0 AS cor0
----
110
121
175

onlyif mysql # use DIV operator for integer division
query I rowsort label-2216
SELECT - col1 DIV col0 + + 35 AS col0 FROM tab1 AS cor0
----
27
35
35

skipif mysql # not compatible
query I rowsort label-2216
SELECT - col1 / col0 + + 35 AS col0 FROM tab1 AS cor0
----
27
35
35

query I rowsort
SELECT + 30 + col2 FROM tab1 AS cor0
----
126
84
87

query I rowsort
SELECT col1 * + col2 * + tab2.col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT 34 * 25 AS col1 FROM tab2
----
850
850
850

onlyif mysql # use DIV operator for integer division
query I rowsort label-2220
SELECT DISTINCT + col2 DIV + col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2220
SELECT DISTINCT + col2 / + col1 FROM tab1
----
2
5
7

query I rowsort
SELECT cor0.col2 + + col1 * cor0.col1 FROM tab1 AS cor0
----
157
265
730

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

query I rowsort
SELECT col1 - - col2 * 46 * col2 FROM tab2 AS cor0
----
31155
33565
66441

query I rowsort
SELECT ALL col2 * 77 FROM tab1 cor0
----
4158
4389
7392

query I rowsort
SELECT + col0 * 83 FROM tab2
----
581
6474
6557

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 + col1 col1 FROM tab0 AS cor0
----
138
143
149

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

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

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

query I rowsort
SELECT - col1 * - 15 FROM tab1 AS cor0
----
150
195
390

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

query I rowsort
SELECT + - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

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

query I rowsort
SELECT col2 * + ( 75 ) FROM tab1
----
4050
4275
7200

query I rowsort
SELECT col0 * - ( + tab2.col0 ) * - col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT + + col2 + ( + col0 ) + - col0 AS col2 FROM tab1 cor0
----
54
57
96

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

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

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

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

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

query I rowsort
SELECT ALL - col2 * 44 FROM tab2 AS cor0
----
-1144
-1188
-1672

onlyif mysql # use DIV operator for integer division
query I rowsort label-2242
SELECT + col0 DIV col1 + col1 FROM tab1 AS cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-2242
SELECT + col0 / col1 + col1 FROM tab1 AS cor0
----
16
19
26

query I rowsort
SELECT + cor0.col2 * + 20 AS col1 FROM tab1 AS cor0
----
1080
1140
1920

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

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

query I rowsort
SELECT ALL - 82 AS col1 FROM tab0 AS cor0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 52 AS col2 FROM tab1 AS cor0
----
52

query I rowsort
SELECT DISTINCT 36 AS col2 FROM tab2 AS cor0
----
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2248
SELECT DISTINCT - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 cor0
----
NULL

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

query I rowsort
SELECT + + 41 * + col2 FROM tab0 AS cor0
----
1353
3362
41

query I rowsort
SELECT col1 * - col2 + + 26 AS col2 FROM tab1
----
-1222
-1378
-544

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

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

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

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

query I rowsort
SELECT - col0 * col2 + ( 97 ) AS col2 FROM tab1 AS cor0
----
-3551
-65
-7583

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) col1 FROM tab0 AS cor0
----
1
33
82

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

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

query I rowsort
SELECT ALL - 91 AS col1 FROM tab1
----
-91
-91
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2260
SELECT DISTINCT + 31 DIV - tab0.col0 FROM tab0, tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2260
SELECT DISTINCT + 31 / - tab0.col0 FROM tab0, tab2 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab2
----
35

query I rowsort
SELECT - col1 * + col2 + col1 * 49 * tab1.col1 - col0 AS col2 FROM tab1
----
31717
4266
6953

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 + - ( + col2 * + col2 ) col1 FROM tab1
----
-10464
-3819
-4320

query I rowsort
SELECT ( - col0 ) - 39 AS col1 FROM tab1
----
-103
-119
-42

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

query I rowsort
SELECT - + 84 * + cor0.col2 + + 25 FROM tab2 AS cor0
----
-2159
-2243
-3167

query I rowsort
SELECT cor0.col0 * + cor0.col1 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6387e809cb1e467e8e7184dc79f3a43b

query I rowsort
SELECT DISTINCT - + 27 * cor0.col2 FROM tab0, tab1 AS cor0
----
-1458
-1539
-2592

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

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

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

query I rowsort
SELECT ALL - col2 + - tab0.col0 FROM tab0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2272
SELECT DISTINCT - col0 DIV 56 + col0 * col1 * - col0 AS col0 FROM tab1
----
-234
-40961
-83201

skipif mysql # not compatible
query I rowsort label-2272
SELECT DISTINCT - col0 / 56 + col0 * col1 * - col0 AS col0 FROM tab1
----
-234
-40961
-83201

query I rowsort
SELECT - 4 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 39 col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
39

query I rowsort
SELECT tab0.col2 * - 2 AS col2 FROM tab0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL - - col2 * + CAST ( col1 AS REAL ) + + col0 col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - cor0.col1 + ( - 94 ) FROM tab0 AS cor0
----
-180
-185
-191

query I rowsort
SELECT + cor0.col0 + - 47 * + col0 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT DISTINCT - - col2 * col2 - + ( col1 ) * col2 * col1 AS col0 FROM tab0 AS cor0
----
-242979
-672318
-9408

query I rowsort
SELECT + - col0 * col0 + col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT - + cor0.col2 - - col1 * - col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 9 col1 FROM tab1 AS cor0
----
27
576
720

query I rowsort
SELECT ALL + col0 * 11 + - cor0.col2 * + cor0.col2 FROM tab0 AS cor0
----
-5745
-825
384

query I rowsort
SELECT DISTINCT - - col2 + + 61 AS col0 FROM tab1 cor0
----
115
118
157

query I rowsort
SELECT ALL + + cor0.col2 + + 14 FROM tab1 AS cor0
----
110
68
71

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d2e5241c58e367013a1a203910e000c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col0 + + col2 col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - ( + 67 ) FROM tab0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT + ( col2 ) * col1 * - col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - 60 AS col2 FROM tab0, tab2, tab2 cor0, tab1 AS cor1
----
81 values hashing to 17ea60db8bdc9b534fe91b7fd55df3f9

query I rowsort
SELECT ALL - 44 AS col2 FROM tab0
----
-44
-44
-44

query I rowsort
SELECT 75 AS col2 FROM tab2
----
75
75
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2293
SELECT + CAST( + 23 * + col0 AS SIGNED ) - - 55 FROM tab1
----
124
1527
1895

skipif mysql # not compatible
query I rowsort label-2293
SELECT + CAST ( + 23 * + col0 AS INTEGER ) - - 55 FROM tab1
----
124
1527
1895

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( 45 ) * cor0.col1 * - 88 col0 FROM tab1 AS cor0
----
102960
39600
51480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - 61 ) * - cor0.col0 col0 FROM tab2 AS cor0
----
427
4758
4819

onlyif mysql # use DIV operator for integer division
query I rowsort label-2296
SELECT ALL + col0 + - col1 DIV + col2 col1 FROM tab0 AS cor0
----
-62
22
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2296
SELECT ALL + col0 + - col1 / + col2 col1 FROM tab0 AS cor0
----
-62
22
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2297
SELECT - CAST( NULL AS DECIMAL ) + tab2.col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2297
SELECT - CAST ( NULL AS REAL ) + tab2.col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2298
SELECT CAST( 73 AS SIGNED ) FROM tab0
----
73
73
73

skipif mysql # not compatible
query I rowsort label-2298
SELECT CAST ( 73 AS INTEGER ) FROM tab0
----
73
73
73

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab2 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 6a08afba67ce3272fad6d766e76c67f0

query I rowsort
SELECT DISTINCT 4 - col1 * col1 FROM tab1 AS cor0
----
-165
-672
-96

query I rowsort
SELECT 40 FROM tab0 cor0
----
40
40
40

query I rowsort
SELECT ALL - ( - col2 ) - - 10 * 73 AS col2 FROM tab0 AS cor0
----
731
763
812

query I rowsort
SELECT - - 14 FROM tab2 AS cor0
----
14
14
14

query I rowsort
SELECT DISTINCT + + col1 + col2 * 90 * col0 FROM tab2 AS cor0
----
17041
182579
270197

query I rowsort
SELECT DISTINCT 8 * col2 AS col0 FROM tab0 AS cor0
----
264
656
8

query I rowsort
SELECT DISTINCT 33 + + col1 FROM tab2 cor0
----
50
64
92

query I rowsort
SELECT DISTINCT + + col1 * col0 * - col0 AS col2 FROM tab0 cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL 68 + - tab2.col0 AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 0e159b3f0bd4e543998fa987484008d6

query I rowsort
SELECT + cor0.col0 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - ( - 25 * col2 ) FROM tab2
----
650
675
950

query I rowsort
SELECT ALL - 81 * + col0 AS col1 FROM tab2 AS cor0
----
-567
-6318
-6399

query I rowsort
SELECT DISTINCT + + cor0.col0 * cor0.col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL - col1 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - 99 * col1 AS col2 FROM tab0 AS cor0
----
-8514
-9009
-9603

onlyif mysql # use DIV operator for integer division
query I rowsort label-2315
SELECT DISTINCT + 85 DIV - col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2315
SELECT DISTINCT + 85 / - col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - 87 + col2 FROM tab1 AS cor0
----
-30
-33
9

query I rowsort
SELECT + ( col0 ) * - ( + ( col1 ) ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT ( + 16 ) * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1376
-1456
-1552

onlyif mysql # use DIV operator for integer division
query I rowsort label-2319
SELECT DISTINCT + ( cor0.col1 ) DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2319
SELECT DISTINCT + ( cor0.col1 ) / cor0.col2 AS col1 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT ALL - 70 AS col0 FROM tab2
----
-70
-70
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2322
SELECT ALL ( col0 ) * CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2322
SELECT ALL ( col0 ) * CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * - col2 + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2324
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2324
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col0 + - ( 62 ) * - col0 AS col0 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT ALL - - col0 * + 38 AS col0 FROM tab0 cor0
----
1330
3382
912

query I rowsort
SELECT + + col2 + + ( + cor0.col0 ) * col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT - - col2 * - ( 76 ) + col1 FROM tab2 AS cor0
----
-1917
-2021
-2871

query I rowsort
SELECT DISTINCT + + col1 * col2 + + col2 * col2 AS col0 FROM tab1 AS cor0
----
10464
3819
4320

query I rowsort
SELECT col1 + + col0 * - col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + 43 * col2 + + col2 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT - ( - col2 ) + + col2 * col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT + 30 - 99 FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT + 90 + - col1 AS col1 FROM tab0 AS cor0
----
-1
-7
4

query I rowsort
SELECT + 67 + - col0 * col2 AS col0 FROM tab0 AS cor0
----
-7231
-725
32

query I rowsort
SELECT DISTINCT + ( - col0 ) * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + 66 AS col2 FROM tab2 AS cor0
----
66
66
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-2338
SELECT col1 DIV + col2 + - col1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2338
SELECT col1 / + col2 + - col1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - + 98 AS col2 FROM tab0 cor0
----
-98
-98
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2340
SELECT + 77 * + 24 + - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2340
SELECT + 77 * + 24 + - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT cor0.col2 + 91 FROM tab2 AS cor0
----
117
118
129

query I rowsort
SELECT ( ( col0 ) ) + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + col0 * - col0 + col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT + col1 * col1 + col2 * - col2 AS col0 FROM tab2
----
-1155
232
2805

query I rowsort
SELECT + - 66 AS col1 FROM tab1 AS cor0
----
-66
-66
-66

query I rowsort
SELECT + ( - 10 ) - col0 AS col1 FROM tab0
----
-34
-45
-99

query I rowsort
SELECT DISTINCT tab2.col2 - - tab2.col2 FROM tab2
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2349
SELECT ALL 34 DIV col1 + col0 AS col2 FROM tab2 AS cor0
----
78
8
81

skipif mysql # not compatible
query I rowsort label-2349
SELECT ALL 34 / col1 + col0 AS col2 FROM tab2 AS cor0
----
78
8
81

query I rowsort
SELECT ALL - - 52 + col1 AS col2 FROM tab1 AS cor0
----
62
65
78

query I rowsort
SELECT ALL + cor0.col0 + - cor1.col0 + cor1.col0 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ( col1 ) * col1 + + 76 AS col0 FROM tab0 AS cor0
----
7472
8357
9485

query I rowsort
SELECT + + col2 * - 17 * col1 + + col1 * col0 FROM tab0 AS cor0
----
-118755
-46182
1746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * + col2 + col1 * - 58 col0 FROM tab0 cor0
----
-12002
-5627
-6077

onlyif mysql # use DIV operator for integer division
query I rowsort label-2355
SELECT ALL - col2 * col0 DIV + 49 AS col0 FROM tab2 AS cor0
----
-3
-41
-61

skipif mysql # not compatible
query I rowsort label-2355
SELECT ALL - col2 * col0 / + 49 AS col0 FROM tab2 AS cor0
----
-3
-41
-61

query I rowsort
SELECT ALL + 38 + + col0 FROM tab2 AS cor0
----
116
117
45

query I rowsort
SELECT + col0 + col1 * ( + col1 * - col0 ) FROM tab1 AS cor0
----
-13440
-2025
-6336

query I rowsort
SELECT col0 * col2 * + col1 + col2 AS col0 FROM tab0 AS cor0
----
3396
664200
68145

onlyif mysql # use DIV operator for integer division
query I rowsort label-2359
SELECT DISTINCT - col2 DIV col2 + 12 AS col2 FROM tab0 AS cor0
----
11

skipif mysql # not compatible
query I rowsort label-2359
SELECT DISTINCT - col2 / col2 + 12 AS col2 FROM tab0 AS cor0
----
11

query I rowsort
SELECT ALL - + col2 + - col2 * - col1 * + col0 AS col2 FROM tab0 AS cor0
----
3394
664036
68079

query I rowsort
SELECT ALL + 81 * - col1 AS col1 FROM tab0 AS cor0
----
-6966
-7371
-7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-2362
SELECT DISTINCT - 70 DIV col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-2362
SELECT DISTINCT - 70 / col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT DISTINCT - tab2.col2 + + 99 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
61
72
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2364
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2364
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab2
----
NULL

query I rowsort
SELECT cor0.col0 + ( col0 ) AS col1 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2366
SELECT - cor0.col2 + + CAST( 67 AS SIGNED ) FROM tab2 AS cor0
----
29
40
41

skipif mysql # not compatible
query I rowsort label-2366
SELECT - cor0.col2 + + CAST ( 67 AS INTEGER ) FROM tab2 AS cor0
----
29
40
41

query I rowsort
SELECT DISTINCT - col1 + col2 * + 9 + col1 * 65 FROM tab1 cor0
----
1153
1696
2150

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2368
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2368
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 74 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT ALL - cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ( - tab1.col1 ) AS col2 FROM tab1, tab2 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2372
SELECT col1 DIV - 20 FROM tab2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2372
SELECT col1 / - 20 FROM tab2
----
-1
-2
0

query I rowsort
SELECT + - 41 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 40 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT col2 + - col0 - 86 * 18 * col2 FROM tab2
----
-40300
-41776
-58865

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2376
SELECT + col0 + + cor0.col1 * - CAST( col1 AS SIGNED ) + col0 FROM tab2 AS cor0
----
-131
-3325
-947

skipif mysql # not compatible
query I rowsort label-2376
SELECT + col0 + + cor0.col1 * - CAST ( col1 AS INTEGER ) + col0 FROM tab2 AS cor0
----
-131
-3325
-947

skipif mysql # not compatible
query I rowsort
SELECT col1 * col2 + - CAST ( col2 AS REAL ) FROM tab1
----
1152
1350
513

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL + 87 + col1 AS col1 FROM tab1
----
100
113
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * + col0 col1 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT col0 * - 56 + 71 AS col1 FROM tab1 AS cor0
----
-3513
-4409
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2382
SELECT - + col2 + + col1 DIV + ( + cor0.col2 * 2 ) FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2382
SELECT - + col2 + + col1 / + ( + cor0.col2 * 2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col1 * 33 + - col2 FROM tab1 AS cor0
----
273
333
804

onlyif mysql # use DIV operator for integer division
query I rowsort label-2384
SELECT ALL - + col2 DIV col0 + col1 * + col2 + ( ( - col1 ) ) * ( - col0 ) * col2 AS col1 FROM tab1 AS cor0
----
101087
37050
5598

skipif mysql # not compatible
query I rowsort label-2384
SELECT ALL - + col2 / col0 + col1 * + col2 + ( ( - col1 ) ) * ( - col0 ) * col2 AS col1 FROM tab1 AS cor0
----
101087
37050
5598

query I rowsort
SELECT ALL + col0 + + 89 FROM tab1 AS cor0
----
153
169
92

query I rowsort
SELECT DISTINCT + 71 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2, tab1 AS cor3
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2387
SELECT - + col2 * CAST( col0 AS SIGNED ) * - col0 + + col1 FROM tab2 AS cor0
----
1354
158243
237175

skipif mysql # not compatible
query I rowsort label-2387
SELECT - + col2 * CAST ( col0 AS INTEGER ) * - col0 + + col1 FROM tab2 AS cor0
----
1354
158243
237175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2388
SELECT - col2 - + CAST( + 25 AS SIGNED ) FROM tab0 AS cor0
----
-107
-26
-58

skipif mysql # not compatible
query I rowsort label-2388
SELECT - col2 - + CAST ( + 25 AS INTEGER ) FROM tab0 AS cor0
----
-107
-26
-58

query I rowsort
SELECT ALL - col2 + 47 AS col2 FROM tab1 AS cor0
----
-10
-49
-7

query I rowsort
SELECT ALL + + col2 + col1 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2391
SELECT col0 DIV tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2391
SELECT col0 / tab0.col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + cor0.col1 * 97 + cor0.col0 * col0 * + 78 AS col1 FROM tab1 AS cor0
----
320458
3224
500461

query I rowsort
SELECT DISTINCT - col1 * - 0 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + col0 + - 52 AS col2 FROM tab1 AS cor0
----
-49
12
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-2395
SELECT col2 DIV col0 + ( col1 + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
173
182
194

skipif mysql # not compatible
query I rowsort label-2395
SELECT col2 / col0 + ( col1 + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
173
182
194

query I rowsort
SELECT DISTINCT - + col1 + - col2 * 39 AS col2 FROM tab1 AS cor0
----
-2132
-2233
-3757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col2 * col1 col0 FROM tab2
----
1560
684
864

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 WHERE NULL NOT IN ( + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2399
SELECT col0 + col1 DIV - tab1.col0 AS col1 FROM tab1
----
-5
64
80

skipif mysql # not compatible
query I rowsort label-2399
SELECT col0 + col1 / - tab1.col0 AS col1 FROM tab1
----
-5
64
80

query I rowsort
SELECT ALL - col0 + tab0.col2 * col2 FROM tab0
----
-34
1065
6635

query I rowsort
SELECT DISTINCT col0 - - tab1.col1 * - tab1.col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + tab1.col0 * tab1.col0 FROM tab1
----
4096
6400
9

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL IN ( col1 + - col1 )
----

query I rowsort
SELECT DISTINCT + col0 * + col2 + col2 AS col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + tab1.col1 * - col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + col1 + - col2 * col2 AS col1 FROM tab1
----
-2890
-3239
-9203

query I rowsort
SELECT col0 FROM tab2 WHERE NOT NULL IN ( tab2.col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT - col2 NOT IN ( + col1 / + tab0.col2 )
----

query I rowsort
SELECT DISTINCT col0 - col1 * + col0 AS col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL tab2.col1 * + col2 AS col1 FROM tab2 WHERE NOT NULL NOT IN ( + col0 )
----

query I rowsort
SELECT DISTINCT + - col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2412
SELECT DISTINCT + - col0 + + col0 * ( - ( - col1 ) * col1 ) + - 76 DIV + cor0.col0 AS col2 FROM tab1 cor0
----
13440
2000
6335

skipif mysql # not compatible
query I rowsort label-2412
SELECT DISTINCT + - col0 + + col0 * ( - ( - col1 ) * col1 ) + - 76 / + cor0.col0 AS col2 FROM tab1 cor0
----
13440
2000
6335

query I rowsort
SELECT + ( col0 ) + col0 * - col2 FROM tab0 AS cor0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2414
SELECT DISTINCT col0 DIV - col2 + + ( col1 + - col2 * CAST( 62 AS SIGNED ) ) FROM tab0 AS cor0
----
-1960
-4994
0

skipif mysql # not compatible
query I rowsort label-2414
SELECT DISTINCT col0 / - col2 + + ( col1 + - col2 * CAST ( 62 AS INTEGER ) ) FROM tab0 AS cor0
----
-1960
-4994
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2415
SELECT ALL + 84 * col2 - - CAST( cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
2805
6970
85

skipif mysql # not compatible
query I rowsort label-2415
SELECT ALL + 84 * col2 - - CAST ( cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
2805
6970
85

query I rowsort
SELECT ALL + + ( cor0.col1 ) * 69 AS col1 FROM tab0 AS cor0
----
5934
6279
6693

query I rowsort
SELECT + + ( - col0 ) * - col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - + col0 + - col0 * + 0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2419
SELECT ALL - cor0.col1 DIV - col2 FROM tab0 cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2419
SELECT ALL - cor0.col1 / - col2 FROM tab0 cor0
----
1
2
97

query I rowsort
SELECT ALL col0 + col0 * + col1 AS col2 FROM tab2
----
1422
224
4680

query I rowsort
SELECT col1 - col2 * + col2 * tab2.col2 AS col0 FROM tab2
----
-17517
-19652
-54855

query I rowsort
SELECT DISTINCT - col0 + col0 AS col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT + 1 + - col0 + + 42 * + col2 FROM tab0 AS cor0
----
1363
3356
8

query I rowsort
SELECT ALL + col1 + col1 * 82 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT ALL + + 71 FROM tab0 AS cor0
----
71
71
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-2426
SELECT 15 DIV + col0 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-2426
SELECT 15 / + col0 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - 63 AS col2 FROM tab2 AS cor0
----
-63
-63
-63

query I rowsort
SELECT DISTINCT - + col1 * + col1 * + col2 AS col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL - cor0.col2 + col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - 70 * col2 FROM tab0 AS cor0
----
-2310
-5740
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2431
SELECT - 97 DIV - col0 FROM tab2 AS cor0
----
1
1
13

skipif mysql # not compatible
query I rowsort label-2431
SELECT - 97 / - col0 FROM tab2 AS cor0
----
1
1
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-2432
SELECT - 10 * col2 DIV + ( - col0 + - col2 ) FROM tab0 AS cor0
----
0
4
5

skipif mysql # not compatible
query I rowsort label-2432
SELECT - 10 * col2 / + ( - col0 + - col2 ) FROM tab0 AS cor0
----
0
4
5

query I rowsort
SELECT ALL - 60 FROM tab2
----
-60
-60
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2434
SELECT + col2 + + col2 DIV 59 AS col0 FROM tab0 AS cor0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-2434
SELECT + col2 + + col2 / 59 AS col0 FROM tab0 AS cor0
----
1
33
83

query I rowsort
SELECT - - col2 + + col1 + col1 AS col0 FROM tab0 AS cor0
----
195
205
264

query I rowsort
SELECT - col1 * col0 + 77 - col2 AS col1 FROM tab0 AS cor0
----
-2020
-3319
-8104

query I rowsort
SELECT - cor0.col2 * ( col1 ) FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - - col1 - + 46 * - col0 FROM tab1 AS cor0
----
164
2954
3693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2439
SELECT DISTINCT - col0 + col0 DIV col1 AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2439
SELECT DISTINCT - col0 + col0 / col1 AS col1 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2440
SELECT col1 + + 51 DIV - col2 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2440
SELECT col1 + + 51 / - col2 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + col1 * + 46 FROM tab0
----
3956
4186
4462

query I rowsort
SELECT ( - tab2.col0 ) * + tab2.col1 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2443
SELECT ALL + 50 DIV - cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d4991a56dac05be7420cd6355b04b41b

skipif mysql # not compatible
query I rowsort label-2443
SELECT ALL + 50 / - cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d4991a56dac05be7420cd6355b04b41b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2444
SELECT 29 * col0 + - tab1.col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2444
SELECT 29 * col0 + - tab1.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 17 + cor0.col0 AS col1 FROM tab1, tab2, tab1 AS cor0
----
20
81
97

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 + + col1 col0 FROM tab2 AS cor0
----
-27
-55
-69

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT + 88 * 2 + col1 * - col1 FROM tab2 AS cor0
----
-113
-3305
-785

query I rowsort
SELECT DISTINCT - col2 + + cor0.col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + 54 * + col2 + cor0.col0 AS col1 FROM tab1 cor0
----
2919
3142
5264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2452
SELECT + CAST( col0 AS SIGNED ) FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2452
SELECT + CAST ( col0 AS INTEGER ) FROM tab2
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2453
SELECT DISTINCT col2 DIV - 55 AS col2 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2453
SELECT DISTINCT col2 / - 55 AS col2 FROM tab0
----
-1
0

query I rowsort
SELECT ALL - col2 * col1 + col2 AS col0 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT + 3 * - col0 AS col1 FROM tab0
----
-105
-267
-72

query I rowsort
SELECT + 54 * - col0 * col2 AS col1 FROM tab2
----
-10206
-109512
-162108

query I rowsort
SELECT ALL - 62 * + 19 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 74ee1f789bb4dcb48a2f00723586cad5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2458
SELECT - + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2458
SELECT - + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-2459
SELECT ALL - col1 DIV - 56 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2459
SELECT ALL - col1 / - 56 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT - col2 * - col2 * + col0 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT - - col2 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL 4 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + col1 * 8 AS col1 FROM tab2
----
136
248
472

query I rowsort
SELECT DISTINCT ( ( col1 ) ) FROM tab1
----
10
13
26

query I rowsort
SELECT + 88 FROM tab2, tab2 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ALL 70 FROM tab2, tab2 cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT DISTINCT + ( + col1 ) + - col0 * + 32 FROM tab0 AS cor0
----
-1023
-2757
-682

query I rowsort
SELECT + + cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + + ( col0 ) + 48 FROM tab1 AS cor0
----
112
128
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + - col0 * cor0.col1 col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + - col0 * col0 + - 82 * col0 FROM tab0 AS cor0
----
-15219
-2544
-4095

query I rowsort
SELECT - + col1 + col2 * + ( col2 * col1 + col1 ) FROM tab1 AS cor0
----
121043
33050
77194

query I rowsort
SELECT 91 * col0 AS col0 FROM tab0 AS cor0
----
2184
3185
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2474
SELECT DISTINCT + col1 * col1 + + col2 + cor0.col0 DIV col2 FROM tab1 AS cor0
----
158
265
730

skipif mysql # not compatible
query I rowsort label-2474
SELECT DISTINCT + col1 * col1 + + col2 + cor0.col0 / col2 FROM tab1 AS cor0
----
158
265
730

query I rowsort
SELECT + 0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 63 + + cor0.col2 FROM tab1 cor0
----
-6
-9
33

query I rowsort
SELECT DISTINCT - + col2 * - col2 * 97 AS col1 FROM tab1 AS cor0
----
282852
315153
893952

query I rowsort
SELECT 11 - col0 FROM tab1 cor0
----
-53
-69
8

query I rowsort
SELECT - cor0.col0 * col0 - col2 * col1 FROM tab0 AS cor0
----
-1322
-15383
-3414

query I rowsort
SELECT ALL + 27 * col1 AS col2 FROM tab1
----
270
351
702

query I rowsort
SELECT ALL + tab1.col1 * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - 59 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT + ( cor0.col1 ) * ( col0 * + col2 ) FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + col0 + - col1 * ( col1 * + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-636032
-753482
-912638

query I rowsort
SELECT - col0 * + col0 * - cor0.col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT + - 12 * - cor0.col2 FROM tab2 AS cor0
----
312
324
456

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2487
SELECT - - col1 + - CAST( + 85 AS SIGNED ) * + col0 FROM tab0 cor0
----
-1954
-2878
-7474

skipif mysql # not compatible
query I rowsort label-2487
SELECT - - col1 + - CAST ( + 85 AS INTEGER ) * + col0 FROM tab0 cor0
----
-1954
-2878
-7474

query I rowsort
SELECT - - col1 - + cor0.col2 AS col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 95 * col2 col0 FROM tab1 AS cor0
----
-5184
-5472
-9216

query I rowsort
SELECT col1 + + col0 * + cor0.col2 - + col2 AS col2 FROM tab2 cor0
----
193
2061
2981

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col1 * - cor0.col1 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT DISTINCT col2 + - 57 * + cor0.col0 + col1 AS col2 FROM tab0 AS cor0
----
-1249
-1897
-4900

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2494
SELECT + + col0 + - CAST( NULL AS SIGNED ) * 25 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2494
SELECT + + col0 + - CAST ( NULL AS INTEGER ) * 25 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * col2 + - 64 * - col0 FROM tab1 cor0
----
12800
354
7744

query I rowsort
SELECT + col1 * + col1 AS col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT col2 + + 64 FROM tab1 AS cor0
----
118
121
160

query I rowsort
SELECT - 15 AS col0 FROM tab2 AS cor0
----
-15
-15
-15

query I rowsort
SELECT - 27 + cor0.col2 FROM tab0 AS cor0
----
-26
55
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2500
SELECT - + 80 DIV col1 AS col0 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-2500
SELECT - + 80 / col1 AS col0 FROM tab2 AS cor0
----
-1
-2
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2501
SELECT - CAST( NULL AS SIGNED ) + cor0.col1 / - col1 + col1 * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2501
SELECT - CAST ( NULL AS INTEGER ) + cor0.col1 / - col1 + col1 * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col0 ) * + col2 * col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT + + col1 - + 25 AS col1 FROM tab1 AS cor0
----
-12
-15
1

query I rowsort
SELECT ALL - col2 + + col0 * - col2 AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT + 86 + col0 AS col1 FROM tab0 AS cor0
----
110
121
175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 + + col2 col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT 93 * 64 FROM tab1 AS cor0
----
5952
5952
5952

onlyif mysql # use DIV operator for integer division
query I rowsort label-2508
SELECT ALL + col1 DIV col1 - + col0 FROM tab0 cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-2508
SELECT ALL + col1 / col1 - + col0 FROM tab0 cor0
----
-23
-34
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2509
SELECT DISTINCT - + col0 DIV - 15 AS col2 FROM tab1 AS cor0
----
0
4
5

skipif mysql # not compatible
query I rowsort label-2509
SELECT DISTINCT - + col0 / - 15 AS col2 FROM tab1 AS cor0
----
0
4
5

query I rowsort
SELECT + ( - 69 ) FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT ALL 87 - col1 * col1 FROM tab1
----
-13
-589
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2512
SELECT DISTINCT + col2 * col0 + - col0 DIV - 42 FROM tab2 AS cor0
----
189
2029
3003

skipif mysql # not compatible
query I rowsort label-2512
SELECT DISTINCT + col2 * col0 + - col0 / - 42 FROM tab2 AS cor0
----
189
2029
3003

query I rowsort
SELECT ALL - - cor0.col0 - col1 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT + col2 * + ( col0 ) FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2515
SELECT ALL - CAST( NULL AS SIGNED ) + + 5 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2515
SELECT ALL - CAST ( NULL AS INTEGER ) + + 5 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * 76 * cor0.col0 FROM tab1 AS cor0
----
311296
486400
684

query I rowsort
SELECT DISTINCT + 12 AS col2 FROM tab1 AS cor0
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-2518
SELECT DISTINCT - - col0 DIV + col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2518
SELECT DISTINCT - - col0 / + col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT col2 + ( col0 ) FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - col0 * + col2 * col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT + - 27 * - col0 + + cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
1150
2422
5587

query I rowsort
SELECT DISTINCT 29 + col2 AS col0 FROM tab1 AS cor0
----
125
83
86

query I rowsort
SELECT DISTINCT - 6 + 73 * - col0 FROM tab1 AS cor0
----
-225
-4678
-5846

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2525
SELECT + + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2525
SELECT + + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2526
SELECT CAST( - 32 AS SIGNED ) FROM tab2 AS cor0
----
-32
-32
-32

skipif mysql # not compatible
query I rowsort label-2526
SELECT CAST ( - 32 AS INTEGER ) FROM tab2 AS cor0
----
-32
-32
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-2527
SELECT ALL col2 DIV col1 + - col1 * tab1.col2 + col2 * - col2 AS col0 FROM tab1
----
-10457
-3814
-4318

skipif mysql # not compatible
query I rowsort label-2527
SELECT ALL col2 / col1 + - col1 * tab1.col2 + col2 * - col2 AS col0 FROM tab1
----
-10457
-3814
-4318

query I rowsort
SELECT ALL - col2 + tab0.col0 AS col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT cor0.col0 * ( + cor0.col2 ) FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2530
SELECT DISTINCT + + col0 * CAST( NULL AS SIGNED ) * + col1 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2530
SELECT DISTINCT + + col0 * CAST ( NULL AS INTEGER ) * + col1 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col0 + - ( col0 ) * - col2 AS col0 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2532
SELECT ALL col2 * CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-2532
SELECT ALL col2 * CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + 50 + 24 AS col2 FROM tab0, tab1 AS cor0
----
74

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 60 AS REAL ) * + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 9fa07539a71ff1bbd61e03a2b66b6649

query I rowsort
SELECT ALL - 26 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT - - col2 * cor0.col0 + ( col1 ) * + col1 + 79 AS col0 FROM tab0 AS cor0
----
15658
8267
9523

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + col1 + + CAST ( - col2 AS REAL ) * - col0 AS col2 FROM tab1 cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col2 + cor0.col0 * - col0 col2 FROM tab2 AS cor0
----
-6760
-7685
-778

query I rowsort
SELECT + col1 + col2 + + 50 AS col2 FROM tab0 AS cor0
----
148
169
223

query I rowsort
SELECT col2 + ( + cor0.col2 ) AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - - col2 + 98 * col2 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 97 * col0 col1 FROM tab0 AS cor0
----
-2328
-3395
-8633

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2544
SELECT DISTINCT CAST( NULL AS DECIMAL ) / col2 col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2544
SELECT DISTINCT CAST ( NULL AS REAL ) / col2 col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - ( + col1 ) + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ( 63 ) AS col0 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT - 90 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2548
SELECT - col2 + - col0 DIV col0 col0 FROM tab1 AS cor0
----
-55
-58
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2548
SELECT - col2 + - col0 / col0 col0 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT ALL 18 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT + 94 * + col1 FROM tab2 AS cor0
----
1598
2914
5546

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
26
27
38

query I rowsort
SELECT ALL col2 * - col2 + col2 * col2 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 4 * - cor0.col2 AS col1 FROM tab2 cor0
----
-104
-108
-152

query I rowsort
SELECT DISTINCT + - col0 * - col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL ( - col1 ) + + ( 81 ) * col0 AS col1 FROM tab2 AS cor0
----
536
6259
6382

query I rowsort
SELECT ALL + + col0 * + col0 + 77 FROM tab1 AS cor0
----
4173
6477
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-2557
SELECT + 88 * col2 DIV 18 + + 54 FROM tab1 AS cor0
----
318
332
523

skipif mysql # not compatible
query I rowsort label-2557
SELECT + 88 * col2 / 18 + + 54 FROM tab1 AS cor0
----
318
332
523

query I rowsort
SELECT DISTINCT + col2 * + col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT 42 - - col2 AS col1 FROM tab2 AS cor0
----
68
69
80

query I rowsort
SELECT - col2 * - col0 + + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + col1 * col2 + - 68 + col2 AS col0 FROM tab0
----
2803
30
7476

query I rowsort
SELECT col2 * 96 * 91 FROM tab2 cor0
----
227136
235872
331968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2563
SELECT ALL - + col1 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2563
SELECT ALL - + col1 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab1.col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT + + 67 * col1 AS col0 FROM tab1 AS cor0
----
1742
670
871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + tab1.col1 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + 78 * col2 + - ( + tab1.col1 ) * + col2 * - ( + tab1.col0 + col1 * - 14 ) AS col0 FROM tab1
----
-119808
-38874
-502632

query I rowsort
SELECT DISTINCT - 34 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2569
SELECT - CAST( 84 AS SIGNED ) * + col0 AS col1 FROM tab1 AS cor0
----
-252
-5376
-6720

skipif mysql # not compatible
query I rowsort label-2569
SELECT - CAST ( 84 AS INTEGER ) * + col0 AS col1 FROM tab1 AS cor0
----
-252
-5376
-6720

query I rowsort
SELECT + col2 + col1 * + cor0.col0 AS col0 FROM tab0 cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-2571
SELECT CAST( - col0 AS SIGNED ) DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2571
SELECT CAST ( - col0 AS INTEGER ) / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * 46 FROM tab0
----
-3956
-4186
-4462

query I rowsort
SELECT - cor0.col1 FROM tab2, tab0 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col1 col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + 49 * + ( cor0.col1 ) FROM tab0 AS cor0
----
4214
4459
4753

onlyif mysql # use DIV operator for integer division
query I rowsort label-2576
SELECT DISTINCT - col0 - - cor0.col2 DIV - 56 AS col0 FROM tab0 AS cor0
----
-24
-35
-90

skipif mysql # not compatible
query I rowsort label-2576
SELECT DISTINCT - col0 - - cor0.col2 / - 56 AS col0 FROM tab0 AS cor0
----
-24
-35
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2577
SELECT col1 + col1 / CAST( NULL AS SIGNED ) - 90 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2577
SELECT col1 + col1 / CAST ( NULL AS INTEGER ) - 90 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * col2 + - cor0.col0 - + col1 FROM tab2 AS cor0
----
1348
539
691

query I rowsort
SELECT - cor0.col1 * cor0.col1 + + col0 + 37 * - col2 FROM tab1 AS cor0
----
-2145
-2671
-3641

query I rowsort
SELECT + col2 + - 76 * cor0.col2 FROM tab0 AS cor0
----
-2475
-6150
-75

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 489b7b2b5c4980d50e86e51be30361c3

query I rowsort
SELECT DISTINCT 3 + - 79 AS col0 FROM tab0, tab1, tab0 AS cor0, tab2
----
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col0 col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT + cor0.col2 * ( + col1 + - col0 ) AS col1 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT - - cor0.col1 * ( + 17 ) FROM tab0 AS cor0
----
1462
1547
1649

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col1 * col1 + - ( cor0.col2 * + col2 ) FROM tab2 AS cor0
----
-24275
-272194
-7456

query I rowsort
SELECT - - 15 AS col1 FROM tab1 AS cor0
----
15
15
15

query I rowsort
SELECT - - col0 * + 89 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT ALL + col0 * + col0 + col2 * 29 AS col1 FROM tab0 AS cor0
----
10299
1254
1533

query I rowsort
SELECT + + 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 54 AS col0 FROM tab2, tab0 AS cor0
----
54

query I rowsort
SELECT + 27 + - cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 79b1de8a47423e79cc3041c9232f9c88

query I rowsort
SELECT DISTINCT + ( + 80 ) FROM tab2, tab0 AS cor0
----
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2594
SELECT CAST( col0 AS SIGNED ) + - col2 FROM tab2
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-2594
SELECT CAST ( col0 AS INTEGER ) + - col2 FROM tab2
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 col2 FROM tab1
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 13 ) col0 FROM tab1
----
13

query I rowsort
SELECT ALL + 82 FROM tab2
----
82
82
82

query I rowsort
SELECT col0 * 64 - + col1 FROM tab2
----
417
4933
5039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 * col0 * + col0 - 74 * - col0 col0 FROM tab0
----
46704
624424
98140

query I rowsort
SELECT - 86 + 67 FROM tab2 AS cor0
----
-19
-19
-19

query I rowsort
SELECT cor1.col0 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + 66 * + col1 FROM tab1
----
1716
660
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-2603
SELECT 29 DIV + 80 AS col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-2603
SELECT 29 / + 80 AS col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ALL - col1 * + col1 * ( col0 ) - col0 * col2 FROM tab0
----
-178296
-329350
-744307

query I rowsort
SELECT col0 * tab1.col0 + + col2 AS col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT DISTINCT tab1.col0 + + ( col0 ) FROM tab1
----
128
160
6

query I rowsort
SELECT - col1 * - 84 AS col2 FROM tab2 AS cor0
----
1428
2604
4956

query I rowsort
SELECT ALL - col0 + col2 AS col1 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT + + col2 * 12 AS col0 FROM tab1 cor0
----
1152
648
684

query I rowsort
SELECT DISTINCT - + 47 FROM tab0 AS cor0
----
-47

query I rowsort
SELECT ALL - col1 + col1 + + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - + cor0.col0 + cor0.col1 * - col0 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT - ( col2 ) + - ( - col2 ) AS col2 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col1 + - col0 col2 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT DISTINCT - - col2 * + col2 * ( + 44 ) FROM tab1 AS cor0
----
128304
142956
405504

query I rowsort
SELECT ALL - 45 AS col1 FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 62 * col0 FROM tab0 cor0
----
1488
2170
5518

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col1 col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2619
SELECT + + 61 DIV cor0.col1 FROM tab2 AS cor0
----
1
1
3

skipif mysql # not compatible
query I rowsort label-2619
SELECT + + 61 / cor0.col1 FROM tab2 AS cor0
----
1
1
3

query I rowsort
SELECT - + col2 * + cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + + col0 * - cor0.col2 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 * 15 AS col0 FROM tab1 AS cor0
----
-1440
-810
-855

onlyif mysql # use DIV operator for integer division
query I rowsort label-2623
SELECT + - col0 + - CAST( cor0.col1 AS SIGNED ) DIV - col0 col2 FROM tab0 AS cor0
----
-21
-33
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2623
SELECT + - col0 + - CAST ( cor0.col1 AS INTEGER ) / - col0 col2 FROM tab0 AS cor0
----
-21
-33
-88

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-2625
SELECT - col2 DIV tab0.col0 + - col2 FROM tab0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-2625
SELECT - col2 / tab0.col0 + - col2 FROM tab0
----
-1
-34
-82

query I rowsort
SELECT DISTINCT tab0.col0 * - col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + ( + ( + cor0.col1 ) ) AS col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + col2 col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + + col2 * col1 * col1 + - col2 FROM tab2 AS cor0
----
10944
25920
90480

query I rowsort
SELECT ALL + col0 + + col1 + - col2 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT DISTINCT - col1 - col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT + 20 FROM tab0 cor0
----
20
20
20

query I rowsort
SELECT DISTINCT cor0.col1 * 73 * col1 + 94 AS col1 FROM tab2 AS cor0
----
21191
254207
70247

query I rowsort
SELECT ALL - ( 93 ) FROM tab0 cor0
----
-93
-93
-93

query I rowsort
SELECT ALL + + col1 + - col1 * - col1 FROM tab0 AS cor0
----
7482
8372
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - col0 + + col2 col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT + - col2 * + 12 FROM tab2 cor0
----
-312
-324
-456

onlyif mysql # use DIV operator for integer division
query I rowsort label-2638
SELECT ALL cor0.col2 * + col1 + - col0 * 34 DIV 86 FROM tab0 AS cor0
----
2829
7427
84

skipif mysql # not compatible
query I rowsort label-2638
SELECT ALL cor0.col2 * + col1 + - col0 * 34 / 86 FROM tab0 AS cor0
----
2829
7427
84

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( - 76 AS REAL ) AS col1 FROM tab2 AS cor0
----
-76
-76
-76

query I rowsort
SELECT + tab0.col2 + tab0.col1 * - col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT + col1 * - 70 AS col0 FROM tab2
----
-1190
-2170
-4130

query I rowsort
SELECT col1 - + 33 AS col1 FROM tab1
----
-20
-23
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2643
SELECT DISTINCT tab0.col2 * CAST( - 28 AS SIGNED ) * - tab0.col1 - + 63 * col0 FROM tab0
----
203329
511
77952

skipif mysql # not compatible
query I rowsort label-2643
SELECT DISTINCT tab0.col2 * CAST ( - 28 AS INTEGER ) * - tab0.col1 - + 63 * col0 FROM tab0
----
203329
511
77952

query I rowsort
SELECT tab1.col2 + 40 - col1 AS col1 FROM tab1
----
123
68
87

query I rowsort
SELECT ALL + col0 * - 14 + + col1 FROM tab1
----
-1107
-16
-886

query I rowsort
SELECT + col1 - + col2 * - col2 AS col0 FROM tab2
----
1461
735
760

query I rowsort
SELECT - col2 * - col1 + col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT ALL - - col2 * - col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2649
SELECT DISTINCT - col1 DIV cor0.col0 + col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-2649
SELECT DISTINCT - col1 / cor0.col0 + col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort
SELECT ( - 0 ) + - col2 + CAST ( col0 * + col0 AS REAL ) FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT 73 + + 20 AS col1 FROM tab1 AS cor0
----
93

query I rowsort
SELECT + col2 * 92 AS col1 FROM tab0 AS cor0
----
3036
7544
92

query I rowsort
SELECT col0 * col1 + col2 * + col1 FROM tab0
----
15561
3492
4902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT ALL 68 + - tab1.col1 FROM tab1
----
42
55
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-2656
SELECT ALL ( tab0.col1 ) DIV col2 + + col2 AS col0 FROM tab0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-2656
SELECT ALL ( tab0.col1 ) / col2 + + col2 AS col0 FROM tab0
----
35
83
98

query I rowsort
SELECT + 66 + + col1 AS col0 FROM tab0 cor0
----
152
157
163

query I rowsort
SELECT ALL + 21 FROM tab2
----
21
21
21

query I rowsort
SELECT - 11 FROM tab2, tab0, tab2 AS cor0, tab1
----
81 values hashing to b479c2926237a341642edb92c755a9f3

query I rowsort
SELECT 10 * - ( col2 ) FROM tab1
----
-540
-570
-960

query I rowsort
SELECT ALL - col2 + col0 AS col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT DISTINCT - - 53 AS col2 FROM tab0, tab1, tab1 AS cor0
----
53

query I rowsort
SELECT DISTINCT + + 86 + + col2 * - 92 AS col1 FROM tab0 AS cor0
----
-2950
-6
-7458

query I rowsort
SELECT + + col1 + col0 * - col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT - - cor0.col2 * col2 + + ( col1 ) AS col0 FROM tab0 cor0
----
1175
6815
98

query I rowsort
SELECT ALL + col2 * col1 + 52 AS col1 FROM tab2 AS cor0
----
1586
698
889

query I rowsort
SELECT ALL + 76 * - col0 AS col0 FROM tab2 AS cor0
----
-532
-5928
-6004

query I rowsort
SELECT 28 * - col0 + col1 AS col1 FROM tab2 AS cor0
----
-165
-2125
-2195

query I rowsort
SELECT ALL + col2 * + col0 + ( col2 ) * - col2 + + ( + col0 + col0 ) AS col2 FROM tab1 AS cor0
----
-1376
-2748
527

query I rowsort
SELECT ALL - + ( col2 ) + - col1 + ( - cor0.col0 + + col2 ) * + col1 AS col1 FROM tab2 AS cor0
----
-3153
-752
562

query I rowsort
SELECT + 84 AS col0 FROM tab1 cor0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 40 + + col0 col1 FROM tab2 AS cor0
----
118
119
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2673
SELECT + + col0 + - cor0.col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2673
SELECT + + col0 + - cor0.col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 * + col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2675
SELECT ALL + + col1 DIV col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2675
SELECT ALL + + col1 / col0 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT - col2 * ( + 58 ) AS col2 FROM tab1 AS cor0
----
-3132
-3306
-5568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * col1 col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - col2 + ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + col0 * - 2 - + col0 * + col0 FROM tab2 AS cor0
----
-6240
-63
-6399

query I rowsort
SELECT DISTINCT col0 * + 76 AS col1 FROM tab0 AS cor0
----
1824
2660
6764

query I rowsort
SELECT ALL col2 + + ( col1 + col1 ) AS col2 FROM tab2 cor0
----
144
72
89

query I rowsort
SELECT - + col0 + + 86 * col2 AS col1 FROM tab2 AS cor0
----
2158
2315
3189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 - ( 17 ) * cor0.col1 col0 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT ALL + - col1 + + 70 + - col2 FROM tab1 AS cor0
----
-10
-39
3

query I rowsort
SELECT cor0.col1 - + ( col0 ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + ( col1 ) + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - + cor0.col1 + cor0.col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT 31 FROM tab2, tab2 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT DISTINCT + 97 * col0 + col0 FROM tab2 AS cor0
----
686
7644
7742

onlyif mysql # use DIV operator for integer division
query I rowsort label-2690
SELECT 29 DIV + 6 + col1 AS col0 FROM tab1 AS cor0
----
14
17
30

skipif mysql # not compatible
query I rowsort label-2690
SELECT 29 / + 6 + col1 AS col0 FROM tab1 AS cor0
----
14
17
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2691
SELECT DISTINCT + CAST( col1 AS SIGNED ) * col1 + cor0.col1 * cor0.col1 FROM tab2 cor0
----
1922
578
6962

skipif mysql # not compatible
query I rowsort label-2691
SELECT DISTINCT + CAST ( col1 AS INTEGER ) * col1 + cor0.col1 * cor0.col1 FROM tab2 cor0
----
1922
578
6962

onlyif mysql # use DIV operator for integer division
query I rowsort label-2692
SELECT DISTINCT 89 * ( + col2 ) DIV ( cor0.col1 ) + + col2 + cor0.col2 FROM tab1 AS cor0
----
292
621
849

skipif mysql # not compatible
query I rowsort label-2692
SELECT DISTINCT 89 * ( + col2 ) / ( cor0.col1 ) + + col2 + cor0.col2 FROM tab1 AS cor0
----
292
621
849

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col0 FROM tab2 AS cor0
----
51
51
51

query I rowsort
SELECT 38 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2695
SELECT ALL col1 - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2695
SELECT ALL col1 - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + 53 AS col2 FROM tab1
----
53
53
53

query I rowsort
SELECT + col1 + col2 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - - col2 * cor0.col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL 35 + col1 AS col2 FROM tab0 cor0
----
121
126
132

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 WHERE + cor0.col0 NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 * + col1 col2 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT - col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - + cor0.col0 * - cor0.col0 * col2 FROM tab1 cor0
----
233472
486
614400

query I rowsort
SELECT DISTINCT - 82 AS col1 FROM tab0 AS cor0
----
-82

query I rowsort
SELECT col0 * - col0 + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT 79 + ( col0 ) AS col0 FROM tab0 cor0
----
103
114
168

onlyif mysql # use DIV operator for integer division
query I rowsort label-2707
SELECT ALL + 60 + col0 DIV cor0.col1 AS col0 FROM tab2 cor0
----
60
61
64

skipif mysql # not compatible
query I rowsort label-2707
SELECT ALL + 60 + col0 / cor0.col1 AS col0 FROM tab2 cor0
----
60
61
64

query I rowsort
SELECT + 67 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
131
147
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2709
SELECT - col1 DIV - col1 + col1 + cor0.col0 * cor0.col0 FROM tab0 cor0
----
1323
663
8013

skipif mysql # not compatible
query I rowsort label-2709
SELECT - col1 / - col1 + col1 + cor0.col0 * cor0.col0 FROM tab0 cor0
----
1323
663
8013

query I rowsort
SELECT - col2 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - + 15 + + col1 FROM tab0 AS cor0
----
71
76
82

query I rowsort
SELECT col1 * tab1.col2 * - col2 AS col2 FROM tab1
----
-119808
-32490
-75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-2713
SELECT DISTINCT + col2 DIV + tab1.col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-2713
SELECT DISTINCT + col2 / + tab1.col0 FROM tab1
----
0
1
18

query I rowsort
SELECT DISTINCT 78 * - tab0.col2 FROM tab0
----
-2574
-6396
-78

query I rowsort
SELECT - ( + col2 ) * + col0 AS col0 FROM tab0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2716
SELECT CAST( 86 AS SIGNED ) * - col0 FROM tab0
----
-2064
-3010
-7654

skipif mysql # not compatible
query I rowsort label-2716
SELECT CAST ( 86 AS INTEGER ) * - col0 FROM tab0
----
-2064
-3010
-7654

query I rowsort
SELECT col1 * col0 + + col0 AS col2 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT col2 + + tab0.col1 * col2 FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - col2 col2 FROM tab0 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT col0 * col1 + col2 * col2 AS col2 FROM tab1
----
10256
2994
3889

query I rowsort
SELECT ALL col1 * tab1.col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + col1 * col1 * + col2 AS col2 FROM tab0
----
244068
679042
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 * - col0 * tab2.col1 col1 FROM tab2
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-2725
SELECT - col2 DIV + col2 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2725
SELECT - col2 / + col2 AS col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT - col1 * + col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT col0 * tab0.col0 AS col2 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - col0 col2 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL + col0 * - tab0.col1 * tab0.col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col2 * col1 * - col0 FROM tab1 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT + col2 + col2 + - tab0.col1 * tab0.col2 AS col2 FROM tab0
----
-2772
-7298
-95

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 * - col1 + - col1 NOT BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2733
SELECT ALL + col2 + - col0 DIV col0 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-2733
SELECT ALL + col2 + - col0 / col0 FROM tab1
----
53
56
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2734
SELECT col2 DIV + col1 + col1 AS col1 FROM tab1 cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-2734
SELECT col2 / + col1 + col1 AS col1 FROM tab1 cor0
----
15
20
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + cor0.col2 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + col2 * - col0 - - col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT - col2 NOT BETWEEN NULL AND col1 AND NOT col0 NOT IN ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2738
SELECT - col0 DIV - col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2738
SELECT - col0 / - col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - col1 * col0 * - col2 AS col0 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2740
SELECT + col2 * - col1 * - col0 + col1 DIV col1 + + col1 AS col0 FROM tab1
----
36491
4239
99854

skipif mysql # not compatible
query I rowsort label-2740
SELECT + col2 * - col1 * - col0 + col1 / col1 + + col1 AS col0 FROM tab1
----
36491
4239
99854

query I rowsort
SELECT - col1 + col1 - col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + col1 * - col1 * + col0 - col0 * + col1 FROM tab1 AS cor0
----
-14560
-2106
-7040

query I rowsort
SELECT + - col1 * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + col1 - - col0 * - col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT col1 + 68 AS col2 FROM tab2
----
127
85
99

query I rowsort
SELECT ALL + col2 + col0 + col2 * col0 * + col2 AS col1 FROM tab1
----
208057
737456
8805

query I rowsort
SELECT ALL col2 + - 94 FROM tab1
----
-37
-40
2

query I rowsort
SELECT ALL col1 + + 75 * - tab0.col1 * + col0 AS col1 FROM tab0
----
-154714
-254528
-607334

onlyif mysql # use DIV operator for integer division
query I rowsort label-2749
SELECT ALL col0 * 18 + 96 DIV col2 AS col2 FROM tab1
----
1153
1441
55

skipif mysql # not compatible
query I rowsort label-2749
SELECT ALL col0 * 18 + 96 / col2 AS col2 FROM tab1
----
1153
1441
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col1 + + col0 col0 FROM tab1
----
106
55
84

query I rowsort
SELECT ALL - col2 + 90 * - col1 FROM tab1 AS cor0
----
-1266
-2394
-957

query I rowsort
SELECT - col2 * + 80 - - col0 AS col2 FROM tab1 AS cor0
----
-4317
-4496
-7600

query I rowsort
SELECT DISTINCT - - col2 - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + + col2 + 13 * - col0 * + col1 AS col2 FROM tab1 AS cor0
----
-13424
-8263
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2755
SELECT - cor0.col0 + + CAST( NULL AS SIGNED ) * col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2755
SELECT - cor0.col0 + + CAST ( NULL AS INTEGER ) * col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + - 29 FROM tab1 AS cor0
----
-26
35
51

query I rowsort
SELECT col1 * - col0 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - + ( + col1 ) * - col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ( + col0 ) + - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + ( + 0 ) - + col0 * - col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + - ( - cor0.col1 ) * + cor0.col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL ( - 48 ) + col0 * col2 AS col0 FROM tab0 AS cor0
----
-13
7250
744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col0 ) - col2 * - col1 col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - 78 * - col0 AS col1 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT - - col0 * - cor0.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-2766
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * - col0 col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2766
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * - col0 col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2767
SELECT ALL - + CAST( NULL AS SIGNED ) * + 81 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2767
SELECT ALL - + CAST ( NULL AS INTEGER ) * + 81 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - ( + 22 ) * col2 AS col2 FROM tab0 AS cor0
----
-1804
-22
-726

query I rowsort
SELECT DISTINCT tab0.col1 + ( 56 + col1 ) * 52 AS col0 FROM tab0
----
7470
7735
8053

query I rowsort
SELECT cor0.col1 + cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to d994d266bacb99d3939b70b2c7903ce8

query I rowsort
SELECT DISTINCT - 46 + col0 * col0 FROM tab1 AS cor0
----
-37
4050
6354

query I rowsort
SELECT + ( + 11 ) + col1 FROM tab2 AS cor0
----
28
42
70

query I rowsort
SELECT ALL - - 47 * col0 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
138
2944
3680

query I rowsort
SELECT 63 * + 57 FROM tab0 AS cor0
----
3591
3591
3591

query I rowsort
SELECT DISTINCT - col2 * col2 + col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT col2 * col2 + + 14 * cor0.col2 FROM tab0 AS cor0
----
15
1551
7872

query I rowsort
SELECT + col0 * + col0 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1413
4666
7648

query I rowsort
SELECT ALL + - col0 + + col1 FROM tab1 cor0
----
-54
-67
23

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 DISTINCT - ( col0 ) + 37 * 81 col1 FROM tab2 cor0
----
2918
2919
2990

onlyif mysql # use DIV operator for integer division
query I rowsort label-2781
SELECT - 16 DIV col2 FROM tab0 AS cor0
----
-16
0
0

skipif mysql # not compatible
query I rowsort label-2781
SELECT - 16 / col2 FROM tab0 AS cor0
----
-16
0
0

query I rowsort
SELECT DISTINCT - ( col0 ) * col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2783
SELECT DISTINCT + col2 DIV col0 AS col2 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-2783
SELECT DISTINCT + col2 / col0 AS col2 FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT + - 6 + cor0.col0 - - col2 FROM tab2 AS cor0
----
111
28
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2785
SELECT - 56 * col1 - - CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2785
SELECT - 56 * col1 - - CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 3 * cor0.col2 * - ( ( - col1 ) ) AS col2 FROM tab1 AS cor0
----
-1710
-3744
-4212

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 * col0 col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + 5 * col1 AS col1 FROM tab1 AS cor0
----
130
50
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-2789
SELECT - ( - col2 ) DIV 52 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2789
SELECT - ( - col2 ) / 52 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - 6 * col2 AS col0 FROM tab2 AS cor0
----
-156
-162
-228

query I rowsort
SELECT + + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + - 22 FROM tab0 AS cor0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT + - 62 FROM tab0 AS cor0
----
-62

query I rowsort
SELECT DISTINCT col1 + - col1 * col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT col0 * 62 AS col0 FROM tab1 AS cor0
----
186
3968
4960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2796
SELECT DISTINCT col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2796
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 - col2 * - ( col0 ) - + col2 col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT + col1 * + 49 + + cor0.col0 FROM tab1 AS cor0
----
1277
554
717

query I rowsort
SELECT ALL - tab0.col0 + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + - cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + + col1 * + ( + 87 ) + + col0 * col2 FROM tab0 AS cor0
----
15215
8274
8474

query I rowsort
SELECT + cor0.col2 * + ( - col0 ) - - col2 FROM tab0 cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-2803
SELECT + col1 DIV + col1 + col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-2803
SELECT + col1 / + col1 + col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT - - col0 * 63 AS col1 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT cor0.col1 + - 22 FROM tab2 AS cor0
----
-5
37
9

query I rowsort
SELECT ALL + - col2 * + col0 + col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + - col1 * - cor0.col1 AS col2 FROM tab2 cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2808
SELECT col0 + CAST( NULL AS SIGNED ) * col2 - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2808
SELECT col0 + CAST ( NULL AS INTEGER ) * col2 - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 50 + + col0 - - tab0.col2 AS col2 FROM tab0
----
107
221
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-2810
SELECT + col1 - col0 DIV - 29 AS col2 FROM tab0
----
86
94
98

skipif mysql # not compatible
query I rowsort label-2810
SELECT + col1 - col0 / - 29 AS col2 FROM tab0
----
86
94
98

query I rowsort
SELECT 59 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT col1 * col0 + - col0 * col0 * - col2 AS col1 FROM tab2
----
1540
162786
238501

query I rowsort
SELECT DISTINCT - col1 + - col1 * ( col1 ) FROM tab0
----
-7482
-8372
-9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col0 + ( ( col2 ) ) AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + - col0 + col1 * - col2 + - col1 * + col0 * col1 FROM tab0 AS cor0
----
-180366
-329447
-744560

query I rowsort
SELECT ALL - col0 * + col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + cor0.col1 * - 78 + - col0 AS col0 FROM tab2 AS cor0
----
-1405
-2425
-4680

query I rowsort
SELECT ALL - col2 * ( col1 ) FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2820
SELECT + col0 DIV + ( tab1.col2 ) - col2 DIV 31 col2 FROM tab1
----
-1
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2820
SELECT + col0 / + ( tab1.col2 ) - col2 / 31 col2 FROM tab1
----
-1
-3
0

query I rowsort
SELECT ALL - ( col0 ) + - col0 + col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT 99 * tab1.col1 AS col0 FROM tab1
----
1287
2574
990

query I rowsort
SELECT ALL + + 30 * - col0 FROM tab1 AS cor0
----
-1920
-2400
-90

query I rowsort
SELECT DISTINCT - + 53 * + cor0.col0 + - cor0.col2 + + 93 AS col1 FROM tab1 AS cor0
----
-120
-3356
-4243

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 59 col0 FROM tab1
----
-59
-59
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2826
SELECT DISTINCT - ( col0 ) DIV 15 + col0 AS col1 FROM tab1 AS cor0
----
3
60
75

skipif mysql # not compatible
query I rowsort label-2826
SELECT DISTINCT - ( col0 ) / 15 + col0 AS col1 FROM tab1 AS cor0
----
3
60
75

query I rowsort
SELECT DISTINCT - 81 * + col0 + - col2 AS col2 FROM tab2 AS cor0
----
-594
-6344
-6437

query I rowsort
SELECT ALL + + col0 + - cor0.col0 * 85 * + col1 AS col0 FROM tab2 AS cor0
----
-114076
-18438
-391092

query I rowsort
SELECT DISTINCT col1 + col1 - - col0 FROM tab2 AS cor0
----
113
196
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2830
SELECT DISTINCT col0 * cor0.col2 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2830
SELECT DISTINCT col0 * cor0.col2 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT ( - col2 ) AS col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - col2 * - cor0.col2 + 42 * cor0.col2 AS col1 FROM tab0 AS cor0
----
10168
2475
43

query I rowsort
SELECT - ( col0 ) * tab1.col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT 74 FROM tab2, tab1 AS cor0
----
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2835
SELECT ALL - CAST( - 90 AS SIGNED ) col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2835
SELECT ALL - CAST ( - 90 AS INTEGER ) col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT - 82 AS col2 FROM tab0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - col1 + + col1 AS col1 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2838
SELECT 1 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2838
SELECT 1 / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col0 + + cor0.col2 + + 32 * col2 AS col0 FROM tab0 AS cor0
----
1113
2795
68

query I rowsort
SELECT + col2 * + col0 * + col0 AS col1 FROM tab1 AS cor0
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-2841
SELECT + col0 + - col0 DIV col2 AS col1 FROM tab1 AS cor0
----
3
63
80

skipif mysql # not compatible
query I rowsort label-2841
SELECT + col0 + - col0 / col2 AS col1 FROM tab1 AS cor0
----
3
63
80

query I rowsort
SELECT - - 34 * + col2 FROM tab0 AS cor0
----
1122
2788
34

query I rowsort
SELECT DISTINCT - - cor0.col1 * - cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-2064
-3395
-8099

query I rowsort
SELECT col2 - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + col2 * + col0 * + col0 AS col2 FROM tab1 AS cor0
----
233472
486
614400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2846
SELECT - col1 / + CAST( NULL AS SIGNED ) - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2846
SELECT - col1 / + CAST ( NULL AS INTEGER ) - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT 58 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
58

query I rowsort
SELECT - ( col0 ) * col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT 26 * + ( - col0 * 36 ) - 31 AS col1 FROM tab1
----
-2839
-59935
-74911

query I rowsort
SELECT - - col2 + - col0 * col0 * 39 AS col0 FROM tab1 AS cor0
----
-159687
-249504
-297

query I rowsort
SELECT DISTINCT 55 AS col0 FROM tab0, tab2 AS cor0
----
55

query I rowsort
SELECT DISTINCT - 7 FROM tab2, tab2 AS cor0
----
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2854
SELECT ALL - col0 - col2 * col0 DIV col1 AS col1 FROM tab1
----
-428
-670
-9

skipif mysql # not compatible
query I rowsort label-2854
SELECT ALL - col0 - col2 * col0 / col1 AS col1 FROM tab1
----
-428
-670
-9

query I rowsort
SELECT col2 + tab0.col2 * col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT col0 - + col2 * col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT - - col2 + + col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2858
SELECT + + col0 * + 76 + col1 DIV col1 FROM tab2 AS cor0
----
533
5929
6005

skipif mysql # not compatible
query I rowsort label-2858
SELECT + + col0 * + 76 + col1 / col1 FROM tab2 AS cor0
----
533
5929
6005

onlyif mysql # use DIV operator for integer division
query I rowsort label-2859
SELECT + col0 * - col1 DIV cor0.col1 + 72 FROM tab2 AS cor0
----
-6
-7
65

skipif mysql # not compatible
query I rowsort label-2859
SELECT + col0 * - col1 / cor0.col1 + 72 FROM tab2 AS cor0
----
-6
-7
65

query I rowsort
SELECT + - cor0.col0 * + col2 + + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL - + 83 * col1 * - 17 AS col1 FROM tab2 AS cor0
----
23987
43741
83249

query I rowsort
SELECT - + col0 * + col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - cor0.col2 * - col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2864
SELECT - CAST( 33 AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

skipif mysql # not compatible
query I rowsort label-2864
SELECT - CAST ( 33 AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

onlyif mysql # use DIV operator for integer division
query I rowsort label-2865
SELECT DISTINCT 32 DIV - col2 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-2865
SELECT DISTINCT 32 / - col2 FROM tab1 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ( + col1 ) + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - col1 + - col0 * - cor0.col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT + 71 - + cor0.col2 FROM tab2 AS cor0
----
33
44
45

query I rowsort
SELECT - + col1 + + col2 * + col0 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT 50 * - cor0.col0 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-150
-3200
-4000

query I rowsort
SELECT ALL 8 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2873
SELECT - col1 * - CAST( 11 AS SIGNED ) + - col2 FROM tab1
----
232
47
53

skipif mysql # not compatible
query I rowsort label-2873
SELECT - col1 * - CAST ( 11 AS INTEGER ) + - col2 FROM tab1
----
232
47
53

query I rowsort
SELECT ALL cor0.col2 * - col2 * - 57 FROM tab0 AS cor0
----
383268
57
62073

query I rowsort
SELECT ALL + col0 * - ( col1 ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 * 85 col2 FROM tab0 AS cor0
----
7343
7817
8246

query I rowsort
SELECT DISTINCT + col1 + + 75 FROM tab1 AS cor0
----
101
85
88

query I rowsort
SELECT DISTINCT ( - 36 ) AS col1 FROM tab2 AS cor0
----
-36

query I rowsort
SELECT DISTINCT + 47 * 4 FROM tab0 AS cor0
----
188

query I rowsort
SELECT DISTINCT - + 7 * - col1 AS col2 FROM tab1 AS cor0
----
182
70
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 * + 41 + + col0 - 10 col2 FROM tab1 AS cor0
----
-1073
-356
-463

query I rowsort
SELECT DISTINCT 98 + col1 FROM tab1 AS cor0
----
108
111
124

query I rowsort
SELECT DISTINCT - ( 37 ) FROM tab1 AS cor0
----
-37

query I rowsort
SELECT ALL - - 18 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT + col1 - - col0 * - col2 AS col0 FROM tab1
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2886
SELECT ALL tab2.col2 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2886
SELECT ALL tab2.col2 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2887
SELECT ALL + 95 - + col2 / CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2887
SELECT ALL + 95 - + col2 / CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + col1 + - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 * - col2 FROM tab2 cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT + 20 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col1 * col0 + + 0 col2 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL + col1 * 56 AS col1 FROM tab0 cor0
----
4816
5096
5432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + ( 44 ) + - col2 * + 29 col1 FROM tab2
----
-475
2374
2678

query I rowsort
SELECT + col0 * + col1 * 42 FROM tab2
----
193284
56406
9114

query I rowsort
SELECT DISTINCT - col1 + - col0 * 77 * + col2 FROM tab2 cor0
----
-14584
-156215
-231171

query I rowsort
SELECT cor0.col0 + - 41 AS col0 FROM tab0 cor0
----
-17
-6
48

query I rowsort
SELECT - col0 * ( col1 ) + col2 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + cor0.col1 + + 33 * + cor0.col0 FROM tab0 AS cor0
----
1252
3028
878

query I rowsort
SELECT ALL + col1 * 75 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-554700
-621075
-705675

query I rowsort
SELECT DISTINCT - col1 * col0 + col1 AS col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT + col0 * - col2 - 80 FROM tab0 AS cor0
----
-115
-7378
-872

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2902
SELECT DISTINCT + - CAST( 25 AS SIGNED ) FROM tab1, tab2, tab1 AS cor0
----
-25

skipif mysql # not compatible
query I rowsort label-2902
SELECT DISTINCT + - CAST ( 25 AS INTEGER ) FROM tab1, tab2, tab1 AS cor0
----
-25

query I rowsort
SELECT DISTINCT col0 * col1 * col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL + ( 55 ) FROM tab0
----
55
55
55

query I rowsort
SELECT ALL + ( tab2.col1 ) * - col0 * - ( - 42 ) AS col0 FROM tab2
----
-193284
-56406
-9114

query I rowsort
SELECT - - cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL cor1.col0 * - 35 + + 70 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 4222373eb11913545d8fed0f3409a513

query I rowsort
SELECT - 39 + col2 AS col2 FROM tab0
----
-38
-6
43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2909
SELECT col0 + col0 * col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2909
SELECT col0 + col0 * col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 28 * - col2 FROM tab2 cor0
----
-1064
-728
-756

query I rowsort
SELECT + 87 * col1 FROM tab0 AS cor0
----
7482
7917
8439

query I rowsort
SELECT ALL + cor0.col1 * + col0 * - 67 + 3 * - col2 FROM tab2 AS cor0
----
-14620
-308412
-90095

query I rowsort
SELECT DISTINCT - 79 - + col2 FROM tab2 AS cor0
----
-105
-106
-117

query I rowsort
SELECT col0 + + col1 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col1 + - col2 * col2 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2916
SELECT ALL col2 + col0 DIV + 88 FROM tab0 AS cor0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-2916
SELECT ALL col2 + col0 / + 88 FROM tab0 AS cor0
----
1
33
83

query I rowsort
SELECT - + 83 FROM tab0 AS cor0
----
-83
-83
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2918
SELECT DISTINCT - cor0.col1 * + cor0.col2 + CAST( NULL AS SIGNED ) * - 32 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2918
SELECT DISTINCT - cor0.col1 * + cor0.col2 + CAST ( NULL AS INTEGER ) * - 32 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 61 + + col1 AS col0 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT + 93 AS col0 FROM tab0 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2921
SELECT DISTINCT - col1 - - col1 DIV - ( cor0.col1 + col2 * col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-2921
SELECT DISTINCT - col1 - - col1 / - ( cor0.col1 + col2 * col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2922
SELECT DISTINCT + 71 DIV col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2922
SELECT DISTINCT + 71 / col1 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + - cor0.col1 col2 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 94 col0 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT ALL - 83 * - col0 + 98 FROM tab0 AS cor0
----
2090
3003
7485

query I rowsort
SELECT DISTINCT col0 * - cor0.col1 + - cor0.col1 - col1 FROM tab2 AS cor0
----
-1377
-279
-4720

query I rowsort
SELECT DISTINCT - - cor0.col1 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-2928
SELECT ALL + + col1 DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2928
SELECT ALL + + col1 / - cor0.col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2929
SELECT + + 70 DIV - tab1.col1 col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 21811631b5c0826c9240c5375e83ee0f

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2929
SELECT + + 70 / - tab1.col1 col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 21811631b5c0826c9240c5375e83ee0f

query I rowsort
SELECT ALL 29 * col2 AS col2 FROM tab0
----
2378
29
957

query I rowsort
SELECT + - col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 col2 FROM tab1 AS cor0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * cor0.col0 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col1 * - 92 AS col1 FROM tab2 cor0
----
1564
2852
5428

query I rowsort
SELECT col0 * + 71 AS col2 FROM tab0 AS cor0
----
1704
2485
6319

query I rowsort
SELECT col2 + ( + 6 ) * col0 FROM tab2 cor0
----
494
512
69

query I rowsort
SELECT ALL 87 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

onlyif mysql # use DIV operator for integer division
query I rowsort label-2938
SELECT col1 + col0 DIV ( - col1 ) AS col0 FROM tab2
----
13
31
58

skipif mysql # not compatible
query I rowsort label-2938
SELECT col1 + col0 / ( - col1 ) AS col0 FROM tab2
----
13
31
58

query I rowsort
SELECT ALL + 19 * col2 AS col2 FROM tab1 cor0
----
1026
1083
1824

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) * - col0 + col2 + col2 FROM tab1 AS cor0
----
270
3762
7872

query I rowsort
SELECT DISTINCT + 19 + - col0 AS col2 FROM tab1 AS cor0
----
-45
-61
16

query I rowsort
SELECT DISTINCT + 16 AS col0 FROM tab0 AS cor0
----
16

query I rowsort
SELECT + cor0.col2 + 93 FROM tab1 AS cor0
----
147
150
189

query I rowsort
SELECT ALL + cor0.col0 + col2 + - col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + col2 * - col1 col2 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT + 0 * + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 65 * col1 FROM tab1 cor0
----
1690
650
845

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + 29 ) col0 FROM tab0 AS cor0
----
29

query I rowsort
SELECT + ( - col2 ) * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + - 76 FROM tab0 AS cor0
----
-76
-76
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2951
SELECT - col1 + 46 + col0 DIV col1 FROM tab1
----
20
39
42

skipif mysql # not compatible
query I rowsort label-2951
SELECT - col1 + 46 + col0 / col1 FROM tab1
----
20
39
42

query I rowsort
SELECT col0 * + 40 * - 7 AS col0 FROM tab2
----
-1960
-21840
-22120

query I rowsort
SELECT ( cor0.col1 ) + cor0.col2 * ( + 30 ) FROM tab1 AS cor0
----
1646
1720
2893

query I rowsort
SELECT 93 + + col1 * + col0 FROM tab1 AS cor0
----
1133
171
733

query I rowsort
SELECT ( + 59 ) + cor0.col0 AS col1 FROM tab1 AS cor0
----
123
139
62

query I rowsort
SELECT ALL col1 + - col1 * - col1 FROM tab0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2957
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2957
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2958
SELECT ALL col2 DIV 4 FROM tab0
----
0
20
8

skipif mysql # not compatible
query I rowsort label-2958
SELECT ALL col2 / 4 FROM tab0
----
0
20
8

query I rowsort
SELECT 13 + + col1 FROM tab1
----
23
26
39

query I rowsort
SELECT 37 * + col2 + - col2 AS col1 FROM tab1
----
1944
2052
3456

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 CROSS JOIN tab1, tab2 cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT ALL - ( col2 ) * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + + ( + col2 ) + cor0.col0 * + 59 AS col0 FROM tab1 AS cor0
----
231
3833
4816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 91 col0 FROM tab2, tab1 AS cor0, tab1, tab1 AS cor1
----
91

query I rowsort
SELECT + col1 + + 15 AS col1 FROM tab0 cor0
----
101
106
112

query I rowsort
SELECT + - col0 * ( cor0.col1 ) * - col2 + col1 FROM tab2 AS cor0
----
119711
51051
5890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 + + col0 * + col2 * col1 col2 FROM tab1 AS cor0
----
3536
36380
99671

query I rowsort
SELECT + col1 + + 92 + + 53 FROM tab1 AS cor0
----
155
158
171

query I rowsort
SELECT + + col1 * - 91 AS col0 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT - - 64 AS col1 FROM tab0, tab2, tab2 cor0
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT ALL col2 + + col0 + col2 * + col0 AS col0 FROM tab0
----
71
7469
849

query I rowsort
SELECT - + cor0.col0 * - col2 - col1 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-2973
SELECT + cor0.col2 DIV - ( - col0 ) + - col2 AS col2 FROM tab0 AS cor0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-2973
SELECT + cor0.col2 / - ( - col0 ) + - col2 AS col2 FROM tab0 AS cor0
----
-1
-32
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - + 17 col2 FROM tab2 AS cor0
----
0
14
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2975
SELECT + CAST( + 46 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
-1518
-3772
-46

skipif mysql # not compatible
query I rowsort label-2975
SELECT + CAST ( + 46 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
-1518
-3772
-46

query I rowsort
SELECT DISTINCT + ( - col0 ) * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT 13 + col2 AS col2 FROM tab1 cor0
----
109
67
70

query I rowsort
SELECT + + 18 FROM tab0 cor0
----
18
18
18

query I rowsort
SELECT ALL - tab0.col2 * ( ( col1 ) ) * 72 AS col0 FROM tab0
----
-204336
-537264
-6984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2980
SELECT DISTINCT tab1.col1 * - CAST( col1 AS SIGNED ) * col1 AS col1 FROM tab1
----
-1000
-17576
-2197

skipif mysql # not compatible
query I rowsort label-2980
SELECT DISTINCT tab1.col1 * - CAST ( col1 AS INTEGER ) * col1 AS col1 FROM tab1
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT ALL ( col1 + + col2 ) DIV + 8 AS col2 FROM tab0
----
12
14
21

skipif mysql # not compatible
query I rowsort label-2981
SELECT ALL ( col1 + + col2 ) / + 8 AS col2 FROM tab0
----
12
14
21

query I rowsort
SELECT ALL 11 AS col0 FROM tab2
----
11
11
11

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2984
SELECT CAST( NULL AS DECIMAL ) col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2984
SELECT CAST ( NULL AS REAL ) col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL 52 * + col2 FROM tab1
----
2808
2964
4992

query I rowsort
SELECT ALL - 22 * cor0.col0 + cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 16be65bf9955ff788aa5ba02318819b8

query I rowsort
SELECT DISTINCT - col0 - + col0 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT - col2 + - 6 - col1 FROM tab0
----
-104
-125
-179

query I rowsort
SELECT ALL + col1 - col0 AS col2 FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2991
SELECT tab0.col1 DIV + 82 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2991
SELECT tab0.col1 / + 82 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT + col2 * + 62 + col2 AS col0 FROM tab1 AS cor0
----
3402
3591
6048

onlyif mysql # use DIV operator for integer division
query I rowsort label-2993
SELECT ALL col0 * + col2 + col0 DIV - col1 AS col2 FROM tab1 AS cor0
----
162
3642
7674

skipif mysql # not compatible
query I rowsort label-2993
SELECT ALL col0 * + col2 + col0 / - col1 AS col2 FROM tab1 AS cor0
----
162
3642
7674

query I rowsort
SELECT DISTINCT - col0 * - col1 + - 5 AS col0 FROM tab2 AS cor0
----
1338
212
4597

query I rowsort
SELECT DISTINCT + col2 * + 0 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2996
SELECT ALL - col0 DIV ( + col0 * + col0 ) + - CAST( ( + col2 ) + col1 AS SIGNED ) FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-2996
SELECT ALL - col0 / ( + col0 * + col0 ) + - CAST ( ( + col2 ) + col1 AS INTEGER ) FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2997
SELECT - cor0.col0 DIV cor1.col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8c64c93ce040e393a7363ee22a22b244

skipif mysql # not compatible
query I rowsort label-2997
SELECT - cor0.col0 / cor1.col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8c64c93ce040e393a7363ee22a22b244

query I rowsort
SELECT ALL - col0 * ( cor0.col1 * - cor0.col2 ) FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT ALL 92 * - col2 + + col0 + - col0 AS col2 FROM tab2
----
-2392
-2484
-3496

query I rowsort
SELECT DISTINCT 77 + ( col0 ) * + tab1.col2 AS col0 FROM tab1
----
239
3725
7757

query I rowsort
SELECT ALL - ( - col1 ) + - col2 * - 63 * col1 FROM tab2
----
40715
52762
96701

query I rowsort
SELECT - + ( col0 ) * - cor0.col0 + + 54 FROM tab1 cor0
----
4150
63
6454

query I rowsort
SELECT ( 25 ) AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 68fc0eecd4f434589f3ec576bbd0c540

query I rowsort
SELECT + ( col0 ) + + col0 * 94 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT + col2 + + col1 * + cor0.col2 FROM tab1 AS cor0
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 50 col2 FROM tab0 AS cor0
----
-50

query I rowsort
SELECT 58 * col0 AS col2 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT ALL 33 AS col2 FROM tab1 cor0
----
33
33
33

query I rowsort
SELECT DISTINCT col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col2 * col0 + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-1272
-3360
-801

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3012
SELECT DISTINCT + col2 - - col0 * col0 DIV cor0.col0 col1 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3012
SELECT DISTINCT + col2 - - col0 * col0 / cor0.col0 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - - cor0.col0 + cor0.col1 - + ( + col1 ) * col2 AS col0 FROM tab0 cor0
----
-2728
-7282
35

query I rowsort
SELECT ALL - ( 30 + tab1.col1 ) FROM tab1
----
-40
-43
-56

query I rowsort
SELECT ALL + ( - col0 ) AS col2 FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3016
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1, tab0, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3016
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1, tab0, tab1 AS cor0
----
NULL

query I rowsort
SELECT 2 * + ( - col1 ) AS col0 FROM tab0 AS cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + 30 * cor0.col1 * col1 col2 FROM tab1 AS cor0
----
20277
2936
4990

query I rowsort
SELECT DISTINCT - - 93 + col0 + cor0.col0 AS col2 FROM tab0 AS cor0
----
141
163
271

query I rowsort
SELECT ALL - ( col1 ) * - col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL col0 * + ( - col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col2 + + col0 * col0 AS col1 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT - 88 + tab0.col2 FROM tab0
----
-55
-6
-87

query I rowsort
SELECT - tab0.col2 * tab0.col2 + - col2 + ( 81 ) FROM tab0
----
-1041
-6725
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3025
SELECT + ( 17 ) * col2 DIV + tab0.col1 AS col2 FROM tab0
----
0
15
6

skipif mysql # not compatible
query I rowsort label-3025
SELECT + ( 17 ) * col2 / + tab0.col1 AS col2 FROM tab0
----
0
15
6

query I rowsort
SELECT ( - col1 ) + + tab0.col0 * 41 * + col0 AS col0 FROM tab0
----
23530
324670
50128

query I rowsort
SELECT DISTINCT 83 * cor0.col1 AS col0 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT DISTINCT + - col1 * col0 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 + - cor0.col2 * - col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL - - col1 * - cor0.col0 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3031
SELECT DISTINCT - + CAST( 58 AS SIGNED ) AS col1 FROM tab2 cor0
----
-58

skipif mysql # not compatible
query I rowsort label-3031
SELECT DISTINCT - + CAST ( 58 AS INTEGER ) AS col1 FROM tab2 cor0
----
-58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT CAST( NULL AS SIGNED ) + + tab0.col1 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3032
SELECT CAST ( NULL AS INTEGER ) + + tab0.col1 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 53 * col1 + + tab1.col2 AS col0 FROM tab1
----
1432
587
785

query I rowsort
SELECT ALL + col2 + col1 * - 22 AS col0 FROM tab2
----
-1272
-336
-655

onlyif mysql # use DIV operator for integer division
query I rowsort label-3035
SELECT ALL - col2 DIV cor0.col1 + 35 * col2 AS col0 FROM tab1 AS cor0
----
1888
1990
3353

skipif mysql # not compatible
query I rowsort label-3035
SELECT ALL - col2 / cor0.col1 + 35 * col2 AS col0 FROM tab1 AS cor0
----
1888
1990
3353

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3036
SELECT DISTINCT - + col0 * - CAST( NULL AS SIGNED ) + + col2 * - col2 * + 3 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3036
SELECT DISTINCT - + col0 * - CAST ( NULL AS INTEGER ) + + col2 * - col2 * + 3 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 * 43 + col2 AS col1 FROM tab0 AS cor0
----
-3665
-3831
-4170

query I rowsort
SELECT DISTINCT + + cor0.col2 - - col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + col2 * - tab2.col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ( col0 ) * ( + 75 ) FROM tab2
----
525
5850
5925

onlyif mysql # use DIV operator for integer division
query I rowsort label-3041
SELECT col1 DIV + col1 + - col2 DIV tab1.col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3041
SELECT col1 / + col1 + - col2 / tab1.col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3042
SELECT 92 + - col2 * CAST( 76 AS SIGNED ) FROM tab0
----
-2416
-6140
16

skipif mysql # not compatible
query I rowsort label-3042
SELECT 92 + - col2 * CAST ( 76 AS INTEGER ) FROM tab0
----
-2416
-6140
16

query I rowsort
SELECT ALL 72 + col0 AS col2 FROM tab1
----
136
152
75

query I rowsort
SELECT 81 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2
----
81 values hashing to 50d500b1082f81e0b02096b2afac91cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3045
SELECT ALL - - col1 * CAST( NULL AS SIGNED ) - col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3045
SELECT ALL - - col1 * CAST ( NULL AS INTEGER ) - col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - 82 * + col0 + + col1 FROM tab2 AS cor0
----
-110109
-17763
-377305

query I rowsort
SELECT DISTINCT col0 + col0 * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL - col2 + - col1 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 40a052eaf1d698dbf3ba319dc3e245ee

query I rowsort
SELECT ALL - + col2 * + col0 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3051
SELECT DISTINCT + col0 + + CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3051
SELECT DISTINCT + col0 + + CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + - col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + + cor0.col0 + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3054
SELECT DISTINCT - - col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3054
SELECT DISTINCT - - col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + - col2 + 19 FROM tab2 AS cor0
----
-19
-7
-8

query I rowsort
SELECT DISTINCT cor0.col0 + col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + + col0 * ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + + cor0.col2 * col2 AS col0 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - 79 * 92 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to a025d13cc4390e1db7164c6e64f0269a

query I rowsort
SELECT DISTINCT - tab0.col0 * + col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - col0 - + 95 AS col1 FROM tab0 AS cor0
----
-119
-130
-184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3062
SELECT ALL + - CAST( + ( + col1 ) AS SIGNED ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-3062
SELECT ALL + - CAST ( + ( + col1 ) AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 96 * + 58 + + col2 AS col0 FROM tab1 AS cor0
----
5622
5625
5664

query I rowsort
SELECT DISTINCT + col1 - cor0.col0 AS col2 FROM tab0 AS cor0
----
2
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3065
SELECT + - CAST( NULL AS SIGNED ) * + 45 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3065
SELECT + - CAST ( NULL AS INTEGER ) * + 45 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 2 * + ( + cor0.col1 ) * col2 AS col0 FROM tab2 cor0
----
1292
1674
3068

query I rowsort
SELECT DISTINCT + + col0 - col0 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - + 99 * col1 AS col1 FROM tab1 AS cor0
----
-1287
-2574
-990

query I rowsort
SELECT DISTINCT - + col0 * + cor0.col2 + - cor0.col2 * - 74 FROM tab2 AS cor0
----
-104
-190
1809

query I rowsort
SELECT + 6 + + col1 AS col1 FROM tab2 AS cor0
----
23
37
65

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 * col0 AS col2 FROM tab2 cor0
----
-540
1352
1558

query I rowsort
SELECT - 35 * - col0 * col0 FROM tab1 AS cor0
----
143360
224000
315

query I rowsort
SELECT col0 * 67 FROM tab1
----
201
4288
5360

query I rowsort
SELECT - + cor0.col0 * cor0.col0 + 10 - col1 AS col0 FROM tab1 AS cor0
----
-25
-4096
-6403

query I rowsort
SELECT cor0.col0 * col1 + + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT tab2.col1 * + tab2.col1 FROM tab2
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3077
SELECT col2 + + col1 DIV 92 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3077
SELECT col2 + + col1 / 92 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL col1 + col0 * - 8 FROM tab1 cor0
----
-502
-627
2

query I rowsort
SELECT - 70 + col0 * 5 AS col2 FROM tab0 AS cor0
----
105
375
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-3080
SELECT - 73 * col0 DIV - col0 AS col0 FROM tab0 AS cor0
----
73
73
73

skipif mysql # not compatible
query I rowsort label-3080
SELECT - 73 * col0 / - col0 AS col0 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT ALL 24 * col2 FROM tab0 AS cor0
----
1968
24
792

query I rowsort
SELECT - 99 - col2 FROM tab1 AS cor0
----
-153
-156
-195

query I rowsort
SELECT DISTINCT + col0 + - col2 * 45 FROM tab1 AS cor0
----
-2427
-2501
-4240

onlyif mysql # use DIV operator for integer division
query I rowsort label-3084
SELECT ALL + 8 DIV + col0 FROM tab1 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3084
SELECT ALL + 8 / + col0 FROM tab1 AS cor0
----
0
0
2

query I rowsort
SELECT - + cor0.col1 + + col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3086
SELECT - + 58 * + cor0.col0 + + CAST( 57 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-463
2904
832

skipif mysql # not compatible
query I rowsort label-3086
SELECT - + 58 * + cor0.col0 + + CAST ( 57 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-463
2904
832

query I rowsort
SELECT - col2 * + cor0.col2 + + 22 * col0 AS col0 FROM tab2 AS cor0
----
-575
1040
294

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col2 * col0 col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - col0 * col1 + cor0.col1 * - col0 FROM tab1 AS cor0
----
-1280
-156
-2080

query I rowsort
SELECT + 71 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT DISTINCT cor0.col2 * 25 FROM tab0, tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-45

query I rowsort
SELECT DISTINCT col0 * + col2 + - col0 AS col2 FROM tab0
----
0
7209
768

query I rowsort
SELECT ALL - 21 FROM tab2
----
-21
-21
-21

query I rowsort
SELECT ( 72 ) AS col2 FROM tab0
----
72
72
72

query I rowsort
SELECT DISTINCT 15 * col1 AS col2 FROM tab1
----
150
195
390

query I rowsort
SELECT ALL 42 AS col1 FROM tab2
----
42
42
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-3098
SELECT - - col2 DIV col0 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3098
SELECT - - col2 / col0 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - col2 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 8 * + col1 * - cor0.col2 + col0 * - col2 FROM tab2 AS cor0
----
-14300
-6885
-8170

query I rowsort
SELECT - col0 * col1 + + col2 * + col1 AS col0 FROM tab1 AS cor0
----
-70
1326
208

onlyif mysql # use DIV operator for integer division
query I rowsort label-3102
SELECT DISTINCT - col0 DIV col1 + col0 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3102
SELECT DISTINCT - col0 / col1 + col0 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab0 AS cor0
----
56

query I rowsort
SELECT - col0 - col1 * - col1 AS col1 FROM tab1 cor0
----
36
673
89

query I rowsort
SELECT ALL - - ( - col2 ) AS col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + 27 + + col2 * col1 AS col0 FROM tab0 AS cor0
----
124
2865
7489

query I rowsort
SELECT - - cor0.col0 + + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + cor0.col0 * col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - col0 + - col2 * + col1 + col0 * col1 AS col1 FROM tab2 AS cor0
----
-627
2990
618

query I rowsort
SELECT - col1 + col0 * + 58 * col1 AS col2 FROM tab2
----
12555
266857
77877

query I rowsort
SELECT - col1 * col1 * col2 + col0 * - col0 + col1 FROM tab1 AS cor0
----
-22611
-36487
-9786

query I rowsort
SELECT ALL - ( tab1.col2 ) * ( col2 ) AS col0 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - col2 * - 69 AS col0 FROM tab1 AS cor0
----
3726
3933
6624

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3114
SELECT + + col0 + CAST( NULL AS SIGNED ) / col2 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3114
SELECT + + col0 + CAST ( NULL AS INTEGER ) / col2 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + - col2 * - 23 * col2 col2 FROM tab2 AS cor0
----
15607
16798
33229

query I rowsort
SELECT col2 * + col1 + ( cor0.col1 ) FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL 90 * ( - col1 ) FROM tab1 AS cor0
----
-1170
-2340
-900

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3118
SELECT ALL - CAST( NULL AS SIGNED ) * 53 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3118
SELECT ALL - CAST ( NULL AS INTEGER ) * 53 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * 75 AS col2 FROM tab0
----
1800
2625
6675

query I rowsort
SELECT ALL + - col1 + col1 * col0 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT col2 + - col0 * col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT - cor0.col1 * col2 + cor0.col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT col2 * + col2 * + col2 + col1 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-9408
28541
543087

query I rowsort
SELECT ALL col2 + col0 * col1 FROM tab0 cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-3125
SELECT + col0 DIV col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3125
SELECT + col0 / col0 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + col0 * - col0 * + col0 AS col1 FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT ALL - col0 * cor0.col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + col1 + col2 * col1 * + col2 AS col0 FROM tab1 AS cor0
----
119821
32500
75842

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT ALL col0 * tab0.col0 DIV col1 + col1 DIV col0 FROM tab0 WHERE NOT col2 + - col0 <= - col2 + col2 AND + col0 NOT IN ( col1 DIV - col1 )
----
9

skipif mysql # not compatible
query I rowsort label-3130
SELECT ALL col0 * tab0.col0 / col1 + col1 / col0 FROM tab0 WHERE NOT col2 + - col0 <= - col2 + col2 AND + col0 NOT IN ( col1 / - col1 )
----
9

query I rowsort
SELECT + col0 * col2 + + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT col0 - - tab1.col2 * col2 FROM tab1
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-3133
SELECT ALL col0 DIV + col2 AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3133
SELECT ALL col0 / + col2 AS col0 FROM tab1
----
0
0
1

query I rowsort
SELECT - col1 + - tab1.col0 * col0 AS col0 FROM tab1
----
-35
-4106
-6413

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3136
SELECT ALL + tab0.col2 DIV col2 + - col1 * - col0 AS col2 FROM tab0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-3136
SELECT ALL + tab0.col2 / col2 + - col1 * - col0 AS col2 FROM tab0
----
2065
3396
8100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 + col0 * - col2 col1 FROM tab2
----
-406
-4345
-6630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3138
SELECT ALL + tab0.col0 + - col0 DIV + col2 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-3138
SELECT ALL + tab0.col0 + - col0 / + col2 FROM tab0
----
0
24
88

query I rowsort
SELECT tab2.col0 - + col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3140
SELECT ALL col1 DIV col1 + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3140
SELECT ALL col1 / col1 + col0 FROM tab1
----
4
65
81

query I rowsort
SELECT DISTINCT - col1 + col1 AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT + col2 + col0 + col0 FROM tab0 AS cor0
----
260
71
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3143
SELECT col2 + col0 * - col1 + - col1 DIV + col1 FROM tab1 AS cor0
----
-25
-584
-945

skipif mysql # not compatible
query I rowsort label-3143
SELECT col2 + col0 * - col1 + - col1 / + col1 FROM tab1 AS cor0
----
-25
-584
-945

onlyif mysql # use DIV operator for integer division
query I rowsort label-3144
SELECT DISTINCT + cor0.col1 + col1 DIV + cor0.col2 AS col0 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-3144
SELECT DISTINCT + cor0.col1 + col1 / + cor0.col2 AS col0 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT - - col1 * col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - 43 * col1 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT ALL - col0 * + tab1.col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT + 27 AS col2 FROM tab0
----
27
27
27

query I rowsort
SELECT ALL + col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 + - col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL + col1 - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col0 * + cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - 83 * - col2 FROM tab0 AS cor0
----
2739
6806
83

query I rowsort
SELECT ALL - col0 * - col1 - col0 * col0 FROM tab2 AS cor0
----
-1482
-4898
168

query I rowsort
SELECT ( + col1 ) * col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT ALL - col2 DIV - col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3157
SELECT ALL - col2 / - col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL + + col2 + + col1 AS col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3159
SELECT DISTINCT - - 92 DIV - col1 + col2 FROM tab0 cor0
----
1
32
81

skipif mysql # not compatible
query I rowsort label-3159
SELECT DISTINCT - - 92 / - col1 + col2 FROM tab0 cor0
----
1
32
81

query I rowsort
SELECT DISTINCT col2 + 61 AS col0 FROM tab1 AS cor0
----
115
118
157

query I rowsort
SELECT 97 * - cor0.col1 AS col2 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 755a84a1b9c9144da1c0b828a6ec4793

query I rowsort
SELECT DISTINCT + 6 FROM tab1
----
6

query I rowsort
SELECT DISTINCT - col0 * + col0 * col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT 94 + col0 * - col0 FROM tab1 AS cor0
----
-4002
-6306
85

query I rowsort
SELECT + ( col2 ) - - col2 * + col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab0 AS cor0
----
-98

query I rowsort
SELECT DISTINCT 68 + 36 AS col2 FROM tab2 cor0
----
104

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + col2 AS REAL ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3169
SELECT + + col1 * col0 + col1 DIV + ( col1 * - col1 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-3169
SELECT + + col1 * col0 + col1 / + ( col1 * - col1 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + ( - col1 ) * + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT - col0 * col2 + + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL col1 * + col0 + col2 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - col0 + - 76 AS col1 FROM tab0 AS cor0
----
-100
-111
-165

onlyif mysql # use DIV operator for integer division
query I rowsort label-3174
SELECT ALL - col0 * col2 + cor0.col0 DIV col0 AS col0 FROM tab1 AS cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-3174
SELECT ALL - col0 * col2 + cor0.col0 / col0 AS col0 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - cor1.col1 + 32 * + 7 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 60971cc10581c5de58a16195dfbc5f98

query I rowsort
SELECT ALL 35 * col0 + + col0 FROM tab2 cor0
----
252
2808
2844

query I rowsort
SELECT DISTINCT col2 + + 23 * col1 FROM tab2
----
1383
429
740

query I rowsort
SELECT - 26 + 9 FROM tab2
----
-17
-17
-17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3180
SELECT + + col1 * cor0.col1 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3180
SELECT + + col1 * cor0.col1 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 98 + + col2 AS col1 FROM tab1
----
-2
-41
-44

query I rowsort
SELECT 87 + col2 * - col2 FROM tab2
----
-1357
-589
-642

query I rowsort
SELECT + 91 - cor0.col1 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 4e714cc8b4bb7490d7e3ca73c64421ca

query I rowsort
SELECT ALL + col1 + col0 * col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT + ( ( col0 ) ) FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 60 * - col2 ) col2 FROM tab0
----
1980
4920
60

query I rowsort
SELECT ALL - 23 * tab2.col2 + tab2.col2 FROM tab2
----
-572
-594
-836

query I rowsort
SELECT ALL tab2.col0 + + 8 * tab2.col1 AS col1 FROM tab2
----
215
255
550

query I rowsort
SELECT - 97 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

query I rowsort
SELECT col1 - + col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - - 74 * - col1 + col2 * - ( - col2 ) AS col2 FROM tab1 cor0
----
2509
8254
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-3192
SELECT ALL ( + col1 ) + + col1 DIV 34 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3192
SELECT ALL ( + col1 ) + + col1 / 34 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT 62 * - 96 + - col2 FROM tab1
----
-6006
-6009
-6048

query I rowsort
SELECT ALL tab0.col0 * col0 * 35 FROM tab0
----
20160
277235
42875

query I rowsort
SELECT 93 + 59 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e91eb813025a8d938c0c83abc5aaf0fc

query I rowsort
SELECT ALL col0 * col0 * - 95 AS col0 FROM tab2
----
-4655
-577980
-592895

query I rowsort
SELECT - 40 AS col0 FROM tab2
----
-40
-40
-40

query I rowsort
SELECT ALL - 73 * col1 AS col2 FROM tab2
----
-1241
-2263
-4307

query I rowsort
SELECT - - ( col1 ) + ( cor0.col1 + col1 ) FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT + col1 * cor0.col0 + - col1 + + 57 FROM tab2 AS cor0
----
1383
243
4600

query I rowsort
SELECT col0 * col0 * - 29 FROM tab0
----
-16704
-229709
-35525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT DISTINCT - 38 * cor0.col2 * - 26 AS col0 FROM tab2 AS cor0
----
25688
26676
37544

query I rowsort
SELECT - 12 * - col1 + 75 * - col2 + col2 FROM tab0 AS cor0
----
-1410
-4976
1090

query I rowsort
SELECT - tab2.col2 * cor0.col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to f2ff5a34195597ac4b4402da8bd2643f

query I rowsort
SELECT DISTINCT col0 * ( - 96 * col2 ) AS col0 FROM tab0
----
-3360
-700608
-76032

query I rowsort
SELECT col2 * - 72 * col0 + + col0 * tab0.col2 FROM tab0
----
-2485
-518158
-56232

query I rowsort
SELECT ALL + + col1 + - 7 FROM tab0 AS cor0
----
79
84
90

query I rowsort
SELECT DISTINCT + + ( 42 ) * + col2 FROM tab1 AS cor0
----
2268
2394
4032

query I rowsort
SELECT + - col2 - + col1 * + col1 FROM tab2 AS cor0
----
-327
-3507
-988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * - 72 + col1 col2 FROM tab1 AS cor0
----
3914
4114
6925

query I rowsort
SELECT - + 2 * - 36 + col1 FROM tab1 AS cor0
----
82
85
98

query I rowsort
SELECT 71 + 79 AS col0 FROM tab2 AS cor0
----
150
150
150

query I rowsort
SELECT ALL - cor0.col2 * col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - 87 + col2 FROM tab1 AS cor0
----
-30
-33
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3216
SELECT ALL + - CAST( NULL AS DECIMAL ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3216
SELECT ALL + - CAST ( NULL AS REAL ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col0 ) * - col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - ( 18 ) * - col2 - cor0.col2 FROM tab0 AS cor0
----
1394
17
561

query I rowsort
SELECT + ( col2 ) + + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - - ( - 56 ) + - col2 FROM tab0 AS cor0
----
-138
-57
-89

query I rowsort
SELECT - 18 * ( - col0 ) + - ( col2 ) AS col1 FROM tab2 AS cor0
----
1378
1384
99

query I rowsort
SELECT 60 * + cor0.col2 + cor0.col2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 4e743e0f52fe290648d09d671bc05229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3223
SELECT - CAST( + 87 AS SIGNED ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

skipif mysql # not compatible
query I rowsort label-3223
SELECT - CAST ( + 87 AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT DISTINCT + - 26 + col2 AS col0 FROM tab0 AS cor0
----
-25
56
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3225
SELECT - ( + 41 ) DIV cor0.col1 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7d4fcf1f8ab6fedb787caca2362634b1

skipif mysql # not compatible
query I rowsort label-3225
SELECT - ( + 41 ) / cor0.col1 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7d4fcf1f8ab6fedb787caca2362634b1

query I rowsort
SELECT ALL + col2 * 32 + col1 FROM tab0
----
1142
129
2715

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 + CAST ( - 83 AS REAL ) * - col0 AS col1 FROM tab1
----
303
5369
6736

query I rowsort
SELECT col0 + 48 AS col0 FROM tab0 AS cor0
----
137
72
83

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL 1 AS col0 FROM tab1, tab0, tab1 AS cor0, tab2 AS cor1
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

query I rowsort
SELECT - 33 * + cor0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to a7e4d5ceab088f15bd54146911f2b29f

query I rowsort
SELECT + - 9 + col0 * col2 FROM tab0 AS cor0
----
26
7289
783

query I rowsort
SELECT ALL - 63 + - col1 FROM tab0 AS cor0
----
-149
-154
-160

query I rowsort
SELECT DISTINCT ( + col1 ) * + col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT 42 AS col0 FROM tab0 AS cor0
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) + + col0 * col1 + + cor0.col0 col1 FROM tab2 AS cor0
----
1439
255
4739

query I rowsort
SELECT 22 AS col1 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT - col1 + col2 * + col0 AS col1 FROM tab0 AS cor0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 3 ) * - col2 col1 FROM tab2 AS cor0
----
-114
-78
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3240
SELECT CAST( NULL AS SIGNED ) / + cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3240
SELECT CAST ( NULL AS INTEGER ) / + cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 72 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 78 * 42 col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6cf60d74d7921f0cd3d7ff34771cde81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col2 col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - + col0 * col2 + col2 AS col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT + + col2 * col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - - col2 + + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT - col2 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3248
SELECT col2 DIV col1 + col2 * + col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-3248
SELECT col2 / col1 + col2 * + col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3249
SELECT + col0 + 62 DIV col0 FROM tab2 AS cor0
----
15
78
79

skipif mysql # not compatible
query I rowsort label-3249
SELECT + col0 + 62 / col0 FROM tab2 AS cor0
----
15
78
79

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + + cor0.col1 + col2 * + col0 * cor0.col2 FROM tab2 AS cor0
----
114093
5134
52787

query I rowsort
SELECT + - cor0.col1 + 29 FROM tab1 AS cor0
----
16
19
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3253
SELECT + cor0.col1 DIV + 66 + - ( + col0 ) + 93 * + col0 AS col1 FROM tab1 AS cor0
----
276
5888
7360

skipif mysql # not compatible
query I rowsort label-3253
SELECT + cor0.col1 / + 66 + - ( + col0 ) + 93 * + col0 AS col1 FROM tab1 AS cor0
----
276
5888
7360

onlyif mysql # use DIV operator for integer division
query I rowsort label-3254
SELECT - - cor0.col2 DIV 94 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3254
SELECT - - cor0.col2 / 94 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 + ( - col2 ) * + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort
SELECT tab1.col2 * - col1 + tab1.col1 + - tab1.col2 * CAST ( + col2 AS REAL ) AS col0 FROM tab1
----
-10451
-3809
-4294

query I rowsort
SELECT DISTINCT - col1 + - ( - 25 ) AS col2 FROM tab2 AS cor0
----
-34
-6
8

query I rowsort
SELECT DISTINCT + + cor0.col2 * 46 FROM tab0 AS cor0
----
1518
3772
46

query I rowsort
SELECT + col0 * 28 AS col1 FROM tab2 AS cor0
----
196
2184
2212

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3260
SELECT ALL col2 + - CAST( 86 AS SIGNED ) + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-3
-39
-58

skipif mysql # not compatible
query I rowsort label-3260
SELECT ALL col2 + - CAST ( 86 AS INTEGER ) + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-3
-39
-58

query I rowsort
SELECT + col2 + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - col2 + 0 * col2 + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - ( cor0.col1 ) ) + - col0 col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT col1 + + 50 * col0 * - col0 FROM tab1
----
-204790
-319987
-424

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3265
SELECT DISTINCT - col2 * + CAST( NULL AS DECIMAL ) * tab1.col0 + col0 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3265
SELECT DISTINCT - col2 * + CAST ( NULL AS REAL ) * tab1.col0 + col0 AS col0 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT col2 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3267
SELECT - 71 - - cor0.col0 * CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3267
SELECT - 71 - - cor0.col0 * CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 19 * col1 + + col1 AS col2 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT - col0 * - col1 + - ( cor0.col1 ) AS col2 FROM tab0 cor0
----
1978
3298
8008

query I rowsort
SELECT + cor0.col2 * col1 - col0 AS col2 FROM tab1 cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3271
SELECT - + col2 DIV - col1 - - 82 AS col0 FROM tab0 AS cor0
----
82
82
82

skipif mysql # not compatible
query I rowsort label-3271
SELECT - + col2 / - col1 - - 82 AS col0 FROM tab0 AS cor0
----
82
82
82

query I rowsort
SELECT DISTINCT + col2 * + col2 + col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3274
SELECT 39 DIV - col0 AS col1 FROM tab0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3274
SELECT 39 / - col0 AS col1 FROM tab0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3275
SELECT DISTINCT col2 DIV tab0.col1 - + tab0.col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3275
SELECT DISTINCT col2 / tab0.col1 - + tab0.col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + tab1.col1 - - col2 AS col1 FROM tab1
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3277
SELECT col2 * col2 + CAST( NULL AS SIGNED ) * + ( col2 ) + + col0 * - 77 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3277
SELECT col2 * col2 + CAST ( NULL AS INTEGER ) * + ( col2 ) + + col0 * - 77 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 - + col1 AS col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + col1 + + col0 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-3280
SELECT - 69 DIV cor0.col1 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-3280
SELECT - 69 / cor0.col1 FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT + col0 * tab1.col1 + 37 - + col1 FROM tab1
----
1064
667
89

query I rowsort
SELECT 68 + col0 FROM tab2
----
146
147
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-3283
SELECT DISTINCT + col1 * col2 DIV col2 + tab1.col1 FROM tab1
----
20
26
52

skipif mysql # not compatible
query I rowsort label-3283
SELECT DISTINCT + col1 * col2 / col2 + tab1.col1 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - col2 * col0 + col0 AS col1 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT col2 FROM tab0 WHERE NOT ( + col1 + col2 ) IN ( - col0 * - col0 + col2 )
----
1
33
82

query I rowsort
SELECT + col1 FROM tab1 WHERE ( NULL ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col1 + col1 + + col0 FROM tab0
----
196
229
271

query I rowsort
SELECT ALL col1 + col1 * tab0.col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT tab2.col0 * + tab2.col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL + col1 * + col2 + + col1 FROM tab2
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-3291
SELECT DISTINCT + tab1.col0 DIV col1 + - col0 FROM tab1
----
-3
-58
-74

skipif mysql # not compatible
query I rowsort label-3291
SELECT DISTINCT + tab1.col0 / col1 + - col0 FROM tab1
----
-3
-58
-74

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 WHERE NOT col1 NOT IN ( - col1 )
----

query I rowsort
SELECT DISTINCT tab0.col1 * - col2 * col0 + col0 FROM tab0
----
-3360
-664029
-68088

query I rowsort
SELECT DISTINCT tab1.col1 + + tab1.col2 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT + col1 * col2 - col2 * col0 FROM tab1
----
-3078
-6432
1242

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL >= col1 * - col0 + col1 * col2 - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3297
SELECT ALL - + col2 * col2 DIV col2 + - col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-3297
SELECT ALL - + col2 * col2 / col2 + - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + + 56 AS col1 FROM tab1 AS cor0
----
56
56
56

query I rowsort
SELECT ALL - col0 * cor0.col1 - 66 FROM tab0 cor0
----
-2130
-3461
-8165

query I rowsort
SELECT DISTINCT - - ( - col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 51 * - col1 FROM tab1
----
-1326
-510
-663

query I rowsort
SELECT + col2 * - col2 + 65 * + col1 FROM tab2 AS cor0
----
-339
1286
3159

query I rowsort
SELECT DISTINCT + 76 + + col1 AS col0 FROM tab0 AS cor0
----
162
167
173

query I rowsort
SELECT - col2 * col1 + - tab0.col2 AS col0 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT DISTINCT + tab2.col2 * + col0 + col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT - ( - col0 ) * 17 FROM tab1 AS cor0
----
1088
1360
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-3307
SELECT tab0.col1 DIV tab0.col0 + - tab0.col2 AS col0 FROM tab0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-3307
SELECT tab0.col1 / tab0.col0 + - tab0.col2 AS col0 FROM tab0
----
-30
-81
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3308
SELECT col0 DIV + col0 + tab2.col2 AS col0 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-3308
SELECT col0 / + col0 + tab2.col2 AS col0 FROM tab2
----
27
28
39

query I rowsort
SELECT ALL + col1 FROM tab0 WHERE NOT + col0 + col1 NOT IN ( + col2 / + col0 )
----

query I rowsort
SELECT col0 * + col2 * + col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL col1 * - tab1.col2 + tab1.col1 - - col0 * col1 AS col2 FROM tab1
----
-1300
-195
80

query I rowsort
SELECT - tab1.col2 * col2 * col0 AS col0 FROM tab1
----
-207936
-737280
-8748

query III rowsort
SELECT * FROM tab1 cor0 WHERE NULL NOT IN ( - col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 * cor0.col2 col0 FROM tab1 AS cor0 WHERE NULL BETWEEN col0 + + col0 AND NULL
----

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 AS cor0 WHERE col1 NOT IN ( col0 / - col2 + + col2 * col0 )
----
86
91
97

query I rowsort
SELECT col0 * + col1 + - col1 * - col2 AS col2 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT ALL col2 * col0 + col2 * + col0 * + col1 + col2 AS col1 FROM tab2 WHERE NULL < col0
----

query I rowsort
SELECT ALL + col0 + - col1 + - col2 AS col0 FROM tab2
----
-51
-7
24

query I rowsort
SELECT col0 * + col0 * col2 AS col2 FROM tab0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 + - col1 col2 FROM tab0
----
-194
-2924
-7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3321
SELECT ALL + col0 DIV + col2 + col0 AS col2 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-3321
SELECT ALL + col0 / + col2 + col0 AS col2 FROM tab1
----
3
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3322
SELECT DISTINCT - col2 * - col2 + col0 DIV - col1 AS col0 FROM tab0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-3322
SELECT DISTINCT - col2 * - col2 + col0 / - col1 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT + col1 FROM tab2 WHERE - col1 - - col1 * + col2 * col0 NOT IN ( - col0 )
----
17
31
59

query I rowsort
SELECT DISTINCT - col0 * col2 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col2 * + col0 * + col0 AS col0 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 * col1 col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT tab0.col2 * col1 + - col2 + - col1 * - col2 FROM tab0
----
14842
193
5643

onlyif mysql # use DIV operator for integer division
query I rowsort label-3328
SELECT ALL - 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-3328
SELECT ALL - col2 / tab2.col1 col0 FROM tab2
----
-2
0
0

query I rowsort
SELECT tab2.col1 + col0 + col1 FROM tab2
----
113
196
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-3330
SELECT - col0 * - tab1.col0 * - col0 + + col0 + + col2 DIV + col2 FROM tab1
----
-23
-262079
-511919

skipif mysql # not compatible
query I rowsort label-3330
SELECT - col0 * - tab1.col0 * - col0 + + col0 + + col2 / + col2 FROM tab1
----
-23
-262079
-511919

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( - col0 - col2 ) NOT IN ( col1 / col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT 70 + cor0.col2 + col1 AS col0 FROM tab0 AS cor0
----
168
189
243

onlyif mysql # use DIV operator for integer division
query I rowsort label-3333
SELECT - ( col2 ) * col1 + col1 DIV - cor0.col0 FROM tab1 AS cor0
----
-1248
-1412
-570

skipif mysql # not compatible
query I rowsort label-3333
SELECT - ( col2 ) * col1 + col1 / - cor0.col0 FROM tab1 AS cor0
----
-1248
-1412
-570

query I rowsort
SELECT + - cor0.col1 + - col2 - col1 FROM tab0 AS cor0
----
-195
-205
-264

query I rowsort
SELECT - + 67 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2983
-3316
-9283

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to b225d3765f33551c12574f545c8c91eb

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

query I rowsort
SELECT + 33 - + col0 * - 46 FROM tab2 cor0
----
355
3621
3667

query I rowsort
SELECT ( + col0 ) * col2 + + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + - 98 FROM tab1, tab0, tab0 AS cor0
----
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col1 + + col0 AS REAL ) col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT - ( col1 ) * col0 AS col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3343
SELECT ALL 43 DIV col1 col1 FROM tab1
----
1
3
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3343
SELECT ALL 43 / col1 col1 FROM tab1
----
1
3
4

query I rowsort
SELECT DISTINCT 57 * col1 * + col1 FROM tab0
----
421572
472017
536313

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 57 col0 FROM tab1
----
57
57
57

query I rowsort
SELECT - 23 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT + col2 * - cor0.col2 * 75 AS col0 FROM tab0 AS cor0
----
-504300
-75
-81675

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-3349
SELECT DISTINCT + 12 DIV col1 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-3349
SELECT DISTINCT + 12 / col1 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 + - col1 col1 FROM tab1
----
56
69
72

query I rowsort
SELECT ALL col0 * - col1 * col0 AS col2 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT ALL 45 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3353
SELECT ALL - + col1 * CAST( NULL AS SIGNED ) * - col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3353
SELECT ALL - + col1 * CAST ( NULL AS INTEGER ) * - col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 * 22 FROM tab0 cor0
----
1892
2002
2134

query I rowsort
SELECT + + col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3356
SELECT ALL - col2 * CAST( col1 AS SIGNED ) + col1 * - 11 AS col0 FROM tab1 cor0
----
-1391
-1690
-680

skipif mysql # not compatible
query I rowsort label-3356
SELECT ALL - col2 * CAST ( col1 AS INTEGER ) + col1 * - 11 AS col0 FROM tab1 cor0
----
-1391
-1690
-680

query I rowsort
SELECT + + col2 * ( col1 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col0 * col2 * - cor0.col2 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
26103
34
598354

query I rowsort
SELECT DISTINCT + col2 + + col1 * - ( col0 ) FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - cor0.col1 * + col0 + + 28 FROM tab2 AS cor0
----
-1315
-189
-4574

query I rowsort
SELECT - 81 * + ( col2 ) AS col0 FROM tab0
----
-2673
-6642
-81

query I rowsort
SELECT ALL 49 * col2 AS col2 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT ALL 48 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab0 AS cor0
----
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3365
SELECT ALL - - col1 DIV cor0.col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3365
SELECT ALL - - col1 / cor0.col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT col1 * + col2 * col0 - - col0 FROM tab0 AS cor0
----
3430
664207
68136

onlyif mysql # use DIV operator for integer division
query I rowsort label-3367
SELECT ALL col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3367
SELECT ALL col1 / cor0.col1 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT 17 AS col0 FROM tab2, tab0, tab1 AS cor0
----
17

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + ( col1 + col2 ) FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - 31 + col1 AS col0 FROM tab0
----
55
60
66

query I rowsort
SELECT ALL + tab2.col0 + tab2.col2 + col1 AS col0 FROM tab2
----
134
163
65

query I rowsort
SELECT DISTINCT - 63 + cor0.col0 AS col0 FROM tab1, tab2, tab2 cor0
----
-56
15
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3375
SELECT ALL + CAST( NULL AS SIGNED ) * col1 + col2 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3375
SELECT ALL + CAST ( NULL AS INTEGER ) * col1 + col2 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( col0 ) + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - 40 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT DISTINCT + - cor0.col0 * 94 AS col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT + col0 + + col0 * col2 FROM tab2 cor0
----
196
2106
3081

query I rowsort
SELECT ALL - 64 * col0 AS col1 FROM tab2 AS cor0
----
-448
-4992
-5056

onlyif mysql # use DIV operator for integer division
query I rowsort label-3381
SELECT - + col1 DIV col1 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3381
SELECT - + col1 / col1 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + ( + col2 ) * col0 + + col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - ( - col0 ) - + col2 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 66 + + col2 col2 FROM tab0 AS cor0
----
148
67
99

query I rowsort
SELECT - 35 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT + tab0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT 92 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
81 values hashing to cfcf012ce1a8dd60a7428b4ef6b95843

query I rowsort
SELECT - + col1 + + ( - col0 + + col0 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - ( cor0.col2 ) * - col0 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3390
SELECT CAST( NULL AS DECIMAL ) + + cor0.col1 + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3390
SELECT CAST ( NULL AS REAL ) + + cor0.col1 + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 74 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-22
17
20

query I rowsort
SELECT 28 AS col0 FROM tab1
----
28
28
28

query I rowsort
SELECT + 80 - - col2 AS col1 FROM tab1
----
134
137
176

query I rowsort
SELECT DISTINCT 88 - col2 FROM tab2
----
50
61
62

query I rowsort
SELECT DISTINCT + col1 - + tab2.col1 AS col0 FROM tab2
----
0

query I rowsort
SELECT + 79 * - col0 + col2 FROM tab1
----
-183
-4999
-6224

query I rowsort
SELECT ALL + col1 * - col0 * col1 + col2 * col2 FROM tab1
----
-3151
-4304
888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 * - col2 + col0 col1 FROM tab1 AS cor0
----
1893
2059
3440

query I rowsort
SELECT ALL + col1 * + 13 * cor0.col1 FROM tab0 AS cor0
----
107653
122317
96148

query I rowsort
SELECT DISTINCT ( col0 ) + + tab2.col0 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT - col1 + col2 * - col2 AS col2 FROM tab2
----
-1461
-735
-760

query I rowsort
SELECT DISTINCT + 77 * col0 * + col2 AS col0 FROM tab1 AS cor0
----
12474
280896
591360

query I rowsort
SELECT 29 AS col0 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT ALL - ( col1 ) * + ( - col2 ) * col0 + col0 FROM tab1 AS cor0
----
36544
4215
99920

onlyif mysql # use DIV operator for integer division
query I rowsort label-3405
SELECT + col1 DIV - col1 + - ( - cor0.col1 ) FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3405
SELECT + col1 / - col1 + - ( - cor0.col1 ) FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT col0 * col2 * col0 AS col0 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 + col1 + - col2 col0 FROM tab1 AS cor0
----
50
593
957

query I rowsort
SELECT - + col1 * + col1 * col0 - col0 FROM tab1 AS cor0
----
-13600
-2031
-6464

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) + + ( - col2 ) * col1 * ( + col0 ) FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT 56 * col2 + col2 + col0 AS col0 FROM tab1 AS cor0
----
3081
3313
5552

query I rowsort
SELECT DISTINCT + - col0 + + col1 * - col1 * - col0 FROM tab0 AS cor0
----
177480
329280
736920

query I rowsort
SELECT DISTINCT - - col0 + - col0 * - cor0.col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3413
SELECT + 67 + + col1 * CAST( - 92 AS SIGNED ) FROM tab1 cor0
----
-1129
-2325
-853

skipif mysql # not compatible
query I rowsort label-3413
SELECT + 67 + + col1 * CAST ( - 92 AS INTEGER ) FROM tab1 cor0
----
-1129
-2325
-853

query I rowsort
SELECT 78 + - col2 AS col2 FROM tab1 AS cor0
----
-18
21
24

query I rowsort
SELECT ALL + + ( - col2 ) * col1 * col1 AS col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT col0 - - col1 * ( + col2 ) * + col2 AS col0 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT DISTINCT - - col0 * col1 + + col0 * - col1 + + col1 * col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - 79 + col0 * - cor0.col0 FROM tab1 AS cor0
----
-4175
-6479
-88

query I rowsort
SELECT ALL 81 + - col1 * + col1 FROM tab1 AS cor0
----
-19
-595
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3420
SELECT DISTINCT - 12 * col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3420
SELECT DISTINCT - 12 * col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3421
SELECT + col1 DIV + col2 + col2 * + cor0.col1 * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif mysql # not compatible
query I rowsort label-3421
SELECT + col1 / + col2 + col2 * + cor0.col1 * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 59ca7c96f3955e014bebd08b5442edff

onlyif mysql # use DIV operator for integer division
query I rowsort label-3423
SELECT DISTINCT col0 * + 19 + + cor0.col0 DIV col1 AS col0 FROM tab2 AS cor0
----
133
1483
1505

skipif mysql # not compatible
query I rowsort label-3423
SELECT DISTINCT col0 * + 19 + + cor0.col0 / col1 AS col0 FROM tab2 AS cor0
----
133
1483
1505

query I rowsort
SELECT DISTINCT + - col0 - ( - ( col1 ) ) AS col2 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL cor0.col1 + ( + cor0.col0 ) AS col0 FROM tab0 cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3426
SELECT DISTINCT + + col0 DIV col1 + col0 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-3426
SELECT DISTINCT + + col0 / col1 + col0 FROM tab2 AS cor0
----
7
79
83

query I rowsort
SELECT ALL + col0 * 22 - - col2 FROM tab2 AS cor0
----
1742
1776
181

query I rowsort
SELECT ALL - col1 + col2 * ( col2 ) AS col0 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT ALL - ( + col0 ) * + col1 + + 42 + 18 AS col2 FROM tab1 AS cor0
----
-18
-580
-980

query I rowsort
SELECT ALL + col0 - + 52 FROM tab1 AS cor0
----
-49
12
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3431
SELECT DISTINCT - - 61 DIV col0 - - col1 AS col2 FROM tab0 cor0
----
88
91
98

skipif mysql # not compatible
query I rowsort label-3431
SELECT DISTINCT - - 61 / col0 - - col1 AS col2 FROM tab0 cor0
----
88
91
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-3433
SELECT ALL - - 0 + + 69 DIV col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3433
SELECT ALL - - 0 + + 69 / col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT + - 81 FROM tab1 AS cor0
----
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3435
SELECT DISTINCT + 34 + - 64 + col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3435
SELECT DISTINCT + 34 + - 64 + col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT + ( cor0.col0 ) + col0 AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT ALL + 36 + col0 * - cor0.col2 * col2 FROM tab1 AS cor0
----
-207900
-737244
-8712

query I rowsort
SELECT - col2 + ( col0 ) - col1 AS col1 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT col1 * + col2 + col0 * + col0 FROM tab2 AS cor0
----
6887
7618
886

query I rowsort
SELECT ALL col1 * + 49 AS col1 FROM tab2 AS cor0
----
1519
2891
833

onlyif mysql # use DIV operator for integer division
query I rowsort label-3441
SELECT DISTINCT - col2 DIV 6 AS col1 FROM tab2 cor0
----
-4
-6

skipif mysql # not compatible
query I rowsort label-3441
SELECT DISTINCT - col2 / 6 AS col1 FROM tab2 cor0
----
-4
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3442
SELECT - col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3442
SELECT - col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * 85 * - 66 + + col2 AS col0 FROM tab2 cor0
----
-39243
-437554
-443152

query I rowsort
SELECT col0 * + ( 61 ) AS col2 FROM tab2 AS cor0
----
427
4758
4819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col1 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + col2 + - col0 + + 85 FROM tab1
----
101
136
78

query I rowsort
SELECT col1 * - 71 AS col1 FROM tab1
----
-1846
-710
-923

query I rowsort
SELECT + col0 + + ( - ( - col0 ) ) FROM tab0
----
178
48
70

query I rowsort
SELECT DISTINCT - col2 * + col1 + + col2 FROM tab1
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-3450
SELECT ALL - cor0.col2 DIV - col0 AS col1 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3450
SELECT ALL - cor0.col2 / - col0 AS col1 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT DISTINCT col2 + - col0 * - col0 AS col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT DISTINCT col1 * + 50 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT - tab1.col0 * + 54 + + col1 AS col2 FROM tab1
----
-136
-3446
-4307

query I rowsort
SELECT DISTINCT ( 27 ) FROM tab0
----
27

query I rowsort
SELECT + ( - col0 ) + col2 * col0 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3456
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col1 * + cor0.col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3456
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col1 * + cor0.col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL ( 28 ) FROM tab1
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 + 73 col0 FROM tab1 AS cor0
----
155
155
155

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 + col1 ) col0 FROM tab1
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3460
SELECT - 66 * + cor0.col1 + + CAST( NULL AS SIGNED ) FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3460
SELECT - 66 * + cor0.col1 + + CAST ( NULL AS INTEGER ) FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT + 83 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1527
759
812

query I rowsort
SELECT ALL + + col0 * + col0 + col1 AS col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT + - 88 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
-88

query I rowsort
SELECT DISTINCT 26 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
26

query I rowsort
SELECT + - 5 * col1 AS col0 FROM tab0 AS cor0
----
-430
-455
-485

query I rowsort
SELECT - - col1 * - cor0.col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - + ( col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT + ( col0 ) + - col1 * + col1 FROM tab2 cor0
----
-210
-3403
-954

query I rowsort
SELECT ( 83 ) FROM tab2 cor0
----
83
83
83

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to fcae6e4467f798ac88c869b8e38c6b23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 74 * col1 col0 FROM tab1 AS cor0
----
-1924
-740
-962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - 57 col2 FROM tab1
----
-3078
-3249
-5472

query I rowsort
SELECT DISTINCT - 31 * col2 * col2 AS col0 FROM tab2
----
-20956
-22599
-44764

query I rowsort
SELECT + + col1 * - col0 + - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + col2 + + col0 + col1 * col2 * - col1 FROM tab1
----
-16048
-36447
-5579

query I rowsort
SELECT - 46 + cor1.col0 + cor0.col2 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d9fa2c8f9c29c9cf48f8251d736a6511

query I rowsort
SELECT ALL + cor0.col1 + col0 - + col1 * + cor0.col0 FROM tab0 AS cor0
----
-1954
-3263
-7919

query I rowsort
SELECT + - col0 * + col1 - col1 * + col2 FROM tab1 AS cor0
----
-1210
-1482
-2288

onlyif mysql # use DIV operator for integer division
query I rowsort label-3480
SELECT ALL - 98 + 38 DIV col1 FROM tab0 cor0
----
-98
-98
-98

skipif mysql # not compatible
query I rowsort label-3480
SELECT ALL - 98 + 38 / col1 FROM tab0 cor0
----
-98
-98
-98

query I rowsort
SELECT 30 + col0 * + col0 * col2 AS col2 FROM tab0 AS cor0
----
1255
19038
649552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3482
SELECT ALL - CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3482
SELECT ALL - CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col2 ) + col0 * 51 AS col2 FROM tab2 AS cor0
----
330
3952
3991

query I rowsort
SELECT ALL 22 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1958
528
770

query I rowsort
SELECT 45 + 72 * + col2 FROM tab0 AS cor0
----
117
2421
5949

query I rowsort
SELECT + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - ( + ( col0 ) ) + 48 * 21 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-1043
-33288
-82745

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 - col0 AS col1 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT col2 * 51 AS col2 FROM tab0 AS cor0
----
1683
4182
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-3490
SELECT col0 DIV CAST( col1 AS SIGNED ) + col1 * - col2 FROM tab2
----
-1533
-642
-837

skipif mysql # not compatible
query I rowsort label-3490
SELECT col0 / CAST ( col1 AS INTEGER ) + col1 * - col2 FROM tab2
----
-1533
-642
-837

query I rowsort
SELECT col1 * 40 AS col1 FROM tab2
----
1240
2360
680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3492
SELECT - - col2 DIV + cor0.col2 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3492
SELECT - - col2 / + cor0.col2 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + 52 * col2 AS col0 FROM tab2 cor0
----
1352
1404
1976

query I rowsort
SELECT DISTINCT + 64 AS col1 FROM tab0, tab0 AS cor0
----
64

query I rowsort
SELECT DISTINCT - 14 * tab0.col0 FROM tab0
----
-1246
-336
-490

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3496
SELECT DISTINCT + cor0.col1 + col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3496
SELECT DISTINCT + cor0.col1 + col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 45 * + col1 + 42 AS col1 FROM tab2 AS cor0
----
1437
2697
807

onlyif mysql # use DIV operator for integer division
query I rowsort label-3498
SELECT ALL + - 58 * col0 + ( - col1 ) DIV col0 AS col2 FROM tab2 AS cor0
----
-410
-4524
-4582

skipif mysql # not compatible
query I rowsort label-3498
SELECT ALL + - 58 * col0 + ( - col1 ) / col0 AS col2 FROM tab2 AS cor0
----
-410
-4524
-4582

query I rowsort
SELECT ALL col1 * col0 * ( 70 ) FROM tab2 AS cor0
----
15190
322140
94010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3500
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3500
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT col0 * 77 AS col2 FROM tab2
----
539
6006
6083

onlyif mysql # use DIV operator for integer division
query I rowsort label-3502
SELECT DISTINCT - + col1 * + ( ( + cor0.col0 ) ) + ( + col0 ) * col1 DIV col0 AS col0 FROM tab1 cor0
----
-1027
-52
-630

skipif mysql # not compatible
query I rowsort label-3502
SELECT DISTINCT - + col1 * + ( ( + cor0.col0 ) ) + ( + col0 ) * col1 / col0 AS col0 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL - ( col2 + + tab1.col1 ) FROM tab1
----
-109
-67
-80

query I rowsort
SELECT ALL + 79 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT DISTINCT + col0 + + cor0.col0 + 73 FROM tab1 AS cor0
----
201
233
79

query I rowsort
SELECT col0 + - 39 AS col0 FROM tab0 cor0
----
-15
-4
50

query I rowsort
SELECT DISTINCT + + col2 * - col0 + + cor0.col2 + col0 FROM tab1 AS cor0
----
-105
-3527
-7504

onlyif mysql # use DIV operator for integer division
query I rowsort label-3508
SELECT + ( col1 ) + - tab2.col1 DIV - col1 AS col2 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-3508
SELECT + ( col1 ) + - tab2.col1 / - col1 AS col2 FROM tab2
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-3509
SELECT ALL col1 DIV + 4 - col0 FROM tab1
----
-62
-77
3

skipif mysql # not compatible
query I rowsort label-3509
SELECT ALL col1 / + 4 - col0 FROM tab1
----
-62
-77
3

query I rowsort
SELECT DISTINCT + cor0.col2 * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL col2 + - 68 * col1 FROM tab1 AS cor0
----
-1714
-623
-788

query I rowsort
SELECT - col1 * col1 + + col2 * + col2 FROM tab2 cor0
----
-232
-2805
1155

query I rowsort
SELECT ALL - col1 * + 54 AS col2 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT col0 + - ( - col1 ) FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * + col0 col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + - col1 + cor0.col1 * ( - col1 ) FROM tab2 cor0
----
-306
-3540
-992

query I rowsort
SELECT DISTINCT + - col2 * 68 FROM tab0 AS cor0
----
-2244
-5576
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - + cor0.col0 col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col2 * col2 + + col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT - 36 FROM tab0, tab2 AS cor0
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

query I rowsort
SELECT - + cor0.col1 + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * - col2 + - col1 AS col2 FROM tab1 AS cor0
----
-188
-3658
-7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-3523
SELECT DISTINCT col0 + + col1 DIV - col0 + + 82 AS col0 FROM tab1
----
146
162
77

skipif mysql # not compatible
query I rowsort label-3523
SELECT DISTINCT col0 + + col1 / - col0 + + 82 AS col0 FROM tab1
----
146
162
77

query I rowsort
SELECT DISTINCT 17 + + col2 * 37 FROM tab0 AS cor0
----
1238
3051
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 34 col2 FROM tab2 AS cor0
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 * col2 col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + 67 * - tab1.col0 + ( col0 * col2 ) AS col0 FROM tab1
----
-39
-640
2320

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1, tab1 cor2
----
3645 values hashing to bce5cbf48f4a41569415c085ae91ae7c

query I rowsort
SELECT DISTINCT - - col0 * - col1 * col1 AS col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + - col2 + 29 * - col2 FROM tab0 AS cor0
----
-2460
-30
-990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 59 col0 FROM tab1 AS cor0
----
-177
-3776
-4720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3532
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * col2 * + col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3532
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * col2 * + col2 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + ( - 44 ) + + col0 * 93 AS col1 FROM tab2 AS cor0
----
607
7210
7303

query I rowsort
SELECT DISTINCT - - cor0.col2 * 89 FROM tab1 AS cor0
----
4806
5073
8544

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT ALL + + col0 DIV 68 AS col1 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3535
SELECT ALL + + col0 / 68 AS col1 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT cor0.col1 + col2 * col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - - 6 * - col2 * col0 FROM tab2 AS cor0
----
-1134
-12168
-18012

query I rowsort
SELECT - 73 * - col2 FROM tab0 AS cor0
----
2409
5986
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3539
SELECT DISTINCT - - col0 DIV col0 col0 FROM tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3539
SELECT DISTINCT - - col0 / col0 col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - col1 * - ( col0 ) AS col2 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 31 * 30 col1 FROM tab2 AS cor0
----
930
930
930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3542
SELECT - + CAST( NULL AS SIGNED ) + - col0 * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3542
SELECT - + CAST ( NULL AS INTEGER ) + - col0 * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 35 + + cor0.col1 * + cor0.col2 FROM tab0 AS cor0
----
132
2873
7497

query I rowsort
SELECT + + col0 - col2 AS col1 FROM tab1 cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 + col0 col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - ( + col0 ) * + col0 + 45 FROM tab0
----
-1180
-531
-7876

query I rowsort
SELECT ALL col1 + col0 * + 56 FROM tab2
----
423
4427
4441

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3548
SELECT ALL + col2 * + CAST( - col1 * col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif mysql # not compatible
query I rowsort label-3548
SELECT ALL + col2 * + CAST ( - col1 * col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col0 + - tab2.col2 * + ( 93 * + col1 ) FROM tab2
----
-142584
-59999
-77834

query I rowsort
SELECT + col0 + + tab2.col2 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT tab2.col0 * + col0 FROM tab2
----
49
6084
6241

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab0 AS cor0, tab2 cor1
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

query I rowsort
SELECT - col2 * + 65 FROM tab2 AS cor0
----
-1690
-1755
-2470

query I rowsort
SELECT ALL + col1 * - col1 FROM tab1 cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 col0 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL col2 + cor0.col2 * - col1 + - col1 FROM tab1 AS cor0
----
-1165
-1376
-523

query I rowsort
SELECT col1 + col0 * col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT + 22 AS col0 FROM tab1 AS cor0
----
22
22
22

query I rowsort
SELECT col0 * 92 * col0 + col1 FROM tab1 AS cor0
----
376842
588813
854

query I rowsort
SELECT col2 * - ( + col1 * col2 ) AS col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT + ( col0 ) + + col2 AS col0 FROM tab2 cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 + - 64 col2 FROM tab0, tab2, tab2 AS cor0
----
22
27
33

query I rowsort
SELECT ALL col2 * 64 FROM tab2
----
1664
1728
2432

query I rowsort
SELECT + + 42 + 66 FROM tab1 cor0
----
108
108
108

query I rowsort
SELECT + 37 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT + ( col1 ) * + col2 * cor0.col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + ( - tab2.col0 ) FROM tab2, tab0 AS cor0, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT cor0.col0 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - cor0.col2 - col2 AS col1 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT - col2 * + cor0.col0 + col2 + - col1 FROM tab1 AS cor0
----
-134
-3601
-7597

query I rowsort
SELECT DISTINCT - 51 AS col2 FROM tab0 AS cor0
----
-51

query I rowsort
SELECT ALL + col1 + col1 + - col1 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col0 + 57 * - col2 AS col0 FROM tab0 AS cor0
----
-1857
-22
-4585

query I rowsort
SELECT cor0.col0 * col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-3575
SELECT ALL + 84 DIV - col0 + - CAST( - ( - col1 ) AS SIGNED ) AS col1 FROM tab1
----
-11
-14
-54

skipif mysql # not compatible
query I rowsort label-3575
SELECT ALL + 84 / - col0 + - CAST ( - ( - col1 ) AS INTEGER ) AS col1 FROM tab1
----
-11
-14
-54

query I rowsort
SELECT + 93 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT + col0 * 17 AS col1 FROM tab2 AS cor0
----
119
1326
1343

query I rowsort
SELECT - + col0 + + col2 * + col0 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + col1 + 97 FROM tab1 AS cor0
----
107
110
123

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - col2 - + col1 col0 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT 28 * col1 + + col1 * - col1 * col2 FROM tab2
----
-10506
-25079
-88854

query I rowsort
SELECT DISTINCT + 92 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
92

query I rowsort
SELECT + 25 + + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b7162c6ab679d43703aa6aaf202a162b

query I rowsort
SELECT - - 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 cor0.col2 + ( + ( col1 ) ) col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + - col2 + + col2 * col1 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL - col1 * - col2 + - tab2.col1 AS col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT DISTINCT col2 + col2 - - 67 AS col2 FROM tab2 AS cor0
----
119
121
143

query I rowsort
SELECT ALL + col2 + col2 * col1 AS col2 FROM tab2 cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-3590
SELECT DISTINCT + col1 DIV - ( + col2 ) + col0 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-3590
SELECT DISTINCT + col1 / - ( + col2 ) + col0 FROM tab0 AS cor0
----
-62
22
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3591
SELECT ALL col1 * CAST( NULL AS SIGNED ) + col1 * cor0.col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3591
SELECT ALL col1 * CAST ( NULL AS INTEGER ) + col1 * cor0.col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * 7 + + col1 AS col2 FROM tab0 AS cor0
----
-145
-483
90

query I rowsort
SELECT ALL - cor0.col1 + ( col0 ) FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL 30 AS col2 FROM tab0
----
30
30
30

query I rowsort
SELECT ALL + col0 + 32 AS col1 FROM tab1
----
112
35
96

query I rowsort
SELECT ALL 38 * col1 + + tab1.col2 FROM tab1
----
1042
437
590

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3597
SELECT - CAST( - cor0.col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3597
SELECT - CAST ( - cor0.col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3598
SELECT - CAST( + col2 AS SIGNED ) col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3598
SELECT - CAST ( + col2 AS INTEGER ) col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col1 * 56 FROM tab1 AS cor0
----
1456
560
728

query I rowsort
SELECT ALL - 30 * - cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 9693f5ea9151a0c78bc109319136ccd6

query I rowsort
SELECT col2 + - 37 FROM tab1 AS cor0
----
17
20
59

query I rowsort
SELECT DISTINCT - - 25 * - col0 + + 86 AS col2 FROM tab2 AS cor0
----
-1864
-1889
-89

query I rowsort
SELECT ALL - + ( cor0.col1 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col1 * col0 + col2 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL col2 * cor0.col1 - - col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + - ( cor0.col2 ) * - col2 AS col0 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT ( ( - col1 ) + - col2 ) AS col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL + 39 + + tab0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 5b8bfbf30c842116d4cc107054e5f865

query I rowsort
SELECT ALL + col0 - + col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL col2 * + col0 + 34 * + ( - col2 ) + col1 * col0 * col0 AS col1 FROM tab1 AS cor0
----
-1440
42670
87616

query I rowsort
SELECT ALL - 20 FROM tab2 AS cor0
----
-20
-20
-20

query I rowsort
SELECT + 85 * + col0 AS col0 FROM tab1 cor0
----
255
5440
6800

query I rowsort
SELECT DISTINCT - 1 * + col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT 53 * - cor0.col2 + + col2 FROM tab0 AS cor0
----
-1716
-4264
-52

query I rowsort
SELECT DISTINCT - + col2 + col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + + ( cor0.col0 ) * + col0 AS col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT + 16 FROM tab1 cor0
----
16
16
16

query I rowsort
SELECT ALL - + col1 + + cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - col1 * 55 - - col0 AS col2 FROM tab1 AS cor0
----
-1427
-486
-635

query I rowsort
SELECT DISTINCT col1 + + 64 FROM tab1 AS cor0
----
74
77
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3621
SELECT - 0 + - tab1.col2 DIV - col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3621
SELECT - 0 + - tab1.col2 / - col2 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 col0 FROM tab2, tab1, tab1 AS cor0
----
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + col0 + col0 * + 44 FROM tab0
----
1080
1575
4005

query I rowsort
SELECT - 42 + - col0 AS col0 FROM tab2 AS cor0
----
-120
-121
-49

query I rowsort
SELECT ALL - + 44 * + col0 * col2 FROM tab2 AS cor0
----
-132088
-8316
-89232

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3627
SELECT ALL - + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3627
SELECT ALL - + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - 34 + - col0 FROM tab2 AS cor0
----
1047
1928
499

query I rowsort
SELECT - - col0 * + 2 - col0 * + 18 AS col2 FROM tab1 AS cor0
----
-1024
-1280
-48

query I rowsort
SELECT DISTINCT + col0 + - 92 * col1 AS col1 FROM tab1 cor0
----
-1116
-2389
-856

onlyif mysql # use DIV operator for integer division
query I rowsort label-3631
SELECT ALL - CAST( col0 AS SIGNED ) DIV col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3631
SELECT ALL - CAST ( col0 AS INTEGER ) / col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col2 * col2 * + col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT - cor0.col1 + cor0.col0 * - col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL + ( - col2 ) + col2 * col2 * - col2 AS col2 FROM tab0 cor0
----
-2
-35970
-551450

query I rowsort
SELECT DISTINCT col1 - + 58 FROM tab2
----
-27
-41
1

query I rowsort
SELECT + tab0.col2 * + col0 FROM tab0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3637
SELECT col0 + + CAST( col1 * - col2 AS SIGNED ) AS col1 FROM tab2
----
-1456
-567
-830

skipif mysql # not compatible
query I rowsort label-3637
SELECT col0 + + CAST ( col1 * - col2 AS INTEGER ) AS col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT + col2 - + col2 FROM tab0
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-16
-61
-77
0
16
61
77

query I rowsort
SELECT DISTINCT ( - col0 ) * + col0 + col1 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT + + col2 + - col0 * - col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT - col0 * - col2 + - col0 * - 66 FROM tab1 AS cor0
----
12960
360
7872

query I rowsort
SELECT ALL - - 12 + + col0 * col0 FROM tab0 AS cor0
----
1237
588
7933

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3644
SELECT - CAST( NULL AS SIGNED ) * cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3644
SELECT - CAST ( NULL AS INTEGER ) * cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 56 AS col2 FROM tab0 AS cor0
----
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3646
SELECT - CAST( NULL AS SIGNED ) * - 81 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3646
SELECT - CAST ( NULL AS INTEGER ) * - 81 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * + col0 + col0 AS col1 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + 1 * col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - + 51 * col1 AS col1 FROM tab0 cor0
----
-4386
-4641
-4947

query I rowsort
SELECT ALL - col0 * col2 + col1 FROM tab0
----
-706
-7207
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3651
SELECT + col2 + - col1 DIV tab1.col0 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-3651
SELECT + col2 + - col1 / tab1.col0 FROM tab1
----
46
57
96

query I rowsort
SELECT ALL + col0 * - col2 + col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT + col1 + - col1 * + col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + col2 + col0 * + col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - col0 - - col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3656
SELECT ALL col1 DIV col1 - col2 AS col1 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-3656
SELECT ALL col1 / col1 - col2 AS col1 FROM tab2
----
-25
-26
-37

query I rowsort
SELECT DISTINCT col1 - col0 * - col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + tab0.col0 + - tab0.col2 * - tab0.col1 FROM tab0
----
132
2862
7551

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col0 > ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3660
SELECT + col2 + + col2 DIV - col0 + col0 col2 FROM tab0
----
171
36
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3660
SELECT + col2 + + col2 / - col0 + col0 col2 FROM tab0
----
171
36
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-3661
SELECT col2 + col2 DIV col2 AS col1 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-3661
SELECT col2 + col2 / col2 AS col1 FROM tab1
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 + + col1 col2 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col2 + col1 col1 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ALL - col2 AS col1 FROM tab1 WHERE NOT NULL <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3665
SELECT DISTINCT + col2 DIV col1 - col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3665
SELECT DISTINCT + col2 / col1 - col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + col2 * tab0.col1 AS col1 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3667
SELECT ALL + col2 DIV - col0 - col0 * col2 FROM tab0
----
-35
-7298
-793

skipif mysql # not compatible
query I rowsort label-3667
SELECT ALL + col2 / - col0 - col0 * col2 FROM tab0
----
-35
-7298
-793

query I rowsort
SELECT ALL col0 - - cor0.col0 AS col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT - col1 * col1 + + col2 AS col0 FROM tab1 cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT col1 + col2 * + col0 AS col0 FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 + - col2 * + col1 col2 FROM tab1 AS cor0
----
-1210
-1482
-2288

query I rowsort
SELECT ALL col1 + - cor0.col1 - + col1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col0 * - col2 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 * tab1.col1 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1 WHERE ( - col1 + + col2 ) < NULL
----

query I rowsort
SELECT - col2 * col2 + col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-2609
-2838
-8176

onlyif mysql # use DIV operator for integer division
query I rowsort label-3677
SELECT + col2 + col1 - cor0.col0 DIV col0 AS col2 FROM tab0 AS cor0
----
118
172
97

skipif mysql # not compatible
query I rowsort label-3677
SELECT + col2 + col1 - cor0.col0 / col0 AS col2 FROM tab0 AS cor0
----
118
172
97

query I rowsort
SELECT + col1 + - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * + col2 col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - col2 * + col1 * + col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT ( - col1 ) IN ( + col2 * - col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL + cor0.col0 * + col2 FROM tab0 AS cor0 WHERE NOT ( NULL ) < + col2
----

query III rowsort
SELECT * FROM tab2 cor0 WHERE ( + col1 + + col2 ) BETWEEN NULL AND + col1
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT BETWEEN - col0 * col0 AND col0 * + col1
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL <= ( NULL )
----

query I rowsort
SELECT + tab2.col2 + - tab2.col0 * - col0 AS col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT col1 + + ( col1 + col2 ) AS col2 FROM tab0 AS cor0
----
195
205
264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3688
SELECT - col0 + CAST( NULL AS SIGNED ) * - ( + col2 ) * col0 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-3688
SELECT - col0 + CAST ( NULL AS INTEGER ) * - ( + col2 ) * col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + cor0.col1 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT - - col0 - 90 * + 11 AS col1 FROM tab0 AS cor0
----
-901
-955
-966

query I rowsort
SELECT + 4 * col0 FROM tab1
----
12
256
320

query I rowsort
SELECT ALL + 13 AS col2 FROM tab0
----
13
13
13

query I rowsort
SELECT col2 * - 31 + - col1 * col1 AS col0 FROM tab1 AS cor0
----
-1867
-2350
-3145

query I rowsort
SELECT ALL + - col0 * ( + 94 ) FROM tab2 cor0
----
-658
-7332
-7426

onlyif mysql # use DIV operator for integer division
query I rowsort label-3695
SELECT col1 DIV + col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3695
SELECT col1 / + col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT cor0.col2 * - 65 * - col0 FROM tab1 AS cor0
----
10530
237120
499200

onlyif mysql # use DIV operator for integer division
query I rowsort label-3697
SELECT + + col1 + + 29 - + col0 DIV col1 FROM tab0 AS cor0
----
115
120
126

skipif mysql # not compatible
query I rowsort label-3697
SELECT + + col1 + + 29 - + col0 / col1 FROM tab0 AS cor0
----
115
120
126

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3698
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 / col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3698
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 / col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col1 FROM tab2 AS cor0
----
-82

query I rowsort
SELECT ALL - cor0.col1 + col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT - 55 FROM tab0, tab0 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT 30 FROM tab1, tab2 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3703
SELECT + - col0 DIV + col1 FROM tab1 cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-3703
SELECT + - col0 / + col1 FROM tab1 cor0
----
-6
-6
0

query I rowsort
SELECT ALL - col0 + - col1 AS col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT - cor0.col0 * + col0 * - col0 AS col1 FROM tab2 AS cor0
----
343
474552
493039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col0 col1 FROM tab0
----
178
48
70

query I rowsort
SELECT tab0.col1 * + col2 * col0 FROM tab0 WHERE NOT NULL > - col1
----

query I rowsort
SELECT DISTINCT - col0 + - col0 * + col0 AS col0 FROM tab2
----
-56
-6162
-6320

query I rowsort
SELECT DISTINCT - col2 + col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT - 45 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab0 cor0, tab1 AS cor1
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT ( - col1 * + col1 ) AS col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT 83 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT + 68 * col0 AS col2 FROM tab1 AS cor0
----
204
4352
5440

onlyif mysql # use DIV operator for integer division
query I rowsort label-3716
SELECT - 32 DIV col2 FROM tab0 AS cor0
----
-32
0
0

skipif mysql # not compatible
query I rowsort label-3716
SELECT - 32 / col2 FROM tab0 AS cor0
----
-32
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3717
SELECT col0 DIV + ( col0 * col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3717
SELECT col0 / + ( col0 * col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col1 * 90 * + col1 AS col1 FROM tab0 AS cor0
----
665640
745290
846810

query I rowsort
SELECT DISTINCT - ( 92 ) AS col1 FROM tab1 AS cor0
----
-92

query I rowsort
SELECT ALL + + ( - cor0.col1 ) * cor0.col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT 87 FROM tab2 AS cor0
----
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-3722
SELECT ( col0 ) * col0 DIV col2 FROM tab1 AS cor0
----
0
66
71

skipif mysql # not compatible
query I rowsort label-3722
SELECT ( col0 ) * col0 / col2 FROM tab1 AS cor0
----
0
66
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3723
SELECT + col2 * 18 DIV - col0 AS col1 FROM tab2 AS cor0
----
-6
-69
-8

skipif mysql # not compatible
query I rowsort label-3723
SELECT + col2 * 18 / - col0 AS col1 FROM tab2 AS cor0
----
-6
-69
-8

query I rowsort
SELECT ALL 87 FROM tab2, tab0 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3725
SELECT DISTINCT + col2 + CAST( + col2 AS SIGNED ) * + col0 + col0 * col0 FROM tab0
----
1261
1401
15301

skipif mysql # not compatible
query I rowsort label-3725
SELECT DISTINCT + col2 + CAST ( + col2 AS INTEGER ) * + col0 + col0 * col0 FROM tab0
----
1261
1401
15301

query I rowsort
SELECT DISTINCT col2 + + tab1.col2 + col1 * - col1 FROM tab1
----
-568
14
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 - col1 col2 FROM tab0
----
-76
-81
-87

query I rowsort
SELECT DISTINCT - 4 * tab0.col1 FROM tab0
----
-344
-364
-388

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT 54 - col2 AS col0 FROM tab2
----
16
27
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col2 col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - 72 * + 32 + - col0 AS col2 FROM tab2 AS cor0
----
-2311
-2382
-2383

query I rowsort
SELECT 89 + col0 AS col2 FROM tab2
----
167
168
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3734
SELECT DISTINCT - col0 DIV + 45 AS col2 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-3734
SELECT DISTINCT - col0 / + 45 AS col2 FROM tab1
----
-1
0

query I rowsort
SELECT ALL 6 * + tab2.col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to f293fb31cc171abeef4b8f6e790a6ab0

query I rowsort
SELECT DISTINCT - 40 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-40

query I rowsort
SELECT 9 * - col1 + col0 * cor0.col0 FROM tab1 AS cor0
----
-225
4006
6283

query I rowsort
SELECT + - col2 * cor0.col1 + 11 * - col0 AS col1 FROM tab2 AS cor0
----
-1515
-2392
-914

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3740
SELECT DISTINCT col0 DIV col0 + col2 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-3740
SELECT DISTINCT col0 / col0 + col2 FROM tab2
----
27
28
39

query I rowsort
SELECT DISTINCT + tab0.col1 + col0 * 17 AS col1 FROM tab0
----
1604
494
692

query I rowsort
SELECT + col2 + - col2 * + cor0.col0 AS col0 FROM tab1 cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 73 col0 FROM tab2 cor0
----
151
152
80

query I rowsort
SELECT - + col1 + ( - col1 ) + + col0 FROM tab2 cor0
----
-40
-55
45

query I rowsort
SELECT DISTINCT - col2 + + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT cor0.col1 + + cor0.col2 + - col2 * col1 * + cor0.col0 FROM tab1 AS cor0
----
-36413
-4132
-99731

query I rowsort
SELECT + + col2 + 13 * col1 AS col0 FROM tab1 AS cor0
----
187
265
392

query I rowsort
SELECT DISTINCT - + col0 * col0 + col1 * + col2 FROM tab1 AS cor0
----
-3526
-5152
1395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + ( col1 + - col0 ) col2 FROM tab2
----
-45
40
55

query I rowsort
SELECT - 1 FROM tab2, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1, tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - col1 * + ( - col1 ) + - col0 AS col0 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT ALL + cor0.col0 + - 52 AS col2 FROM tab0 AS cor0
----
-17
-28
37

query I rowsort
SELECT DISTINCT + + 66 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
66

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col1 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col0 - + cor0.col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3758
SELECT + col2 + CAST( NULL AS SIGNED ) * + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3758
SELECT + col2 + CAST ( NULL AS INTEGER ) * + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * ( + col0 + + col0 ) * - col1 FROM tab1 AS cor0
----
-199680
-72960
-8424

query I rowsort
SELECT + - 15 AS col1 FROM tab1 cor0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT + col1 + col0 * col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - - 90 * - 61 FROM tab1 AS cor0
----
-5490
-5490
-5490

query I rowsort
SELECT ALL + - 22 + - col0 AS col2 FROM tab1 AS cor0
----
-102
-25
-86

query I rowsort
SELECT ALL + col0 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col0 + + 70 FROM tab2 cor0
----
148
149
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( + cor0.col1 ) * col2 - - col1 * - 49 col0 FROM tab0 AS cor0
----
-1376
-4656
3003

query I rowsort
SELECT ALL 92 * cor0.col2 FROM tab0 cor0
----
3036
7544
92

query I rowsort
SELECT - - ( col1 ) * + col0 + ( ( col0 ) ) * + 55 FROM tab2 AS cor0
----
5688
602
8892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 37 + - ( col1 + col2 ) col0 FROM tab1 AS cor0
----
-30
-43
-72

query I rowsort
SELECT ALL - - 63 FROM tab2 AS cor0
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col1 col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + col0 * - 61 + col0 FROM tab2
----
-420
-4680
-4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + 1 col1 FROM tab0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - ( + 37 ) FROM tab1 AS cor0
----
-37

query I rowsort
SELECT ALL ( + col0 ) + + col0 * 80 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT ALL - + col2 * - col0 + col1 * cor0.col2 + + col1 FROM tab2 cor0
----
1057
3621
3665

query I rowsort
SELECT col2 + - ( + tab2.col0 ) FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT + 97 + + col1 AS col2 FROM tab2 AS cor0
----
114
128
156

query I rowsort
SELECT - - 49 + + col2 AS col1 FROM tab2 AS cor0
----
75
76
87

query I rowsort
SELECT DISTINCT + col1 + col0 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - ( + col0 ) AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - + col1 - cor0.col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT 1 + col0 FROM tab2 AS cor0
----
79
8
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3785
SELECT DISTINCT 14 + col0 DIV ( col2 ) FROM tab1 AS cor0
----
14
15

skipif mysql # not compatible
query I rowsort label-3785
SELECT DISTINCT 14 + col0 / ( col2 ) FROM tab1 AS cor0
----
14
15

query I rowsort
SELECT + col1 * + col2 + + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col1 * col1 + - col2 - - col2 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3788
SELECT DISTINCT col2 DIV + col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3788
SELECT DISTINCT col2 / + col1 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT ALL + 67 AS col2 FROM tab2 AS cor0
----
67
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3790
SELECT - col2 DIV + col1 col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3790
SELECT - col2 / + col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + tab2.col1 * col1 AS col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL 12 AS col2 FROM tab2
----
12
12
12

query I rowsort
SELECT - 87 * col1 + 71 AS col2 FROM tab0 AS cor0
----
-7411
-7846
-8368

query I rowsort
SELECT ALL - ( cor0.col2 ) * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + col1 + - col2 * col1 * col0 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT DISTINCT + 65 - col2 FROM tab2
----
27
38
39

query I rowsort
SELECT + + col1 + - 43 AS col2 FROM tab1 cor0
----
-17
-30
-33

query I rowsort
SELECT ALL + + col0 * ( col2 ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3799
SELECT col1 + CAST( 76 AS SIGNED ) FROM tab0 AS cor0
----
162
167
173

skipif mysql # not compatible
query I rowsort label-3799
SELECT col1 + CAST ( 76 AS INTEGER ) FROM tab0 AS cor0
----
162
167
173

query I rowsort
SELECT DISTINCT col0 * + 7 - + col1 AS col1 FROM tab1 AS cor0
----
-5
438
547

query I rowsort
SELECT DISTINCT col0 * + col2 - - 22 * - col0 AS col2 FROM tab0 AS cor0
----
-735
264
5340

query I rowsort
SELECT ALL - col2 * ( - col2 ) AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - col1 + col0 * - col0 * 26 + tab2.col2 FROM tab2
----
-1278
-158217
-162245

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3804
SELECT - CAST( col0 + tab0.col0 AS SIGNED ) AS col0 FROM tab0
----
-178
-48
-70

skipif mysql # not compatible
query I rowsort label-3804
SELECT - CAST ( col0 + tab0.col0 AS INTEGER ) AS col0 FROM tab0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3805
SELECT ALL - 7 * + 12 + - col0 DIV + tab0.col0 AS col2 FROM tab0
----
-85
-85
-85

skipif mysql # not compatible
query I rowsort label-3805
SELECT ALL - 7 * + 12 + - col0 / + tab0.col0 AS col2 FROM tab0
----
-85
-85
-85

query I rowsort
SELECT - ( - col1 ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3807
SELECT + col0 * col0 * + ( col1 ) + cor0.col2 + - ( + col1 + cor0.col2 ) DIV col1 FROM tab2 AS cor0
----
106132
1545
358981

skipif mysql # not compatible
query I rowsort label-3807
SELECT + col0 * col0 * + ( col1 ) + cor0.col2 + - ( + col1 + cor0.col2 ) / col1 FROM tab2 AS cor0
----
106132
1545
358981

query I rowsort
SELECT + 98 FROM tab1 cor0
----
98
98
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3809
SELECT ALL col1 DIV + col1 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3809
SELECT ALL col1 / + col1 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT - 99 * + col0 FROM tab1
----
-297
-6336
-7920

query I rowsort
SELECT DISTINCT cor1.col2 AS col1 FROM tab2, tab1 AS cor0, tab1 cor1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3812
SELECT DISTINCT - col2 + + cor0.col2 DIV + cor0.col1 + col2 * - cor0.col1 AS col0 FROM tab2 cor0
----
-1560
-682
-864

skipif mysql # not compatible
query I rowsort label-3812
SELECT DISTINCT - col2 + + cor0.col2 / + cor0.col1 + col2 * - cor0.col1 AS col0 FROM tab2 cor0
----
-1560
-682
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 92 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
92

query I rowsort
SELECT - col1 + col1 * 10 + col1 AS col1 FROM tab2 AS cor0
----
170
310
590

onlyif mysql # use DIV operator for integer division
query I rowsort label-3815
SELECT 93 * col2 + - 78 DIV col0 FROM tab0 AS cor0
----
3066
7626
91

skipif mysql # not compatible
query I rowsort label-3815
SELECT 93 * col2 + - 78 / col0 FROM tab0 AS cor0
----
3066
7626
91

query I rowsort
SELECT + 23 + - col0 AS col1 FROM tab1 cor0
----
-41
-57
20

query I rowsort
SELECT ALL - ( + col1 ) + + 64 AS col1 FROM tab2 AS cor0
----
33
47
5

query I rowsort
SELECT ALL + 74 + col2 + col2 FROM tab2 AS cor0
----
126
128
150

query I rowsort
SELECT - col1 * col0 + col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT + 58 AS col2 FROM tab1, tab2 AS cor0
----
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3821
SELECT CAST( NULL AS SIGNED ) + tab2.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3821
SELECT CAST ( NULL AS INTEGER ) + tab2.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + 88 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT - col1 * - ( col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - cor0.col2 * 89 + + 7 AS col1 FROM tab1 AS cor0
----
-4799
-5066
-8537

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 * col0 * - col0 col1 FROM tab1 cor0
----
-1
-262134
-511987

query I rowsort
SELECT DISTINCT - cor0.col0 + + 55 AS col2 FROM tab0 cor0
----
-34
20
31

query I rowsort
SELECT DISTINCT - col1 * 53 + col0 AS col1 FROM tab1 AS cor0
----
-1375
-466
-609

query I rowsort
SELECT ALL - - col0 * - ( cor0.col1 + + col1 ) * col1 FROM tab1 AS cor0
----
-12800
-27040
-4056

query I rowsort
SELECT DISTINCT + col1 + 12 AS col0 FROM tab2 cor0
----
29
43
71

query I rowsort
SELECT ALL 87 * 56 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 9832ee466987d89a8e9edc9e3dec95fc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - 90 col0 FROM tab2 AS cor0
----
2340
2430
3420

query I rowsort
SELECT ALL - col2 * 51 AS col0 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT ALL + col2 * col0 * col2 AS col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL + - ( col0 ) * - cor0.col2 + - 94 * 74 AS col2 FROM tab0 AS cor0
----
-6164
-6921
342

query I rowsort
SELECT 94 * cor0.col1 - + col2 AS col0 FROM tab2 AS cor0
----
1560
2887
5520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3836
SELECT ALL - 87 + col0 * + col1 + - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3836
SELECT ALL - 87 + col0 * + col1 + - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col1 + - col1 * + col1 AS col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 - col0 * 7 AS col1 FROM tab2 AS cor0
----
-1010
-4027
-842

query I rowsort
SELECT + - cor0.col2 * col1 - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1261
-1430
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( col2 ) + - col2 col0 FROM tab0 AS cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3841
SELECT DISTINCT - ( + ( col1 ) ) DIV + col1 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3841
SELECT DISTINCT - ( + ( col1 ) ) / + col1 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT ALL - + 0 + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 23 FROM tab2, tab1 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT - 59 * - col0 - col2 FROM tab0 AS cor0
----
1383
2064
5169

query I rowsort
SELECT 89 * col2 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT ( + col0 ) * + cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3847
SELECT + col0 DIV + cor0.col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3847
SELECT + col0 / + cor0.col1 FROM tab2 AS cor0
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT DISTINCT - 29 DIV col2 - ( ( col1 ) ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3848
SELECT DISTINCT - 29 / col2 - ( ( col1 ) ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + 33 + + col2 * cor0.col0 FROM tab1 AS cor0
----
195
3681
7713

onlyif mysql # use DIV operator for integer division
query I rowsort label-3850
SELECT - 22 DIV cor0.col0 + - col1 FROM tab1 AS cor0
----
-10
-13
-33

skipif mysql # not compatible
query I rowsort label-3850
SELECT - 22 / cor0.col0 + - col1 FROM tab1 AS cor0
----
-10
-13
-33

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab0 cor1, tab1, tab0 AS cor2
----
3645 values hashing to a3c09af95301183ccb084eb1936b14e3

query I rowsort
SELECT col0 + + ( col2 ) FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

onlyif mysql # use DIV operator for integer division
query I rowsort label-3855
SELECT - col0 DIV ( - 95 + col2 ) FROM tab1 AS cor0
----
-80
0
1

skipif mysql # not compatible
query I rowsort label-3855
SELECT - col0 / ( - 95 + col2 ) FROM tab1 AS cor0
----
-80
0
1

query I rowsort
SELECT col0 * - ( - cor0.col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - 33 * col2 FROM tab1
----
-1782
-1881
-3168

query I rowsort
SELECT - 84 AS col0 FROM tab0 AS cor0
----
-84
-84
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3860
SELECT - col2 + CAST( NULL AS DECIMAL ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3860
SELECT - col2 + CAST ( NULL AS REAL ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 19 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT DISTINCT + + cor0.col1 * - 95 AS col2 FROM tab0 cor0
----
-8170
-8645
-9215

query I rowsort
SELECT ALL - - col2 * - ( + col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL 56 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT ALL + 31 FROM tab1, tab0 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT - col0 * - cor0.col2 + 98 * 94 AS col2 FROM tab0 cor0
----
10004
16510
9247

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3867
SELECT + col2 * + col2 + + CAST( ( col2 ) AS SIGNED ) * + cor0.col0 FROM tab0 AS cor0
----
14022
1881
36

skipif mysql # not compatible
query I rowsort label-3867
SELECT + col2 * + col2 + + CAST ( ( col2 ) AS INTEGER ) * + cor0.col0 FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT DISTINCT + 25 * col1 + col1 AS col1 FROM tab2 AS cor0
----
1534
442
806

query I rowsort
SELECT DISTINCT + 45 + - col0 FROM tab0
----
-44
10
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-3870
SELECT - - cor0.col1 DIV + col1 + - col2 FROM tab0 cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3870
SELECT - - cor0.col1 / + col1 + - col2 FROM tab0 cor0
----
-32
-81
0

query I rowsort
SELECT DISTINCT - + col2 + - col1 * ( + col0 ) AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - + col0 * col0 * col1 + 95 * - col1 AS col0 FROM tab1 AS cor0
----
-2704
-41910
-84435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col2 * - col2 * col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT ALL 26 * - col2 + col1 FROM tab1 AS cor0
----
-1378
-1472
-2483

query I rowsort
SELECT DISTINCT cor0.col2 - + col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - - 87 * col1 FROM tab0 AS cor0
----
7482
7917
8439

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 * + col1 AS col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT + - col1 * col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-3880
SELECT DISTINCT - col0 DIV col0 FROM tab1 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3880
SELECT DISTINCT - col0 / col0 FROM tab1 cor0
----
-1

query I rowsort
SELECT - 88 + - col0 FROM tab2 AS cor0
----
-166
-167
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-3882
SELECT DISTINCT - - col2 DIV cor0.col0 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-3882
SELECT DISTINCT - - col2 / cor0.col0 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT ALL + cor0.col1 * - ( col0 * - col2 ) FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL + col1 * - 15 AS col0 FROM tab0 AS cor0
----
-1290
-1365
-1455

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * - col2 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + tab1.col0 + 96 FROM tab1, tab0 AS cor0
----
160
176
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3887
SELECT col0 + - col0 DIV - col2 col2 FROM tab1
----
3
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3887
SELECT col0 + - col0 / - col2 col2 FROM tab1
----
3
65
80

query I rowsort
SELECT + + 10 - - 23 * col2 AS col2 FROM tab0 AS cor0
----
1896
33
769

query I rowsort
SELECT DISTINCT + 60 * + col2 AS col2 FROM tab1 AS cor0
----
3240
3420
5760

query I rowsort
SELECT ALL + col2 * - ( col2 + 43 ) FROM tab1 cor0
----
-13344
-5238
-5700

query I rowsort
SELECT - col0 + + ( col2 ) AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - + ( - cor0.col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 + + 65 AS col1 FROM tab1 AS cor0
----
129
145
68

query I rowsort
SELECT ALL - ( 93 ) AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3895
SELECT - col0 DIV - 31 AS col2 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3895
SELECT - col0 / - 31 AS col2 FROM tab0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3896
SELECT DISTINCT col0 - - 72 DIV tab0.col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3896
SELECT DISTINCT col0 - - 72 / tab0.col1 FROM tab0
----
24
35
89

query I rowsort
SELECT ( ( tab0.col1 ) ) * 86 FROM tab0
----
7396
7826
8342

query I rowsort
SELECT DISTINCT - ( 64 ) * + col2 - - col0 AS col2 FROM tab1
----
-3453
-3584
-6064

query I rowsort
SELECT 89 - - 81 * col0 FROM tab1
----
332
5273
6569

query I rowsort
SELECT col2 * 74 FROM tab1
----
3996
4218
7104

onlyif mysql # use DIV operator for integer division
query I rowsort label-3901
SELECT ALL - 74 DIV + col2 + - col2 col0 FROM tab1
----
-55
-58
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3901
SELECT ALL - 74 / + col2 + - col2 col0 FROM tab1
----
-55
-58
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3902
SELECT - CAST( ( col2 ) AS SIGNED ) + - col0 FROM tab1 AS cor0
----
-121
-176
-57

skipif mysql # not compatible
query I rowsort label-3902
SELECT - CAST ( ( col2 ) AS INTEGER ) + - col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - col2 + tab0.col0 * + tab0.col0 AS col0 FROM tab0
----
1224
543
7839

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3904
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col0 * - tab1.col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3904
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col0 * - tab1.col1 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3905
SELECT - tab1.col2 DIV col0 AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3905
SELECT - tab1.col2 / col0 AS col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT ALL col0 * col0 + tab2.col1 - ( col1 + - tab2.col2 ) * col2 FROM tab2
----
-28
5285
7056

query I rowsort
SELECT DISTINCT + ( col1 ) * + 11 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT - ( cor0.col2 ) * col0 FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3909
SELECT - col2 DIV col2 - 48 AS col2 FROM tab0 cor0
----
-49
-49
-49

skipif mysql # not compatible
query I rowsort label-3909
SELECT - col2 / col2 - 48 AS col2 FROM tab0 cor0
----
-49
-49
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-3911
SELECT DISTINCT - col2 DIV col0 + tab2.col1 AS col1 FROM tab2
----
17
28
59

skipif mysql # not compatible
query I rowsort label-3911
SELECT DISTINCT - col2 / col0 + tab2.col1 AS col1 FROM tab2
----
17
28
59

query I rowsort
SELECT ALL 38 + + col1 FROM tab0
----
124
129
135

onlyif mysql # use DIV operator for integer division
query I rowsort label-3913
SELECT DISTINCT + 26 DIV + tab2.col1 AS col0 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-3913
SELECT DISTINCT + 26 / + tab2.col1 AS col0 FROM tab2
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3914
SELECT + col2 DIV tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3914
SELECT + col2 / tab0.col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + tab2.col2 * tab2.col2 + col2 FROM tab2
----
1482
702
756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3916
SELECT DISTINCT tab2.col0 + + CAST( NULL AS DECIMAL ) FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3916
SELECT DISTINCT tab2.col0 + + CAST ( NULL AS REAL ) FROM tab2, tab0 AS cor0
----
NULL

query I rowsort
SELECT - + col1 + col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT col1 + + cor0.col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT - 71 * - cor0.col1 AS col2 FROM tab1 cor0
----
1846
710
923

query I rowsort
SELECT ALL - col1 + col1 * - 84 FROM tab1 AS cor0
----
-1105
-2210
-850

query I rowsort
SELECT + 28 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3922
SELECT ALL - cor0.col2 + - col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3922
SELECT ALL - cor0.col2 + - col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 59 AS col2 FROM tab0, tab1 AS cor0
----
-59

query I rowsort
SELECT col0 * + col1 * - 92 + col2 * col0 FROM tab1
----
-55232
-7014
-88000

query I rowsort
SELECT - col0 - 69 FROM tab0
----
-104
-158
-93

query I rowsort
SELECT DISTINCT + col1 * + ( + tab0.col0 ) AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col1 + col1 AS col2 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT col2 + + col1 * - 56 AS col0 FROM tab0
----
-4783
-5014
-5431

query I rowsort
SELECT DISTINCT + col1 - + col2 * ( col2 * + 99 ) AS col0 FROM tab2 AS cor0
----
-142939
-66865
-72140

query I rowsort
SELECT DISTINCT - col2 * - ( + col0 ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT 14 + 21 + - col0 FROM tab1 AS cor0
----
-29
-45
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-3932
SELECT DISTINCT + 30 * 48 DIV cor0.col1 col2 FROM tab0 AS cor0
----
14
15
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3932
SELECT DISTINCT + 30 * 48 / cor0.col1 col2 FROM tab0 AS cor0
----
14
15
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-3933
SELECT DISTINCT - col1 + col1 DIV col0 FROM tab1 AS cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-3933
SELECT DISTINCT - col1 + col1 / col0 FROM tab1 AS cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort
SELECT ALL + + CAST ( 29 AS REAL ) FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT DISTINCT 16 + col1 FROM tab2 AS cor0
----
33
47
75

query I rowsort
SELECT ALL - col2 + ( col0 * + 69 ) AS col2 FROM tab0 AS cor0
----
1623
2414
6059

query I rowsort
SELECT + - 23 + col0 - + col2 AS col2 FROM tab2 AS cor0
----
-43
18
29

query I rowsort
SELECT ALL + + cor0.col1 + 62 AS col1 FROM tab0 AS cor0
----
148
153
159

query I rowsort
SELECT DISTINCT - col2 + - col2 * cor0.col1 FROM tab1 AS cor0
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-3940
SELECT + - col1 * col0 DIV col1 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3940
SELECT + - col1 * col0 / col1 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL 2 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT 90 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # use DIV operator for integer division
query I rowsort label-3943
SELECT ALL - col1 + col0 DIV - col1 AS col2 FROM tab2 cor0
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-3943
SELECT ALL - col1 + col0 / - col1 AS col2 FROM tab2 cor0
----
-21
-31
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3944
SELECT DISTINCT + CAST( - 32 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-32

skipif mysql # not compatible
query I rowsort label-3944
SELECT DISTINCT + CAST ( - 32 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-32

query I rowsort
SELECT ALL + col2 * - ( col1 ) + - 59 FROM tab0 AS cor0
----
-156
-2897
-7521

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col2 AS REAL ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + 44 * + col2 AS col0 FROM tab0 AS cor0
----
1452
3608
44

query I rowsort
SELECT ALL 7 + + col1 AS col1 FROM tab2 AS cor0
----
24
38
66

query I rowsort
SELECT ALL 47 + col1 AS col1 FROM tab2 AS cor0
----
106
64
78

query I rowsort
SELECT cor0.col0 + col0 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT + 20 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - 1 col2 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT col0 * tab2.col0 * col0 FROM tab2
----
343
474552
493039

onlyif mysql # use DIV operator for integer division
query I rowsort label-3954
SELECT DISTINCT - col1 DIV ( col0 ) + - cor0.col1 DIV col2 AS col2 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-3954
SELECT DISTINCT - col1 / ( col0 ) + - cor0.col1 / col2 AS col2 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT + col0 + 47 FROM tab0 AS cor0
----
136
71
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3956
SELECT col1 DIV + 30 AS col2 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3956
SELECT col1 / + 30 AS col2 FROM tab2 AS cor0
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3957
SELECT col0 + - CAST( NULL AS SIGNED ) - - 6 * - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3957
SELECT col0 + - CAST ( NULL AS INTEGER ) - - 6 * - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3959
SELECT ALL + col0 * col2 DIV 82 + + col2 AS col1 FROM tab2
----
29
50
74

skipif mysql # not compatible
query I rowsort label-3959
SELECT ALL + col0 * col2 / 82 + + col2 AS col1 FROM tab2
----
29
50
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 col0 FROM tab2
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3961
SELECT + CAST( + col2 AS SIGNED ) + - col2 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3961
SELECT + CAST ( + col2 AS INTEGER ) + - col2 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3962
SELECT - + col0 - col1 DIV - col2 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3962
SELECT - + col0 - col1 / - col2 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - 67 + 74 FROM tab2 AS cor0
----
7
7
7

query I rowsort
SELECT - col2 + col0 * + col0 * ( col1 * - col0 ) FROM tab0 AS cor0
----
-1188897
-4158876
-64152261

query I rowsort
SELECT ALL + 64 FROM tab0, tab0 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT 74 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT ALL + col0 * 39 * col2 FROM tab1
----
142272
299520
6318

query I rowsort
SELECT 1 * col0 * 40 FROM tab0 AS cor0
----
1400
3560
960

query I rowsort
SELECT 88 AS col2 FROM tab0 cor0
----
88
88
88

query I rowsort
SELECT col0 + 30 AS col0 FROM tab0
----
119
54
65

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 71 col1 FROM tab1 cor0
----
-71
-71
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3973
SELECT DISTINCT + col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3973
SELECT DISTINCT + col1 / + col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL cor0.col1 + + col1 FROM tab0 cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-3975
SELECT ALL ( + col1 ) DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3975
SELECT ALL ( + col1 ) / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 64 AS col1 FROM tab1 AS cor0
----
64

query I rowsort
SELECT + + 26 * col0 AS col0 FROM tab1 AS cor0
----
1664
2080
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3978
SELECT DISTINCT - 76 DIV - tab2.col1 AS col0 FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-3978
SELECT DISTINCT - 76 / - tab2.col1 AS col0 FROM tab2
----
1
2
4

query I rowsort
SELECT DISTINCT + col0 * + tab1.col2 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT col0 + - 49 AS col0 FROM tab0 AS cor0
----
-14
-25
40

query I rowsort
SELECT ALL - - col0 * + col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT col0 + - ( - cor0.col1 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + - col0 + ( col2 ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT DISTINCT + - col0 * 69 + col0 * col2 * cor0.col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
203577
731856
8595

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - col0 * - 93 col0 FROM tab0 AS cor0
----
2208
3220
8188

query I rowsort
SELECT DISTINCT 94 + tab1.col2 + 85 FROM tab1, tab0 AS cor0
----
233
236
275

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 CROSS JOIN tab1 cor1
----
243 values hashing to 4fe4780e49e612b93957f575d9b3e89f

query I rowsort
SELECT - - ( + col0 ) * col2 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - col2 + cor0.col0 * + col2 FROM tab2 AS cor0
----
162
2002
2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3991
SELECT + 40 + col0 * col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3991
SELECT + 40 + col0 * col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( cor0.col0 ) + + col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + ( + col0 ) * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT cor0.col0 * + 49 * 61 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 2b8e940d6093686d4d917b3e035ead1e

query I rowsort
SELECT 48 FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to df6d12001a34fdcf5cfb2ca3a4a22108

onlyif mysql # use DIV operator for integer division
query I rowsort label-3996
SELECT DISTINCT - - col1 DIV cor0.col0 AS col1 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3996
SELECT DISTINCT - - col1 / cor0.col0 AS col1 FROM tab0 cor0
----
1
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3997
SELECT ALL col2 + + CAST( NULL AS DECIMAL ) * + col2 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3997
SELECT ALL col2 + + CAST ( NULL AS REAL ) * + col2 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + ( - col1 ) * col0 + col0 * + col0 AS col1 FROM tab2
----
-195
1456
4860

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + 77 * 91 col1 FROM tab2 AS cor0
----
6928
6929
7000

query I rowsort
SELECT ALL - col0 * + 35 AS col2 FROM tab2 AS cor0
----
-245
-2730
-2765

query I rowsort
SELECT - col2 * ( + col1 ) + col2 AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT - col2 * col0 - - ( col1 ) FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - cor0.col1 + - ( - col1 ) AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + col0 + 76 AS col0 FROM tab1 cor0
----
140
156
79

query I rowsort
SELECT ALL + col2 * + ( - col2 ) AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col2 + 49 FROM tab2 AS cor0
----
11
22
23

query I rowsort
SELECT + col0 * + 41 - - col2 FROM tab2 AS cor0
----
314
3224
3277

onlyif mysql # use DIV operator for integer division
query I rowsort label-4008
SELECT + cor0.col0 DIV 76 + + col0 FROM tab1 AS cor0
----
3
64
81

skipif mysql # not compatible
query I rowsort label-4008
SELECT + cor0.col0 / 76 + + col0 FROM tab1 AS cor0
----
3
64
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4009
SELECT DISTINCT 35 DIV 26 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4009
SELECT DISTINCT 35 / 26 FROM tab1 AS cor0
----
1

query I rowsort
SELECT 34 + cor0.col1 AS col0 FROM tab0 AS cor0
----
120
125
131

query I rowsort
SELECT ALL + 20 + col1 + col2 AS col2 FROM tab2 AS cor0
----
105
75
78

query I rowsort
SELECT DISTINCT + - 28 * col0 + col2 * + col0 AS col1 FROM tab1 AS cor0
----
1856
5440
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4013
SELECT - CAST( - 17 AS SIGNED ) + + col2 * col0 + - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-497
3565
7528

skipif mysql # not compatible
query I rowsort label-4013
SELECT - CAST ( - 17 AS INTEGER ) + + col2 * col0 + - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-497
3565
7528

query I rowsort
SELECT ALL + - col1 + col0 + + cor0.col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - 94 FROM tab1, tab1 cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - cor0.col2 ) * col1 + - col2 col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT ALL - col0 - 49 AS col0 FROM tab1
----
-113
-129
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) * + col2 + col1 col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT + 40 + cor0.col2 AS col2 FROM tab2 AS cor0
----
66
67
78

query I rowsort
SELECT ALL - 33 * 92 + col1 * col2 FROM tab2 AS cor0
----
-1502
-2199
-2390

query I rowsort
SELECT + - 13 * + col1 * 9 FROM tab1 AS cor0
----
-1170
-1521
-3042

query I rowsort
SELECT + + col1 * - col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 31 AS col2 FROM tab0
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) * col1 col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col2 + + 53 col1 FROM tab2 AS cor0
----
-1391
-623
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 * cor0.col1 col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL + col2 + ( - col0 ) * col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT + col1 + ( col1 ) * + col2 * - col2 FROM tab2 AS cor0
----
-22568
-24531
-39825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4030
SELECT DISTINCT + + col2 * - CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-4030
SELECT DISTINCT + + col2 * - CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - col2 + + 73 * 13 AS col1 FROM tab1 cor0
----
853
892
895

query I rowsort
SELECT DISTINCT - col2 * col0 * col0 AS col2 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT + col0 + - ( col0 * - col2 ) + - col2 AS col2 FROM tab0 AS cor0
----
69
7305
783

query I rowsort
SELECT col1 * - ( + col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + col1 * + col2 - + col1 AS col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL tab1.col2 * col1 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL - col0 * - col0 AS col1 FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col0 * + col2 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + + col2 * + col1 * + col0 AS col0 FROM tab0 cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + col1 * + col2 * + col2 AS col1 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT + col1 + + col1 * col1 + - col0 AS col1 FROM tab0
----
7458
8283
9471

query I rowsort
SELECT ALL + col1 + col2 * col1 AS col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT - col0 * col2 + - tab1.col2 + col1 * - tab1.col0 FROM tab1
----
-294
-4345
-8816

query I rowsort
SELECT col2 + - col1 * - col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT - - col0 - col1 * - col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT col1 + - col0 - col0 FROM tab0
----
-87
27
38

query I rowsort
SELECT - tab1.col2 + tab1.col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - - col1 col2 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT col2 + - tab1.col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL col0 + + col1 + col1 AS col2 FROM tab1 AS cor0
----
106
55
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4052
SELECT DISTINCT col1 + col1 + - col2 DIV col2 AS col0 FROM tab1
----
19
25
51

skipif mysql # not compatible
query I rowsort label-4052
SELECT DISTINCT col1 + col1 + - col2 / col2 AS col0 FROM tab1
----
19
25
51

query I rowsort
SELECT ALL - col2 + col1 + col1 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT ALL 74 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4055
SELECT DISTINCT col1 + col2 DIV + col0 FROM tab2
----
17
34
59

skipif mysql # not compatible
query I rowsort label-4055
SELECT DISTINCT col1 + col2 / + col0 FROM tab2
----
17
34
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4056
SELECT ALL + CAST( + col0 AS SIGNED ) + col0 * col1 AS col1 FROM tab1
----
1120
704
81

skipif mysql # not compatible
query I rowsort label-4056
SELECT ALL + CAST ( + col0 AS INTEGER ) + col0 * col1 AS col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT + 61 + + col1 FROM tab1
----
71
74
87

query I rowsort
SELECT ALL + col0 + col2 * + cor0.col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL + col0 * + col2 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT cor0.col0 + - col0 * - col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT + - 80 + - col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-177
-2918
-7542

onlyif mysql # use DIV operator for integer division
query I rowsort label-4062
SELECT ALL - col2 DIV + col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4062
SELECT ALL - col2 / + col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col2 * + 90 AS col0 FROM tab2
----
2340
2430
3420

query I rowsort
SELECT - 94 * + tab0.col0 - col2 FROM tab0
----
-2289
-3291
-8448

query I rowsort
SELECT 39 - col0 FROM tab2
----
-39
-40
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-4066
SELECT 56 DIV + col2 + - col0 col0 FROM tab0
----
-23
-89
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4066
SELECT 56 / + col2 + - col0 col0 FROM tab0
----
-23
-89
21

query I rowsort
SELECT DISTINCT + 83 FROM tab0, tab1 AS cor0
----
83

query I rowsort
SELECT ALL col2 * col2 + + col0 AS col1 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL ( col1 ) + col1 FROM tab2
----
118
34
62

query I rowsort
SELECT ( + col0 ) * tab2.col2 + - col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT ALL + 76 + - 9 AS col2 FROM tab2
----
67
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4072
SELECT 15 + + col0 DIV col1 FROM tab0 AS cor0
----
15
15
15

skipif mysql # not compatible
query I rowsort label-4072
SELECT 15 + + col0 / col1 FROM tab0 AS cor0
----
15
15
15

query I rowsort
SELECT DISTINCT - 56 + + col2 * - col1 * - col0 AS col2 FROM tab1 AS cor0
----
36424
4156
99784

query I rowsort
SELECT ALL + 65 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
103
91
92

query I rowsort
SELECT 64 * - col2 * col2 - + col0 FROM tab1
----
-186627
-208000
-589904

onlyif mysql # use DIV operator for integer division
query I rowsort label-4076
SELECT ALL - ( - col0 ) DIV - col2 AS col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4076
SELECT ALL - ( - col0 ) / - col2 AS col0 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL - 29 * + cor0.col1 + col0 * - col1 FROM tab1 AS cor0
----
-1417
-832
-930

query I rowsort
SELECT ALL 21 AS col0 FROM tab2 cor0
----
21
21
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT DISTINCT col0 DIV + col0 col2 FROM tab2 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4079
SELECT DISTINCT col0 / + col0 col2 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT - - col2 + col0 * col1 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL + + 34 + cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
7430
8315
9443

query I rowsort
SELECT DISTINCT - col1 * + col0 + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT - - ( - col1 ) + + cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + + col0 * - col0 * - col1 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT ALL + ( 95 ) * + col0 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT 14 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT - ( + tab1.col2 ) AS col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT 22 FROM tab2, tab0 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT DISTINCT - 73 AS col0 FROM tab0
----
-73

query I rowsort
SELECT ALL ( - 31 + col0 ) FROM tab2
----
-24
47
48

query I rowsort
SELECT ALL cor0.col1 * + cor0.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to f2938bee011b8d49dd931b1f9235e7f5

query I rowsort
SELECT ALL + + ( 69 ) FROM tab0 AS cor0
----
69
69
69

query I rowsort
SELECT + ( col2 ) + 11 FROM tab2 AS cor0
----
37
38
49

query I rowsort
SELECT - + col1 * - col1 + + col1 * cor0.col2 AS col1 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT - col1 * + col2 + col1 * col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4097
SELECT tab0.col1 DIV - cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 7d94127a4b67449262b97bb17d976ac4

skipif mysql # not compatible
query I rowsort label-4097
SELECT tab0.col1 / - cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 7d94127a4b67449262b97bb17d976ac4

query I rowsort
SELECT DISTINCT + + col0 + col0 * - ( col1 ) FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT col1 * ( cor0.col1 * cor0.col2 ) + 69 + - 35 FROM tab0 AS cor0
----
244102
679076
9443

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - col1 * - ( + col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - + col0 + + ( col2 ) * col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT - + col1 * col2 * col2 + + col1 AS col0 FROM tab0 AS cor0
----
-611793
-93568
0

query I rowsort
SELECT - col2 * ( - ( + col2 ) ) AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + - col1 + col2 AS col0 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL - col0 * - ( - 60 ) + cor0.col2 - - col2 FROM tab1 AS cor0
----
-3726
-4608
-72

query I rowsort
SELECT ALL - col0 * 16 AS col1 FROM tab0 AS cor0
----
-1424
-384
-560

query I rowsort
SELECT - col1 + - 97 * col1 AS col2 FROM tab1 AS cor0
----
-1274
-2548
-980

query I rowsort
SELECT ( col1 ) * - ( + col2 ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + 52 AS col1 FROM tab0
----
52
52
52

query I rowsort
SELECT ALL 88 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4112
SELECT col1 * - CAST( NULL AS SIGNED ) + - col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4112
SELECT col1 * - CAST ( NULL AS INTEGER ) + - col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 97 AS col0 FROM tab0 AS cor0
----
8342
8827
9409

query I rowsort
SELECT 14 AS col0 FROM tab2 AS cor0
----
14
14
14

query I rowsort
SELECT cor1.col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT col1 * ( + col0 ) + tab1.col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT - 81 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

query I rowsort
SELECT ALL - + ( - col0 ) * col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 0 + col2 col1 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col2 col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 79 * - cor1.col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to f547550532ac0555ec8a997d512d1a41

query I rowsort
SELECT col1 * ( ( + col0 ) ) * 18 AS col0 FROM tab0
----
145782
37152
61110

query I rowsort
SELECT DISTINCT col2 * 31 AS col2 FROM tab1
----
1674
1767
2976

query I rowsort
SELECT col1 * 84 * col2 FROM tab0
----
238392
626808
8148

query I rowsort
SELECT - - ( 19 ) AS col2 FROM tab0 AS cor0
----
19
19
19

query I rowsort
SELECT 19 * - col1 - - tab2.col2 AS col1 FROM tab2
----
-1095
-285
-562

onlyif mysql # use DIV operator for integer division
query I rowsort label-4127
SELECT DISTINCT col2 * + tab1.col2 + tab1.col2 DIV + col1 FROM tab1
----
2918
3254
9223

skipif mysql # not compatible
query I rowsort label-4127
SELECT DISTINCT col2 * + tab1.col2 + tab1.col2 / + col1 FROM tab1
----
2918
3254
9223

query I rowsort
SELECT DISTINCT col2 + - col2 FROM tab0 cor0
----
0

query I rowsort
SELECT + - col2 + + col2 * cor0.col0 + + col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-3277
-4082
113

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4130
SELECT + + cor0.col1 * CAST( NULL AS SIGNED ) + 90 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4130
SELECT + + cor0.col1 * CAST ( NULL AS INTEGER ) + 90 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4131
SELECT cor0.col2 * col2 + cor0.col0 * - col0 + - CAST( + 64 AS SIGNED ) * cor0.col2 col0 FROM tab0 AS cor0
----
-1288
-1599
-6445

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4131
SELECT cor0.col2 * col2 + cor0.col0 * - col0 + - CAST ( + 64 AS INTEGER ) * cor0.col2 col0 FROM tab0 AS cor0
----
-1288
-1599
-6445

query I rowsort
SELECT DISTINCT col0 * tab1.col0 * 53 FROM tab1
----
217088
339200
477

query I rowsort
SELECT + col1 * - col2 * - tab1.col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT + col0 - - col2 FROM tab1
----
121
176
57

query I rowsort
SELECT col0 + + ( + 45 + col0 ) FROM tab2 AS cor0
----
201
203
59

query I rowsort
SELECT - col2 * - ( - col0 * col1 ) + col1 * col0 AS col0 FROM tab2 AS cor0
----
-115050
-49691
-5642

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4137
SELECT - col0 + CAST( + 92 AS SIGNED ) * - col0 AS col0 FROM tab1 AS cor0
----
-279
-5952
-7440

skipif mysql # not compatible
query I rowsort label-4137
SELECT - col0 + CAST ( + 92 AS INTEGER ) * - col0 AS col0 FROM tab1 AS cor0
----
-279
-5952
-7440

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4138
SELECT ALL - col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4138
SELECT ALL - col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4139
SELECT ALL ( tab0.col1 ) DIV + col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4139
SELECT ALL ( tab0.col1 ) / + col1 FROM tab0
----
1
1
1

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL col2 * - col0 * tab1.col1 AS col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - col0 * col0 + + 6 * - col2 AS col2 FROM tab2 cor0
----
-211
-6240
-6469

query I rowsort
SELECT - col0 * - ( + 16 * cor0.col0 ) FROM tab1 AS cor0
----
102400
144
65536

query I rowsort
SELECT ALL - + col0 + + 84 FROM tab2 AS cor0
----
5
6
77

query I rowsort
SELECT + cor0.col1 * 93 FROM tab1 AS cor0
----
1209
2418
930

query I rowsort
SELECT - + col1 * 18 * 67 FROM tab2 AS cor0
----
-20502
-37386
-71154

query I rowsort
SELECT ALL - col1 + - col0 AS col2 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ( - col0 * - 77 ) FROM tab1
----
231
4928
6160

query I rowsort
SELECT 44 AS col0 FROM tab1
----
44
44
44

query I rowsort
SELECT ALL tab0.col0 * + col1 * 43 AS col1 FROM tab0
----
145985
348257
88752

query I rowsort
SELECT + col2 + + col0 AS col0 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL col0 + + 37 AS col2 FROM tab1 AS cor0
----
101
117
40

query I rowsort
SELECT - col0 + - ( + col2 ) - col1 FROM tab1 AS cor0
----
-131
-189
-83

query I rowsort
SELECT + + cor0.col1 * col1 - cor0.col2 * - col2 AS col1 FROM tab1 AS cor0
----
3349
3592
9385

query I rowsort
SELECT DISTINCT - col0 * + 69 FROM tab2 AS cor0
----
-483
-5382
-5451

query I rowsort
SELECT + - col0 + 52 FROM tab2 AS cor0
----
-26
-27
45

query I rowsort
SELECT DISTINCT + col0 + col2 * col2 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-4158
SELECT col1 DIV col1 + col1 - col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4158
SELECT col1 / col1 + col1 - col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4159
SELECT DISTINCT + col1 DIV + ( - col0 ) AS col0 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-4159
SELECT DISTINCT + col1 / + ( - col0 ) AS col0 FROM tab2 AS cor0
----
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4160
SELECT ALL - col2 / - 34 + - col1 + CAST( NULL AS SIGNED ) / - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4160
SELECT ALL - col2 / - 34 + - col1 + CAST ( NULL AS INTEGER ) / - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * 97 FROM tab0
----
2328
3395
8633

query I rowsort
SELECT - cor0.col0 * col2 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT + + 78 + + 80 FROM tab1 AS cor0
----
158
158
158

query I rowsort
SELECT ( + 67 ) FROM tab0 AS cor0
----
67
67
67

query I rowsort
SELECT + 3 * - col2 FROM tab0 AS cor0
----
-246
-3
-99

query I rowsort
SELECT + 52 * - col1 AS col0 FROM tab2 AS cor0
----
-1612
-3068
-884

query I rowsort
SELECT ALL - 22 FROM tab1 cor0
----
-22
-22
-22

query I rowsort
SELECT + ( col0 ) * col2 * col1 FROM tab2 cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4169
SELECT + ( col2 ) DIV 40 AS col1 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-4169
SELECT + ( col2 ) / 40 AS col1 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT ALL - - cor0.col2 * - col0 * + 15 FROM tab0 AS cor0
----
-109470
-11880
-525

query I rowsort
SELECT DISTINCT - col2 * - col1 + 0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - + 19 + col2 * col2 * - col0 AS col2 FROM tab0 AS cor0
----
-26155
-54
-598455

query I rowsort
SELECT + cor0.col0 * 88 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 745dbe316202e59b0fdd0f07d929c4d1

query I rowsort
SELECT ALL - - col2 + + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 col0 FROM tab0 AS cor0
----
95

query I rowsort
SELECT DISTINCT - - 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 ALL - - col2 + col0 * - ( 87 ) col0 FROM tab0 AS cor0
----
-2055
-3044
-7661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 * - col1 * col0 + - cor0.col1 col0 FROM tab2 AS cor0
----
-24191
-3937
-82895

query I rowsort
SELECT DISTINCT + col0 * + cor0.col1 + ( ( - cor0.col1 ) ) AS col2 FROM tab0 cor0
----
1978
3298
8008

query I rowsort
SELECT ALL - 89 FROM tab1 AS cor0
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 13 - - cor0.col0 * ( col0 + col2 ) col2 FROM tab1 AS cor0
----
14093
184
7757

query I rowsort
SELECT ALL + + cor0.col2 * col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - - col0 * cor0.col1 - ( col0 ) FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + + col2 col0 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4185
SELECT ALL + - col1 DIV + col1 + col1 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-4185
SELECT ALL + - col1 / + col1 + col1 FROM tab0 cor0
----
85
90
96

query I rowsort
SELECT + - col0 + col1 * col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT + - col0 + col1 * + col2 AS col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL + + col0 * ( - col0 ) * - cor0.col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT + 68 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( col1 ) - cor0.col2 * - ( - col0 + col0 ) col1 FROM tab0 cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4191
SELECT ALL ( - 32 ) * col2 - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4191
SELECT ALL ( - 32 ) * col2 - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 16 + + ( col2 ) AS col1 FROM tab1 AS cor0
----
112
70
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4193
SELECT ALL - CAST( col0 AS SIGNED ) * + col0 - ( - ( - col1 ) + - col0 ) FROM tab0 cor0
----
-1287
-638
-7923

skipif mysql # not compatible
query I rowsort label-4193
SELECT ALL - CAST ( col0 AS INTEGER ) * + col0 - ( - ( - col1 ) + - col0 ) FROM tab0 cor0
----
-1287
-638
-7923

onlyif mysql # use DIV operator for integer division
query I rowsort label-4194
SELECT ALL - col0 DIV + col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4194
SELECT ALL - col0 / + col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4195
SELECT ALL CAST( col1 AS SIGNED ) * col1 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-4195
SELECT ALL CAST ( col1 AS INTEGER ) * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT col1 * col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ( - col0 ) + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 - 10 * 97 * - col2 FROM tab1
----
52406
55300
93133

query I rowsort
SELECT DISTINCT + + 32 AS col2 FROM tab2 AS cor0
----
32

query I rowsort
SELECT - cor1.col1 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT + - col2 * - cor0.col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4202
SELECT DISTINCT - CAST( + col0 AS SIGNED ) * + col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4202
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) * + col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + 28 * + 23 - col0 FROM tab2 AS cor0
----
565
566
637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4204
SELECT ( + 22 ) + - col1 * - CAST( + col0 * col2 + col1 AS SIGNED ) col1 FROM tab0 AS cor0
----
12826
672421
75530

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4204
SELECT ( + 22 ) + - col1 * - CAST ( + col0 * col2 + col1 AS INTEGER ) col1 FROM tab0 AS cor0
----
12826
672421
75530

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab2.col0 ) * col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL 34 + - col1 AS col2 FROM tab1
----
21
24
8

query I rowsort
SELECT - - col1 + col0 * + col0 * - 15 FROM tab1 AS cor0
----
-109
-61430
-95987

onlyif mysql # use DIV operator for integer division
query I rowsort label-4208
SELECT - 29 * - col1 + + 90 DIV + cor0.col0 FROM tab2 AS cor0
----
1712
494
911

skipif mysql # not compatible
query I rowsort label-4208
SELECT - 29 * - col1 + + 90 / + cor0.col0 FROM tab2 AS cor0
----
1712
494
911

onlyif mysql # use DIV operator for integer division
query I rowsort label-4209
SELECT DISTINCT col1 + col0 DIV col0 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4209
SELECT DISTINCT col1 + col0 / col0 FROM tab1
----
11
14
27

query I rowsort
SELECT DISTINCT - 77 * col1 AS col0 FROM tab2
----
-1309
-2387
-4543

query I rowsort
SELECT DISTINCT col0 * 26 FROM tab2
----
182
2028
2054

query I rowsort
SELECT - ( 16 ) * - col1 FROM tab1 AS cor0
----
160
208
416

query I rowsort
SELECT DISTINCT + 54 * + col0 AS col1 FROM tab1
----
162
3456
4320

query I rowsort
SELECT col0 * + col2 + cor0.col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL ( - col2 ) AS col1 FROM tab0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4216
SELECT ALL + 89 DIV - col1 AS col1 FROM tab1
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-4216
SELECT ALL + 89 / - col1 AS col1 FROM tab1
----
-3
-6
-8

query I rowsort
SELECT DISTINCT + col2 + - col2 + col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 70 * cor0.col1 + + ( + 30 ) * col0 FROM tab0 AS cor0
----
-3700
-5300
-5740

onlyif mysql # use DIV operator for integer division
query I rowsort label-4219
SELECT + cor0.col0 DIV col2 + ( - 11 ) FROM tab1 AS cor0
----
-10
-11
-11

skipif mysql # not compatible
query I rowsort label-4219
SELECT + cor0.col0 / col2 + ( - 11 ) FROM tab1 AS cor0
----
-10
-11
-11

onlyif mysql # use DIV operator for integer division
query I rowsort label-4220
SELECT + col0 * cor0.col1 + - col0 DIV + col0 AS col1 FROM tab2 cor0
----
1342
216
4601

skipif mysql # not compatible
query I rowsort label-4220
SELECT + col0 * cor0.col1 + - col0 / + col0 AS col1 FROM tab2 cor0
----
1342
216
4601

query I rowsort
SELECT - + col2 + col2 + col2 * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col0 + ( col0 ) AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + col2 * cor0.col2 * + 15 + col0 * - cor0.col0 + col1 AS col1 FROM tab0 AS cor0
----
-1113
15845
93030

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + 9 col2 FROM tab1 AS cor0
----
-1
-17
-4

query I rowsort
SELECT DISTINCT + 30 + - tab1.col1 FROM tab1
----
17
20
4

query I rowsort
SELECT DISTINCT 26 + col2 FROM tab0
----
108
27
59

query I rowsort
SELECT ALL - col2 + - col1 AS col2 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL - 64 * - tab0.col2 + + ( + col2 * + tab0.col0 ) AS col0 FROM tab0
----
12546
2904
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4230
SELECT + + col2 * CAST( NULL AS SIGNED ) / col0 + col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4230
SELECT + + col2 * CAST ( NULL AS INTEGER ) / col0 + col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4231
SELECT cor0.col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4231
SELECT cor0.col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab1.col1 * col1 + + col1 * - col2 AS col0 FROM tab1
----
-1079
-470
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 col1 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + col0 + - ( - col2 ) * + col1 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT - + col1 - + col1 AS col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL + ( + cor0.col0 ) + + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL col0 + + col0 + col1 * col0 * + col2 FROM tab2 AS cor0
----
119808
51192
5873

query I rowsort
SELECT ALL col2 * col0 + - col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 82 col2 FROM tab1 AS cor0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4241
SELECT DISTINCT - - col0 DIV - 91 + + col1 * col2 + col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-4241
SELECT DISTINCT - - col0 / - 91 + + col1 * col2 + col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4242
SELECT ALL 77 * col0 DIV + cor0.col1 AS col2 FROM tab0 AS cor0
----
21
27
75

skipif mysql # not compatible
query I rowsort label-4242
SELECT ALL 77 * col0 / + cor0.col1 AS col2 FROM tab0 AS cor0
----
21
27
75

query I rowsort
SELECT - cor0.col2 * + col2 + - col0 + + col0 * + col2 FROM tab1 AS cor0
----
-1616
-2757
335

query I rowsort
SELECT + - ( + cor0.col2 ) * cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col2 + - 31 * - tab1.col0 FROM tab1
----
147
2041
2576

query I rowsort
SELECT ALL + 20 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT - + 3 + col2 * - col2 AS col0 FROM tab2 AS cor0
----
-1447
-679
-732

query I rowsort
SELECT + 52 + + col2 * + col0 FROM tab1 AS cor0
----
214
3700
7732

query I rowsort
SELECT - - ( - col0 ) + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT - 85 AS col0 FROM tab2
----
-85
-85
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4251
SELECT DISTINCT 35 DIV col2 AS col1 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4251
SELECT DISTINCT 35 / col2 AS col1 FROM tab0
----
0
1
35

query I rowsort
SELECT DISTINCT + 35 AS col0 FROM tab1 cor0
----
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4253
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4253
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4254
SELECT CAST( NULL AS SIGNED ) + + 9 * cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4254
SELECT CAST ( NULL AS INTEGER ) + + 9 * cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4255
SELECT ALL CAST( - cor1.col2 AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif mysql # not compatible
query I rowsort label-4255
SELECT ALL CAST ( - cor1.col2 AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL 82 - col0 * ( col2 ) * col1 AS col0 FROM tab2
----
-119570
-50952
-5777

query I rowsort
SELECT + 59 * cor0.col1 FROM tab1 AS cor0
----
1534
590
767

query I rowsort
SELECT + ( col2 ) * + ( col0 ) FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4259
SELECT ALL - + col1 * - col1 + + col2 DIV 49 FROM tab1 AS cor0
----
101
170
677

skipif mysql # not compatible
query I rowsort label-4259
SELECT ALL - + col1 * - col1 + + col2 / 49 FROM tab1 AS cor0
----
101
170
677

query I rowsort
SELECT 11 + - col1 * col0 AS col0 FROM tab0 cor0
----
-2053
-3384
-8088

query I rowsort
SELECT DISTINCT ( + 19 ) * - col2 FROM tab2 cor0
----
-494
-513
-722

query I rowsort
SELECT DISTINCT + + col2 + + col0 * + col1 AS col1 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT 13 FROM tab2 AS cor0
----
13
13
13

query I rowsort
SELECT - + cor0.col0 + + col2 * cor0.col1 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT - - 0 * - col0 * - col2 + - col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4266
SELECT ALL - - col2 - - 70 DIV - col0 AS col0 FROM tab0 AS cor0
----
-1
31
82

skipif mysql # not compatible
query I rowsort label-4266
SELECT ALL - - col2 - - 70 / - col0 AS col0 FROM tab0 AS cor0
----
-1
31
82

query I rowsort
SELECT DISTINCT - ( col2 ) + col1 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT - + 73 AS col0 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT ALL - + col1 + col0 * + cor0.col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL + 58 - - cor0.col2 AS col2 FROM tab0 AS cor0
----
140
59
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4271
SELECT - CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4271
SELECT - CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col2 - 62 AS col2 FROM tab2
----
-24
-35
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-4273
SELECT ALL - + col0 * + col1 DIV col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4273
SELECT ALL - + col0 * + col1 / col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 + col2 * - cor0.col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT DISTINCT + ( col2 ) FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL 22 FROM tab1, tab2, tab1 AS cor0, tab0
----
81 values hashing to c6f049334398e3533dd6996714479a2f

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 * col0 col1 FROM tab1 AS cor0
----
1200
45
960

query I rowsort
SELECT ALL - col1 * + col2 + col0 * 79 AS col2 FROM tab2 AS cor0
----
-284
4628
5595

query I rowsort
SELECT ( - ( col0 ) ) + 5 * - col2 FROM tab1
----
-273
-349
-560

query I rowsort
SELECT ALL - 46 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 5a5d45989dcc6a06d9ee5a08945518f9

query I rowsort
SELECT - ( - 45 ) * col0 FROM tab0 AS cor0
----
1080
1575
4005

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col0 col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - col0 + col0 * + col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT + - col0 * 40 FROM tab0 AS cor0
----
-1400
-3560
-960

query I rowsort
SELECT ALL col2 + col0 * ( 70 ) FROM tab0
----
1713
2451
6312

query I rowsort
SELECT ALL 88 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT DISTINCT + tab0.col2 * + col0 + col2 AS col0 FROM tab0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-4289
SELECT DISTINCT col2 DIV + col0 + col1 FROM tab2
----
17
34
59

skipif mysql # not compatible
query I rowsort label-4289
SELECT DISTINCT col2 / + col0 + col1 FROM tab2
----
17
34
59

query I rowsort
SELECT + col2 - + 53 FROM tab2
----
-15
-26
-27

query I rowsort
SELECT ALL - col2 + - 8 AS col1 FROM tab0
----
-41
-9
-90

query I rowsort
SELECT + col0 * - ( + tab1.col0 ) + col0 AS col1 FROM tab1
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4293
SELECT - col0 DIV - col0 + - cor0.col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-4293
SELECT - col0 / - col0 + - cor0.col1 FROM tab1 AS cor0
----
-12
-25
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4294
SELECT - col0 DIV 64 + - ( col2 * col2 ) + col2 AS col2 FROM tab1 AS cor0
----
-2862
-3193
-9121

skipif mysql # not compatible
query I rowsort label-4294
SELECT - col0 / 64 + - ( col2 * col2 ) + col2 AS col2 FROM tab1 AS cor0
----
-2862
-3193
-9121

query I rowsort
SELECT ALL - 95 FROM tab1, tab1 cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4296
SELECT ALL + + cor0.col1 * CAST( NULL AS SIGNED ) + 72 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4296
SELECT ALL + + cor0.col1 * CAST ( NULL AS INTEGER ) + 72 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * 58 + - col2 FROM tab2 cor0
----
-433
-4550
-4620

query I rowsort
SELECT DISTINCT + col0 + 8 * ( cor0.col1 * col1 ) FROM tab2 AS cor0
----
2391
27926
7695

query I rowsort
SELECT - col2 * + col1 + + col1 * col0 FROM tab0 AS cor0
----
-774
3298
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 50 col1 FROM tab0 cor0
----
1650
4100
50

query I rowsort
SELECT ALL - col0 * + col2 + + cor0.col0 * - cor0.col2 + + col2 FROM tab0 AS cor0
----
-14514
-1551
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4302
SELECT col2 + - CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4302
SELECT col2 + - CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 72 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # use DIV operator for integer division
query I rowsort label-4304
SELECT DISTINCT 2 + + 26 DIV + col2 FROM tab0 AS cor0
----
2
28

skipif mysql # not compatible
query I rowsort label-4304
SELECT DISTINCT 2 + + 26 / + col2 FROM tab0 AS cor0
----
2
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-4305
SELECT + cor0.col1 DIV col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4305
SELECT + cor0.col1 / col1 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4306
SELECT + col2 DIV - col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4306
SELECT + col2 / - col2 FROM tab0 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col2 col1 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4308
SELECT - - CAST( NULL AS SIGNED ) + + col1 * col2 + + ( col0 + col2 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4308
SELECT - - CAST ( NULL AS INTEGER ) + + col1 * col2 + + ( col0 + col2 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4309
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 37 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4309
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 37 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col1 * tab0.col0 * + tab0.col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT 7 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT ALL - - 37 * - 15 FROM tab1 AS cor0
----
-555
-555
-555

query I rowsort
SELECT - + 17 AS col0 FROM tab0 AS cor0
----
-17
-17
-17

query I rowsort
SELECT - 35 * + col1 + col2 * + 57 AS col1 FROM tab2 AS cor0
----
-583
1571
454

query I rowsort
SELECT DISTINCT 5 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
5

query I rowsort
SELECT 6 * + col1 FROM tab0
----
516
546
582

onlyif mysql # use DIV operator for integer division
query I rowsort label-4317
SELECT DISTINCT tab0.col1 * col2 DIV - col1 + col1 * + col0 FROM tab0
----
2031
3394
8017

skipif mysql # not compatible
query I rowsort label-4317
SELECT DISTINCT tab0.col1 * col2 / - col1 + col1 * + col0 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT + 70 * - col1 FROM tab1 AS cor0
----
-1820
-700
-910

query I rowsort
SELECT DISTINCT + + 55 FROM tab0 AS cor0
----
55

query I rowsort
SELECT DISTINCT - ( cor1.col0 ) FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 - ( - col2 ) FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + - cor0.col0 * - cor0.col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col1 + + col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT - + col2 - 39 FROM tab2 cor0
----
-65
-66
-77

query I rowsort
SELECT + col2 - - col0 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col0 + col1 * ( + cor0.col0 ) + - col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - cor0.col1 + - cor0.col0 AS col2 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT + col1 + - 22 * col0 + + cor0.col1 FROM tab0 AS cor0
----
-1776
-356
-576

query I rowsort
SELECT DISTINCT + + cor0.col2 + - col2 AS col1 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4330
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4330
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4331
SELECT ALL + col0 DIV col2 + + ( cor0.col0 + col1 ) AS col2 FROM tab0 AS cor0
----
110
167
181

skipif mysql # not compatible
query I rowsort label-4331
SELECT ALL + col0 / col2 + + ( cor0.col0 + col1 ) AS col2 FROM tab0 AS cor0
----
110
167
181

onlyif mysql # use DIV operator for integer division
query I rowsort label-4332
SELECT DISTINCT + col0 DIV - col1 + col2 AS col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4332
SELECT DISTINCT + col0 / - col1 + col2 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT + col0 + tab0.col2 AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT - + col2 * + ( col1 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL tab2.col2 * + col0 - 66 AS col0 FROM tab2
----
123
1962
2936

query I rowsort
SELECT DISTINCT + 58 - col2 AS col0 FROM tab0
----
-24
25
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4337
SELECT tab0.col2 DIV col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4337
SELECT tab0.col2 / col0 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 33 col0 FROM tab2, tab0 cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4339
SELECT + - col1 + - col0 DIV cor0.col0 col1 FROM tab0 AS cor0
----
-87
-92
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4339
SELECT + - col1 + - col0 / cor0.col0 col1 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT DISTINCT col0 * + col1 * + col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT - 14 AS col0 FROM tab1
----
-14
-14
-14

query I rowsort
SELECT ALL + ( col0 * ( + col1 ) + col0 * col1 ) AS col0 FROM tab1
----
1280
156
2080

query I rowsort
SELECT + 8 + + col1 * col2 AS col2 FROM tab0 AS cor0
----
105
2846
7470

query I rowsort
SELECT 58 + + col2 AS col1 FROM tab2 AS cor0
----
84
85
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col2 * cor1.col0 col1 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 24e20ca2b8a28088cc71698417e1f489

query I rowsort
SELECT - tab2.col2 * tab2.col0 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - ( col0 ) * + ( ( col2 ) * col1 ) AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - 96 FROM tab0, tab1 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

onlyif mysql # use DIV operator for integer division
query I rowsort label-4349
SELECT tab0.col2 * 96 DIV + ( col1 ) + + col2 DIV + col1 FROM tab0
----
0
36
86

skipif mysql # not compatible
query I rowsort label-4349
SELECT tab0.col2 * 96 / + ( col1 ) + + col2 / + col1 FROM tab0
----
0
36
86

query I rowsort
SELECT ( - 3 ) AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT DISTINCT + col2 + col2 * + tab2.col0 * col1 AS col1 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT ALL col0 + col2 * - col2 + - tab0.col1 AS col2 FROM tab0
----
-1151
-63
-6726

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + + col1 * col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL 95 FROM tab2, tab1 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT - ( - col1 ) * col1 + - col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL - 13 + - 43 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1131
-443
-572

query I rowsort
SELECT ( col1 ) - col1 * + col0 AS col2 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT col2 + 99 AS col0 FROM tab1 AS cor0
----
153
156
195

query I rowsort
SELECT DISTINCT - col2 * - col2 * - col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT + col0 * - 42 AS col2 FROM tab1
----
-126
-2688
-3360

query I rowsort
SELECT - 38 * col0 * col1 - ( + 60 ) FROM tab1 AS cor0
----
-24380
-3024
-39580

onlyif mysql # use DIV operator for integer division
query I rowsort label-4363
SELECT + - col0 DIV cor0.col1 - col0 * - cor0.col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4363
SELECT + - col0 / cor0.col1 - col0 * - cor0.col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + ( ( + cor0.col2 ) ) + - ( 18 * cor0.col1 ) AS col2 FROM tab2 AS cor0
----
-1036
-268
-531

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4365
SELECT CAST( + col0 AS SIGNED ) + + col2 * col1 AS col2 FROM tab1 AS cor0
----
1328
1407
634

skipif mysql # not compatible
query I rowsort label-4365
SELECT CAST ( + col0 AS INTEGER ) + + col2 * col1 AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + + col0 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4367
SELECT + col0 DIV col0 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4367
SELECT + col0 / col0 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4368
SELECT ALL - tab2.col0 DIV col0 AS col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4368
SELECT ALL - tab2.col0 / col0 AS col1 FROM tab2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4370
SELECT ALL + CAST( NULL AS SIGNED ) / - col0 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4370
SELECT ALL + CAST ( NULL AS INTEGER ) / - col0 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4371
SELECT ALL CAST( NULL AS SIGNED ) * - tab2.col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4371
SELECT ALL CAST ( NULL AS INTEGER ) * - tab2.col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 47 FROM tab0, tab1 AS cor0
----
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4373
SELECT + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4373
SELECT + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor1.col2 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT 34 FROM tab1
----
34

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 cor2
----
972 values hashing to 980274175fafec015a83080672486a9a

query I rowsort
SELECT - col2 * + col1 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 - col1 col2 FROM tab0 AS cor0
----
-137
-142
-148

query I rowsort
SELECT col1 * col1 + + cor0.col0 * col2 FROM tab1 AS cor0
----
3748
7849
838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 - - cor0.col1 col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - 20 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-1720
-1820
-1940

query I rowsort
SELECT cor0.col1 - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - col2 + col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT 36 * col1 AS col1 FROM tab2 AS cor0
----
1116
2124
612

query I rowsort
SELECT ALL - ( col2 * col1 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - - cor0.col0 + + col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4387
SELECT ALL col2 DIV + col0 + col1 FROM tab0 cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-4387
SELECT ALL col2 / + col0 + col1 FROM tab0 cor0
----
87
91
97

query I rowsort
SELECT ALL + col1 * col1 * col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT - col1 * col1 + col0 * + col0 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT DISTINCT - 97 AS col0 FROM tab1 AS cor0
----
-97

query I rowsort
SELECT ALL 7 + col2 AS col1 FROM tab2 AS cor0
----
33
34
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4392
SELECT - + ( col0 ) DIV - 67 + col2 FROM tab0 AS cor0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-4392
SELECT - + ( col0 ) / - 67 + col2 FROM tab0 AS cor0
----
1
33
83

query I rowsort
SELECT - cor0.col2 + ( col0 ) * col0 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT + - cor0.col1 AS col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT + col2 + col1 + + col2 FROM tab1 cor0
----
124
134
205

query I rowsort
SELECT col1 * ( + col1 + col1 ) AS col0 FROM tab2 AS cor0
----
1922
578
6962

query I rowsort
SELECT - + col0 + ( - col2 ) FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4398
SELECT - CAST( 71 AS SIGNED ) FROM tab2 AS cor0
----
-71
-71
-71

skipif mysql # not compatible
query I rowsort label-4398
SELECT - CAST ( 71 AS INTEGER ) FROM tab2 AS cor0
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 89 + ( - col2 ) * 96 FROM tab1 AS cor0
----
-5095
-5383
-9127

onlyif mysql # use DIV operator for integer division
query I rowsort label-4401
SELECT DISTINCT col1 + - 91 DIV col0 FROM tab2 cor0
----
16
18
58

skipif mysql # not compatible
query I rowsort label-4401
SELECT DISTINCT col1 + - 91 / col0 FROM tab2 cor0
----
16
18
58

query IIIIIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab1 AS cor2, tab1
----
13122 values hashing to 4c78a7198970fc12623d750e63ecb4fe

query I rowsort
SELECT - col0 + + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - 31 AS col2 FROM tab1
----
-31
-31
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4405
SELECT col0 DIV - col0 + + ( - col2 ) FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-4405
SELECT col0 / - col0 + + ( - col2 ) FROM tab0
----
-2
-34
-83

query I rowsort
SELECT ALL 76 + col2 AS col2 FROM tab0
----
109
158
77

query I rowsort
SELECT tab0.col2 * - 14 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 9dc4c3d27681348c44327a9c80a79b08

query I rowsort
SELECT ALL + - 17 AS col1 FROM tab2 AS cor0
----
-17
-17
-17

onlyif mysql # use DIV operator for integer division
query I rowsort label-4409
SELECT DISTINCT cor0.col2 * - col1 + - col1 DIV + 24 + - col1 * col1 FROM tab0 AS cor0
----
-10237
-15746
-9510

skipif mysql # not compatible
query I rowsort label-4409
SELECT DISTINCT cor0.col2 * - col1 + - col1 / + 24 + - col1 * col1 FROM tab0 AS cor0
----
-10237
-15746
-9510

onlyif mysql # use DIV operator for integer division
query I rowsort label-4410
SELECT ALL - + 39 * col1 DIV - col0 - cor0.col2 * + cor0.col0 FROM tab2 AS cor0
----
-17
-1999
-2994

skipif mysql # not compatible
query I rowsort label-4410
SELECT ALL - + 39 * col1 / - col0 - cor0.col2 * + cor0.col0 FROM tab2 AS cor0
----
-17
-1999
-2994

query I rowsort
SELECT DISTINCT - + cor0.col0 + col1 + col1 * ( col0 + - cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-1303
-275
16

query I rowsort
SELECT + + col2 * + cor0.col0 + col2 * 3 FROM tab2 AS cor0
----
2106
270
3116

query I rowsort
SELECT DISTINCT + - ( 73 ) AS col0 FROM tab0, tab1 AS cor0
----
-73

query I rowsort
SELECT DISTINCT + 94 + + col1 * col2 AS col1 FROM tab0 AS cor0
----
191
2932
7556

query I rowsort
SELECT ALL + col0 + 59 FROM tab1 AS cor0
----
123
139
62

query I rowsort
SELECT DISTINCT + col1 + col0 * + 2 FROM tab2 cor0
----
175
215
45

query I rowsort
SELECT col1 + 23 + + col1 AS col0 FROM tab1 cor0
----
43
49
75

query I rowsort
SELECT ALL col2 * - 57 + + col0 AS col1 FROM tab2 cor0
----
-1404
-1532
-2087

onlyif mysql # use DIV operator for integer division
query I rowsort label-4419
SELECT + col2 DIV - 26 FROM tab0 AS cor0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-4419
SELECT + col2 / - 26 FROM tab0 AS cor0
----
-1
-3
0

query I rowsort
SELECT ALL col0 * col2 * 70 FROM tab1 AS cor0
----
11340
255360
537600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4421
SELECT DISTINCT + cor0.col2 * - CAST( - col2 * + col2 AS SIGNED ) AS col0 FROM tab1 cor0
----
157464
185193
884736

skipif mysql # not compatible
query I rowsort label-4421
SELECT DISTINCT + cor0.col2 * - CAST ( - col2 * + col2 AS INTEGER ) AS col0 FROM tab1 cor0
----
157464
185193
884736

query I rowsort
SELECT 33 * - col1 FROM tab0
----
-2838
-3003
-3201

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 * col1 col2 FROM tab1
----
104
1053
650

query I rowsort
SELECT ALL + col0 * + col1 + col0 * col0 AS col1 FROM tab0
----
16020
2640
4620

query I rowsort
SELECT DISTINCT + col0 * + 56 AS col0 FROM tab1 AS cor0
----
168
3584
4480

onlyif mysql # use DIV operator for integer division
query I rowsort label-4426
SELECT + + col1 + - 21 DIV cor0.col1 FROM tab1 AS cor0
----
12
26
8

skipif mysql # not compatible
query I rowsort label-4426
SELECT + + col1 + - 21 / cor0.col1 FROM tab1 AS cor0
----
12
26
8

query I rowsort
SELECT DISTINCT - + col1 * 31 FROM tab0 cor0
----
-2666
-2821
-3007

query I rowsort
SELECT + col0 + 59 FROM tab1 cor0
----
123
139
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4429
SELECT ALL - 33 * - col0 + col0 DIV col1 FROM tab1 AS cor0
----
2118
2646
99

skipif mysql # not compatible
query I rowsort label-4429
SELECT ALL - 33 * - col0 + col0 / col1 FROM tab1 AS cor0
----
2118
2646
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4430
SELECT col2 DIV 15 + col1 DIV col1 FROM tab0 AS cor0
----
1
3
6

skipif mysql # not compatible
query I rowsort label-4430
SELECT col2 / 15 + col1 / col1 FROM tab0 AS cor0
----
1
3
6

query I rowsort
SELECT DISTINCT 4 * 36 + + cor0.col1 FROM tab1 AS cor0
----
154
157
170

query I rowsort
SELECT ALL + ( - 60 ) * col0 + col0 * col2 * col0 + col0 FROM tab0 cor0
----
-840
17592
644271

query I rowsort
SELECT DISTINCT + col2 * ( - col1 ) - - col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT - - 84 AS col1 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT ALL - 2 * - 30 + col0 * - 80 AS col0 FROM tab1 AS cor0
----
-180
-5060
-6340

query I rowsort
SELECT DISTINCT - 47 + 62 FROM tab0
----
15

query I rowsort
SELECT - col2 - + 10 * cor0.col0 * - 69 AS col0 FROM tab1 AS cor0
----
2016
44103
55104

onlyif mysql # use DIV operator for integer division
query I rowsort label-4438
SELECT + - col1 + col0 DIV col2 FROM tab1 AS cor0
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-4438
SELECT + - col1 + col0 / col2 FROM tab1 AS cor0
----
-13
-26
-9

query I rowsort
SELECT ALL - ( 52 ) AS col2 FROM tab0 AS cor0
----
-52
-52
-52

query I rowsort
SELECT col0 - - col0 * col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + + 25 AS col0 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT - col0 * + 97 + - col0 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT DISTINCT - 65 * 7 AS col0 FROM tab1, tab2 cor0
----
-455

query I rowsort
SELECT ALL - ( - 12 ) + - col0 FROM tab0 cor0
----
-12
-23
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4445
SELECT DISTINCT + col0 DIV - col2 - col0 * + col0 * ( - col2 ) FROM tab0 AS cor0
----
1190
19008
649521

skipif mysql # not compatible
query I rowsort label-4445
SELECT DISTINCT + col0 / - col2 - col0 * + col0 * ( - col2 ) FROM tab0 AS cor0
----
1190
19008
649521

query I rowsort
SELECT ALL - col0 + cor0.col1 * - col2 FROM tab2 cor0
----
-1612
-725
-844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4447
SELECT DISTINCT + CAST( NULL AS DECIMAL ) / ( - cor0.col0 * - 71 ) + cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4447
SELECT DISTINCT + CAST ( NULL AS REAL ) / ( - cor0.col0 * - 71 ) + cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4448
SELECT DISTINCT CAST( ( - col0 ) AS SIGNED ) * col1 - + col1 * col1 FROM tab2 AS cor0
----
-1178
-1632
-8083

skipif mysql # not compatible
query I rowsort label-4448
SELECT DISTINCT CAST ( ( - col0 ) AS INTEGER ) * col1 - + col1 * col1 FROM tab2 AS cor0
----
-1178
-1632
-8083

query I rowsort
SELECT DISTINCT + + 72 - col1 FROM tab0 AS cor0
----
-14
-19
-25

query I rowsort
SELECT + - col0 * col1 - col2 AS col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT 92 AS col1 FROM tab0 cor0
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 85 * + col1 + - ( - 75 ) - - col1 col1 FROM tab2 AS cor0
----
1537
2741
5149

query I rowsort
SELECT DISTINCT + + 8 FROM tab0 AS cor0
----
8

query I rowsort
SELECT ALL - + col1 + col2 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-2888
-3202
-9133

query I rowsort
SELECT ALL + 65 + - col2 FROM tab0 cor0
----
-17
32
64

query I rowsort
SELECT ALL 55 - + col0 FROM tab0
----
-34
20
31

query I rowsort
SELECT + ( col1 ) + - cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab0 AS cor0
----
78

query I rowsort
SELECT DISTINCT - - cor0.col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - cor0.col0 - col2 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - ( col2 ) + + col2 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT 71 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT - col0 + - col2 * + col1 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT + 46 + tab0.col1 + - col2 FROM tab0
----
142
55
99

query I rowsort
SELECT - ( - 55 + col1 ) FROM tab1
----
29
42
45

query I rowsort
SELECT col0 + - 2 AS col1 FROM tab2
----
5
76
77

query I rowsort
SELECT DISTINCT + ( + col0 ) * + col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4468
SELECT ALL - col1 + - col2 DIV - col1 FROM tab2 AS cor0
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-4468
SELECT ALL - col1 + - col2 / - col1 FROM tab2 AS cor0
----
-15
-31
-59

query I rowsort
SELECT + col0 * col0 + + col2 FROM tab1 cor0
----
4153
63
6496

query I rowsort
SELECT + col2 + - cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT 28 * + col2 FROM tab2
----
1064
728
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * + col1 col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col2 + tab1.col1 AS col1 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4475
SELECT ALL col1 DIV + ( + col0 ) FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4475
SELECT ALL col1 / + ( + col0 ) FROM tab2
----
0
0
4

query I rowsort
SELECT DISTINCT col0 * col2 * + tab1.col0 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT - - ( col2 ) * col1 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4478
SELECT ALL col2 + - 79 DIV col1 + + tab2.col1 DIV col0 AS col0 FROM tab2
----
25
29
34

skipif mysql # not compatible
query I rowsort label-4478
SELECT ALL col2 + - 79 / col1 + + tab2.col1 / col0 AS col0 FROM tab2
----
25
29
34

query I rowsort
SELECT DISTINCT + col0 + 13 + - col0 AS col1 FROM tab2
----
13

query I rowsort
SELECT + tab2.col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT 1 * col0 AS col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4482
SELECT - 87 DIV + 85 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4482
SELECT - 87 / + 85 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + 37 * 86 AS col1 FROM tab1 AS cor0
----
3182
3182
3182

query I rowsort
SELECT ALL - - ( - 73 ) AS col2 FROM tab1 cor0
----
-73
-73
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-4486
SELECT + 56 DIV - cor0.col1 FROM tab1 AS cor0
----
-2
-4
-5

skipif mysql # not compatible
query I rowsort label-4486
SELECT + 56 / - cor0.col1 FROM tab1 AS cor0
----
-2
-4
-5

query I rowsort
SELECT - col1 * col0 - - 43 AS col2 FROM tab1 AS cor0
----
-35
-597
-997

onlyif mysql # use DIV operator for integer division
query I rowsort label-4488
SELECT + col1 * - 71 + + col0 DIV - cor0.col0 FROM tab2 AS cor0
----
-1208
-2202
-4190

skipif mysql # not compatible
query I rowsort label-4488
SELECT + col1 * - 71 + + col0 / - cor0.col0 FROM tab2 AS cor0
----
-1208
-2202
-4190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4489
SELECT + col0 - 98 DIV - cor0.col2 FROM tab0 AS cor0
----
133
26
90

skipif mysql # not compatible
query I rowsort label-4489
SELECT + col0 - 98 / - cor0.col2 FROM tab0 AS cor0
----
133
26
90

query I rowsort
SELECT - col2 + 99 * 92 FROM tab1 cor0
----
9012
9051
9054

query I rowsort
SELECT - col2 + col0 * col0 * - col2 AS col0 FROM tab1 AS cor0
----
-233529
-540
-614496

onlyif mysql # use DIV operator for integer division
query I rowsort label-4492
SELECT DISTINCT 17 + - ( col1 ) * cor0.col1 DIV col2 AS col0 FROM tab0 AS cor0
----
-207
-83
-9392

skipif mysql # not compatible
query I rowsort label-4492
SELECT DISTINCT 17 + - ( col1 ) * cor0.col1 / col2 AS col0 FROM tab0 AS cor0
----
-207
-83
-9392

query I rowsort
SELECT + ( + col1 ) * col2 - 91 FROM tab1 AS cor0
----
1157
1313
479

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4494
SELECT CAST( NULL AS SIGNED ) * + col0 / col0 + + col1 * + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4494
SELECT CAST ( NULL AS INTEGER ) * + col0 / col0 + + col1 * + col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + tab0.col0 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL + tab1.col1 * col1 * 39 FROM tab1
----
26364
3900
6591

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT ALL + col2 DIV - col0 + col1 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-4497
SELECT ALL + col2 / - col0 + col1 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT + col2 * - 18 AS col1 FROM tab2 AS cor0
----
-468
-486
-684

query I rowsort
SELECT DISTINCT col0 + ( col1 ) * + col2 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - 8 * col1 AS col2 FROM tab1
----
-104
-208
-80

query I rowsort
SELECT - col2 + - 13 * - col2 * col2 AS col1 FROM tab1
----
119712
37854
42180

query I rowsort
SELECT - - 56 + cor0.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to 33814c2ecacb0213f4e593da479c4536

query I rowsort
SELECT - col2 * + col1 + 90 * col2 FROM tab0
----
-7
-82
132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 8 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4505
SELECT col1 * 27 + col1 DIV tab0.col2 FROM tab0
----
2324
2458
2716

skipif mysql # not compatible
query I rowsort label-4505
SELECT col1 * 27 + col1 / tab0.col2 FROM tab0
----
2324
2458
2716

query I rowsort
SELECT DISTINCT - tab1.col1 + - 2 AS col0 FROM tab1, tab2 AS cor0
----
-12
-15
-28

query I rowsort
SELECT col1 * col2 * - col2 FROM tab1
----
-119808
-32490
-75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-4508
SELECT DISTINCT tab0.col2 DIV 63 AS col2 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-4508
SELECT DISTINCT tab0.col2 / 63 AS col2 FROM tab0
----
0
1

query I rowsort
SELECT DISTINCT 97 FROM tab2, tab2 AS cor0
----
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4510
SELECT - CAST( + 44 AS SIGNED ) FROM tab0
----
-44
-44
-44

skipif mysql # not compatible
query I rowsort label-4510
SELECT - CAST ( + 44 AS INTEGER ) FROM tab0
----
-44
-44
-44

query I rowsort
SELECT 60 - col0 FROM tab0
----
-29
25
36

query I rowsort
SELECT ALL + + cor0.col0 * + cor0.col2 AS col0 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 02081120b66025475df9f31f465bcbe4

query I rowsort
SELECT + tab0.col0 - - 11 FROM tab0
----
100
35
46

query I rowsort
SELECT 32 AS col0 FROM tab2
----
32
32
32

query I rowsort
SELECT DISTINCT tab2.col1 + tab2.col1 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT - 85 * + col1 + 84 AS col0 FROM tab2 AS cor0
----
-1361
-2551
-4931

query I rowsort
SELECT - 35 * - col0 AS col2 FROM tab2 AS cor0
----
245
2730
2765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col0 * ( 84 ) col0 FROM tab2 AS cor0
----
-557
-6493
-6619

query I rowsort
SELECT ALL + - 99 * col2 + - 36 FROM tab2 AS cor0
----
-2610
-2709
-3798

query I rowsort
SELECT cor0.col2 * cor0.col0 + + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - col1 * - col0 * - 46 + col2 * - col1 + + col1 AS col0 FROM tab1 cor0
----
-30000
-49075
-4966

query I rowsort
SELECT + col2 * - col2 * col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * - col1 col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT 74 * + col0 + + 37 AS col2 FROM tab1 cor0
----
259
4773
5957

query I rowsort
SELECT col1 + col2 * + tab1.col0 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-4527
SELECT - ( col1 + col2 ) DIV col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4527
SELECT - ( col1 + col2 ) / col1 FROM tab0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4528
SELECT + col2 DIV + col2 + col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4528
SELECT + col2 / + col2 + col2 FROM tab0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4529
SELECT col2 * - col1 + col1 DIV + col2 + + col2 FROM tab0
----
-2803
-7379
1

skipif mysql # not compatible
query I rowsort label-4529
SELECT col2 * - col1 + col1 / + col2 + + col2 FROM tab0
----
-2803
-7379
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4530
SELECT DISTINCT ( col0 ) * col0 + tab0.col1 DIV col2 AS col1 FROM tab0
----
1322
578
7922

skipif mysql # not compatible
query I rowsort label-4530
SELECT DISTINCT ( col0 ) * col0 + tab0.col1 / col2 AS col1 FROM tab0
----
1322
578
7922

query I rowsort
SELECT 35 + + 51 - - col0 FROM tab0
----
110
121
175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4532
SELECT ALL CAST( NULL AS SIGNED ) - - col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4532
SELECT ALL CAST ( NULL AS INTEGER ) - - col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + + col1 - + col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT 12 * - col2 - col0 FROM tab2
----
-331
-390
-535

query I rowsort
SELECT ( 19 ) FROM tab0
----
19
19
19

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to db428ec66bce13149e3129b417b0fe94

query I rowsort
SELECT ALL - 92 * 81 * col2 + col0 * - cor0.col0 FROM tab0 AS cor0
----
-246492
-618985
-8677

onlyif mysql # use DIV operator for integer division
query I rowsort label-4538
SELECT ALL - - 24 DIV + col1 AS col0 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4538
SELECT ALL - - 24 / + col1 AS col0 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT col1 + + col1 * - col1 * + col2 + col1 FROM tab0
----
-243896
-678860
-9215

query I rowsort
SELECT DISTINCT 44 + col2 AS col1 FROM tab0
----
126
45
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4541
SELECT - CAST( NULL AS SIGNED ) * - col2 * + col2 + + 94 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4541
SELECT - CAST ( NULL AS INTEGER ) * - col2 * + col2 + + 94 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col1 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - 23 + + col2 AS col0 FROM tab1 AS cor0
----
31
34
73

query I rowsort
SELECT + + col0 * + cor0.col1 * col1 + + 55 FROM tab0 cor0
----
177559
329370
737064

query I rowsort
SELECT + cor0.col0 * col1 + + 92 * col0 FROM tab1 AS cor0
----
354
6528
8400

query I rowsort
SELECT ALL 99 * col2 AS col1 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT + + col0 + col2 * + 67 FROM tab2 AS cor0
----
1816
1820
2625

onlyif mysql # use DIV operator for integer division
query I rowsort label-4548
SELECT DISTINCT - 29 DIV + col0 FROM tab1 cor0
----
-9
0

skipif mysql # not compatible
query I rowsort label-4548
SELECT DISTINCT - 29 / + col0 FROM tab1 cor0
----
-9
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4549
SELECT ALL + col0 + - col2 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4549
SELECT ALL + col0 + - col2 * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT + col0 * + cor0.col0 AS col2 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL - col0 + cor0.col2 * - 51 FROM tab0 AS cor0
----
-1707
-4271
-86

query I rowsort
SELECT ALL - - 73 * col2 + + col1 FROM tab1 AS cor0
----
3968
4171
7021

query I rowsort
SELECT ALL - col1 * - col1 * - col2 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT col0 + col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - 52 + + col2 * + cor0.col2 + + col0 FROM tab0 AS cor0
----
-16
1061
6761

query I rowsort
SELECT DISTINCT - - col1 + + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT - + col1 + - col0 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
-36490
-4238
-99853

query I rowsort
SELECT ALL - 15 AS col1 FROM tab0 AS cor0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT - - col1 + - cor0.col2 * + ( ( col2 ) ) FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4561
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-4561
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to 2270901c73a658a63f841c68db8155ba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + col0 col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT + col0 * - ( - col2 ) FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4565
SELECT ALL - + col0 DIV col2 - + col0 AS col0 FROM tab0 cor0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-4565
SELECT ALL - + col0 / col2 - + col0 AS col0 FROM tab0 cor0
----
-24
-70
-90

query I rowsort
SELECT ALL - col2 * col1 + 59 AS col2 FROM tab1 AS cor0
----
-1189
-1345
-511

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 45 - col1 col1 FROM tab1 cor0
----
-55
-58
-71

query I rowsort
SELECT + 41 + + col0 * col1 FROM tab0 AS cor0
----
2105
3436
8140

onlyif mysql # use DIV operator for integer division
query I rowsort label-4569
SELECT 49 * + col2 - - col0 DIV col1 FROM tab0 AS cor0
----
1617
4018
49

skipif mysql # not compatible
query I rowsort label-4569
SELECT 49 * + col2 - - col0 / col1 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT DISTINCT - + 26 FROM tab2 AS cor0
----
-26

query I rowsort
SELECT - + ( 44 ) * - cor0.col2 - + col1 FROM tab1 cor0
----
2350
2498
4211

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( 84 AS REAL ) + col2 / cor0.col0 FROM tab0 cor0
----
84
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4573
SELECT ALL - - CAST( 48 AS SIGNED ) FROM tab0 AS cor0
----
48
48
48

skipif mysql # not compatible
query I rowsort label-4573
SELECT ALL - - CAST ( 48 AS INTEGER ) FROM tab0 AS cor0
----
48
48
48

query I rowsort
SELECT ALL - col0 * + col0 AS col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + 4 * + col0 FROM tab1 AS cor0
----
12
256
320

query I rowsort
SELECT ALL + col0 + 74 FROM tab0 cor0
----
109
163
98

query I rowsort
SELECT + + 14 + + col0 * - col0 FROM tab2 AS cor0
----
-35
-6070
-6227

query I rowsort
SELECT DISTINCT - 64 - - col0 FROM tab1 AS cor0
----
-61
0
16

query I rowsort
SELECT ALL + 66 * - col2 FROM tab2 AS cor0
----
-1716
-1782
-2508

query I rowsort
SELECT ( 15 ) AS col0 FROM tab0 AS cor0
----
15
15
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-4581
SELECT DISTINCT - cor0.col1 DIV + col2 col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4581
SELECT DISTINCT - cor0.col1 / + col2 col0 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT ALL col1 + 57 * + col0 FROM tab0 cor0
----
1454
2092
5164

query I rowsort
SELECT - col0 * 64 FROM tab0 AS cor0
----
-1536
-2240
-5696

query I rowsort
SELECT ALL + 78 * + col1 + - col1 FROM tab2 AS cor0
----
1309
2387
4543

query I rowsort
SELECT ALL ( + col2 ) * col2 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4586
SELECT DISTINCT - col0 + 66 * col0 DIV col0 AS col2 FROM tab2 AS cor0
----
-12
-13
59

skipif mysql # not compatible
query I rowsort label-4586
SELECT DISTINCT - col0 + 66 * col0 / col0 AS col2 FROM tab2 AS cor0
----
-12
-13
59

query I rowsort
SELECT ALL 3 + - col0 AS col2 FROM tab2
----
-4
-75
-76

query I rowsort
SELECT - col1 - col1 AS col0 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT + - col2 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL + + 69 FROM tab2, tab0 cor0, tab1 AS cor1, tab0, tab0 AS cor2
----
243 values hashing to 82762d1f978d19c1dfb91e39310b5974

query I rowsort
SELECT - col1 * + col0 + cor0.col2 * col0 * - 37 + col1 * + col1 FROM tab1 AS cor0
----
-135516
-285031
-5396

query I rowsort
SELECT DISTINCT - cor0.col0 * 62 FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT DISTINCT + col2 + 88 AS col1 FROM tab0 cor0
----
121
170
89

query I rowsort
SELECT 33 * + col1 AS col1 FROM tab2
----
1023
1947
561

query I rowsort
SELECT DISTINCT col1 * ( 68 ) * - col2 AS col1 FROM tab0
----
-192984
-507416
-6596

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * col2 * col0 col1 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-4597
SELECT - CAST( cor0.col2 AS SIGNED ) DIV - cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 83c163442931d28e4160369d40047ea7

skipif mysql # not compatible
query I rowsort label-4597
SELECT - CAST ( cor0.col2 AS INTEGER ) / - cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 83c163442931d28e4160369d40047ea7

query I rowsort
SELECT - col2 * col2 + - col2 - col1 AS col1 FROM tab0 WHERE - col2 BETWEEN NULL AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT + col0 * - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-12
-4160
-6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 col0 FROM tab0 AS cor0
----
-34
-7
9

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( col0 ) < col2 * - col0
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT - col0 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4604
SELECT col1 * col1 DIV col0 FROM tab0
----
268
308
93

skipif mysql # not compatible
query I rowsort label-4604
SELECT col1 * col1 / col0 FROM tab0
----
268
308
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4605
SELECT DISTINCT - col2 + col2 + + col0 DIV col1 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-4605
SELECT DISTINCT - col2 + col2 + + col0 / col1 FROM tab1 AS cor0
----
0
6

query I rowsort
SELECT - col2 + - col0 * col0 AS col2 FROM tab0 AS cor0 WHERE NULL IN ( col0 - col0 )
----

query I rowsort
SELECT ALL + col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col1 + col2 * + col2 FROM tab0 AS cor0
----
1175
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + col2 col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + - col1 + - col1 AS col2 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - col2 * col1 + col1 * col0 FROM tab2
----
-620
3068
697

query I rowsort
SELECT ALL - + ( - cor0.col0 ) + col0 * col1 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT col0 + + col1 * + cor0.col1 * + col2 + col1 * + ( col0 + cor0.col0 ) AS col1 FROM tab2 AS cor0
----
13747
26388
99788

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT BETWEEN col1 AND NULL
----

query I rowsort
SELECT - - col0 * - cor0.col1 FROM tab2 cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 18 * cor0.col1 col0 FROM tab2 AS cor0
----
1062
306
558

query I rowsort
SELECT DISTINCT + col2 + - tab0.col0 AS col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - 48 * cor0.col0 AS col2 FROM tab2 cor0
----
-336
-3744
-3792

query I rowsort
SELECT DISTINCT + - col1 * - col1 AS col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4620
SELECT col1 + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4620
SELECT col1 + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab0.col0 * + tab0.col1 * 30 FROM tab0
----
101850
242970
61920

query I rowsort
SELECT DISTINCT - ( col1 * + col0 ) + + 48 FROM tab1
----
-30
-592
-992

query I rowsort
SELECT DISTINCT + col2 FROM tab1 WHERE + col0 < ( col0 * col1 - col1 )
----
54
57
96

query I rowsort
SELECT DISTINCT col0 * col0 * col0 FROM tab2
----
343
474552
493039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col0 + col2 col1 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + col0 * - col1 + - col2 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - col2 * + col1 - col2 * + col1 AS col2 FROM tab1
----
-1140
-2496
-2808

query I rowsort
SELECT col1 * - col2 + - tab0.col0 AS col0 FROM tab0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4629
SELECT tab1.col0 DIV - col0 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4629
SELECT tab1.col0 / - col0 AS col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - col0 * + col1 + col1 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT ALL - col0 + + col1 + col2 * col2 AS col1 FROM tab0
----
1151
63
6726

query I rowsort
SELECT - col0 * col1 + col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT col1 * col2 + - col0 FROM tab0 WHERE NOT + col0 * col2 NOT IN ( col0 + col2 - col1 * col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col2 col1 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4635
SELECT ALL col2 DIV col0 + col1 + + col2 FROM tab1
----
110
67
98

skipif mysql # not compatible
query I rowsort label-4635
SELECT ALL col2 / col0 + col1 + + col2 FROM tab1
----
110
67
98

query I rowsort
SELECT col2 * + col1 + col1 * col0 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT ALL tab2.col0 + + col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL tab2.col2 + - tab2.col2 + col0 AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT col1 + + col0 + - col2 AS col2 FROM tab2
----
11
111
58

query I rowsort
SELECT ALL col2 * - col1 * col0 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col2 + + col2 AS col1 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL - col2 * col1 * + col1 + col1 + - col2 AS col0 FROM tab1
----
-16307
-36532
-5747

query I rowsort
SELECT DISTINCT - col1 + - col2 + - col1 * - col0 * + col1 FROM tab1
----
13411
1948
6333

query I rowsort
SELECT col1 * - tab1.col0 * + col0 AS col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT - col0 + col2 + col1 FROM tab1
----
29
3
77

query I rowsort
SELECT ALL + tab1.col0 + col2 + + col1 AS col0 FROM tab1
----
131
189
83

query I rowsort
SELECT ALL - col1 + + col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - - cor0.col0 + + col0 AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT - + col2 + col1 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT + col0 + + 14 * col2 + - col2 FROM tab0
----
1155
453
48

query I rowsort
SELECT DISTINCT - tab1.col2 + + col2 * - col1 AS col1 FROM tab1
----
-1344
-1458
-627

query I rowsort
SELECT - col0 * col0 * 48 FROM tab2
----
-2352
-292032
-299568

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4653
SELECT col0 + CAST( + 31 AS SIGNED ) * - col2 FROM tab1
----
-1671
-1703
-2896

skipif mysql # not compatible
query I rowsort label-4653
SELECT col0 + CAST ( + 31 AS INTEGER ) * - col2 FROM tab1
----
-1671
-1703
-2896

query I rowsort
SELECT - col1 + ( 99 ) * col0 AS col2 FROM tab0
----
2290
3368
8720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4655
SELECT DISTINCT col2 - - ( col1 ) * col1 DIV + col0 AS col2 FROM tab2
----
164
41
70

skipif mysql # not compatible
query I rowsort label-4655
SELECT DISTINCT col2 - - ( col1 ) * col1 / + col0 AS col2 FROM tab2
----
164
41
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4656
SELECT col1 * col1 + col0 DIV col2 + - col2 * col1 AS col0 FROM tab0
----
4558
820
9347

skipif mysql # not compatible
query I rowsort label-4656
SELECT col1 * col1 + col0 / col2 + - col2 * col1 AS col0 FROM tab0
----
4558
820
9347

query I rowsort
SELECT - col1 - + 48 FROM tab0
----
-134
-139
-145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4658
SELECT ALL + CAST( NULL AS SIGNED ) * 55 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4658
SELECT ALL + CAST ( NULL AS INTEGER ) * 55 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4659
SELECT - + cor0.col0 DIV - col2 + - col2 * cor0.col1 * - 38 AS col0 FROM tab0 AS cor0
----
107844
283557
3721

skipif mysql # not compatible
query I rowsort label-4659
SELECT - + cor0.col0 / - col2 + - col2 * cor0.col1 * - 38 AS col0 FROM tab0 AS cor0
----
107844
283557
3721

query I rowsort
SELECT DISTINCT + col1 * - 87 FROM tab2 cor0
----
-1479
-2697
-5133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col2 + + col0 col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT - 10 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT DISTINCT - col1 * tab0.col1 * + tab0.col2 + col2 * + 30 FROM tab0
----
-243078
-676582
-9379

query I rowsort
SELECT col1 * 25 * + col0 AS col1 FROM tab1
----
16000
1950
26000

query I rowsort
SELECT DISTINCT col1 * + 95 + col0 FROM tab2
----
1694
2952
5683

query I rowsort
SELECT + + cor0.col1 * col2 + col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
195
2957
7635

query I rowsort
SELECT DISTINCT 36 + + col0 * ( 65 * col1 ) AS col1 FROM tab0 AS cor0
----
134196
220711
526471

query I rowsort
SELECT - 67 + col2 * + col0 AS col1 FROM tab2 AS cor0
----
122
1961
2935

query I rowsort
SELECT + 84 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT - ( + col0 ) + - col1 FROM tab2
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4671
SELECT - col1 DIV + col2 + - col1 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4671
SELECT - col1 / + col2 + - col1 FROM tab1
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4672
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4672
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT 16 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
16

query I rowsort
SELECT DISTINCT - 31 + col2 FROM tab1 AS cor0
----
23
26
65

query I rowsort
SELECT - + 80 * - col2 AS col0 FROM tab2 AS cor0
----
2080
2160
3040

query I rowsort
SELECT - + ( - col1 ) + col1 * col1 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4677
SELECT DISTINCT - - 13 + - col2 DIV ( cor0.col0 ) FROM tab0 AS cor0
----
12
13

skipif mysql # not compatible
query I rowsort label-4677
SELECT DISTINCT - - 13 + - col2 / ( cor0.col0 ) FROM tab0 AS cor0
----
12
13

query I rowsort
SELECT - + 35 AS col0 FROM tab0 AS cor0
----
-35
-35
-35

query I rowsort
SELECT + + cor0.col0 * + col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col0 * + col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + + cor0.col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT 40 * 80 * cor0.col2 AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
105600
262400
3200

onlyif mysql # use DIV operator for integer division
query I rowsort label-4683
SELECT + 74 + - tab1.col0 DIV col1 FROM tab1
----
68
68
74

skipif mysql # not compatible
query I rowsort label-4683
SELECT + 74 + - tab1.col0 / col1 FROM tab1
----
68
68
74

query I rowsort
SELECT 31 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT ALL + - col2 * col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL col1 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + col2 * - 14 FROM tab1 AS cor0
----
-1344
-756
-798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4688
SELECT - cor0.col0 + CAST( + cor0.col2 AS SIGNED ) * + cor0.col0 FROM tab2 AS cor0
----
182
1950
2923

skipif mysql # not compatible
query I rowsort label-4688
SELECT - cor0.col0 + CAST ( + cor0.col2 AS INTEGER ) * + cor0.col0 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4689
SELECT + col2 * - CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-4689
SELECT + col2 * - CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + col1 + - col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL ( + cor0.col2 ) * col1 + - col1 * - col2 * + col0 FROM tab2 AS cor0
----
121186
51680
6696

query I rowsort
SELECT + col1 * - 46 FROM tab1 cor0
----
-1196
-460
-598

query I rowsort
SELECT DISTINCT - 69 FROM tab0 cor0
----
-69

query I rowsort
SELECT 67 + - 90 AS col1 FROM tab1 AS cor0
----
-23
-23
-23

query I rowsort
SELECT + 66 AS col1 FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT - - ( 83 ) FROM tab1 AS cor0
----
83
83
83

query I rowsort
SELECT + 52 + col2 FROM tab0 cor0
----
134
53
85

query I rowsort
SELECT DISTINCT - 85 * col1 + cor0.col1 * + 30 AS col1 FROM tab2 cor0
----
-1705
-3245
-935

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4699
SELECT ALL col2 * 85 + - col0 * CAST( NULL AS SIGNED ) * - col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4699
SELECT ALL col2 * 85 + - col0 * CAST ( NULL AS INTEGER ) * - col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * col1 - - col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4701
SELECT DISTINCT CAST( NULL AS SIGNED ) * col1 + + col2 * - col2 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4701
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col1 + + col2 * - col2 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT 50 + col2 AS col0 FROM tab0 AS cor0
----
132
51
83

query I rowsort
SELECT ALL + + 65 * - col0 AS col0 FROM tab1 AS cor0
----
-195
-4160
-5200

query I rowsort
SELECT ALL - ( col2 ) * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4705
SELECT 20 + + col0 DIV - 98 AS col1 FROM tab2 AS cor0
----
20
20
20

skipif mysql # not compatible
query I rowsort label-4705
SELECT 20 + + col0 / - 98 AS col1 FROM tab2 AS cor0
----
20
20
20

query I rowsort
SELECT 19 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

onlyif mysql # use DIV operator for integer division
query I rowsort label-4707
SELECT ALL - ( - tab1.col1 ) + - col0 DIV - CAST( col2 AS SIGNED ) AS col2 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-4707
SELECT ALL - ( - tab1.col1 ) + - col0 / - CAST ( col2 AS INTEGER ) AS col2 FROM tab1
----
11
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 16 + 33 col0 FROM tab2 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT 62 + + col0 AS col0 FROM tab1 AS cor0
----
126
142
65

query I rowsort
SELECT + 11 * - cor0.col2 + col2 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-108
-3201
-8364

query I rowsort
SELECT - 91 * 12 AS col1 FROM tab2 AS cor0
----
-1092
-1092
-1092

query I rowsort
SELECT - col1 + - 89 FROM tab1 AS cor0
----
-102
-115
-99

query I rowsort
SELECT DISTINCT + + col2 * cor0.col2 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT col0 * ( col1 ) * col2 FROM tab2
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 58 col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
58

query I rowsort
SELECT - 70 * - 57 AS col2 FROM tab1 AS cor0
----
3990
3990
3990

query I rowsort
SELECT - - cor0.col2 + col0 + - col0 * col1 * 61 AS col1 FROM tab0 AS cor0
----
-125847
-207059
-493868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4718
SELECT - - CAST( - 78 AS SIGNED ) FROM tab1 AS cor0
----
-78
-78
-78

skipif mysql # not compatible
query I rowsort label-4718
SELECT - - CAST ( - 78 AS INTEGER ) FROM tab1 AS cor0
----
-78
-78
-78

query I rowsort
SELECT + - ( - col2 ) AS col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4720
SELECT + 46 DIV - col0 AS col0 FROM tab0 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4720
SELECT + 46 / - col0 AS col0 FROM tab0 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4721
SELECT + - 56 DIV - col1 AS col0 FROM tab2 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-4721
SELECT + - 56 / - col1 AS col0 FROM tab2 AS cor0
----
0
1
3

query I rowsort
SELECT - col1 + cor0.col2 AS col2 FROM tab0 cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + col0 col0 FROM tab0 cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4724
SELECT DISTINCT - tab1.col1 DIV + 17 AS col0 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-4724
SELECT DISTINCT - tab1.col1 / + 17 AS col0 FROM tab1
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4725
SELECT col2 * - CAST( NULL AS SIGNED ) * + col0 + + col0 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4725
SELECT col2 * - CAST ( NULL AS INTEGER ) * + col0 + + col0 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * ( + 4 ) FROM tab0 cor0
----
132
328
4

query I rowsort
SELECT + col0 - + 38 * 4 AS col1 FROM tab2 AS cor0
----
-145
-73
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col1 col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 * 21 AS col0 FROM tab2 AS cor0
----
546
567
798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4730
SELECT + CAST( - 54 AS SIGNED ) FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

skipif mysql # not compatible
query I rowsort label-4730
SELECT + CAST ( - 54 AS INTEGER ) FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

onlyif mysql # use DIV operator for integer division
query I rowsort label-4731
SELECT DISTINCT - col0 DIV col0 + 65 + - col1 AS col0 FROM tab0
----
-22
-27
-33

skipif mysql # not compatible
query I rowsort label-4731
SELECT DISTINCT - col0 / col0 + 65 + - col1 AS col0 FROM tab0
----
-22
-27
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-4732
SELECT ALL - col0 * 97 DIV + col0 + - tab2.col2 * + tab2.col1 AS col0 FROM tab2
----
-1631
-743
-934

skipif mysql # not compatible
query I rowsort label-4732
SELECT ALL - col0 * 97 / + col0 + - tab2.col2 * + tab2.col1 AS col0 FROM tab2
----
-1631
-743
-934

query I rowsort
SELECT - + 39 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT + col1 * - 6 FROM tab1 AS cor0
----
-156
-60
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4735
SELECT ALL - + col0 + - CAST( 31 + cor0.col0 * ( - col2 ) AS SIGNED ) AS col1 FROM tab1 AS cor0
----
128
3553
7569

skipif mysql # not compatible
query I rowsort label-4735
SELECT ALL - + col0 + - CAST ( 31 + cor0.col0 * ( - col2 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
----
128
3553
7569

query I rowsort
SELECT ALL + col0 + + col1 + col1 AS col2 FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT DISTINCT - + col2 - + col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT - col1 + - col2 * - col1 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-4739
SELECT + col0 * col2 * ( cor0.col2 ) + + col1 + + col1 DIV col2 FROM tab1 AS cor0
----
207946
737293
8774

skipif mysql # not compatible
query I rowsort label-4739
SELECT + col0 * col2 * ( cor0.col2 ) + + col1 + + col1 / col2 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT + col1 + + col1 + - col0 FROM tab2 AS cor0
----
-45
40
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-4741
SELECT ALL - col0 * 20 + col0 DIV + col1 AS col0 FROM tab0 AS cor0
----
-1780
-480
-700

skipif mysql # not compatible
query I rowsort label-4741
SELECT ALL - col0 * 20 + col0 / + col1 AS col0 FROM tab0 AS cor0
----
-1780
-480
-700

query I rowsort
SELECT ALL cor0.col2 + + 67 FROM tab1 AS cor0
----
121
124
163

query I rowsort
SELECT col2 * - cor0.col0 * - col1 + - col1 + - 60 FROM tab0 cor0
----
3238
663967
67966

query I rowsort
SELECT DISTINCT + - ( col0 ) * - col0 AS col1 FROM tab2 cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col2 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT + + col0 + + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4747
SELECT DISTINCT - CAST( + col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4747
SELECT DISTINCT - CAST ( + col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + 14 + col2 + - col0 * 15 FROM tab2 AS cor0
----
-1130
-1133
-64

query I rowsort
SELECT + + 81 + - col0 FROM tab1 AS cor0
----
1
17
78

query I rowsort
SELECT DISTINCT - col1 - - col2 FROM tab1
----
28
47
83

query I rowsort
SELECT - cor0.col0 * - col1 + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4752
SELECT ALL + CAST( NULL AS SIGNED ) * - col2 + col2 * + 78 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4752
SELECT ALL + CAST ( NULL AS INTEGER ) * - col2 + col2 * + 78 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 - col0 col2 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT ALL col0 + col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - cor0.col2 - + col0 * + ( + col0 ) AS col1 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT + - 88 * col0 FROM tab1 AS cor0
----
-264
-5632
-7040

query I rowsort
SELECT - ( cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col2 * + col0 * col1 + - 67 FROM tab2 AS cor0
----
119585
50967
5792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4759
SELECT ALL + - cor0.col0 - CAST( 44 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-122
-123
-51

skipif mysql # not compatible
query I rowsort label-4759
SELECT ALL + - cor0.col0 - CAST ( 44 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-122
-123
-51

query I rowsort
SELECT col1 + + col1 * - col2 * - col2 FROM tab1 AS cor0
----
119821
32500
75842

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * + cor0.col1 + col0 col2 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - 24 * col0 AS col0 FROM tab1
----
-1536
-1920
-72

query I rowsort
SELECT ALL + cor0.col2 * + 14 AS col1 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT ALL - col2 * col0 + col1 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + cor0.col0 + - ( col2 ) AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT + - col0 + + col2 * cor0.col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT DISTINCT + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col2 - col0 col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT + col0 + ( col0 ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL col1 + + col1 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT col1 - col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT ALL + 42 AS col1 FROM tab0
----
42
42
42

query I rowsort
SELECT ALL - 8 AS col2 FROM tab2
----
-8
-8
-8

query I rowsort
SELECT ALL tab1.col0 - tab1.col1 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 FROM tab2 AS cor0
----
-118
-34
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4776
SELECT ALL - - 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-4776
SELECT ALL - - CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 * - col1 * col0 FROM tab0 cor0
----
118825
49536
720811

query I rowsort
SELECT - cor0.col0 + 29 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to df06b7436a9af254bcf72564119e62a2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4779
SELECT DISTINCT + CAST( 91 AS SIGNED ) + col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1339
1495
661

skipif mysql # not compatible
query I rowsort label-4779
SELECT DISTINCT + CAST ( 91 AS INTEGER ) + col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1339
1495
661

query I rowsort
SELECT ALL ( 80 ) * col1 + + ( + 87 * col1 ) AS col2 FROM tab2 AS cor0
----
2839
5177
9853

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2, tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - ( 0 ) FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 35 col2 FROM tab2 AS cor0
----
1330
910
945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT DISTINCT - + 19 * ( col0 ) + - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1032
-1890
-9612

query I rowsort
SELECT col1 + col1 * col1 FROM tab1
----
110
182
702

query I rowsort
SELECT ALL + ( - cor0.col2 ) + col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + 52 FROM tab0 cor0
----
52
52
52

query I rowsort
SELECT ALL col1 - - col0 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + + cor0.col2 * col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4791
SELECT + col2 * - col0 / + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4791
SELECT + col2 * - col0 / + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4792
SELECT CAST( 63 AS SIGNED ) FROM tab0
----
63
63
63

skipif mysql # not compatible
query I rowsort label-4792
SELECT CAST ( 63 AS INTEGER ) FROM tab0
----
63
63
63

query I rowsort
SELECT ALL 53 FROM tab2, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT + + col1 + + ( col1 ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + + col0 * cor0.col1 + + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT + col2 + col1 AS col0 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col2 * - col2 col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL + + col2 - - 82 FROM tab2 AS cor0
----
108
109
120

query I rowsort
SELECT + + cor0.col0 * + 24 + - 88 FROM tab1 AS cor0
----
-16
1448
1832

query I rowsort
SELECT - col1 + + 14 AS col0 FROM tab1 cor0
----
-12
1
4

query I rowsort
SELECT DISTINCT col1 + col0 + - col2 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT DISTINCT col1 + - 40 FROM tab0 AS cor0
----
46
51
57

query I rowsort
SELECT ALL - col2 + - col2 * col1 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 70 col0 FROM tab0 cor0
----
2310
5740
70

query I rowsort
SELECT + + col2 + + col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-4806
SELECT DISTINCT + cor0.col1 DIV + col0 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-4806
SELECT DISTINCT + cor0.col1 / + col0 FROM tab2 cor0
----
0
4

query I rowsort
SELECT DISTINCT + col1 + 4 * - col0 AS col0 FROM tab2 AS cor0
----
-253
-299
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4808
SELECT - - col2 DIV 39 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-4808
SELECT - - col2 / 39 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 + col2 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT - ( - col0 ) + col0 + col1 FROM tab2
----
175
215
45

query I rowsort
SELECT + 7 AS col0 FROM tab2
----
7
7
7

query I rowsort
SELECT + ( tab0.col2 ) + 93 - + col1 FROM tab0
----
-3
40
84

query I rowsort
SELECT col0 + col2 - col2 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT - col1 - + col0 * + col1 AS col1 FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT DISTINCT col2 * - 22 FROM tab1 AS cor0
----
-1188
-1254
-2112

query I rowsort
SELECT - col0 + + col1 AS col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL + + col1 * 35 AS col0 FROM tab2 cor0
----
1085
2065
595

onlyif mysql # use DIV operator for integer division
query I rowsort label-4818
SELECT ALL - col0 DIV 64 AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4818
SELECT ALL - col0 / 64 AS col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + cor0.col0 * - col1 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT - col1 + - 74 * - cor0.col1 FROM tab0 AS cor0
----
6278
6643
7081

query I rowsort
SELECT DISTINCT + col2 * 7 AS col0 FROM tab0 AS cor0
----
231
574
7

query I rowsort
SELECT - col1 * - 76 + col2 * col2 FROM tab0 AS cor0
----
13640
7373
7625

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4823
SELECT - col1 * CAST( + col1 AS SIGNED ) AS col0 FROM tab1
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-4823
SELECT - col1 * CAST ( + col1 AS INTEGER ) AS col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT col0 + col2 + + col2 AS col2 FROM tab0
----
253
37
90

query I rowsort
SELECT + col1 * 60 + + col0 FROM tab2
----
1099
1867
3618

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 + + col0 col0 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL col1 + col1 * col1 + + tab2.col1 * + ( col1 ) FROM tab2
----
1953
595
7021

query I rowsort
SELECT DISTINCT col0 * + 1 + - col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT - col1 + col2 + col0 AS col0 FROM tab0 cor0
----
-29
-61
80

query I rowsort
SELECT ALL + col2 * 66 AS col0 FROM tab2
----
1716
1782
2508

onlyif mysql # use DIV operator for integer division
query I rowsort label-4831
SELECT ALL col0 DIV + 86 AS col2 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4831
SELECT ALL col0 / + 86 AS col2 FROM tab0
----
0
0
1

query I rowsort
SELECT + col2 + - col2 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 32 + - ( - col0 + col0 ) FROM tab2 AS cor0
----
32
32
32

query I rowsort
SELECT DISTINCT - col2 * - col0 * - col1 AS col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT col2 * 77 AS col2 FROM tab0 AS cor0
----
2541
6314
77

query I rowsort
SELECT DISTINCT - ( col1 ) * + col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + - 63 * + 3 AS col1 FROM tab2 AS cor0
----
-189

query I rowsort
SELECT ALL - ( - 74 ) AS col0 FROM tab2 cor0
----
74
74
74

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) * - col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT col2 * - 63 FROM tab0 AS cor0
----
-2079
-5166
-63

query I rowsort
SELECT + + 95 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT ALL - 0 + col2 * + 91 AS col0 FROM tab2 AS cor0
----
2366
2457
3458

query I rowsort
SELECT ALL + - 40 * + col0 + + col2 * + col0 FROM tab1 AS cor0
----
1088
42
4480

query I rowsort
SELECT ALL + col2 * cor0.col0 + - 29 AS col1 FROM tab0 AS cor0
----
6
7269
763

query I rowsort
SELECT DISTINCT + col0 - + col0 * col1 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + - col2 * + col1 + - cor0.col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT col1 * col2 + + 12 FROM tab2 AS cor0
----
1546
658
849

query I rowsort
SELECT + - 97 AS col1 FROM tab1 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ALL - ( col2 ) * + 96 + 36 AS col2 FROM tab2 AS cor0
----
-2460
-2556
-3612

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col0 ) + + col0 * + col1 col0 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( col1 ) - + col2 col0 FROM tab1 AS cor0
----
1152
1350
513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4852
SELECT - col1 * + col1 - 16 * - col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4852
SELECT - col1 * + col1 - 16 * - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4853
SELECT + col0 DIV 81 + + ( col0 ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4853
SELECT + col0 / 81 + + ( col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col2 * col0 + - col1 * - col2 AS col2 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT col2 + 72 AS col1 FROM tab1 AS cor0
----
126
129
168

query I rowsort
SELECT - + cor0.col1 + col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col1 + + col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + cor0.col2 * + col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - ( cor0.col0 ) * 36 + col1 AS col1 FROM tab0 AS cor0
----
-1163
-3113
-778

onlyif mysql # use DIV operator for integer division
query I rowsort label-4860
SELECT DISTINCT - 58 + - col2 * col2 DIV col0 FROM tab2 AS cor0
----
-162
-66
-76

skipif mysql # not compatible
query I rowsort label-4860
SELECT DISTINCT - 58 + - col2 * col2 / col0 FROM tab2 AS cor0
----
-162
-66
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4861
SELECT DISTINCT + 50 DIV col1 - col0 * col0 col0 FROM tab1 AS cor0
----
-4091
-6397
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4861
SELECT DISTINCT + 50 / col1 - col0 * col0 col0 FROM tab1 AS cor0
----
-4091
-6397
-8

query I rowsort
SELECT - + col2 * col0 + ( + col0 + col1 ) FROM tab0 AS cor0
----
-682
-7118
97

query I rowsort
SELECT - col1 - col2 AS col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT ( - 60 ) * + col2 FROM tab0
----
-1980
-4920
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4865
SELECT - CAST( NULL AS DECIMAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4865
SELECT - CAST ( NULL AS REAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col2 * - col2 + + col0 AS col1 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT - - col0 * col2 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT 98 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1, tab1, tab2 AS cor2
----
243 values hashing to d130086b8d8a18a3ac49ce2321d35e00

query I rowsort
SELECT col1 * + 11 AS col1 FROM tab2 cor0
----
187
341
649

onlyif mysql # use DIV operator for integer division
query I rowsort label-4870
SELECT DISTINCT - col1 DIV - CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-4870
SELECT DISTINCT - col1 / - CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT ALL 70 * + 52 FROM tab1, tab2 AS cor0
----
9 values hashing to 7332ecfeffc63276eec1c10824bb9475

query I rowsort
SELECT DISTINCT - - col2 + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4873
SELECT - - col1 + + CAST( + 81 AS SIGNED ) * + col2 FROM tab2 cor0
----
2165
2218
3095

skipif mysql # not compatible
query I rowsort label-4873
SELECT - - col1 + + CAST ( + 81 AS INTEGER ) * + col2 FROM tab2 cor0
----
2165
2218
3095

query I rowsort
SELECT 20 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT ALL 55 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL col0 * 25 AS col0 FROM tab2
----
175
1950
1975

query I rowsort
SELECT ( + col0 ) + + col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT 15 * col0 FROM tab1 AS cor0
----
1200
45
960

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) * + col0 * - col0 col0 FROM tab2
----
-343
-474552
-493039

query I rowsort
SELECT 95 * + 89 + col2 FROM tab1 AS cor0
----
8509
8512
8551

query I rowsort
SELECT - ( col2 ) + - col1 FROM tab0 cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - 86 col0 FROM tab0
----
-4
-53
-85

query I rowsort
SELECT - 88 - col0 * col1 AS col1 FROM tab0 cor0
----
-2152
-3483
-8187

query I rowsort
SELECT DISTINCT + 12 AS col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-4886
SELECT - - col0 + col2 DIV + col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4886
SELECT - - col0 + col2 / + col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + col0 + col0 AS col1 FROM tab1 cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 5 + cor0.col0 col0 FROM tab2 AS cor0
----
2
73
74

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1, tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4890
SELECT + ( + col2 ) * col0 + - 11 DIV col1 + - ( - tab2.col0 + col2 ) * 13 FROM tab2
----
-71
2704
3535

skipif mysql # not compatible
query I rowsort label-4890
SELECT + ( + col2 ) * col0 + - 11 / col1 + - ( - tab2.col0 + col2 ) * 13 FROM tab2
----
-71
2704
3535

query I rowsort
SELECT col0 + - tab0.col2 AS col0 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4892
SELECT + 22 DIV - col0 AS col2 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4892
SELECT + 22 / - col0 AS col2 FROM tab2
----
-3
0
0

query I rowsort
SELECT col1 + - col0 * col0 * col0 - - cor0.col0 AS col0 FROM tab2 AS cor0
----
-305
-474415
-492943

onlyif mysql # use DIV operator for integer division
query I rowsort label-4894
SELECT - ( + col1 ) DIV + col0 + 93 col0 FROM tab0 AS cor0
----
90
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4894
SELECT - ( + col1 ) / + col0 + 93 col0 FROM tab0 AS cor0
----
90
91
92

query I rowsort
SELECT DISTINCT cor0.col1 + col2 * - ( - col2 + col2 ) AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - + col0 * col2 + col0 * col0 - col2 AS col1 FROM tab2 AS cor0
----
-167
3201
4030

onlyif mysql # use DIV operator for integer division
query I rowsort label-4897
SELECT DISTINCT + - col2 DIV col1 + + col1 + - col1 DIV col0 AS col2 FROM tab1 AS cor0
----
16
5
6

skipif mysql # not compatible
query I rowsort label-4897
SELECT DISTINCT + - col2 / col1 + + col1 + - col1 / col0 AS col2 FROM tab1 AS cor0
----
16
5
6

query I rowsort
SELECT DISTINCT + - 91 FROM tab2 cor0
----
-91

query I rowsort
SELECT ALL + 34 FROM tab2 cor0
----
34
34
34

query I rowsort
SELECT ALL + tab2.col2 * ( - tab2.col0 ) AS col1 FROM tab2
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL + 68 FROM tab2, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab1, tab2 AS cor0
----
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-4904
SELECT + + col0 DIV col0 + + col1 * col2 FROM tab0 AS cor0
----
2839
7463
98

skipif mysql # not compatible
query I rowsort label-4904
SELECT + + col0 / col0 + + col1 * col2 FROM tab0 AS cor0
----
2839
7463
98

query I rowsort
SELECT ALL + - 57 AS col1 FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT 85 * col1 FROM tab1 cor0
----
1105
2210
850

query I rowsort
SELECT ALL + + cor0.col2 AS col1 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4908
SELECT DISTINCT - + col0 DIV col0 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4908
SELECT DISTINCT - + col0 / col0 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT - 41 * + 91 * col1 AS col1 FROM tab1 AS cor0
----
-37310
-48503
-97006

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 21 col1 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT col0 * col2 + - col1 * - col1 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT DISTINCT + 81 * - col1 AS col0 FROM tab2 AS cor0
----
-1377
-2511
-4779

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4913
SELECT DISTINCT + CAST( col1 AS SIGNED ) * + cor0.col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-4913
SELECT DISTINCT + CAST ( col1 AS INTEGER ) * + cor0.col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - - 15 * col2 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT col2 + + col0 * col1 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4916
SELECT ALL + CAST( col1 AS SIGNED ) * + col0 + - 56 FROM tab1 AS cor0
----
22
584
984

skipif mysql # not compatible
query I rowsort label-4916
SELECT ALL + CAST ( col1 AS INTEGER ) * + col0 + - 56 FROM tab1 AS cor0
----
22
584
984

query I rowsort
SELECT + + ( col2 ) * + col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4918
SELECT ALL CAST( 64 AS SIGNED ) * col2 AS col0 FROM tab0 AS cor0
----
2112
5248
64

skipif mysql # not compatible
query I rowsort label-4918
SELECT ALL CAST ( 64 AS INTEGER ) * col2 AS col0 FROM tab0 AS cor0
----
2112
5248
64

query I rowsort
SELECT DISTINCT col1 * ( - col0 * + col1 ) AS col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col2 * col1 * - 99 AS col1 FROM tab0
----
-280962
-738738
-9603

query I rowsort
SELECT - 41 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT - 22 * cor0.col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 9b50763b644d97a3a66a57915a195b27

query I rowsort
SELECT ALL col2 * + col1 + - col1 * col0 FROM tab0
----
-3298
-637
774

query I rowsort
SELECT 21 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT ALL + - col2 * - col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + - col0 * 37 AS col0 FROM tab2 AS cor0
----
-259
-2886
-2923

query I rowsort
SELECT ALL + + col0 + col2 AS col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT - col0 + - col2 * + cor0.col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT - cor0.col0 * ( col1 + col2 ) * + ( - col0 ) FROM tab1 AS cor0
----
274432
697600
720

query I rowsort
SELECT col1 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4931
SELECT - col1 * - CAST( ( + col0 ) AS SIGNED ) FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4931
SELECT - col1 * - CAST ( ( + col0 ) AS INTEGER ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 + ( 79 ) AS col2 FROM tab2
----
110
138
96

query I rowsort
SELECT DISTINCT tab2.col1 * 55 FROM tab2
----
1705
3245
935

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 cor2, tab0 AS cor3
----
3645 values hashing to be7848c91584d04f21fd5bbb0d239aca

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col0 + - col2 + - col0 col1 FROM tab1 AS cor0
----
-1216
-135
-761

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4936
SELECT DISTINCT + CAST( 98 AS SIGNED ) * - col0 * col0 + - col2 - + cor0.col1 FROM tab2 AS cor0
----
-4860
-596317
-611673

skipif mysql # not compatible
query I rowsort label-4936
SELECT DISTINCT + CAST ( 98 AS INTEGER ) * - col0 * col0 + - col2 - + cor0.col1 FROM tab2 AS cor0
----
-4860
-596317
-611673

query I rowsort
SELECT DISTINCT ( + ( - col0 ) ) * col0 FROM tab1
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4938
SELECT ALL CAST( col1 AS SIGNED ) * col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-4938
SELECT ALL CAST ( col1 AS INTEGER ) * col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - - 45 * col2 FROM tab1 AS cor0
----
2430
2565
4320

query I rowsort
SELECT col0 + col1 + col2 * 83 * + col0 FROM tab2
----
15725
168461
249262

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + col0 * col0 + 28 FROM tab0 AS cor0
----
1253
604
7949

query I rowsort
SELECT DISTINCT tab0.col1 * - tab0.col0 + col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT + 77 + - col1 AS col1 FROM tab1
----
51
64
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4945
SELECT ALL + cor0.col0 * cor0.col1 DIV cor0.col0 + col1 FROM tab0 AS cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-4945
SELECT ALL + cor0.col0 * cor0.col1 / cor0.col0 + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - cor0.col2 - - col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT ( col0 ) * cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col1 * - col1 + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1690
-1733
-4157

query I rowsort
SELECT DISTINCT + cor0.col1 + + col0 * - col2 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 35 col1 FROM tab0 AS cor0
----
35

query I rowsort
SELECT DISTINCT - col0 * + ( col2 ) + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - - col2 * ( cor0.col2 ) + + col2 * - ( col1 ) FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT + - col0 * + cor0.col1 + 88 FROM tab1 AS cor0
----
-552
-952
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-4954
SELECT + col2 DIV + 63 + - 87 FROM tab1 cor0
----
-86
-87
-87

skipif mysql # not compatible
query I rowsort label-4954
SELECT + col2 / + 63 + - 87 FROM tab1 cor0
----
-86
-87
-87

query I rowsort
SELECT + cor0.col0 * col1 - 18 FROM tab1 AS cor0
----
1022
60
622

query I rowsort
SELECT - col0 + col1 + col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col1 + 73 col1 FROM tab0 cor0
----
-13
-18
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + cor0.col2 col1 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col2 * ( 23 + - cor0.col1 ) FROM tab2 AS cor0
----
-216
-936
228

query I rowsort
SELECT ALL + col0 * 12 FROM tab0 cor0
----
1068
288
420

query I rowsort
SELECT + col2 + 95 * - col1 FROM tab1 cor0
----
-1139
-2416
-893

query I rowsort
SELECT col2 * 75 + + col2 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT DISTINCT col1 * col2 + - ( ( col1 ) * ( col2 ) ) AS col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT - 24 * - col2 + col0 * - col1 AS col2 FROM tab1
----
1218
1264
728

query I rowsort
SELECT + 79 + - col2 AS col2 FROM tab2
----
41
52
53

skipif mysql # not compatible
query I rowsort
SELECT + col2 + + col1 + CAST ( - ( + col2 ) AS REAL ) / col2 AS col0 FROM tab1
----
108
66
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4967
SELECT col0 + CAST( - col1 AS SIGNED ) * + col2 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif mysql # not compatible
query I rowsort label-4967
SELECT col0 + CAST ( - col1 AS INTEGER ) * + col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT col2 * + col2 + 86 FROM tab0 AS cor0
----
1175
6810
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4969
SELECT - + col2 - CAST( ( + col2 ) AS SIGNED ) FROM tab1 AS cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-4969
SELECT - + col2 - CAST ( ( + col2 ) AS INTEGER ) FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + + col2 * + col2 + 73 AS col2 FROM tab2 AS cor0
----
1517
749
802

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4971
SELECT cor0.col2 - CAST( - 84 AS SIGNED ) * + col1 AS col1 FROM tab1 AS cor0
----
1188
2238
897

skipif mysql # not compatible
query I rowsort label-4971
SELECT cor0.col2 - CAST ( - 84 AS INTEGER ) * + col1 AS col1 FROM tab1 AS cor0
----
1188
2238
897

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4972
SELECT col0 * + ( - ( - col1 ) + + CAST( NULL AS SIGNED ) ) * col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4972
SELECT col0 * + ( - ( - col1 ) + + CAST ( NULL AS INTEGER ) ) * col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - 35 + - col0 AS col1 FROM tab0 AS cor0
----
-124
-59
-70

query I rowsort
SELECT - col0 * 25 AS col0 FROM tab2
----
-175
-1950
-1975

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4975
SELECT ALL - CAST( + 15 AS SIGNED ) AS col0 FROM tab0
----
-15
-15
-15

skipif mysql # not compatible
query I rowsort label-4975
SELECT ALL - CAST ( + 15 AS INTEGER ) AS col0 FROM tab0
----
-15
-15
-15

query I rowsort
SELECT 92 + col1 * - col0 FROM tab0 AS cor0
----
-1972
-3303
-8007

query I rowsort
SELECT + cor0.col2 * col2 AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT cor0.col1 + col2 * 13 FROM tab0 cor0
----
110
1157
515

query I rowsort
SELECT ALL col0 * + tab1.col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col2 * + col1 + + ( - 95 ) + cor0.col2 * + 96 FROM tab0 AS cor0
----
15239
5911
98

query I rowsort
SELECT ALL - + cor0.col0 - + col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT col2 + + col1 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * cor0.col1 col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - + 83 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-83

query I rowsort
SELECT DISTINCT + col1 * + col1 + + col1 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT ALL - - col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 WHERE NOT ( NULL ) < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4988
SELECT ALL col1 * - col2 + - col2 - - col2 DIV col1 col0 FROM tab1
----
-1337
-1456
-622

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4988
SELECT ALL col1 * - col2 + - col2 - - col2 / col1 col0 FROM tab1
----
-1337
-1456
-622

query I rowsort
SELECT ALL + col2 - col0 AS col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL - tab0.col2 + col0 - - col2 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL - + col2 * cor0.col0 * + col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT - col2 - - col0 * - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT - col1 + + col1 * - col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4994
SELECT - col2 + - cor0.col1 DIV col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4994
SELECT - col2 + - cor0.col1 / col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + - col2 * col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col0 * + col2 - cor0.col1 * - col1 FROM tab2 AS cor0
----
1150
3291
5509

onlyif mysql # use DIV operator for integer division
query I rowsort label-4997
SELECT ALL - col2 DIV col1 AS col0 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4997
SELECT ALL - col2 / col1 AS col0 FROM tab2
----
-2
0
0

query I rowsort
SELECT + - col1 + + col1 * - col0 AS col1 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + col0 + + col0 * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT col1 * col2 + - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT col1 + + col1 AS col2 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - cor0.col2 * - col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5004
SELECT + 57 * + col1 DIV + col1 AS col0 FROM tab1 AS cor0
----
57
57
57

skipif mysql # not compatible
query I rowsort label-5004
SELECT + 57 * + col1 / + col1 AS col0 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT 59 AS col0 FROM tab2 cor0
----
59
59
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5006
SELECT ALL - col2 DIV + col2 AS col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5006
SELECT ALL - col2 / + col2 AS col2 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 39 * col1 + + col1 * cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
23494
273819
7936

query I rowsort
SELECT ALL + col0 * - col2 - col2 * col2 FROM tab0 AS cor0
----
-14022
-1881
-36

query I rowsort
SELECT ALL - col1 * col2 + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - ( col1 * + col1 ) AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT ALL + col2 * - col1 + col1 AS col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL col0 - tab1.col0 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5014
SELECT DISTINCT col0 DIV col1 + col1 * col0 AS col1 FROM tab2
----
1347
217
4603

skipif mysql # not compatible
query I rowsort label-5014
SELECT DISTINCT col0 / col1 + col1 * col0 AS col1 FROM tab2
----
1347
217
4603

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT + tab0.col1 + col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 WHERE ( col1 ) BETWEEN ( col1 ) AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col0 + col0 IN ( + col0 * + col1 + + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5019
SELECT col1 DIV col1 col1 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5019
SELECT col1 / col1 col1 FROM tab2
----
1
1
1

query I rowsort
SELECT + tab2.col2 + - col1 AS col2 FROM tab2
----
-33
-4
21

query III rowsort
SELECT * FROM tab1 WHERE NOT col1 + col1 * col2 NOT IN ( + col1 )
----

query I rowsort
SELECT DISTINCT - col2 * tab1.col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT col1 + col2 * col2 * - col0 AS col2 FROM tab0
----
-26050
-598345
62

query I rowsort
SELECT - col1 + + col2 * + col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT DISTINCT - col1 + - col1 AS col0 FROM tab2
----
-118
-34
-62

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL BETWEEN NULL AND col2
----

query I rowsort
SELECT ALL + tab0.col1 * - col1 + col1 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT + col2 * col2 + col0 AS col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT + col0 + col1 * col2 FROM tab1
----
1328
1407
634

query I rowsort
SELECT DISTINCT + + ( + col2 ) * 85 + + col1 AS col1 FROM tab2 AS cor0
----
2269
2326
3247

query I rowsort
SELECT tab0.col2 + col0 - - col1 AS col2 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT col0 + - col1 * col2 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT - col2 - + col2 AS col0 FROM tab0
----
-164
-2
-66

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL BETWEEN NULL AND col2
----

query III rowsort
SELECT * FROM tab0 WHERE NOT + col1 > NULL
----

query I rowsort
SELECT + col1 + - tab0.col1 * col0 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - col2 * col0 * + col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 AS cor0 WHERE - col0 IN ( col2 + + col2 )
----

query I rowsort
SELECT ALL col0 + - col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL - col1 + + col2 * col0 * + col1 AS col1 FROM tab1
----
36470
4186
99827

query I rowsort
SELECT DISTINCT - col1 + - col0 * + tab1.col2 AS col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT col2 - col1 AS col2 FROM tab0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 col1 FROM tab2 WHERE NOT NULL NOT IN ( col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NULL IN ( + col0 + col2 )
----

query I rowsort
SELECT + col0 FROM tab0 AS cor0 WHERE + col1 NOT BETWEEN + col0 * col0 + col2 * col2 * col1 + cor0.col1 AND NULL
----
24
35
89

query I rowsort
SELECT + col0 + - col0 - + 99 * col1 FROM tab1 AS cor0
----
-1287
-2574
-990

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col1 AS REAL ) + + col0 * - tab1.col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT 55 * - tab0.col1 + - tab0.col2 AS col1 FROM tab0
----
-4763
-5087
-5336

query I rowsort
SELECT - col2 + - col1 * col1 AS col2 FROM tab1 AS cor0
----
-157
-265
-730

onlyif mysql # use DIV operator for integer division
query I rowsort label-5050
SELECT + col0 DIV col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5050
SELECT + col0 / col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab2
----
99

query I rowsort
SELECT DISTINCT col1 + - col0 * - col0 AS col1 FROM tab2
----
6143
6258
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - tab0.col1 + ( col1 * + col0 ) col2 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT 18 * - col0 FROM tab1
----
-1152
-1440
-54

query I rowsort
SELECT DISTINCT + 67 FROM tab1, tab0, tab1 AS cor0
----
67

query I rowsort
SELECT DISTINCT + col2 + col0 * col2 * - 76 FROM tab0 AS cor0
----
-2659
-554566
-60159

query I rowsort
SELECT + - 87 + - col1 FROM tab1 AS cor0
----
-100
-113
-97

query I rowsort
SELECT DISTINCT - - 14 + col2 FROM tab0 AS cor0
----
15
47
96

query I rowsort
SELECT 18 + col1 * + ( + col0 ) FROM tab1 AS cor0
----
1058
658
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col0 - - 17 col2 FROM tab0 AS cor0
----
-18
-7281
-775

query I rowsort
SELECT DISTINCT 83 - col1 AS col2 FROM tab1 cor0
----
57
70
73

query I rowsort
SELECT tab1.col2 + 86 * 47 AS col1 FROM tab1
----
4096
4099
4138

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5063
SELECT DISTINCT - CAST( + 94 AS SIGNED ) AS col2 FROM tab0, tab2 AS cor0
----
-94

skipif mysql # not compatible
query I rowsort label-5063
SELECT DISTINCT - CAST ( + 94 AS INTEGER ) AS col2 FROM tab0, tab2 AS cor0
----
-94

query I rowsort
SELECT - col1 + + 35 FROM tab0
----
-51
-56
-62

query I rowsort
SELECT DISTINCT - + col2 + col2 * - col0 FROM tab2 cor0
----
-2054
-216
-3040

query I rowsort
SELECT ALL - cor1.col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - col1 * + ( - col2 ) + 95 AS col2 FROM tab2 AS cor0
----
1629
741
932

query I rowsort
SELECT DISTINCT - 87 + ( col0 ) FROM tab0 AS cor0
----
-52
-63
2

query I rowsort
SELECT + col1 * + 19 * col1 + + col2 * ( - col2 ) FROM tab2 AS cor0
----
17530
4047
65463

query I rowsort
SELECT ALL + col1 * col2 AS col0 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 87 col2 FROM tab2
----
609
6786
6873

query I rowsort
SELECT ALL - + 41 + col1 FROM tab2 AS cor0
----
-10
-24
18

query I rowsort
SELECT ALL - col1 * - cor0.col1 + cor0.col1 * col0 FROM tab2 AS cor0
----
1178
1632
8083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5074
SELECT + + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5074
SELECT + + CAST ( NULL AS REAL ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 col1 FROM tab2 AS cor0
----
-92

query I rowsort
SELECT ALL + - col1 AS col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - - ( 4 ) AS col1 FROM tab0 AS cor0
----
4
4
4

query I rowsort
SELECT DISTINCT cor0.col1 + 98 * + col1 AS col2 FROM tab0 AS cor0
----
8514
9009
9603

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5079
SELECT DISTINCT - - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5079
SELECT DISTINCT - - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5080
SELECT + - col1 DIV - 74 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5080
SELECT + - col1 / - 74 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5081
SELECT ALL + - ( ( col1 ) ) + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5081
SELECT ALL + - ( ( 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 - - 28 + cor0.col0 col2 FROM tab1 AS cor0
----
108
31
92

query I rowsort
SELECT ALL + cor0.col2 + - 0 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
-54
-57
-96

query I rowsort
SELECT + + col1 - cor0.col2 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col0 + - col1 col2 FROM tab0 AS cor0
----
-1322
-662
-8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-5087
SELECT col0 DIV + cor0.col0 - col0 * col1 FROM tab2 AS cor0
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-5087
SELECT col0 / + cor0.col0 - col0 * col1 FROM tab2 AS cor0
----
-1342
-216
-4601

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5088
SELECT - 63 * + col2 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5088
SELECT - 63 * + col2 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * - col0 + col1 AS col0 FROM tab2 cor0
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - tab1.col0 ) col1 FROM tab1
----
3
64
80

query I rowsort
SELECT ( col0 * col1 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT ( col1 * col0 ) AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - 68 AS col2 FROM tab1 AS cor0
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * col2 * col2 col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT ALL - + col2 * ( col1 ) * col0 AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5096
SELECT DISTINCT - + col1 + - col2 DIV col0 + col2 AS col0 FROM tab0 AS cor0
----
-54
-9
-96

skipif mysql # not compatible
query I rowsort label-5096
SELECT DISTINCT - + col1 + - col2 / col0 + col2 AS col0 FROM tab0 AS cor0
----
-54
-9
-96

query I rowsort
SELECT DISTINCT - col0 * + col2 + col2 AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL cor0.col1 * - 12 + + col1 AS col1 FROM tab1 cor0
----
-110
-143
-286

query I rowsort
SELECT + + col0 + - ( 46 ) * - col2 FROM tab2 AS cor0
----
1249
1274
1827

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5100
SELECT - + col0 * CAST( + col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-5100
SELECT - + col0 * CAST ( + col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5101
SELECT DISTINCT col2 * CAST( + col2 * col0 AS SIGNED ) FROM tab0 AS cor0
----
26136
35
598436

skipif mysql # not compatible
query I rowsort label-5101
SELECT DISTINCT col2 * CAST ( + col2 * col0 AS INTEGER ) FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT - col1 - - col2 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL - col2 + - col1 AS col1 FROM tab2
----
-55
-58
-85

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 1260d4dbe7a8d809e8010586a3c398c5

query I rowsort
SELECT col0 + - 49 * col0 AS col2 FROM tab0
----
-1152
-1680
-4272

query I rowsort
SELECT + 2 AS col2 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT - 84 + - col0 FROM tab2 AS cor0
----
-162
-163
-91

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to e3dd03163bf3bbebd049e3a988dfe640

query I rowsort
SELECT - ( 99 ) + - cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to da7b9d9efdf6471d1d34c07fbd61ad4b

query I rowsort
SELECT ALL - cor0.col1 - + cor0.col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - col0 + - col0 AS col2 FROM tab2
----
-14
-156
-158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 + col2 ) col2 FROM tab0
----
53
9
96

query I rowsort
SELECT - 91 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + ( + 78 ) col2 FROM tab0 AS cor0
----
-11
43
54

query I rowsort
SELECT col2 * + 49 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT + + col2 * - col0 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0, tab2, tab1 AS cor0, tab1
----
81 values hashing to 2df272448a67587d4635afedff278dcc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 96 * + col2 col2 FROM tab1
----
5184
5472
9216

query I rowsort
SELECT + 27 - - col1 FROM tab0
----
113
118
124

query I rowsort
SELECT ALL tab2.col0 * col2 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - - col0 + + col1 * + col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - col2 * 38 AS col2 FROM tab2 AS cor0
----
-1026
-1444
-988

query I rowsort
SELECT ALL - col0 + + 79 FROM tab0 AS cor0
----
-10
44
55

query I rowsort
SELECT DISTINCT + - cor0.col2 * 45 AS col0 FROM tab0 AS cor0
----
-1485
-3690
-45

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 0c9c9a26da1b45580001288543ac8dbe

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0 cor0 CROSS JOIN tab0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ( col2 ) * + col0 + ( - col0 + - col1 ) * - col0 * 23 FROM tab2 AS cor0
----
177434
247806
6307

query I rowsort
SELECT - col0 + + 53 FROM tab2 AS cor0
----
-25
-26
46

query I rowsort
SELECT col1 * - col1 + col2 + col0 * - ( col1 * col1 ) FROM tab2 AS cor0
----
-23082
-274973
-7661

query I rowsort
SELECT - col1 + + col2 + + col0 AS col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT + + 72 AS col1 FROM tab0 AS cor0
----
72
72
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5132
SELECT + 38 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5132
SELECT + 38 / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 50 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

query I rowsort
SELECT - ( - col0 * col0 ) FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL - + col1 * col1 + col1 FROM tab1 cor0
----
-156
-650
-90

query I rowsort
SELECT col1 * cor0.col1 FROM tab2 cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-5137
SELECT - ( + col2 ) * col2 DIV + 43 AS col1 FROM tab0 AS cor0
----
-156
-25
0

skipif mysql # not compatible
query I rowsort label-5137
SELECT - ( + col2 ) * col2 / + 43 AS col1 FROM tab0 AS cor0
----
-156
-25
0

query I rowsort
SELECT ALL + 46 + col1 FROM tab0 AS cor0
----
132
137
143

query I rowsort
SELECT DISTINCT 46 * + col1 FROM tab2 cor0
----
1426
2714
782

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab2 AS cor0
----
-45

query I rowsort
SELECT 16 * col0 + 14 FROM tab2
----
126
1262
1278

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col2 * col0 + + col1 col0 FROM tab2 AS cor0
----
-1292
-158125
-237141

query I rowsort
SELECT - ( - cor0.col2 ) AS col0 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5144
SELECT ALL - 34 + + col0 DIV - 63 FROM tab2 AS cor0
----
-34
-35
-35

skipif mysql # not compatible
query I rowsort label-5144
SELECT ALL - 34 + + col0 / - 63 FROM tab2 AS cor0
----
-34
-35
-35

query I rowsort
SELECT DISTINCT - col1 * + col0 + + 37 AS col2 FROM tab1 AS cor0
----
-1003
-41
-603

onlyif mysql # use DIV operator for integer division
query I rowsort label-5146
SELECT DISTINCT - col0 DIV cor0.col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5146
SELECT DISTINCT - col0 / cor0.col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT col0 + + col1 * 49 FROM tab2 AS cor0
----
1526
2969
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-5148
SELECT ALL + 60 * col2 * col0 + - cor0.col0 DIV - col1 AS col2 FROM tab0 AS cor0
----
2100
437880
47520

skipif mysql # not compatible
query I rowsort label-5148
SELECT ALL + 60 * col2 * col0 + - cor0.col0 / - col1 AS col2 FROM tab0 AS cor0
----
2100
437880
47520

query I rowsort
SELECT DISTINCT - - 42 + col1 FROM tab2 AS cor0
----
101
59
73

query I rowsort
SELECT DISTINCT 8 + + col0 * col0 FROM tab1 AS cor0
----
17
4104
6408

query I rowsort
SELECT - - col1 + col1 AS col2 FROM tab2 cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5152
SELECT - col0 DIV + col0 AS col1 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5152
SELECT - col0 / + col0 AS col1 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT - 51 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT ALL col2 * - ( col1 ) + cor0.col0 + - ( 34 ) AS col2 FROM tab0 cor0
----
-2848
-7407
-96

query I rowsort
SELECT col2 * - cor0.col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col1 * + col2 + ( col0 + col2 ) FROM tab2
----
1638
763
871

query I rowsort
SELECT - ( - col0 * ( - tab2.col2 ) ) - + tab2.col0 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT ALL 88 + col2 * ( + tab1.col0 ) AS col2 FROM tab1
----
250
3736
7768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5159
SELECT DISTINCT col2 + - 15 DIV col1 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5159
SELECT DISTINCT col2 + - 15 / col1 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - + col1 col2 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5161
SELECT + 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-5161
SELECT + CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - 79 ) AS col1 FROM tab0 AS cor0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + + ( 53 ) AS col1 FROM tab2 AS cor0
----
53

query I rowsort
SELECT ALL - col1 * + col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + + col0 + + 0 * + cor0.col1 * col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT + 75 * col2 - col2 FROM tab1 AS cor0
----
3996
4218
7104

query I rowsort
SELECT DISTINCT + 96 * 65 * - col2 + + 47 FROM tab2
----
-162193
-168433
-237073

query I rowsort
SELECT + tab2.col1 + + col1 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL - 69 * col2 FROM tab2 AS cor0
----
-1794
-1863
-2622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 col2 FROM tab0
----
46
46
46

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 59 * + col1 AS col0 FROM tab0
----
5074
5369
5723

query I rowsort
SELECT + tab2.col0 + 56 + + tab2.col0 AS col2 FROM tab2
----
212
214
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab1, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT 0 * + ( col0 ) + col2 AS col1 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5176
SELECT DISTINCT - col0 + ( col2 ) * col0 DIV + 74 AS col0 FROM tab2 AS cor0
----
-39
-5
-51

skipif mysql # not compatible
query I rowsort label-5176
SELECT DISTINCT - col0 + ( col2 ) * col0 / + 74 AS col0 FROM tab2 AS cor0
----
-39
-5
-51

query I rowsort
SELECT ALL + cor0.col0 * 28 FROM tab2 AS cor0
----
196
2184
2212

onlyif mysql # use DIV operator for integer division
query I rowsort label-5178
SELECT ALL + col1 * 93 + col1 DIV col1 FROM tab0 AS cor0
----
7999
8464
9022

skipif mysql # not compatible
query I rowsort label-5178
SELECT ALL + col1 * 93 + col1 / col1 FROM tab0 AS cor0
----
7999
8464
9022

query I rowsort
SELECT ALL col2 + 67 * ( + col0 ) * - col2 AS col0 FROM tab0 AS cor0
----
-2344
-488884
-53031

query I rowsort
SELECT col0 * col1 * + 70 FROM tab2 cor0
----
15190
322140
94010

query I rowsort
SELECT DISTINCT - + col2 + - 83 * + 54 FROM tab0 AS cor0
----
-4483
-4515
-4564

query I rowsort
SELECT - - cor0.col2 * col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5184
SELECT ALL - col2 - - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5184
SELECT ALL - col2 - - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + 10 * - col2 - + 99 AS col1 FROM tab1 cor0
----
-29259
-32589
-92259

onlyif mysql # use DIV operator for integer division
query I rowsort label-5186
SELECT + - ( - col1 ) + + col2 DIV + col0 FROM tab0 AS cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-5186
SELECT + - ( - col1 ) + + col2 / + col0 FROM tab0 AS cor0
----
87
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5187
SELECT CAST( cor0.col1 AS SIGNED ) - col0 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-5187
SELECT CAST ( cor0.col1 AS INTEGER ) - col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL tab0.col1 + 82 * - col2 FROM tab0
----
-2620
-6633
15

query I rowsort
SELECT ALL - 65 FROM tab0, tab2 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT DISTINCT col1 * col0 - + col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT + + cor0.col1 * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - ( col0 ) * col1 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col2 * - 50 + tab2.col2 * - 52 AS col1 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT ALL 49 AS col1 FROM tab0
----
49
49
49

query I rowsort
SELECT + 34 * col0 + col0 AS col2 FROM tab1
----
105
2240
2800

query I rowsort
SELECT DISTINCT 99 * col2 FROM tab2
----
2574
2673
3762

query I rowsort
SELECT - 51 AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 col2 FROM tab2 cor0
----
-70
-70
-70

query I rowsort
SELECT ALL + 4 AS col2 FROM tab2
----
4
4
4

query I rowsort
SELECT - cor0.col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + ( + col0 ) * col0 + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT 34 * tab0.col0 * col2 AS col1 FROM tab0
----
1190
248132
26928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5203
SELECT - col1 * CAST( + col2 * col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

skipif mysql # not compatible
query I rowsort label-5203
SELECT - col1 * CAST ( + col2 * col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL - col1 * + col0 * + ( + 39 ) AS col1 FROM tab1
----
-24960
-3042
-40560

query I rowsort
SELECT 83 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT ALL col2 * col1 * + 7 FROM tab2
----
10738
4522
5859

query I rowsort
SELECT DISTINCT 13 FROM tab2, tab0, tab1 AS cor0, tab0 AS cor1
----
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + cor1.col2 FROM tab0, tab1 cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT col2 * 5 FROM tab1
----
270
285
480

query I rowsort
SELECT DISTINCT ( + col0 ) AS col2 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5212
SELECT DISTINCT - 19 DIV - col1 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-5212
SELECT DISTINCT - 19 / - col1 FROM tab2
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5213
SELECT DISTINCT col0 DIV + 94 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-5213
SELECT DISTINCT col0 / + 94 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col0 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + + col1 * col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 + + ( - col1 ) + - col0 col1 FROM tab2 AS cor0
----
-124
-25
-83

query I rowsort
SELECT - + 45 + - col0 * + ( + col1 * + cor0.col0 ) FROM tab1 AS cor0
----
-279
-41005
-83245

query I rowsort
SELECT - + 61 * + col0 FROM tab0 AS cor0
----
-1464
-2135
-5429

query I rowsort
SELECT - col0 + col2 + + col0 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT 73 * - col1 FROM tab1 AS cor0
----
-1898
-730
-949

query I rowsort
SELECT DISTINCT tab0.col2 + + col2 * + col1 + - col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT col0 + cor0.col0 * - 89 + col0 AS col2 FROM tab0 AS cor0
----
-2088
-3045
-7743

query I rowsort
SELECT - col1 * col1 + col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT col2 + + col1 * + col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT + cor0.col0 + cor0.col2 + 97 * col2 AS col1 FROM tab0 AS cor0
----
133
3258
8125

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5226
SELECT - cor0.col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5226
SELECT - cor0.col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 6 + + col1 FROM tab0 AS cor0
----
103
92
97

query I rowsort
SELECT DISTINCT 72 FROM tab2 cor0
----
72

query I rowsort
SELECT DISTINCT - + col1 * 4 AS col2 FROM tab2 AS cor0
----
-124
-236
-68

query I rowsort
SELECT DISTINCT + - col1 + ( col0 ) FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - col1 * 79 FROM tab0 AS cor0
----
-6794
-7189
-7663

query I rowsort
SELECT ALL - 84 AS col2 FROM tab1 AS cor0
----
-84
-84
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 69 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT DISTINCT + ( col0 ) * + col1 + + col0 + - col1 FROM tab0 cor0
----
2002
3333
8097

query I rowsort
SELECT ALL - - 41 AS col0 FROM tab0 AS cor0
----
41
41
41

query I rowsort
SELECT ALL + + 80 * col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2800
583840
63360

query I rowsort
SELECT + + 38 AS col0 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT DISTINCT ( col2 ) * + col2 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5239
SELECT ALL - col1 DIV + tab2.col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5239
SELECT ALL - col1 / + tab2.col0 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 col0 FROM tab0
----
37
37
37

query I rowsort
SELECT + ( - col2 * + col1 ) FROM tab1
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5242
SELECT - col2 * CAST( NULL AS SIGNED ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5242
SELECT - col2 * CAST ( NULL AS INTEGER ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - 70 AS col0 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT col1 * + col0 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + col0 + + col1 FROM tab2 cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5246
SELECT col2 + 69 DIV + 54 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-5246
SELECT col2 + 69 / + 54 AS col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT - - col2 * + ( + col1 ) + + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL - col0 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + + cor0.col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col1 * - col1 + - ( - col2 ) - col2 AS col1 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5251
SELECT - ( col2 ) + - col1 * + col2 + + col1 DIV - 83 FROM tab0
----
-2872
-7545
-99

skipif mysql # not compatible
query I rowsort label-5251
SELECT - ( col2 ) + - col1 * + col2 + + col1 / - 83 FROM tab0
----
-2872
-7545
-99

query I rowsort
SELECT + 81 AS col0 FROM tab0
----
81
81
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5253
SELECT + col0 + CAST( NULL AS SIGNED ) / col2 + col0 * tab1.col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5253
SELECT + col0 + CAST ( NULL AS INTEGER ) / col2 + col0 * tab1.col0 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + + tab1.col2 * col0 FROM tab1
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5255
SELECT col1 + CAST( col0 AS SIGNED ) FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-5255
SELECT col1 + CAST ( col0 AS INTEGER ) FROM tab2
----
137
38
96

query I rowsort
SELECT - col1 + 99 * + 84 FROM tab2 AS cor0
----
8257
8285
8299

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5257
SELECT col2 * + CAST( col0 AS SIGNED ) - col0 FROM tab1 AS cor0
----
159
3584
7600

skipif mysql # not compatible
query I rowsort label-5257
SELECT col2 * + CAST ( col0 AS INTEGER ) - col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - cor0.col2 + - ( + col2 ) * col0 FROM tab1 AS cor0
----
-216
-3705
-7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + col1 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT col1 * + ( + 31 ) * - col0 + + col1 AS col0 FROM tab0
----
-105148
-250978
-63898

query I rowsort
SELECT ALL + col2 + + col2 - - col0 * - col0 FROM tab0
----
-1223
-510
-7757

query I rowsort
SELECT col1 * col1 * - 81 + tab0.col1 AS col0 FROM tab0
----
-598990
-670670
-762032

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5263
SELECT DISTINCT CAST( NULL AS SIGNED ) + 11 FROM tab2, tab0, tab2 AS cor0, tab0 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5263
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 11 FROM tab2, tab0, tab2 AS cor0, tab0 cor1
----
NULL

query I rowsort
SELECT ALL + tab1.col2 + col0 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT + - col1 + + 16 FROM tab1 AS cor0
----
-10
3
6

query I rowsort
SELECT DISTINCT col2 + - col2 AS col1 FROM tab0
----
0

query I rowsort
SELECT - col0 + + ( col1 ) * + col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT - col0 * - col0 + - 77 + + tab2.col0 AS col1 FROM tab2
----
-21
6085
6243

onlyif mysql # use DIV operator for integer division
query I rowsort label-5269
SELECT DISTINCT - col1 DIV ( + col2 ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5269
SELECT DISTINCT - col1 / ( + col2 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + - cor0.col2 + + cor0.col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT - 32 * + col1 AS col2 FROM tab2 AS cor0
----
-1888
-544
-992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + 80 col0 FROM tab0 AS cor0
----
113
162
81

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col0 + 81 * + col0 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT ALL ( + cor0.col2 ) * + col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - 83 + ( col1 ) * 93 FROM tab0 AS cor0
----
7915
8380
8938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5277
SELECT ALL - col1 * col1 * - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5277
SELECT ALL - col1 * col1 * - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * col2 + + cor0.col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5279
SELECT DISTINCT + CAST( NULL AS SIGNED ) col2 FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5279
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT - ( 27 ) * + col2 AS col2 FROM tab2 AS cor0
----
-1026
-702
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-5281
SELECT DISTINCT - col0 * - 99 + col0 + col2 DIV - col0 FROM tab2 AS cor0
----
697
7800
7900

skipif mysql # not compatible
query I rowsort label-5281
SELECT DISTINCT - col0 * - 99 + col0 + col2 / - col0 FROM tab2 AS cor0
----
697
7800
7900

onlyif mysql # use DIV operator for integer division
query I rowsort label-5282
SELECT ALL - cor0.col0 - - 23 * col1 DIV 24 AS col2 FROM tab0 AS cor0
----
-2
57
58

skipif mysql # not compatible
query I rowsort label-5282
SELECT ALL - cor0.col0 - - 23 * col1 / 24 AS col2 FROM tab0 AS cor0
----
-2
57
58

query I rowsort
SELECT DISTINCT col0 * - col1 - col1 FROM tab1 AS cor0
----
-104
-1053
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-5284
SELECT DISTINCT + col0 * col2 DIV col1 FROM tab1 AS cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-5284
SELECT DISTINCT + col0 * col2 / col1 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT 61 + tab1.col2 AS col1 FROM tab1
----
115
118
157

onlyif mysql # use DIV operator for integer division
query I rowsort label-5286
SELECT - ( - col2 ) + - col1 * - col1 DIV col1 AS col1 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-5286
SELECT - ( - col2 ) + - col1 * - col1 / col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + col0 * + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ( - cor0.col2 ) AS col0 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 54 + - col2 FROM tab0 AS cor0
----
-28
21
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-5290
SELECT + + col1 * col2 DIV + col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5290
SELECT + + col1 * col2 / + col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col1 + col0 * 27 AS col0 FROM tab0 AS cor0
----
1042
2494
734

query I rowsort
SELECT DISTINCT ( + col0 ) * 81 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT DISTINCT + 58 + col2 AS col0 FROM tab2 AS cor0
----
84
85
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col2 col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - cor0.col2 * + col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col0 + - cor0.col1 * 46 AS col2 FROM tab0 AS cor0
----
-3932
-4097
-4427

query I rowsort
SELECT DISTINCT - + col1 AS col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL col2 + cor0.col2 + col1 * col0 AS col0 FROM tab2 AS cor0
----
1419
271
4654

query I rowsort
SELECT + + col1 + + ( + col1 ) * + col2 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 + cor0.col2 col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - 49 FROM tab1, tab1 AS cor0
----
-49

query I rowsort
SELECT DISTINCT - + col1 + ( - col2 ) FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT - + col1 * + col2 + cor0.col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT col1 * - 16 FROM tab0 AS cor0
----
-1376
-1456
-1552

query I rowsort
SELECT + col0 + - 11 FROM tab2 AS cor0
----
-4
67
68

query I rowsort
SELECT ALL - col0 * col0 * + 42 AS col1 FROM tab0 AS cor0
----
-24192
-332682
-51450

query I rowsort
SELECT DISTINCT + 43 FROM tab0
----
43

query I rowsort
SELECT + 34 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT DISTINCT + col1 + col1 * + col2 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - + 50 + + col2 FROM tab1 AS cor0
----
4
46
7

query I rowsort
SELECT DISTINCT - 63 + + col1 * col0 * - ( + cor0.col2 * col2 ) FROM tab1 AS cor0
----
-2079423
-227511
-9584703

query I rowsort
SELECT - - col2 * ( cor0.col0 ) + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - - 77 * 84 FROM tab0 cor0
----
6468

query I rowsort
SELECT ALL - col1 * + col0 + - col1 AS col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + ( col1 ) * col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT col0 + 51 AS col1 FROM tab0 AS cor0
----
140
75
86

query I rowsort
SELECT ALL + 56 * 40 FROM tab0 AS cor0
----
2240
2240
2240

onlyif mysql # use DIV operator for integer division
query I rowsort label-5318
SELECT 72 DIV - col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-5318
SELECT 72 / - col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT DISTINCT + 59 + - col1 FROM tab2 AS cor0
----
0
28
42

query I rowsort
SELECT ALL - + 40 * 38 AS col1 FROM tab2 AS cor0
----
-1520
-1520
-1520

query I rowsort
SELECT col1 + + col2 * + col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + 54 + + col2 FROM tab2 AS cor0
----
80
81
92

query I rowsort
SELECT + col0 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col0 * col1 * - col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5325
SELECT cor0.col0 DIV - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5325
SELECT cor0.col0 / - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + col0 + + col0 * col0 FROM tab0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5328
SELECT ALL CAST( NULL AS SIGNED ) * - ( cor0.col0 ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5328
SELECT ALL CAST ( NULL AS INTEGER ) * - ( cor0.col0 ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * tab1.col1 col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + + col2 - ( col2 ) AS col1 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - ( - 11 ) * - col2 + 86 col0 FROM tab1 AS cor0
----
-13642
-15358
-6184

query I rowsort
SELECT col0 + 58 AS col0 FROM tab2 AS cor0
----
136
137
65

query I rowsort
SELECT ALL - - col2 - - col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + + col1 * ( + col2 ) + - col2 AS col0 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT ALL - col2 + tab1.col1 * + ( col0 ) * col2 AS col0 FROM tab1
----
36423
4158
99744

query I rowsort
SELECT + cor0.col2 - - 32 * - 62 FROM tab0, tab0 AS cor0
----
9 values hashing to 97663aca48d9f4979c04724486dd566e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5337
SELECT + cor0.col1 + - CAST( + ( col1 ) + - col0 AS SIGNED ) DIV col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5337
SELECT + cor0.col1 + - CAST ( + ( col1 ) + - col0 AS INTEGER ) / col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + - col2 + col2 + col2 AS col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5339
SELECT col2 DIV tab2.col0 + col0 DIV + col0 FROM tab2
----
1
1
4

skipif mysql # not compatible
query I rowsort label-5339
SELECT col2 / tab2.col0 + col0 / + col0 FROM tab2
----
1
1
4

query I rowsort
SELECT - col1 * 46 AS col1 FROM tab1
----
-1196
-460
-598

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5341
SELECT DISTINCT - col2 * CAST( NULL AS DECIMAL ) * + col2 + col0 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5341
SELECT DISTINCT - col2 * CAST ( NULL AS REAL ) * + col2 + col0 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT col2 * 60 * + 47 + - col2 * + col0 * col2 FROM tab2
----
-6916
20592
71037

query I rowsort
SELECT - ( + 7 ) FROM tab2 AS cor0
----
-7
-7
-7

query I rowsort
SELECT ( - 75 ) + col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-66
4021
6325

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 74 ) * col1 col2 FROM tab0 AS cor0
----
-6364
-6734
-7178

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT col0 - - 92 DIV + col0 AS col0 FROM tab2
----
20
79
80

skipif mysql # not compatible
query I rowsort label-5347
SELECT col0 - - 92 / + col0 AS col0 FROM tab2
----
20
79
80

query I rowsort
SELECT + 23 * 23 AS col1 FROM tab1 AS cor0
----
529
529
529

query I rowsort
SELECT ( cor0.col2 ) * + col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - - 90 AS col0 FROM tab1 AS cor0
----
90
90
90

query I rowsort
SELECT DISTINCT - 9 FROM tab2
----
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col0 FROM tab1
----
94
94
94

query I rowsort
SELECT ALL + ( - 15 ) FROM tab2
----
-15
-15
-15

query I rowsort
SELECT DISTINCT - 4 FROM tab0, tab0 AS cor0
----
-4

query I rowsort
SELECT + + col2 + ( + cor0.col0 ) AS col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 3 + - cor0.col0 col1 FROM tab2 AS cor0
----
0
35
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-5357
SELECT ( + col1 ) * - cor0.col2 DIV + col2 + col2 FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-5357
SELECT ( + col1 ) * - cor0.col2 / + col2 + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL 39 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT DISTINCT 50 AS col0 FROM tab2
----
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-5360
SELECT - 78 * col2 DIV - col0 FROM tab0
----
107
2
71

skipif mysql # not compatible
query I rowsort label-5360
SELECT - 78 * col2 / - col0 FROM tab0
----
107
2
71

query I rowsort
SELECT DISTINCT ( col0 ) + 85 + col1 AS col1 FROM tab1
----
114
159
178

query I rowsort
SELECT + col2 + tab0.col2 + col2 * col2 AS col2 FROM tab0
----
1155
3
6888

query I rowsort
SELECT - col2 + + 15 + 2 FROM tab1 cor0
----
-37
-40
-79

query I rowsort
SELECT DISTINCT col1 * col0 * 60 FROM tab1
----
38400
4680
62400

query I rowsort
SELECT ALL + cor0.col0 * - col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + + ( + cor0.col1 ) * 98 FROM tab1 AS cor0
----
1274
2548
980

query I rowsort
SELECT DISTINCT + ( tab2.col2 ) * + ( - tab2.col2 ) * tab2.col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT + col1 * - 10 + - col1 AS col0 FROM tab0 AS cor0
----
-1001
-1067
-946

query I rowsort
SELECT ALL - + col2 * cor0.col1 + - ( col0 ) - - col0 * + col1 * col0 FROM tab1 AS cor0
----
-1173
40326
81872

query I rowsort
SELECT col1 + - ( - col2 ) AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col2 * ( - col2 ) AS col1 FROM tab2
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + tab2.col0 col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
86
91
97

query I rowsort
SELECT - - col1 * + col0 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - - col2 + + col0 * 54 AS col2 FROM tab1 AS cor0
----
216
3513
4416

query I rowsort
SELECT DISTINCT col1 + - col1 * + 68 * 38 FROM tab2
----
-152397
-43911
-80073

query I rowsort
SELECT + col0 + + col2 * 42 AS col1 FROM tab0 AS cor0
----
1410
3533
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - + col2 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * + col1 + col2 + col2 AS col0 FROM tab0
----
7462
8445
9411

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5380
SELECT CAST( cor0.col2 AS SIGNED ) AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

skipif mysql # not compatible
query I rowsort label-5380
SELECT CAST ( cor0.col2 AS INTEGER ) AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL 30 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL + 50 + col1 + ( + col0 ) * col2 AS col0 FROM tab2 AS cor0
----
2137
270
3069

query I rowsort
SELECT + col2 + + col0 * + 23 AS col0 FROM tab0 AS cor0
----
2129
585
806

query I rowsort
SELECT DISTINCT - - 49 AS col2 FROM tab0 cor0
----
49

query I rowsort
SELECT - 34 * col1 AS col2 FROM tab0 AS cor0
----
-2924
-3094
-3298

query I rowsort
SELECT - - col1 * + col2 + col0 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT 80 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT ALL 27 * + col1 + + col0 AS col1 FROM tab2 AS cor0
----
1671
538
844

query I rowsort
SELECT - - 48 + - col0 + 1 * 75 AS col2 FROM tab2 AS cor0
----
116
44
45

query I rowsort
SELECT - - cor0.col1 * + col2 + + 8 AS col0 FROM tab0 AS cor0
----
105
2846
7470

query I rowsort
SELECT + col0 * col1 + 70 FROM tab1 AS cor0
----
1110
148
710

query I rowsort
SELECT ALL - cor0.col0 * - ( col2 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5393
SELECT DISTINCT + + col1 + - col1 DIV - col0 AS col2 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-5393
SELECT DISTINCT + + col1 + - col1 / - col0 AS col2 FROM tab1 AS cor0
----
10
13
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5394
SELECT col0 * ( col1 ) DIV col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5394
SELECT col0 * ( col1 ) / col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + + col0 * + col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5396
SELECT - col1 DIV - 86 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5396
SELECT - col1 / - 86 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - 90 + cor0.col2 FROM tab0 AS cor0
----
-7707
-8108
-8729

query I rowsort
SELECT ALL + cor0.col0 * 84 AS col1 FROM tab1 AS cor0
----
252
5376
6720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5399
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5399
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - col2 * + col1 * col2 AS col2 FROM tab0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5401
SELECT DISTINCT - 79 + col0 DIV col1 FROM tab1
----
-73
-79

skipif mysql # not compatible
query I rowsort label-5401
SELECT DISTINCT - 79 + col0 / col1 FROM tab1
----
-73
-79

query I rowsort
SELECT 38 - col0 AS col2 FROM tab2
----
-40
-41
31

query I rowsort
SELECT 52 * col2 * 67 AS col2 FROM tab2
----
132392
90584
94068

query I rowsort
SELECT - 4 * col1 AS col0 FROM tab2 AS cor0
----
-124
-236
-68

query I rowsort
SELECT - col0 + 90 * col2 FROM tab0 AS cor0
----
2946
55
7291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + - col0 * col0 col1 FROM tab1 cor0
----
-35
-4106
-6413

query I rowsort
SELECT DISTINCT col1 * - col0 * cor0.col0 + cor0.col0 * col2 FROM tab1 AS cor0
----
-37312
-72
-75520

query I rowsort
SELECT - 74 * 24 AS col1 FROM tab2 cor0
----
-1776
-1776
-1776

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * - col0 col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col1 col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - col0 + + 53 FROM tab1 AS cor0
----
-11
-27
50

query I rowsort
SELECT DISTINCT col0 * ( + col2 ) - + col1 FROM tab1
----
136
3638
7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5414
SELECT CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5414
SELECT CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - ( + col0 ) - col0 * 47 AS col0 FROM tab1
----
-144
-3072
-3840

query I rowsort
SELECT DISTINCT 67 * col1 FROM tab1 AS cor0
----
1742
670
871

query I rowsort
SELECT DISTINCT - - 26 FROM tab2 AS cor0
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + cor0.col0 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col0 * col0 * 1 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL 39 AS col1 FROM tab2 AS cor0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 0 col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - - 57 FROM tab2 AS cor0
----
57

query I rowsort
SELECT 59 + + col1 FROM tab0
----
145
150
156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 * col2 + - ( - tab1.col2 ) col0 FROM tab1
----
2268
2394
4032

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 + - col2 FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * + col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * cor0.col0 + - 8 col2 FROM tab2 AS cor0
----
1335
209
4594

query I rowsort
SELECT - 40 + + col2 AS col0 FROM tab0 AS cor0
----
-39
-7
42

query I rowsort
SELECT ALL - - col2 * - col1 * + 8 - - 77 AS col0 FROM tab2 AS cor0
----
-12195
-5091
-6619

query I rowsort
SELECT - 41 * - col0 AS col1 FROM tab2 cor0
----
287
3198
3239

onlyif mysql # use DIV operator for integer division
query I rowsort label-5432
SELECT + cor0.col0 + col0 DIV col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5432
SELECT + cor0.col0 + col0 / col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT tab0.col0 + - tab0.col1 * - 8 AS col2 FROM tab0
----
712
811
817

query I rowsort
SELECT DISTINCT + - col1 * + col2 + cor0.col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - - col1 - col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ( 2 ) AS col2 FROM tab0, tab0 AS cor0, tab1, tab1 cor1
----
81 values hashing to 6d1be3904d6870ba21bc766b979d1110

onlyif mysql # use DIV operator for integer division
query I rowsort label-5437
SELECT + - ( + col1 ) + col0 DIV col0 AS col2 FROM tab1 cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-5437
SELECT + - ( + col1 ) + col0 / col0 AS col2 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT ( + ( - col0 ) ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5439
SELECT DISTINCT CAST( - col2 AS SIGNED ) DIV + col2 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5439
SELECT DISTINCT CAST ( - col2 AS INTEGER ) / + col2 AS col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ALL 53 * col2 FROM tab2
----
1378
1431
2014

query I rowsort
SELECT + + col2 + - 89 AS col0 FROM tab1 AS cor0
----
-32
-35
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5442
SELECT ALL + - CAST( NULL AS SIGNED ) * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5442
SELECT ALL + - CAST ( NULL AS INTEGER ) * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * - ( col0 ) + col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT ALL + ( col1 ) + - col1 * + col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL col2 + ( + col0 ) FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col1 * + 80 * + col0 FROM tab2
----
107440
17360
368160

query I rowsort
SELECT DISTINCT + tab0.col2 * ( 9 ) FROM tab0
----
297
738
9

query I rowsort
SELECT - + col2 * - 1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + 52 + col0 * + col1 FROM tab2 AS cor0
----
1395
269
4654

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) * col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + 32 * - cor0.col1 FROM tab2 AS cor0
----
-1888
-544
-992

query I rowsort
SELECT col0 * + 74 + col1 FROM tab2
----
549
5831
5863

query I rowsort
SELECT ( col2 ) * + col2 FROM tab2
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5454
SELECT 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-5454
SELECT CAST ( NULL AS INTEGER ) * + cor0.col1 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 1 * 61 + - col0 AS col0 FROM tab2 AS cor0
----
-139
-140
-68

query I rowsort
SELECT - + 53 + col1 FROM tab0 AS cor0
----
33
38
44

query I rowsort
SELECT - - col0 + + 84 FROM tab0 cor0
----
108
119
173

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 + + 17 AS col1 FROM tab2 AS cor0
----
-1389
-633
-685

query I rowsort
SELECT + - ( ( + cor0.col2 ) ) * col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col0 + cor0.col0 * + cor0.col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT DISTINCT - col2 * col1 * + 27 AS col1 FROM tab2 cor0
----
-17442
-22599
-41418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * col2 col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - 59 * col0 AS col2 FROM tab1 AS cor0
----
-177
-3776
-4720

query I rowsort
SELECT ALL + - 92 AS col0 FROM tab1 AS cor0
----
-92
-92
-92

query I rowsort
SELECT tab0.col2 * + tab0.col0 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - 21 + + col2 * 38 FROM tab0 AS cor0
----
1233
17
3095

query I rowsort
SELECT - col1 + + 83 * - col0 AS col2 FROM tab1 AS cor0
----
-275
-5322
-6653

query I rowsort
SELECT ALL cor0.col1 * + col1 AS col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT - cor0.col1 FROM tab0, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

onlyif mysql # use DIV operator for integer division
query I rowsort label-5470
SELECT + col2 * - col0 DIV + col0 + 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-5470
SELECT + col2 * - col0 / + col0 + col2 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 0 + cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - - col1 + - cor0.col0 * 64 FROM tab2 AS cor0
----
-417
-4933
-5039

query I rowsort
SELECT + col1 * - 3 * + 36 AS col0 FROM tab2 cor0
----
-1836
-3348
-6372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - col0 col0 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 11 col1 FROM tab1 cor0
----
-1
15
2

query I rowsort
SELECT + - cor0.col0 * + cor0.col0 FROM tab1 cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5477
SELECT cor0.col1 * ( col1 ) DIV col2 FROM tab0 AS cor0
----
100
224
9409

skipif mysql # not compatible
query I rowsort label-5477
SELECT cor0.col1 * ( col1 ) / col2 FROM tab0 AS cor0
----
100
224
9409

query I rowsort
SELECT - - col0 - - 76 AS col1 FROM tab0 AS cor0
----
100
111
165

query I rowsort
SELECT + col1 * + col2 + col1 AS col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT col2 + col1 * - 93 FROM tab0 AS cor0
----
-7965
-8381
-9020

query I rowsort
SELECT col2 * ( 78 ) + + col0 FROM tab1 cor0
----
4215
4510
7568

onlyif mysql # use DIV operator for integer division
query I rowsort label-5482
SELECT col0 * col2 DIV - col0 AS col1 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-5482
SELECT col0 * col2 / - col0 AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + + col1 * 15 + col2 AS col2 FROM tab1 AS cor0
----
207
291
444

query I rowsort
SELECT DISTINCT - 66 + col2 * + col2 FROM tab0 AS cor0
----
-65
1023
6658

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5485
SELECT CAST( col2 AS SIGNED ) + col0 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-5485
SELECT CAST ( col2 AS INTEGER ) + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 30 - col1 AS col1 FROM tab1 AS cor0
----
17
20
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 * col2 col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - 89 + ( col0 ) FROM tab0 AS cor0
----
-54
-65
0

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5490
SELECT - + cor1.col0 DIV ( 5 + cor1.col1 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 35791804d57e773fd6768723abffa37d

skipif mysql # not compatible
query I rowsort label-5490
SELECT - + cor1.col0 / ( 5 + cor1.col1 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 35791804d57e773fd6768723abffa37d

query I rowsort
SELECT - - 83 * col0 + - col1 FROM tab0 AS cor0
----
1906
2808
7296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
17
31
59

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL col0 + - col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 30 col0 FROM tab1, tab1 cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT 26 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1508
-620
-811

query I rowsort
SELECT DISTINCT 14 - + tab2.col0 FROM tab2
----
-64
-65
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT + 86 + + col1 AS col0 FROM tab0
----
172
177
183

query I rowsort
SELECT DISTINCT tab0.col2 + col2 FROM tab0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5501
SELECT + 74 + col2 DIV 36 FROM tab0 AS cor0
----
74
74
76

skipif mysql # not compatible
query I rowsort label-5501
SELECT + 74 + col2 / 36 FROM tab0 AS cor0
----
74
74
76

query I rowsort
SELECT DISTINCT - col0 * col2 + col2 * 13 * col1 FROM tab1
----
18090
3762
8544

query I rowsort
SELECT ALL + col0 + - tab1.col2 * col2 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT col2 * col1 * col1 + - ( col0 ) + + col1 FROM tab0
----
244130
679044
9471

query I rowsort
SELECT DISTINCT - 69 + col2 - 0 FROM tab0 AS cor0
----
-36
-68
13

query I rowsort
SELECT DISTINCT + 64 * + col1 - + col0 AS col1 FROM tab2 AS cor0
----
1009
1977
3698

query I rowsort
SELECT DISTINCT - + 59 FROM tab0 AS cor0
----
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5508
SELECT DISTINCT + col2 * + col2 + CAST( + col0 AS SIGNED ) * col2 FROM tab1 AS cor0
----
16896
3078
6897

skipif mysql # not compatible
query I rowsort label-5508
SELECT DISTINCT + col2 * + col2 + CAST ( + col0 AS INTEGER ) * col2 FROM tab1 AS cor0
----
16896
3078
6897

query I rowsort
SELECT ALL 67 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT col0 + col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + + col0 - col2 FROM tab0 AS cor0
----
-9
34
7

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 DISTINCT cor0.col0 + + tab1.col0 col0 FROM tab1, tab2, tab2 AS cor0
----
9 values hashing to b9944e8264ba49a81db9322e4d2ec488

onlyif mysql # use DIV operator for integer division
query I rowsort label-5514
SELECT + col2 + 3 DIV - col0 AS col1 FROM tab1
----
53
57
96

skipif mysql # not compatible
query I rowsort label-5514
SELECT + col2 + 3 / - col0 AS col1 FROM tab1
----
53
57
96

query I rowsort
SELECT + 21 * - cor1.col2 AS col0 FROM tab0, tab2, tab1 AS cor0, tab1 cor1
----
81 values hashing to f7666d2d64bb4957e53180ab5f3b9a82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5516
SELECT DISTINCT col2 DIV + ( tab0.col1 ) FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5516
SELECT DISTINCT col2 / + ( tab0.col1 ) FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + cor0.col1 col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL cor2.col2 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to 3dcd863493ac16ce594c62d4ac8b0412

onlyif mysql # use DIV operator for integer division
query I rowsort label-5519
SELECT cor0.col1 + + ( - 55 ) DIV col1 AS col1 FROM tab1 AS cor0
----
24
5
9

skipif mysql # not compatible
query I rowsort label-5519
SELECT cor0.col1 + + ( - 55 ) / col1 AS col1 FROM tab1 AS cor0
----
24
5
9

query I rowsort
SELECT + col1 * - 39 AS col2 FROM tab1 cor0
----
-1014
-390
-507

query I rowsort
SELECT ALL 89 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL ( - col0 ) * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab1 AS cor0
----
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-5524
SELECT + - cor0.col0 * + col1 DIV - col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5524
SELECT + - cor0.col0 * + col1 / - col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + 95 * 18 AS col0 FROM tab1 AS cor0
----
1710
1710
1710

query I rowsort
SELECT col0 + + cor0.col2 * cor0.col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - + cor0.col1 * - col2 + col0 * col0 FROM tab2 AS cor0
----
6887
7618
886

query I rowsort
SELECT + 66 FROM tab1 cor0
----
66
66
66

skipif mysql # not compatible
query I rowsort
SELECT ALL + ( + cor0.col0 ) + col2 * CAST ( 4 + cor0.col1 AS REAL ) FROM tab2 AS cor0
----
1716
877
952

query I rowsort
SELECT DISTINCT - col2 * - ( 86 ) AS col0 FROM tab0
----
2838
7052
86

query I rowsort
SELECT DISTINCT 16 * + col0 FROM tab1 cor0
----
1024
1280
48

query I rowsort
SELECT ALL + + 35 + - 42 * - col1 * col2 AS col1 FROM tab2 AS cor0
----
27167
35189
64463

query I rowsort
SELECT DISTINCT 16 AS col0 FROM tab1 AS cor0
----
16

query I rowsort
SELECT DISTINCT - ( - 80 ) * - col1 + 37 * 32 FROM tab0 AS cor0
----
-5696
-6096
-6576

query I rowsort
SELECT DISTINCT + col1 * col0 + - col1 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + 60 + - cor0.col0 FROM tab0 AS cor0
----
-29
25
36

query I rowsort
SELECT DISTINCT col2 * + 76 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT ALL + ( 65 ) * col1 * + col2 AS col2 FROM tab1 AS cor0
----
37050
81120
91260

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5539
SELECT ALL + 92 * col0 + col0 * CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
15486
3000
3255

skipif mysql # not compatible
query I rowsort label-5539
SELECT ALL + 92 * col0 + col0 * CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
15486
3000
3255

query I rowsort
SELECT - col1 + col1 * tab2.col0 FROM tab2
----
1326
186
4543

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col2 ) + + col1 col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col2 FROM tab1, tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - cor0.col2 * - 7 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
182
189
266

query I rowsort
SELECT ALL + col1 + - ( + col0 ) FROM tab0 AS cor0
----
2
62
62

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 4c87430a2010fee8daf6d04acf0ad703

query I rowsort
SELECT + - col2 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col0 col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT + col0 * - cor0.col2 * + 53 FROM tab1 cor0
----
-193344
-407040
-8586

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 25 col1 FROM tab1 AS cor0
----
25

query I rowsort
SELECT ALL - cor0.col2 * col1 + + col2 + + col2 * + col2 FROM tab1 AS cor0
----
1566
2736
8064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 38 * col1 col0 FROM tab1 AS cor0
----
-380
-494
-988

query I rowsort
SELECT ALL - col1 * - tab0.col0 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5553
SELECT DISTINCT ( - 39 ) DIV - col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-5553
SELECT DISTINCT ( - 39 ) / - col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5555
SELECT DISTINCT col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5555
SELECT DISTINCT col1 / - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT + cor0.col1 + + ( 85 ) AS col1 FROM tab0 AS cor0
----
171
176
182

query I rowsort
SELECT ALL + + col2 + - 10 * cor0.col0 AS col0 FROM tab1 cor0
----
-583
-704
24

query I rowsort
SELECT - - col1 * - ( 35 + col0 ) * + ( + col1 ) FROM tab0 cor0
----
-1026844
-436364
-658630

onlyif mysql # use DIV operator for integer division
query I rowsort label-5559
SELECT DISTINCT - cor0.col1 DIV col1 - + 50 FROM tab0 AS cor0
----
-51

skipif mysql # not compatible
query I rowsort label-5559
SELECT DISTINCT - cor0.col1 / col1 - + 50 FROM tab0 AS cor0
----
-51

query I rowsort
SELECT DISTINCT - - col1 * + col2 * + col1 AS col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT - - col1 * - col2 + 60 FROM tab2 AS cor0
----
-1474
-586
-777

query I rowsort
SELECT ALL + + col2 - + 0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col2 * col1 * 56 + cor0.col1 FROM tab2 AS cor0
----
36193
46903
85963

query I rowsort
SELECT DISTINCT - - col1 + ( cor0.col2 ) * col0 * ( col1 ) AS col2 FROM tab2 AS cor0
----
119711
51051
5890

query I rowsort
SELECT DISTINCT - col1 * col0 * - ( col2 ) + ( col2 ) FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT ALL col0 + col1 * col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL col2 * 76 - col1 FROM tab0 AS cor0
----
-21
2422
6141

query I rowsort
SELECT col2 + - col1 * tab2.col2 AS col0 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT col1 + col0 + col0 AS col0 FROM tab0
----
134
167
269

query I rowsort
SELECT DISTINCT col0 * ( - 95 * + col1 ) FROM tab2 AS cor0
----
-127585
-20615
-437190

query I rowsort
SELECT ALL + col0 + tab2.col2 * 56 FROM tab2
----
1519
1534
2207

query I rowsort
SELECT DISTINCT + col2 * + col2 + 90 FROM tab0
----
1179
6814
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5573
SELECT col1 + CAST( 91 AS SIGNED ) AS col1 FROM tab2
----
108
122
150

skipif mysql # not compatible
query I rowsort label-5573
SELECT col1 + CAST ( 91 AS INTEGER ) AS col1 FROM tab2
----
108
122
150

query I rowsort
SELECT DISTINCT - col1 + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor1.col1 col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5576
SELECT + col2 * CAST( NULL AS SIGNED ) + ( col1 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5576
SELECT + col2 * CAST ( NULL AS INTEGER ) + ( col1 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 * 26 FROM tab0 AS cor0
----
2314
624
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-5578
SELECT - - col2 DIV col0 + col0 AS col0 FROM tab2 cor0
----
10
78
79

skipif mysql # not compatible
query I rowsort label-5578
SELECT - - col2 / col0 + col0 AS col0 FROM tab2 cor0
----
10
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + + 64 * 54 * col2 col2 FROM tab0 AS cor0
----
114134
283483
3553

query I rowsort
SELECT ALL + col1 * - cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - 4 + cor0.col1 * + ( 73 ) FROM tab2 AS cor0
----
1237
2259
4303

query I rowsort
SELECT 49 * + col1 * 9 + col2 AS col2 FROM tab1 cor0
----
11520
4467
5829

query I rowsort
SELECT + - 95 + - col0 AS col0 FROM tab0 AS cor0
----
-119
-130
-184

query I rowsort
SELECT ALL col0 * col0 + + ( + cor0.col1 ) + + col1 AS col0 FROM tab2 AS cor0
----
111
6202
6275

query I rowsort
SELECT DISTINCT col1 + + cor0.col1 * - ( col0 * col0 ) AS col0 FROM tab2 AS cor0
----
-106080
-1488
-358897

query I rowsort
SELECT - col1 - + col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT + 21 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT col0 * + ( - tab2.col2 ) + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT 60 * - col2 AS col2 FROM tab2
----
-1560
-1620
-2280

query I rowsort
SELECT col1 * ( col0 ) * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + col0 + - tab0.col2 * + tab0.col2 * + col1 FROM tab0
----
-611795
-62
-93630

onlyif mysql # use DIV operator for integer division
query I rowsort label-5592
SELECT tab1.col0 DIV + tab1.col0 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5592
SELECT tab1.col0 / + tab1.col0 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL - 48 + col2 AS col0 FROM tab0
----
-15
-47
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5594
SELECT ALL 52 + tab2.col1 DIV col0 FROM tab2
----
52
52
56

skipif mysql # not compatible
query I rowsort label-5594
SELECT ALL 52 + tab2.col1 / col0 FROM tab2
----
52
52
56

query I rowsort
SELECT DISTINCT col2 + + col1 * + col0 FROM tab1
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT + 90 + + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8f6875b1fd56ec02cb31f8a7ae404604

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5599
SELECT ALL + - col2 DIV - col1 + 20 * col0 AS col1 FROM tab2 AS cor0
----
140
1560
1582

skipif mysql # not compatible
query I rowsort label-5599
SELECT ALL + - col2 / - col1 + 20 * col0 AS col1 FROM tab2 AS cor0
----
140
1560
1582

onlyif mysql # use DIV operator for integer division
query I rowsort label-5600
SELECT - col1 DIV - col2 + + 76 FROM tab0 AS cor0
----
173
77
78

skipif mysql # not compatible
query I rowsort label-5600
SELECT - col1 / - col2 + + 76 FROM tab0 AS cor0
----
173
77
78

query I rowsort
SELECT ALL - - 88 FROM tab2 AS cor0
----
88
88
88

query I rowsort
SELECT ALL + col2 + - cor0.col1 - ( col2 ) * + col0 AS col0 FROM tab0 AS cor0
----
-131
-7307
-845

query I rowsort
SELECT + col0 + tab0.col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT 57 + + col1 AS col0 FROM tab1 AS cor0
----
67
70
83

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT col2 + ( - 61 ) FROM tab1
----
-4
-7
35

query I rowsort
SELECT - col0 * cor0.col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT DISTINCT ( col0 * col1 ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 53 FROM tab1, tab0 cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT ALL + - col0 * 60 * + col2 AS col0 FROM tab0 AS cor0
----
-2100
-437880
-47520

query I rowsort
SELECT + ( + 73 ) FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 9f0f371d979e70a792c8597c6559f0e2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5614
SELECT DISTINCT - 61 + 69 DIV - col1 FROM tab1 AS cor0
----
-63
-66
-67

skipif mysql # not compatible
query I rowsort label-5614
SELECT DISTINCT - 61 + 69 / - col1 FROM tab1 AS cor0
----
-63
-66
-67

query I rowsort
SELECT 34 + col0 + col2 AS col2 FROM tab1
----
155
210
91

query I rowsort
SELECT + 44 * + col0 FROM tab2
----
308
3432
3476

query I rowsort
SELECT 50 * tab1.col1 AS col0 FROM tab1
----
1300
500
650

query I rowsort
SELECT DISTINCT + - 74 + col0 * + col0 FROM tab2 AS cor0
----
-25
6010
6167

query I rowsort
SELECT + 70 * col2 AS col0 FROM tab2 cor0
----
1820
1890
2660

query I rowsort
SELECT 60 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - cor0.col1 * - 62 + + col2 + col1 FROM tab2 AS cor0
----
1109
1980
3743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT 7 FROM tab0, tab0 cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5625
SELECT ALL 85 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5625
SELECT ALL 85 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + - 72 FROM tab2 cor0
----
-72
-72
-72

query I rowsort
SELECT col1 * + cor0.col2 * + col1 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5628
SELECT + 36 * cor0.col1 + ( + col1 ) - col1 DIV ( + col0 * + col0 ) col1 FROM tab0 AS cor0
----
3182
3367
3589

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5628
SELECT + 36 * cor0.col1 + ( + col1 ) - col1 / ( + col0 * + col0 ) col1 FROM tab0 AS cor0
----
3182
3367
3589

query I rowsort
SELECT ALL col2 - + col2 * + 39 AS col0 FROM tab2
----
-1026
-1444
-988

query I rowsort
SELECT ALL - + 58 FROM tab0, tab1 AS cor0
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT DISTINCT 3 FROM tab1 AS cor0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col1 FROM tab1 cor0
----
24

query I rowsort
SELECT - cor0.col1 * - col2 * + cor0.col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL 56 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 9cee91ca9c60ba6e45a33b388a3b7d9b

query I rowsort
SELECT DISTINCT + - col0 + + ( - col2 ) FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - 17 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

query I rowsort
SELECT col0 * + ( + col0 ) FROM tab0
----
1225
576
7921

query I rowsort
SELECT - col0 + - 44 + col0 FROM tab0 AS cor0
----
-44
-44
-44

onlyif mysql # use DIV operator for integer division
query I rowsort label-5639
SELECT - col0 * ( + 13 ) DIV col1 FROM tab1 AS cor0
----
-1
-80
-83

skipif mysql # not compatible
query I rowsort label-5639
SELECT - col0 * ( + 13 ) / col1 FROM tab1 AS cor0
----
-1
-80
-83

query I rowsort
SELECT + 24 AS col1 FROM tab2 cor0
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 * col2 col2 FROM tab0 AS cor0
----
2937
7298
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5642
SELECT CAST( + 80 AS SIGNED ) * - cor0.col2 FROM tab0 AS cor0
----
-2640
-6560
-80

skipif mysql # not compatible
query I rowsort label-5642
SELECT CAST ( + 80 AS INTEGER ) * - cor0.col2 FROM tab0 AS cor0
----
-2640
-6560
-80

query I rowsort
SELECT ALL tab0.col2 * - ( + 49 ) FROM tab0
----
-1617
-4018
-49

query I rowsort
SELECT ALL col1 * - ( + 8 + tab0.col0 ) FROM tab0
----
-2752
-4171
-8827

query I rowsort
SELECT + tab1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT col1 * - col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5647
SELECT DISTINCT + - col1 * CAST( NULL AS DECIMAL ) * - col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5647
SELECT DISTINCT + - col1 * CAST ( NULL AS REAL ) * - col0 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5648
SELECT ALL - col2 DIV - col2 col0 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5648
SELECT ALL - col2 / - col2 col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL cor0.col1 * col0 * col1 + col2 * - ( 80 ) * col2 AS col2 FROM tab0 AS cor0
----
199089
329235
90384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + cor0.col2 col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col1 - cor0.col2 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL col1 + - 86 * + col0 * - col0 AS col0 FROM tab2 AS cor0
----
4245
523283
536743

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5653
SELECT CAST( NULL AS SIGNED ) * + col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5653
SELECT CAST ( NULL AS INTEGER ) * + col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 30 * col0 AS col0 FROM tab0
----
1050
2670
720

query I rowsort
SELECT DISTINCT col2 + 0 * col2 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab1 cor0
----
10
13
26

query I rowsort
SELECT + 39 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 9c9fbbb9cf0068f5900dff6ceb1046eb

query I rowsort
SELECT - col1 + + 66 AS col0 FROM tab1
----
40
53
56

query I rowsort
SELECT + 83 * 13 + - tab0.col1 * + col1 * col2 - tab0.col1 * col1 AS col1 FROM tab0
----
-17739
-250385
-686244

query I rowsort
SELECT 49 + col0 AS col1 FROM tab2
----
127
128
56

query I rowsort
SELECT - 82 * - col1 AS col2 FROM tab0 cor0
----
7052
7462
7954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col1 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - + 63 * col2 FROM tab2 AS cor0
----
-1638
-1701
-2394

query I rowsort
SELECT DISTINCT + - 7 * + col0 FROM tab1 AS cor0
----
-21
-448
-560

query I rowsort
SELECT ALL - + 4 AS col0 FROM tab0 AS cor0
----
-4
-4
-4

query I rowsort
SELECT - - ( + col0 ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + 87 * + col2 AS col2 FROM tab2 cor0
----
2262
2349
3306

query I rowsort
SELECT DISTINCT - + col2 + col2 * - col1 + 32 * cor0.col0 * - 84 AS col2 FROM tab0 AS cor0
----
-246776
-67383
-94178

query I rowsort
SELECT DISTINCT - col0 * col0 + + ( col1 ) FROM tab2 AS cor0
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 * + col0 - - col1 * col2 * - col2 col0 FROM tab2 AS cor0
----
-21080
319072
81549

query I rowsort
SELECT + col0 + - col0 * col0 * col0 FROM tab2
----
-336
-474474
-492960

query I rowsort
SELECT - ( - tab1.col0 ) AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - col0 * - col2 + - col0 AS col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT ALL - 62 FROM tab1 AS cor0
----
-62
-62
-62

query I rowsort
SELECT + - 6 + col2 FROM tab2 AS cor0
----
20
21
32

query I rowsort
SELECT ALL - 55 * + col2 FROM tab2 AS cor0
----
-1430
-1485
-2090

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col2 ) col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - col0 + - col2 * - ( + 34 ) * - col1 AS col1 FROM tab0 AS cor0
----
-253797
-3333
-96516

query I rowsort
SELECT + col2 * ( cor0.col1 ) FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5680
SELECT ALL - col2 DIV + 5 AS col2 FROM tab1 AS cor0
----
-10
-11
-19

skipif mysql # not compatible
query I rowsort label-5680
SELECT ALL - col2 / + 5 AS col2 FROM tab1 AS cor0
----
-10
-11
-19

query I rowsort
SELECT + + cor0.col0 + ( + col0 ) * col2 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT + + col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - - col1 * - 20 FROM tab1 cor0
----
-200
-260
-520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5684
SELECT - col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5684
SELECT - col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * - ( + col0 ) + col1 col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5686
SELECT DISTINCT + col1 + col2 + - CAST( ( col1 ) AS SIGNED ) col2 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5686
SELECT DISTINCT + col1 + col2 + - CAST ( ( col1 ) AS INTEGER ) col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + col2 + col0 + col2 FROM tab0
----
253
37
90

query I rowsort
SELECT 92 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT ALL tab1.col2 + col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT col1 * col1 - + col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT - + col2 + + col2 * - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5692
SELECT DISTINCT cor0.col2 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5692
SELECT DISTINCT cor0.col2 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 * col2 col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT 6 * col0 - col1 AS col2 FROM tab0 AS cor0
----
113
443
58

query I rowsort
SELECT DISTINCT + - 44 * + col2 * cor0.col1 + - col0 FROM tab2 AS cor0
----
-28503
-36835
-67574

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5696
SELECT DISTINCT + ( col1 ) * col1 + CAST( NULL AS DECIMAL ) / cor0.col2 + - col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5696
SELECT DISTINCT + ( col1 ) * col1 + CAST ( NULL AS REAL ) / cor0.col2 + - col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 58 - ( + cor0.col1 ) FROM tab0 AS cor0
----
-144
-149
-155

onlyif mysql # use DIV operator for integer division
query I rowsort label-5698
SELECT + col0 DIV - col2 + + cor0.col1 col2 FROM tab1 AS cor0
----
13
26
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5698
SELECT + col0 / - col2 + + cor0.col1 col2 FROM tab1 AS cor0
----
13
26
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 52 col0 FROM tab1 AS cor0
----
52
52
52

query I rowsort
SELECT DISTINCT - col0 * ( + col1 + - col2 ) AS col2 FROM tab2 AS cor0
----
-2574
-28
1659

query I rowsort
SELECT ALL col2 - cor0.col1 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL 71 * - 99 FROM tab0 AS cor0
----
-7029
-7029
-7029

query I rowsort
SELECT - ( - 35 ) AS col1 FROM tab2 AS cor0
----
35
35
35

query I rowsort
SELECT DISTINCT - col2 * 99 FROM tab0 AS cor0
----
-3267
-8118
-99

query I rowsort
SELECT ALL + col0 + + col0 * col1 * + 18 FROM tab0 AS cor0
----
145871
37176
61145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5706
SELECT + CAST( col1 AS SIGNED ) + col1 FROM tab2 cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-5706
SELECT + CAST ( col1 AS INTEGER ) + col1 FROM tab2 cor0
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5707
SELECT DISTINCT CAST( col0 AS SIGNED ) + col0 AS col0 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-5707
SELECT DISTINCT CAST ( col0 AS INTEGER ) + col0 AS col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL + col0 + - 30 * col2 FROM tab2 AS cor0
----
-1061
-702
-803

query I rowsort
SELECT col2 * 31 + col0 AS col0 FROM tab1 AS cor0
----
1677
1831
3056

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5710
SELECT DISTINCT + CAST( col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5710
SELECT DISTINCT + CAST ( col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5711
SELECT DISTINCT 47 DIV col2 AS col0 FROM tab0 AS cor0
----
0
1
47

skipif mysql # not compatible
query I rowsort label-5711
SELECT DISTINCT 47 / col2 AS col0 FROM tab0 AS cor0
----
0
1
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5712
SELECT DISTINCT + CAST( NULL AS SIGNED ) + cor0.col0 * col1 AS col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5712
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + cor0.col0 * col1 AS col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - - cor0.col2 + - col2 * cor0.col0 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT - 65 * - cor0.col2 + col0 * - 41 FROM tab0 AS cor0
----
-1370
1161
1681

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5715
SELECT ALL + CAST( NULL AS SIGNED ) + + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5715
SELECT ALL + CAST ( NULL AS INTEGER ) + + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - cor0.col2 + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
238
8112
9243

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5717
SELECT DISTINCT + col0 + - col1 * CAST( 33 AS SIGNED ) FROM tab0 AS cor0
----
-2814
-2914
-3166

skipif mysql # not compatible
query I rowsort label-5717
SELECT DISTINCT + col0 + - col1 * CAST ( 33 AS INTEGER ) FROM tab0 AS cor0
----
-2814
-2914
-3166

query I rowsort
SELECT - 37 + col0 FROM tab2 AS cor0
----
-30
41
42

query I rowsort
SELECT DISTINCT col0 + - 80 * + col2 + ( 60 ) * col2 FROM tab0
----
-1551
-636
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 22 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5721
SELECT ALL 52 + 84 DIV col1 FROM tab2
----
53
54
56

skipif mysql # not compatible
query I rowsort label-5721
SELECT ALL 52 + 84 / col1 FROM tab2
----
53
54
56

query I rowsort
SELECT DISTINCT col2 * + col0 * 27 FROM tab0
----
197046
21384
945

query I rowsort
SELECT DISTINCT + col1 * col0 * - col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT cor0.col1 * 59 * col0 FROM tab2 AS cor0
----
12803
271518
79237

onlyif mysql # use DIV operator for integer division
query I rowsort label-5725
SELECT 19 DIV 76 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5725
SELECT 19 / 76 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - col0 + + col0 - col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col0 * ( - col0 ) + col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT 46 * - col0 AS col0 FROM tab2 AS cor0
----
-322
-3588
-3634

query I rowsort
SELECT ALL col1 + 93 AS col0 FROM tab0
----
179
184
190

query I rowsort
SELECT 33 * tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to a5cffa32f627ede3eeafdc956e0a2eea

query I rowsort
SELECT DISTINCT - col0 * - col2 * + col1 AS col1 FROM tab0
----
3395
664118
68112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5732
SELECT - ( - 56 ) * col0 + + CAST( col1 AS SIGNED ) * col2 - + col0 FROM tab2 AS cor0
----
1222
4991
5824

skipif mysql # not compatible
query I rowsort label-5732
SELECT - ( - 56 ) * col0 + + CAST ( col1 AS INTEGER ) * col2 - + col0 FROM tab2 AS cor0
----
1222
4991
5824

onlyif mysql # use DIV operator for integer division
query I rowsort label-5733
SELECT col1 * col0 + + ( col1 ) DIV + col0 FROM tab1 AS cor0
----
1040
640
86

skipif mysql # not compatible
query I rowsort label-5733
SELECT col1 * col0 + + ( col1 ) / + col0 FROM tab1 AS cor0
----
1040
640
86

query I rowsort
SELECT ALL - - col2 * col1 + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + 42 FROM tab0 cor0
----
42
42
42

query I rowsort
SELECT + 57 + col0 * col1 FROM tab1 AS cor0
----
1097
135
697

query I rowsort
SELECT ALL col2 * col2 + - col2 AS col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT DISTINCT - 28 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-280
-364
-728

onlyif mysql # use DIV operator for integer division
query I rowsort label-5739
SELECT - 28 DIV + ( col2 ) + + tab0.col0 * col2 FROM tab0
----
7
7298
792

skipif mysql # not compatible
query I rowsort label-5739
SELECT - 28 / + ( col2 ) + + tab0.col0 * col2 FROM tab0
----
7
7298
792

query I rowsort
SELECT - - 66 * col2 + 51 AS col2 FROM tab0 AS cor0
----
117
2229
5463

query I rowsort
SELECT + + ( col1 ) + + 21 FROM tab1 AS cor0
----
31
34
47

query I rowsort
SELECT - 19 * col0 + 28 FROM tab1 AS cor0
----
-1188
-1492
-29

skipif mysql # not compatible
query I rowsort
SELECT col1 + - col1 * - CAST ( - col0 AS REAL ) AS col2 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ALL 6 FROM tab1, tab1 cor0, tab0 cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT DISTINCT col0 * + col2 + col1 * + cor0.col2 + col1 FROM tab1 cor0
----
1592
4228
8941

query I rowsort
SELECT ALL + col1 * col1 + + col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT + col1 - - 58 * + col2 * col0 FROM tab0 AS cor0
----
2127
423375
46022

query I rowsort
SELECT ALL - + col2 * col0 + 81 + col2 * + col1 FROM tab2 AS cor0
----
-2275
-413
729

query I rowsort
SELECT DISTINCT - col1 * - col1 * col1 - col0 AS col1 FROM tab1 AS cor0
----
17573
2117
936

query I rowsort
SELECT ALL + col1 * 7 AS col1 FROM tab1 cor0
----
182
70
91

query I rowsort
SELECT col1 + 60 AS col2 FROM tab1 AS cor0
----
70
73
86

query I rowsort
SELECT ALL col2 * - col0 + col2 + - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ( 80 ) - + cor1.col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f72d6b33ce551a1c4bad66981dc4419e

query I rowsort
SELECT ALL 54 AS col2 FROM tab0
----
54
54
54

query I rowsort
SELECT - cor0.col2 * - 1 + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL ( - col2 ) * col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + 97 AS col1 FROM tab0, tab1 AS cor0
----
97

query I rowsort
SELECT 71 - cor0.col1 FROM tab2 AS cor0
----
12
40
54

query I rowsort
SELECT 33 * 30 FROM tab2
----
990
990
990

query I rowsort
SELECT - + col0 + + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT col1 * + col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT tab1.col1 * - col1 * - tab1.col2 - + col2 FROM tab1
----
16128
36450
5643

query I rowsort
SELECT + 51 + + col2 FROM tab0 AS cor0
----
133
52
84

query I rowsort
SELECT + 92 * + col2 + - col1 * col0 FROM tab1 AS cor0
----
4604
4890
7792

query I rowsort
SELECT DISTINCT ( + 33 ) FROM tab2, tab2 AS cor0
----
33

query I rowsort
SELECT + 49 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
108
66
80

query I rowsort
SELECT DISTINCT - col1 * + col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT 81 + cor0.col1 * + col2 + 71 FROM tab1 AS cor0
----
1400
1556
722

query I rowsort
SELECT ALL + col1 + + col2 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT + col2 * ( + col2 ) + col0 * 45 AS col0 FROM tab1 AS cor0
----
12816
3051
6129

onlyif mysql # use DIV operator for integer division
query I rowsort label-5771
SELECT ALL + col2 DIV 38 AS col1 FROM tab0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5771
SELECT ALL + col2 / 38 AS col1 FROM tab0
----
0
0
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5772
SELECT CAST( NULL AS SIGNED ) * col0 + col1 * ( - col0 + col2 ) / + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5772
SELECT CAST ( NULL AS INTEGER ) * col0 + col1 * ( - col0 + col2 ) / + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5773
SELECT + + col0 * col0 + - cor0.col0 + 26 DIV col0 FROM tab2 AS cor0
----
45
6006
6162

skipif mysql # not compatible
query I rowsort label-5773
SELECT + + col0 * col0 + - cor0.col0 + 26 / col0 FROM tab2 AS cor0
----
45
6006
6162

query I rowsort
SELECT ALL - + 71 FROM tab2 cor0
----
-71
-71
-71

query I rowsort
SELECT ALL + cor0.col1 * 86 * col2 + + col2 * col1 + + col1 * col2 * col2 FROM tab1 AS cor0
----
197964
228384
82080

onlyif mysql # use DIV operator for integer division
query I rowsort label-5776
SELECT ALL + + col1 DIV - col2 + + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5776
SELECT ALL + + col1 / - col2 + + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT 92 FROM tab1 cor0
----
92

query I rowsort
SELECT DISTINCT col2 * + col0 + col1 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + ( col2 ) + + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - col2 * + 52 * + cor0.col2 FROM tab2 cor0
----
-35152
-37908
-75088

onlyif mysql # use DIV operator for integer division
query I rowsort label-5781
SELECT - col0 + - 27 DIV + cor0.col1 AS col2 FROM tab1 AS cor0
----
-4
-66
-82

skipif mysql # not compatible
query I rowsort label-5781
SELECT - col0 + - 27 / + cor0.col1 AS col2 FROM tab1 AS cor0
----
-4
-66
-82

query I rowsort
SELECT - col2 * col0 + - col2 * col1 AS col0 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT DISTINCT + + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col0 * col1 col0 FROM tab2 AS cor0
----
-1264
-210
-4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5785
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5785
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5786
SELECT DISTINCT - - 54 DIV col0 AS col0 FROM tab2 AS cor0
----
0
7

skipif mysql # not compatible
query I rowsort label-5786
SELECT DISTINCT - - 54 / col0 AS col0 FROM tab2 AS cor0
----
0
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + ( + col0 ) + + 44 AS col0 FROM tab0 AS cor0
----
133
68
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5789
SELECT DISTINCT + col1 DIV - 87 AS col1 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-5789
SELECT DISTINCT + col1 / - 87 AS col1 FROM tab2
----
0

query I rowsort
SELECT - - col1 * col0 - - col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 * + 48 + + col2 * + col1 AS col1 FROM tab1 AS cor0
----
-26790
-58656
-65988

query I rowsort
SELECT ALL - col2 - col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT + - col0 + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - col2 + - 12 + col1 * col2 FROM tab2 AS cor0
----
1496
596
798

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 * + 34 col0 FROM tab1 AS cor0
----
-350
-455
-910

query I rowsort
SELECT ALL - - col1 - col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * - col2 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5799
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5799
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col1 col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - col2 * + 77 AS col0 FROM tab0
----
-2541
-6314
-77

query I rowsort
SELECT col2 * + col2 * col1 AS col1 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT - - cor0.col1 * + col0 + - 30 + col1 * 95 FROM tab1 cor0
----
1560
2245
2518

query I rowsort
SELECT 64 FROM tab1, tab0 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT - col2 * col0 * col1 + + col2 FROM tab2
----
-119626
-50996
-5832

query I rowsort
SELECT col1 - - col2 AS col0 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 79 AS col0 FROM tab2, tab2 cor0, tab0 AS cor1
----
79

query I rowsort
SELECT - 78 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT ALL - ( col0 ) AS col0 FROM tab1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col0 + - col0 col1 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT - 61 * - col1 + + cor0.col2 + + col0 FROM tab0 AS cor0
----
5303
5722
5953

query I rowsort
SELECT ALL + cor0.col2 + - col2 * col2 * - col0 FROM tab2 AS cor0
----
114114
5130
52754

query I rowsort
SELECT - 7 * col0 + - col1 * + ( + col0 ) FROM tab0 AS cor0
----
-2232
-3640
-8722

query I rowsort
SELECT ( ( col0 ) ) * + col1 + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL 72 * col0 AS col2 FROM tab1 AS cor0
----
216
4608
5760

query I rowsort
SELECT + + 34 + col1 FROM tab0 AS cor0
----
120
125
131

onlyif mysql # use DIV operator for integer division
query I rowsort label-5818
SELECT DISTINCT + 33 + + 68 + + cor0.col1 DIV + 30 FROM tab2 AS cor0
----
101
102

skipif mysql # not compatible
query I rowsort label-5818
SELECT DISTINCT + 33 + + 68 + + cor0.col1 / + 30 FROM tab2 AS cor0
----
101
102

query I rowsort
SELECT ALL col2 * + col2 AS col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT - 33 FROM tab1, tab1 cor0, tab0 AS cor1
----
-33

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0, tab1, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + + col2 * cor0.col0 AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - 44 * + col1 AS col1 FROM tab2 AS cor0
----
-1364
-2596
-748

query I rowsort
SELECT DISTINCT - - col0 * - cor0.col0 FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5825
SELECT DISTINCT + + col1 DIV col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5825
SELECT DISTINCT + + col1 / col2 AS col1 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 * col2 col2 FROM tab0 cor0
----
2145
5330
65

query I rowsort
SELECT DISTINCT tab0.col0 * + col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + col1 + col1 * 6 AS col1 FROM tab1 AS cor0
----
182
70
91

query I rowsort
SELECT ALL + cor0.col2 * - ( - 19 ) AS col0 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT DISTINCT + - col0 * - 32 FROM tab0 AS cor0
----
1120
2848
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5831
SELECT + col0 - + col0 * col1 DIV col2 FROM tab0 AS cor0
----
-3360
-38
-9

skipif mysql # not compatible
query I rowsort label-5831
SELECT + col0 - + col0 * col1 / col2 FROM tab0 AS cor0
----
-3360
-38
-9

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col0 * 53 FROM tab0 AS cor0
----
1272
1855
4717

query I rowsort
SELECT col0 + 55 + - col0 AS col1 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT DISTINCT + col2 + col1 * + ( + col2 ) FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 - ( 95 ) * - cor0.col1 col1 FROM tab0 AS cor0
----
8194
8734
9250

query I rowsort
SELECT ALL - cor0.col2 * - ( - 85 ) * + col1 FROM tab2 AS cor0
----
-130390
-54910
-71145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5838
SELECT - - col2 * CAST( + col2 AS SIGNED ) FROM tab1 cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-5838
SELECT - - col2 * CAST ( + col2 AS INTEGER ) FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT cor0.col0 * - col1 + 82 * + col1 - - 91 FROM tab0 AS cor0
----
-546
4650
5079

query I rowsort
SELECT DISTINCT col0 * 95 * col2 FROM tab2 AS cor0
----
17955
192660
285190

query I rowsort
SELECT DISTINCT + + 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-5842
SELECT + col0 * - CAST( + col2 AS SIGNED ) * col0 col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5842
SELECT + col0 * - CAST ( + col2 AS INTEGER ) * col0 col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col2 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col2 * ( - 82 ) + - col1 AS col2 FROM tab0 AS cor0
----
-179
-2792
-6815

query I rowsort
SELECT ALL 93 * + col0 AS col1 FROM tab1 AS cor0
----
279
5952
7440

onlyif mysql # use DIV operator for integer division
query I rowsort label-5846
SELECT DISTINCT + col2 + col1 DIV + 22 FROM tab0 AS cor0
----
36
5
86

skipif mysql # not compatible
query I rowsort label-5846
SELECT DISTINCT + col2 + col1 / + 22 FROM tab0 AS cor0
----
36
5
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 49 col2 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
49

query I rowsort
SELECT + + col2 + + col2 * ( ( - col0 ) ) AS col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL cor1.col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-5850
SELECT + + col2 DIV - 7 AS col1 FROM tab0 AS cor0
----
-11
-4
0

skipif mysql # not compatible
query I rowsort label-5850
SELECT + + col2 / - 7 AS col1 FROM tab0 AS cor0
----
-11
-4
0

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) < NULL
----

query I rowsort
SELECT tab2.col2 * - col0 + - col0 FROM tab2
----
-196
-2106
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + tab2.col1 col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - col1 * - col1 + col2 * + tab0.col0 AS col1 FROM tab0
----
15579
8188
9444

query I rowsort
SELECT DISTINCT col0 + + col1 * col0 * + col2 FROM tab2
----
119730
51113
5866

query I rowsort
SELECT ALL + col0 * - tab1.col0 + col1 * col1 AS col1 FROM tab1
----
-3996
-6231
667

onlyif mysql # use DIV operator for integer division
query I rowsort label-5857
SELECT ALL + col1 DIV - tab2.col0 AS col2 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5857
SELECT ALL + col1 / - tab2.col0 AS col2 FROM tab2
----
-4
0
0

query III rowsort
SELECT * FROM tab1 WHERE col2 - + col1 * col0 NOT IN ( - tab1.col0 * col1 + + col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5859
SELECT + col2 DIV tab0.col2 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5859
SELECT + col2 / tab0.col2 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT tab2.col2 * tab2.col1 + + col0 AS col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT col2 * tab2.col2 AS col0 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-5862
SELECT + tab1.col2 DIV col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5862
SELECT + tab1.col2 / col1 AS col2 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5863
SELECT ALL - col2 + col2 + col0 DIV tab0.col0 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5863
SELECT ALL - col2 + col2 + col0 / tab0.col0 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT + col2 + col0 AS col2 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5865
SELECT DISTINCT col1 DIV col2 AS col0 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-5865
SELECT DISTINCT col1 / col2 AS col0 FROM tab0
----
1
2
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5866
SELECT - 15 / cor0.col1 + CAST( NULL AS DECIMAL ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5866
SELECT - 15 / cor0.col1 + CAST ( NULL AS REAL ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query III rowsort
SELECT * FROM tab2 WHERE ( col2 ) NOT IN ( + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL = col1 * - col1 * col2
----

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE NOT + col1 * + col0 NOT IN ( + tab0.col0 * col1 + + col1 * + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 col0 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + col1 AS col1 FROM tab1 WHERE NOT NULL IN ( - col2 * - col2 )
----

query I rowsort
SELECT DISTINCT - col2 + + col2 AS col1 FROM tab0
----
0

query I rowsort
SELECT + - cor0.col1 + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT 70 FROM tab1 cor0
----
70
70
70

query I rowsort
SELECT DISTINCT + col0 + - col0 * + ( - 21 ) AS col0 FROM tab1 AS cor0
----
1408
1760
66

query I rowsort
SELECT ALL ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab2
----
71

query I rowsort
SELECT ALL + cor0.col1 * + col2 + - col2 AS col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT 39 * - col0 + ( - col2 ) * - cor0.col2 + - col1 FROM tab0 AS cor0
----
-1461
3162
67

query I rowsort
SELECT + 86 + cor0.col2 * 31 + + 90 * - col1 AS col0 FROM tab1 cor0
----
-580
1892
953

query I rowsort
SELECT ALL col2 * 84 AS col0 FROM tab2 cor0
----
2184
2268
3192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 81 col2 FROM tab0
----
-81
-81
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5883
SELECT - CAST( 31 AS SIGNED ) - col0 * - ( - col1 ) FROM tab0 AS cor0
----
-2095
-3426
-8130

skipif mysql # not compatible
query I rowsort label-5883
SELECT - CAST ( 31 AS INTEGER ) - col0 * - ( - col1 ) FROM tab0 AS cor0
----
-2095
-3426
-8130

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5884
SELECT DISTINCT - - CAST( 95 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
95

skipif mysql # not compatible
query I rowsort label-5884
SELECT DISTINCT - - CAST ( 95 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
95

query I rowsort
SELECT 91 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT + ( - col0 ) - - col2 * ( col2 + + col1 ) * + col1 FROM tab0 cor0
----
1290837
337698
9471

query I rowsort
SELECT ALL ( + 4 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL + 29 FROM tab2
----
29
29
29

query I rowsort
SELECT 52 * col2 * col1 FROM tab0
----
147576
388024
5044

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col0 ) - - col1 col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col0 * col2 + + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL - col2 * + col1 - - col1 AS col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL + col1 + - tab1.col1 - + col0 AS col2 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5894
SELECT - + col0 DIV 54 + cor0.col0 FROM tab2 AS cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-5894
SELECT - + col0 / 54 + cor0.col0 FROM tab2 AS cor0
----
7
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col0 + col2 col2 FROM tab1
----
111
178
272

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT - col0 * col0 + - col0 AS col1 FROM tab0
----
-1260
-600
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + cor0.col1 * col0 col2 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + 43 + + cor0.col1 FROM tab0 cor0
----
129
134
140

query I rowsort
SELECT + 58 - + col1 * + col1 AS col1 FROM tab2 AS cor0
----
-231
-3423
-903

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + col0 * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT 2 * + col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT + 77 * + col1 FROM tab1 AS cor0
----
1001
2002
770

query I rowsort
SELECT - 57 * - col2 AS col0 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT - - col1 + col0 + + col1 * - col1 AS col2 FROM tab1 cor0
----
-26
-647
-76

query I rowsort
SELECT DISTINCT - + col0 * col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col0 * + cor0.col0 + cor0.col1 * - col1 AS col2 FROM tab1 cor0
----
-4196
-6569
-685

query I rowsort
SELECT DISTINCT cor0.col1 + + col2 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT + 98 + 27 AS col2 FROM tab1 AS cor0
----
125
125
125

onlyif mysql # use DIV operator for integer division
query I rowsort label-5911
SELECT col1 DIV 67 - col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5911
SELECT col1 / 67 - col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + cor0.col0 + - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT + col1 * + col2 + col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5914
SELECT + + col2 DIV + col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5914
SELECT + + col2 / + col1 FROM tab1 AS cor0
----
2
5
7

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT - - 38 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT ALL - ( + 90 ) + - col0 * + col1 AS col1 FROM tab1 cor0
----
-1130
-168
-730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - col0 col0 FROM tab1 cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5919
SELECT + col2 DIV 43 AS col0 FROM tab1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-5919
SELECT + col2 / 43 AS col0 FROM tab1
----
1
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( - col2 ) col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + col1 * - cor0.col2 + - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL + 26 AS col2 FROM tab1 AS cor0
----
26
26
26

query I rowsort
SELECT ALL - col0 * col0 AS col2 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ( col0 ) - col1 * + col2 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col1 * col1 + col2 * col0 + + col0 FROM tab1 AS cor0
----
-511
3612
7591

query I rowsort
SELECT + ( - cor0.col0 ) * col0 * + col0 + + col1 AS col2 FROM tab2 AS cor0
----
-312
-474493
-493022

query I rowsort
SELECT DISTINCT - + 10 + + col0 FROM tab1 AS cor0
----
-7
54
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5928
SELECT ALL - col0 * + col2 + + col2 - col1 DIV - col2 AS col0 FROM tab1
----
-108
-3591
-7584

skipif mysql # not compatible
query I rowsort label-5928
SELECT ALL - col0 * + col2 + + col2 - col1 / - col2 AS col0 FROM tab1
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-5929
SELECT DISTINCT CAST( - col0 AS SIGNED ) DIV col0 - col1 * + col1 FROM tab2
----
-290
-3482
-962

skipif mysql # not compatible
query I rowsort label-5929
SELECT DISTINCT CAST ( - col0 AS INTEGER ) / col0 - col1 * + col1 FROM tab2
----
-290
-3482
-962

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + col2 AS REAL ) col0 FROM tab0
----
1
33
82

query III rowsort
SELECT ALL * FROM tab2 cor0 WHERE NULL > NULL
----

query I rowsort
SELECT DISTINCT col1 * col0 + col2 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT col0 * col2 + tab2.col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT ALL col2 FROM tab2 cor0 WHERE col0 + - col2 * col0 * - col1 BETWEEN ( NULL ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5935
SELECT ALL - col0 * col2 DIV + col0 + col0 - col0 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5935
SELECT ALL - col0 * col2 / + col0 + col0 - col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col2 * - col2 AS col2 FROM tab2
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col2 col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL - tab1.col0 * + col1 FROM tab1
----
-1040
-640
-78

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT - col2 + col2 NOT IN ( + col1 - - col2 )
----

query I rowsort
SELECT ALL + tab0.col2 + col0 + tab0.col1 AS col1 FROM tab0
----
133
143
262

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col2 col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL - col0 * col0 - + tab2.col2 AS col1 FROM tab2 WHERE - col0 + + col1 * - col1 IN ( col1 )
----

query I rowsort
SELECT col2 * + col0 * + col2 FROM tab0 WHERE NOT + col0 + - tab0.col0 >= NULL
----

query I rowsort
SELECT - col2 * col1 * col0 FROM tab2
----
-119652
-51034
-5859

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT BETWEEN ( NULL ) AND ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5946
SELECT + col2 + + col1 DIV col0 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-5946
SELECT + col2 + + col1 / col0 FROM tab2
----
26
31
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5947
SELECT ALL - col0 * col2 + cor0.col2 DIV col2 FROM tab1 AS cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-5947
SELECT ALL - col0 * col2 + cor0.col2 / col2 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT col0 * tab0.col0 * - tab0.col0 AS col0 FROM tab0
----
-13824
-42875
-704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 * + col1 + col1 col1 FROM tab1
----
16237
36530
5710

query I rowsort
SELECT - col1 * + col2 + col1 AS col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL col0 FROM tab2 WHERE ( NULL ) = ( NULL )
----

query I rowsort
SELECT col1 * - tab2.col1 * + col2 - col2 FROM tab2
----
-11020
-25974
-90532

query I rowsort
SELECT + col1 * + col2 + + col1 FROM tab2
----
1593
663
868

query III rowsort
SELECT * FROM tab1 WHERE NULL = ( - col0 * - col2 + col2 )
----

query I rowsort
SELECT col2 * - col0 - + tab1.col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT tab1.col2 + + col1 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT col0 * col0 * + col2 AS col2 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 col2 FROM tab2, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL - cor0.col2 + col2 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5960
SELECT ALL - - cor0.col2 + - col0 DIV col2 FROM tab0 AS cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-5960
SELECT ALL - - cor0.col2 + - col0 / col2 FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT col1 * - col1 * + col0 FROM tab0
----
-177504
-329315
-737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-5962
SELECT - col0 + col2 DIV + col1 AS col0 FROM tab1
----
-1
-59
-73

skipif mysql # not compatible
query I rowsort label-5962
SELECT - col0 + col2 / + col1 AS col0 FROM tab1
----
-1
-59
-73

query I rowsort
SELECT + col0 * col1 FROM tab2 WHERE NULL BETWEEN col2 * + col1 AND NULL
----

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT cor0.col2 + - col2 * + col1 + - cor0.col2 * + col1 * col0 AS col1 FROM tab2 cor0 WHERE NULL NOT IN ( col1 ) OR ( NULL ) NOT IN ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5966
SELECT DISTINCT cor0.col2 * col2 DIV + col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5966
SELECT DISTINCT cor0.col2 * col2 / + col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + + col1 * + col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + cor0.col1 + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5969
SELECT DISTINCT + col0 * + col1 DIV col1 - col2 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-5969
SELECT DISTINCT + col0 * + col1 / col1 - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
1
33
82

query I rowsort
SELECT - col2 + 29 AS col1 FROM tab2 AS cor0
----
-9
2
3

query I rowsort
SELECT - 91 FROM tab2, tab2 AS cor0
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5973
SELECT + CAST( cor0.col0 AS SIGNED ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif mysql # not compatible
query I rowsort label-5973
SELECT + CAST ( cor0.col0 AS INTEGER ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-5974
SELECT ALL - col2 DIV tab1.col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5974
SELECT ALL - col2 / tab1.col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT ALL + col0 * + 64 AS col2 FROM tab2
----
448
4992
5056

query I rowsort
SELECT + col1 * col2 + col2 AS col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT - 22 + + col1 + col2 AS col0 FROM tab0
----
151
76
97

query I rowsort
SELECT + tab1.col1 + + col0 + col0 FROM tab1
----
138
173
32

query I rowsort
SELECT DISTINCT 72 FROM tab1, tab2, tab2 AS cor0
----
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5980
SELECT cor0.col2 + 24 DIV - tab1.col1 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to f1653b0a8de7824f196559db6c8ec5e9

skipif mysql # not compatible
query I rowsort label-5980
SELECT cor0.col2 + 24 / - tab1.col1 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to f1653b0a8de7824f196559db6c8ec5e9

query I rowsort
SELECT - col2 + + ( - 65 ) FROM tab1 AS cor0
----
-119
-122
-161

query I rowsort
SELECT - col1 + - 50 FROM tab1 AS cor0
----
-60
-63
-76

query I rowsort
SELECT ALL 36 + col0 FROM tab0
----
125
60
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 + ( col2 ) col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL + ( col1 + + 12 ) AS col1 FROM tab2
----
29
43
71

query I rowsort
SELECT DISTINCT - cor0.col2 + 42 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
-12
-15
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * tab0.col1 col0 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort
SELECT + col2 - CAST ( 32 + col0 * 34 AS REAL ) AS col2 FROM tab0 AS cor0
----
-1221
-2976
-815

query I rowsort
SELECT DISTINCT + + cor0.col2 + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5990
SELECT DISTINCT + col0 + col0 - 66 * + col0 * - CAST( 19 AS SIGNED ) FROM tab1 AS cor0
----
100480
3768
80384

skipif mysql # not compatible
query I rowsort label-5990
SELECT DISTINCT + col0 + col0 - 66 * + col0 * - CAST ( 19 AS INTEGER ) FROM tab1 AS cor0
----
100480
3768
80384

query I rowsort
SELECT + col2 * - col0 + - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT - col0 + + 88 FROM tab0 cor0
----
-1
53
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col0 + col1 col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL col0 + - col0 - col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - 21 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT ALL col0 * + ( - 22 ) AS col2 FROM tab0
----
-1958
-528
-770

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab2 cor0
----
26
27
38

query I rowsort
SELECT - cor0.col0 - + col1 * col2 FROM tab2 AS cor0
----
-1612
-725
-844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + cor0.col2 * col1 col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT col1 + - 26 - 37 * - col0 AS col0 FROM tab1
----
111
2352
2947

query I rowsort
SELECT - - col0 + 55 AS col0 FROM tab0 AS cor0
----
144
79
90

query I rowsort
SELECT + col1 * - 36 AS col2 FROM tab0 AS cor0
----
-3096
-3276
-3492

query I rowsort
SELECT DISTINCT + + ( + ( col0 ) ) * - col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6004
SELECT + ( col1 ) - - cor0.col1 DIV + col0 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-6004
SELECT + ( col1 ) - - cor0.col1 / + col0 FROM tab0 AS cor0
----
89
92
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6005
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * - cor0.col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6005
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * - cor0.col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT + - 34 + 82 * col1 AS col1 FROM tab2 AS cor0
----
1360
2508
4804

onlyif mysql # use DIV operator for integer division
query I rowsort label-6007
SELECT - col0 DIV col2 + - col1 * col1 FROM tab0 cor0
----
-7396
-8282
-9444

skipif mysql # not compatible
query I rowsort label-6007
SELECT - col0 / col2 + - col1 * col1 FROM tab0 cor0
----
-7396
-8282
-9444

query I rowsort
SELECT - ( col1 ) * - col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - + 96 * + col2 * col0 - col1 FROM tab0 cor0
----
-3457
-700699
-76118

query I rowsort
SELECT ALL 5 + - col2 * col1 AS col1 FROM tab2 cor0
----
-1529
-641
-832

query I rowsort
SELECT DISTINCT - col2 - col0 AS col0 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - ( col0 ) + + cor0.col1 * - ( 11 ) AS col0 FROM tab1 AS cor0
----
-174
-223
-289

onlyif mysql # use DIV operator for integer division
query I rowsort label-6013
SELECT 41 DIV ( tab0.col0 ) col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6013
SELECT 41 / ( tab0.col0 ) col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

query I rowsort
SELECT ALL - col1 * - 2 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL 99 + - col1 * - col1 FROM tab1 AS cor0
----
199
268
775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col1 * col1 * + col1 col2 FROM tab2 cor0
----
-205353
-29764
-4875

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6017
SELECT CAST( + ( + col0 ) AS SIGNED ) + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6017
SELECT CAST ( + ( + col0 ) AS INTEGER ) + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6018
SELECT DISTINCT - + CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6018
SELECT DISTINCT - + CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - + cor0.col2 + + col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + + col1 * - 41 + col0 AS col2 FROM tab2 AS cor0
----
-1264
-2341
-618

query I rowsort
SELECT + col1 * - col2 + cor0.col0 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6022
SELECT ALL + CAST( - col1 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-6022
SELECT ALL + CAST ( - col1 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - 9 + cor0.col2 FROM tab2 cor0
----
17
18
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 90 + col1 col2 FROM tab1 AS cor0
----
-64
-77
-80

query I rowsort
SELECT ALL col2 + + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT col0 * col2 + - ( + col0 ) FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + ( + col2 ) * + ( + ( - col0 ) ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + 90 AS col2 FROM tab0 AS cor0
----
90
90
90

query I rowsort
SELECT ALL - col2 + - col2 * - col2 AS col1 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT ALL cor0.col2 - + 10 FROM tab0, tab0 AS cor0
----
9 values hashing to 746d776e63661670e45b4b9d5784ad11

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # use DIV operator for integer division
query I rowsort label-6032
SELECT ALL + - col1 DIV ( - 19 + - col0 ) FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6032
SELECT ALL + - col1 / ( - 19 + - col0 ) FROM tab0 AS cor0
----
0
1
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6033
SELECT cor0.col2 + + CAST( NULL AS DECIMAL ) * col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6033
SELECT cor0.col2 + + CAST ( NULL AS REAL ) * col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6034
SELECT - col1 - col1 DIV col1 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-6034
SELECT - col1 - col1 / col1 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT DISTINCT - col1 * col2 * 87 + 26 + col1 AS col0 FROM tab0 AS cor0
----
-246794
-649077
-8316

query I rowsort
SELECT DISTINCT ( col0 ) * ( col1 * - col0 ) + + col0 FROM tab2 AS cor0
----
-106018
-1512
-358878

query I rowsort
SELECT - col2 + - col1 * 13 FROM tab1 AS cor0
----
-187
-265
-392

query I rowsort
SELECT 41 + - col2 FROM tab2 AS cor0
----
14
15
3

query I rowsort
SELECT DISTINCT + + 12 + col0 AS col0 FROM tab1 AS cor0
----
15
76
92

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT col1 - - col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL + - ( + col1 ) * col1 + 48 + + col0 FROM tab1 cor0
----
-41
-625
12

query I rowsort
SELECT ALL + col1 * col2 + + col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - col1 - - col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - - 22 * col1 AS col0 FROM tab1 cor0
----
220
286
572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + col0 col0 FROM tab1 AS cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + 70 * - col1 AS col0 FROM tab0
----
-6020
-6370
-6790

query I rowsort
SELECT ALL + - cor1.col1 * cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 315ab91f9844de122b0c28cd16e982e4

query I rowsort
SELECT DISTINCT - col1 - col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 * col2 FROM tab1 AS cor0
----
2970
3306
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col0 + col2 * - col0 + col2 * - cor0.col0 col1 FROM tab0 AS cor0
----
-1295
-2160
-22517

query I rowsort
SELECT DISTINCT + 81 * + col0 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT ALL - 82 + col0 FROM tab0 AS cor0
----
-47
-58
7

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab1, tab2 cor1
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT DISTINCT + 71 FROM tab2 cor0
----
71

query I rowsort
SELECT + - 75 AS col2 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT ALL + col0 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + col1 * col1 * 2 FROM tab0
----
14792
16562
18818

query I rowsort
SELECT + 35 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT - col1 * + col1 + + ( - col1 * cor0.col1 + col0 ) AS col0 FROM tab1 AS cor0
----
-1349
-136
-258

query I rowsort
SELECT ALL + + col2 + 81 AS col1 FROM tab0 AS cor0
----
114
163
82

query I rowsort
SELECT DISTINCT + + col2 * - 40 + col0 FROM tab1 AS cor0
----
-2157
-2216
-3760

query I rowsort
SELECT ALL ( - col1 ) * + col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6067
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6067
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + col2 FROM tab0 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 91c4f11552b395e0eb390f09eebaec3d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 col0 FROM tab1
----
99

query I rowsort
SELECT 54 FROM tab2, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

onlyif mysql # use DIV operator for integer division
query I rowsort label-6071
SELECT ALL cor0.col2 + - col1 DIV + col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-6071
SELECT ALL cor0.col2 + - col1 / + col1 FROM tab2 AS cor0
----
25
26
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col0 FROM tab0 cor0
----
4
4
4

query I rowsort
SELECT ALL + ( col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + col0 + - 34 AS col0 FROM tab1 cor0
----
-31
30
46

query I rowsort
SELECT ALL + + tab2.col1 FROM tab2, tab0 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6076
SELECT DISTINCT - 87 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6076
SELECT DISTINCT - 87 / col2 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT 62 + cor0.col0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 9bdc6d82bd63157822da4990665b35e2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6079
SELECT ALL - CAST( 90 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-90
-90
-90

skipif mysql # not compatible
query I rowsort label-6079
SELECT ALL - CAST ( 90 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-90
-90
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6080
SELECT DISTINCT ( col1 ) DIV col0 AS col2 FROM tab1
----
0
8

skipif mysql # not compatible
query I rowsort label-6080
SELECT DISTINCT ( col1 ) / col0 AS col2 FROM tab1
----
0
8

query I rowsort
SELECT DISTINCT + 45 FROM tab2
----
45

query I rowsort
SELECT + + 75 * + col1 AS col1 FROM tab2 AS cor0
----
1275
2325
4425

query I rowsort
SELECT DISTINCT - - col2 + - 70 * col0 AS col1 FROM tab1 AS cor0
----
-156
-4423
-5504

query I rowsort
SELECT ALL + - 60 + - 56 * col1 * 1 FROM tab0 cor0
----
-4876
-5156
-5492

query I rowsort
SELECT DISTINCT + col2 * col2 * - col0 AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1, tab1 AS cor0, tab0 cor1
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6087
SELECT DISTINCT + col0 + + col1 + + CAST( - col1 + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-6087
SELECT DISTINCT + col0 + + col1 + + CAST ( - col1 + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL - col0 + + col0 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - + col2 * cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - ( col2 ) + 95 FROM tab2 AS cor0
----
57
68
69

query I rowsort
SELECT - ( - 5 ) FROM tab1
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6092
SELECT col0 DIV + col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6092
SELECT col0 / + col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT col1 + + col2 * 19 + col1 AS col0 FROM tab2 cor0
----
575
612
756

query I rowsort
SELECT DISTINCT - col2 + - 85 FROM tab0 cor0
----
-118
-167
-86

query I rowsort
SELECT col1 * + 81 FROM tab2 cor0
----
1377
2511
4779

query I rowsort
SELECT + 16 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT + + col0 + col0 + - col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 19 FROM tab0, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT 0 + tab2.col1 * + 60 FROM tab2
----
1020
1860
3540

onlyif mysql # use DIV operator for integer division
query I rowsort label-6100
SELECT DISTINCT col2 DIV ( + 45 ) + col1 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6100
SELECT DISTINCT col2 / ( + 45 ) + col1 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT - tab2.col1 + tab2.col2 FROM tab2, tab0 AS cor0
----
-33
-4
21

query I rowsort
SELECT - tab0.col2 + + 95 FROM tab0
----
13
62
94

query I rowsort
SELECT DISTINCT + 5 FROM tab0, tab1 AS cor0
----
5

query I rowsort
SELECT + ( col0 ) * col1 * + col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + - col2 * 60 AS col0 FROM tab0 AS cor0
----
-1980
-4920
-60

query I rowsort
SELECT + 21 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT - col2 * + ( tab0.col0 ) AS col2 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 * cor0.col1 + + col2 col2 FROM tab2 AS cor0
----
1483
2662
5041

query I rowsort
SELECT + + 32 * col2 + + 8 FROM tab1 AS cor0
----
1736
1832
3080

onlyif mysql # use DIV operator for integer division
query I rowsort label-6110
SELECT 35 + col2 DIV - ( col0 ) FROM tab1 AS cor0
----
17
34
35

skipif mysql # not compatible
query I rowsort label-6110
SELECT 35 + col2 / - ( col0 ) FROM tab1 AS cor0
----
17
34
35

query I rowsort
SELECT - 38 * - col1 - col0 * cor0.col2 * col1 FROM tab2 AS cor0
----
-117410
-4681
-50388

onlyif mysql # use DIV operator for integer division
query I rowsort label-6112
SELECT ALL + col0 + 40 DIV col1 FROM tab2 AS cor0
----
78
8
81

skipif mysql # not compatible
query I rowsort label-6112
SELECT ALL + col0 + 40 / col1 FROM tab2 AS cor0
----
78
8
81

query I rowsort
SELECT + col2 * + 82 + 57 * cor0.col2 + 85 * - col2 AS col0 FROM tab1 AS cor0
----
2916
3078
5184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - 87 + + col1 col1 FROM tab0 AS cor0
----
7568
8008
8536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 * col1 + + 16 * + col0 + col2 * - ( col1 ) col0 FROM tab2
----
1417
2487
732

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to aff311fa1b3948e179779cc03c1fade4

query I rowsort
SELECT + col1 + - col1 * + tab0.col0 + + col0 FROM tab0
----
-1954
-3263
-7919

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + 52 col2 FROM tab0 AS cor0
----
4472
4732
5044

query I rowsort
SELECT - - col0 * - col2 + + col2 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + ( 9 ) FROM tab2, tab0 AS cor0, tab2 AS cor1
----
9

query I rowsort
SELECT ( - col0 ) * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - - 69 AS col2 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT - + 74 FROM tab0 AS cor0
----
-74
-74
-74

query I rowsort
SELECT + col0 * 63 + tab1.col0 AS col0 FROM tab1
----
192
4096
5120

query I rowsort
SELECT + 24 + + col2 FROM tab1 AS cor0
----
120
78
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT + ( 85 ) FROM tab1 AS cor0
----
85
85
85

query I rowsort
SELECT ALL + 82 FROM tab0, tab2 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab1 cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6130
SELECT DISTINCT - CAST( + 30 AS SIGNED ) * col1 + ( col0 ) col0 FROM tab0
----
-2556
-2641
-2875

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6130
SELECT DISTINCT - CAST ( + 30 AS INTEGER ) * col1 + ( col0 ) col0 FROM tab0
----
-2556
-2641
-2875

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( + col0 AS REAL ) * col2 + + 39 AS col0 FROM tab2 AS cor0
----
2067
228
3041

query I rowsort
SELECT + + 74 FROM tab1 AS cor0
----
74
74
74

query I rowsort
SELECT DISTINCT - col0 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT col2 + + ( col0 ) FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + 50 + tab0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f295a2607c134d3fa8a7b9b3519a6b22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col0 ) col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + ( col0 ) * + cor0.col1 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT tab2.col1 + tab2.col2 AS col2 FROM tab2, tab0, tab0 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + 84 AS col1 FROM tab2, tab0, tab0 cor0, tab1 AS cor1
----
84

query I rowsort
SELECT ALL + col0 * col0 + - col2 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT + col2 - - col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6142
SELECT ALL - - 19 DIV col2 FROM tab0 AS cor0
----
0
0
19

skipif mysql # not compatible
query I rowsort label-6142
SELECT ALL - - 19 / col2 FROM tab0 AS cor0
----
0
0
19

query I rowsort
SELECT DISTINCT + 43 FROM tab0, tab2 AS cor0
----
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 49 col0 FROM tab2
----
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 0 col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6146
SELECT col0 DIV - ( col1 ) - 14 FROM tab0
----
-14
-14
-14

skipif mysql # not compatible
query I rowsort label-6146
SELECT col0 / - ( col1 ) - 14 FROM tab0
----
-14
-14
-14

query I rowsort
SELECT - 91 + - col2 FROM tab1
----
-145
-148
-187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 93 col0 FROM tab1
----
93
93
93

query I rowsort
SELECT - 48 - col1 AS col2 FROM tab2
----
-107
-65
-79

query I rowsort
SELECT + 48 * - col1 + + ( 2 ) AS col2 FROM tab1
----
-1246
-478
-622

onlyif mysql # use DIV operator for integer division
query I rowsort label-6151
SELECT DISTINCT ( + col0 ) DIV 2 AS col1 FROM tab1 cor0
----
1
32
40

skipif mysql # not compatible
query I rowsort label-6151
SELECT DISTINCT ( + col0 ) / 2 AS col1 FROM tab1 cor0
----
1
32
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 - - col2 col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT ( col1 ) * col1 + 71 FROM tab0 AS cor0
----
7467
8352
9480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 79 + col2 col1 FROM tab0 AS cor0
----
112
161
80

query I rowsort
SELECT col2 * - col0 * + 28 AS col2 FROM tab1 AS cor0
----
-102144
-215040
-4536

query I rowsort
SELECT - col1 * - cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT col0 * - 11 FROM tab2
----
-77
-858
-869

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6158
SELECT ALL + CAST( NULL AS SIGNED ) + 63 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6158
SELECT ALL + CAST ( NULL AS INTEGER ) + 63 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 + 14 * col0 AS col0 FROM tab1 cor0
----
1040
39
832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6160
SELECT + col1 * CAST( NULL AS SIGNED ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6160
SELECT + col1 * CAST ( NULL AS INTEGER ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * 26 AS col1 FROM tab2 AS cor0
----
182
2028
2054

query I rowsort
SELECT - col1 * cor0.col0 + 99 FROM tab0 AS cor0
----
-1965
-3296
-8000

query I rowsort
SELECT + + 41 AS col1 FROM tab1 AS cor0
----
41
41
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6164
SELECT ALL col0 + + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6164
SELECT ALL col0 + + CAST ( NULL AS REAL ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * - cor0.col1 FROM tab0 cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + - 97 col2 FROM tab2 AS cor0
----
-38
-66
-80

query I rowsort
SELECT DISTINCT - - cor0.col1 - 81 FROM tab0 AS cor0
----
10
16
5

query I rowsort
SELECT ALL + col2 + - col2 + + cor0.col2 FROM tab1 cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6169
SELECT + col1 * CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6169
SELECT + col1 * CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 + + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT col0 * - ( - col2 * col2 ) FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT + tab1.col1 * col1 - + 36 AS col2 FROM tab1
----
133
64
640

query I rowsort
SELECT col1 * - col2 - col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT ALL col1 * 23 + - col0 * + col1 FROM tab2 AS cor0
----
-3245
-952
496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6175
SELECT DISTINCT - col1 - CAST( col1 AS SIGNED ) * col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

skipif mysql # not compatible
query I rowsort label-6175
SELECT DISTINCT - col1 - CAST ( col1 AS INTEGER ) * col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT ALL col0 * - ( col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + col2 + 37 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT ALL col0 + ( 34 ) FROM tab2 AS cor0
----
112
113
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col0 * + col1 col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-6180
SELECT - tab2.col2 + + col1 DIV - col1 AS col2 FROM tab2
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-6180
SELECT - tab2.col2 + + col1 / - col1 AS col2 FROM tab2
----
-27
-28
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6181
SELECT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6181
SELECT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - + 19 AS col0 FROM tab0 AS cor0
----
-19

query I rowsort
SELECT ALL + col1 + 73 AS col1 FROM tab2
----
104
132
90

query I rowsort
SELECT col1 - 81 FROM tab0
----
10
16
5

query I rowsort
SELECT + + 15 * - tab1.col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to e0f79b8dc833ffb0ad2085d087bb2642

query I rowsort
SELECT 26 * col1 + col1 FROM tab2 AS cor0
----
1593
459
837

query I rowsort
SELECT ALL + 80 + - col2 FROM tab0 AS cor0
----
-2
47
79

query I rowsort
SELECT ALL col1 * - col2 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 83 * col0 - + 79 col0 FROM tab0 AS cor0
----
1913
2826
7308

query I rowsort
SELECT ALL + 49 + + col0 FROM tab0 AS cor0
----
138
73
84

query I rowsort
SELECT DISTINCT - - 35 AS col1 FROM tab2 AS cor0
----
35

query I rowsort
SELECT + col1 * + col0 + ( - col2 ) FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab2
----
3

query I rowsort
SELECT ALL - + cor0.col0 * + col0 * + col1 FROM tab1 cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT - + col0 + col2 * - 67 FROM tab0 AS cor0
----
-102
-2235
-5583

query I rowsort
SELECT cor0.col2 + + ( - 81 ) FROM tab1 AS cor0
----
-24
-27
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6197
SELECT col0 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6197
SELECT col0 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6198
SELECT ALL CAST( NULL AS DECIMAL ) + - 95 col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6198
SELECT ALL CAST ( NULL AS REAL ) + - 95 col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6199
SELECT CAST( + col2 AS SIGNED ) DIV + col2 col2 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6199
SELECT CAST ( + col2 AS INTEGER ) / + col2 col2 FROM tab0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6200
SELECT - ( 1 ) * - col2 + CAST( NULL AS DECIMAL ) + + 16 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6200
SELECT - ( 1 ) * - col2 + CAST ( NULL AS REAL ) + + 16 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * col2 + + col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT ALL + - 96 + - col0 AS col2 FROM tab2 AS cor0
----
-103
-174
-175

query I rowsort
SELECT + col1 + - col1 * + tab0.col1 AS col0 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT + ( 43 ) * + col1 + + 81 AS col0 FROM tab2
----
1414
2618
812

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6205
SELECT - CAST( col1 AS SIGNED ) * - col2 FROM tab2
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-6205
SELECT - CAST ( col1 AS INTEGER ) * - col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT - 83 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT + - ( col2 ) + - col0 * col0 - + cor0.col0 AS col1 FROM tab0 AS cor0
----
-1261
-633
-8092

query I rowsort
SELECT ALL + - col2 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1406
650
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-6209
SELECT ALL + + col0 DIV + 90 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6209
SELECT ALL + + col0 / + 90 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col1 - + col0 * col1 * + 40 AS col2 FROM tab2 AS cor0
----
-184139
-53737
-8711

query I rowsort
SELECT ( col0 ) * col2 + + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + ( col2 ) + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + 26 FROM tab1 cor0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 52 * col2 col2 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT + + col1 + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6217
SELECT + col1 + - cor0.col1 DIV - cor0.col1 col0 FROM tab0 AS cor0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6217
SELECT + col1 + - cor0.col1 / - cor0.col1 col0 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT + ( cor0.col0 ) + + cor0.col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + col0 * + col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6220
SELECT ALL - 51 + + col2 DIV - col1 AS col0 FROM tab2 AS cor0
----
-51
-51
-53

skipif mysql # not compatible
query I rowsort label-6220
SELECT ALL - 51 + + col2 / - col1 AS col0 FROM tab2 AS cor0
----
-51
-51
-53

query I rowsort
SELECT DISTINCT + - col2 * col0 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + 21 * col1 FROM tab1 AS cor0
----
210
273
546

query I rowsort
SELECT col2 * - tab2.col2 + col1 - 11 AS col1 FROM tab2
----
-1438
-628
-709

query I rowsort
SELECT DISTINCT col2 * + col1 * col0 + col1 FROM tab0
----
3492
664209
68198

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6225
SELECT DISTINCT CAST( NULL AS SIGNED ) + tab0.col1 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6225
SELECT DISTINCT CAST ( NULL AS INTEGER ) + tab0.col1 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT tab2.col2 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6228
SELECT col2 + - col0 DIV + tab0.col1 AS col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6228
SELECT col2 + - col0 / + tab0.col1 AS col1 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col0 * - col2 * tab2.col1 col1 FROM tab2
----
-119626
-50996
-5832

query I rowsort
SELECT ALL + col0 + + col0 * col0 AS col0 FROM tab2
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-6231
SELECT col1 * + tab0.col1 - col0 DIV - col0 AS col2 FROM tab0 WHERE NOT col2 IN ( col0 * col0 * col2 + col1 * col2 )
----
7397
8282
9410

skipif mysql # not compatible
query I rowsort label-6231
SELECT col1 * + tab0.col1 - col0 / - col0 AS col2 FROM tab0 WHERE NOT col2 IN ( col0 * col0 * col2 + col1 * col2 )
----
7397
8282
9410

query I rowsort
SELECT + tab0.col1 + col1 * col2 AS col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL col2 * col0 * tab1.col1 + + tab1.col1 AS col1 FROM tab1
----
36490
4238
99853

query I rowsort
SELECT - col2 + + col0 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT tab0.col1 - - col0 FROM tab0 WHERE ( NULL ) NOT BETWEEN - col0 + + col1 AND NULL
----

query I rowsort
SELECT ALL col1 + col1 * col2 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT + col1 + col1 AS col0 FROM tab2
----
118
34
62

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL > + col0 + + col2
----

query I rowsort
SELECT + col0 + tab2.col1 + - col0 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT - col0 * col0 + col0 AS col1 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT - col1 - col2 * + 11 AS col2 FROM tab1 AS cor0
----
-1069
-620
-637

onlyif mysql # use DIV operator for integer division
query I rowsort label-6242
SELECT - col0 - + col2 DIV CAST( 64 AS SIGNED ) FROM tab0 AS cor0
----
-24
-35
-90

skipif mysql # not compatible
query I rowsort label-6242
SELECT - col0 - + col2 / CAST ( 64 AS INTEGER ) FROM tab0 AS cor0
----
-24
-35
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6243
SELECT - + col2 + - col0 * + CAST( - col0 AS SIGNED ) col0 FROM tab0 AS cor0
----
1224
543
7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6243
SELECT - + col2 + - col0 * + CAST ( - col0 AS INTEGER ) col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL - col1 * col2 * 35 - - 43 FROM tab2
----
-22567
-29252
-53647

query I rowsort
SELECT ALL - 28 * + col1 - + 62 * col0 AS col0 FROM tab1 AS cor0
----
-4248
-5324
-914

query I rowsort
SELECT + col2 * - col0 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1566
-4218
-8928

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col0 <= NULL
----

query I rowsort
SELECT DISTINCT - col1 * col2 + + col2 AS col2 FROM tab0 WHERE NOT NULL BETWEEN NULL AND - col2 + col1
----

query I rowsort
SELECT col2 + + col2 * + col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT col1 - + col2 * col0 FROM tab2 AS cor0 WHERE NOT ( + col2 ) NOT IN ( cor0.col2 )
----
-158
-1969
-2985

query I rowsort
SELECT - cor0.col0 * col1 FROM tab2 cor0 WHERE ( - col2 - col0 ) < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col1 col2 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + col1 col2 FROM tab2
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * tab1.col1 col2 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT col0 + col0 * col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT ALL + col2 + - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 FROM tab0 WHERE NOT ( - col2 ) NOT IN ( col0 / col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT BETWEEN + col2 / - col2 + - col0 AND col2 * col0
----

query I rowsort
SELECT col1 * + tab1.col1 * + col2 FROM tab1 WHERE NOT NULL BETWEEN NULL AND col2 * col2 + col1 * - col1 * - col2
----

query I rowsort
SELECT ALL col2 + col0 * - col0 AS col2 FROM tab1
----
-4039
-6304
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col2 col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6262
SELECT DISTINCT - col2 * tab1.col2 - - col1 DIV col2 AS col1 FROM tab1
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-6262
SELECT DISTINCT - col2 * tab1.col2 - - col1 / col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT col2 + - col1 * + tab1.col0 AS col2 FROM tab1
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 + col0 col0 FROM tab1
----
128
160
6

query I rowsort
SELECT col2 - col2 * col0 AS col1 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT ALL - col0 - + tab1.col1 * - col2 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL + 17 * - 99 FROM tab2 AS cor0
----
-1683
-1683
-1683

query I rowsort
SELECT ( - 33 ) * col2 FROM tab2 AS cor0
----
-1254
-858
-891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6269
SELECT DISTINCT col0 * + CAST( col1 AS SIGNED ) AS col1 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-6269
SELECT DISTINCT col0 * + CAST ( col1 AS INTEGER ) AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT ( col0 ) * - col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 24 + + col2 AS col1 FROM tab2 AS cor0
----
14
2
3

query I rowsort
SELECT 18 AS col2 FROM tab1 cor0
----
18
18
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-6273
SELECT DISTINCT - col2 DIV + col1 AS col1 FROM tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-6273
SELECT DISTINCT - col2 / + col1 AS col1 FROM tab2 AS cor0
----
-2
0

query I rowsort
SELECT DISTINCT + ( col2 ) AS col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6275
SELECT DISTINCT 51 DIV + ( + col1 ) FROM tab1
----
1
3
5

skipif mysql # not compatible
query I rowsort label-6275
SELECT DISTINCT 51 / + ( + col1 ) FROM tab1
----
1
3
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6276
SELECT - col1 * + tab2.col0 - + col0 DIV - 87 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-6276
SELECT - col1 * + tab2.col0 - + col0 / - 87 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + 57 * col1 * - col0 AS col2 FROM tab0 AS cor0
----
-117648
-193515
-461643

query I rowsort
SELECT ALL - + cor0.col0 + col1 FROM tab0 AS cor0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 * 29 col2 FROM tab2 cor0
----
2308
2321
234

query I rowsort
SELECT + - col0 + col1 AS col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT + 28 + col2 * 19 FROM tab0 AS cor0
----
1586
47
655

query I rowsort
SELECT ALL - + ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab2 cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT + 25 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6285
SELECT CAST( NULL AS SIGNED ) - 82 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6285
SELECT CAST ( NULL AS INTEGER ) - 82 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * col0 + 31 FROM tab2 AS cor0
----
2059
220
3033

query I rowsort
SELECT ALL - - col0 + 96 FROM tab0 AS cor0
----
120
131
185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * ( col2 ) + col1 col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6289
SELECT col1 * tab1.col1 * CAST( col1 AS SIGNED ) FROM tab1
----
1000
17576
2197

skipif mysql # not compatible
query I rowsort label-6289
SELECT col1 * tab1.col1 * CAST ( col1 AS INTEGER ) FROM tab1
----
1000
17576
2197

query I rowsort
SELECT ALL - col2 * + 95 + + 53 FROM tab2 AS cor0
----
-2417
-2512
-3557

query I rowsort
SELECT + + col0 - - col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - + cor0.col0 + - col1 AS col2 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT + col2 + + 32 AS col2 FROM tab2 AS cor0
----
58
59
70

query I rowsort
SELECT DISTINCT + + col1 + col1 * + col2 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-6295
SELECT ALL + + col0 DIV 33 + - ( col1 * col1 + col0 ) AS col0 FROM tab2 AS cor0
----
-3557
-366
-968

skipif mysql # not compatible
query I rowsort label-6295
SELECT ALL + + col0 / 33 + - ( col1 * col1 + col0 ) AS col0 FROM tab2 AS cor0
----
-3557
-366
-968

query I rowsort
SELECT ALL ( + cor0.col2 ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6297
SELECT DISTINCT + 20 DIV cor0.col2 AS col2 FROM tab0, tab2, tab0 AS cor0
----
0
20

skipif mysql # not compatible
query I rowsort label-6297
SELECT DISTINCT + 20 / cor0.col2 AS col2 FROM tab0, tab2, tab0 AS cor0
----
0
20

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 95920403df268a272c4e933cd0bbe0be

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - tab2.col2 ) col0 FROM tab2, tab1 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + col0 + 96 FROM tab2
----
103
174
175

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

query I rowsort
SELECT + + col1 + 54 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT DISTINCT 12 FROM tab2, tab0 cor0
----
12

query I rowsort
SELECT + - col2 * col0 + cor0.col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT ( + col1 ) + cor0.col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - - col1 * - col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6307
SELECT + CAST( NULL AS SIGNED ) + ( + col2 ) 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-6307
SELECT + CAST ( NULL AS INTEGER ) + ( + col2 ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6308
SELECT DISTINCT - + CAST( - col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6308
SELECT DISTINCT - + CAST ( - col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + col0 + - 8 AS col1 FROM tab1 AS cor0
----
-5
56
72

query I rowsort
SELECT + cor0.col0 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + col1 * + col0 + col1 * col2 + + col2 FROM tab2 AS cor0
----
1081
2027
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-6312
SELECT ALL - 53 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6312
SELECT ALL - 53 / col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6313
SELECT DISTINCT - + ( - col2 ) DIV + col1 + + col2 AS col1 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-6313
SELECT DISTINCT - + ( - col2 ) / + col1 + + col2 AS col1 FROM tab2 AS cor0
----
26
27
40

query I rowsort
SELECT ALL 15 + col0 * + col2 AS col0 FROM tab1 AS cor0
----
177
3663
7695

query I rowsort
SELECT DISTINCT - - 10 AS col2 FROM tab2 cor0
----
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-6316
SELECT ALL col1 DIV col0 + - col1 * + col2 * cor0.col0 FROM tab1 cor0
----
-36480
-4204
-99840

skipif mysql # not compatible
query I rowsort label-6316
SELECT ALL col1 / col0 + - col1 * + col2 * cor0.col0 FROM tab1 cor0
----
-36480
-4204
-99840

query I rowsort
SELECT DISTINCT + - col0 * - col1 + + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - 12 FROM tab1 cor0
----
-12
-12
-12

query I rowsort
SELECT ALL + col2 * cor0.col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col2 * - cor0.col1 + + col2 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT + col2 + col1 * cor0.col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT col1 + tab0.col0 * - col2 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT - 92 + - 46 FROM tab0
----
-138
-138
-138

query I rowsort
SELECT + + col1 + col1 * 75 FROM tab0 AS cor0
----
6536
6916
7372

query I rowsort
SELECT DISTINCT + col0 * - 90 FROM tab2 AS cor0
----
-630
-7020
-7110

onlyif mysql # use DIV operator for integer division
query I rowsort label-6327
SELECT cor0.col1 DIV + 72 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6327
SELECT cor0.col1 / + 72 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + 95 + ( - col2 ) * - col1 col2 FROM tab0 AS cor0
----
11008
16107
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + + col2 + 51 + + col0 AS col0 FROM tab0 AS cor0
----
108
222
87

query I rowsort
SELECT DISTINCT col1 + + 93 * 24 FROM tab2 AS cor0
----
2249
2263
2291

query I rowsort
SELECT ALL - col2 * + 82 * - col0 AS col1 FROM tab2 AS cor0
----
15498
166296
246164

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + ( - col2 ) * col2 * col0 col2 FROM tab0 AS cor0
----
-26050
-598345
62

query I rowsort
SELECT - col2 + col1 * + 31 FROM tab0
----
2633
2739
3006

query I rowsort
SELECT ALL + col0 * + 91 FROM tab1 AS cor0
----
273
5824
7280

query I rowsort
SELECT col1 + - cor0.col0 AS col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - - col1 * - ( + col0 ) + col1 AS col0 FROM tab0 cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-6338
SELECT - col0 DIV + 9 - - 68 * + col1 FROM tab2 AS cor0
----
1148
2108
4004

skipif mysql # not compatible
query I rowsort label-6338
SELECT - col0 / + 9 - - 68 * + col1 FROM tab2 AS cor0
----
1148
2108
4004

query I rowsort
SELECT + cor0.col0 - + col2 AS col1 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6340
SELECT DISTINCT + col0 + + col1 DIV - col1 AS col2 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-6340
SELECT DISTINCT + col0 + + col1 / - col1 AS col2 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT - col2 * 15 + col1 * - col2 FROM tab0 AS cor0
----
-112
-3333
-8692

query I rowsort
SELECT - ( col0 + col2 ) * col1 FROM tab0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT + col0 + col1 * col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col1 - - cor0.col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + col0 * 69 + - col0 FROM tab1 AS cor0
----
204
4352
5440

query I rowsort
SELECT DISTINCT + col0 * + col0 + - col0 + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + col2 * 2 FROM tab1 cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col0 col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col0 + col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + - ( col0 ) FROM tab1
----
0

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col2 AS REAL ) * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6352
SELECT ALL + CAST( NULL AS SIGNED ) * ( col1 ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6352
SELECT ALL + CAST ( NULL AS INTEGER ) * ( col1 ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col1 * + 25 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT ALL + + cor0.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT col1 + ( col2 ) * col2 * col2 AS col1 FROM tab1 AS cor0
----
157490
185203
884749

query I rowsort
SELECT + 13 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT - col2 + col2 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - - col1 * + col0 - - col1 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
16198
4128
6790

onlyif mysql # use DIV operator for integer division
query I rowsort label-6359
SELECT + col2 DIV col1 + + col0 FROM tab2 cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-6359
SELECT + col2 / col1 + + col0 FROM tab2 cor0
----
7
78
81

query I rowsort
SELECT + col0 + - col2 * + cor0.col1 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT - cor0.col2 + - cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9b6b643191a390a3a60049db62acd1a4

query I rowsort
SELECT - tab1.col2 * col0 + col2 + col1 FROM tab1
----
-3581
-7571
-82

query I rowsort
SELECT ALL col0 * - col2 + col1 + - col0 FROM tab2
----
-165
-2047
-3064

query I rowsort
SELECT - + col0 * col1 + + col1 * col1 * - col2 FROM tab2 cor0
----
-12325
-26164
-95108

onlyif mysql # use DIV operator for integer division
query I rowsort label-6365
SELECT ALL + col2 + - col0 DIV - col1 FROM tab2
----
27
27
42

skipif mysql # not compatible
query I rowsort label-6365
SELECT ALL + col2 + - col0 / - col1 FROM tab2
----
27
27
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 + + col2 col1 FROM tab2
----
55
58
85

query I rowsort
SELECT + col1 * col2 * col1 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + tab0.col1 col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 - - col0 FROM tab2 AS cor0 WHERE ( NULL ) IN ( - col2 )
----

query I rowsort
SELECT ALL + col2 + + col1 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT col0 * cor0.col1 + - col2 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT ALL - + col2 * + col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 WHERE col2 IN ( + col0 )
----

query I rowsort
SELECT + col1 * - tab0.col0 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + 81 FROM tab1
----
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6377
SELECT DISTINCT + - col2 DIV cor0.col0 col0 FROM tab0 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6377
SELECT DISTINCT + - col2 / cor0.col0 col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT 71 + + tab1.col1 AS col0 FROM tab1
----
81
84
97

query I rowsort
SELECT + 14 FROM tab1
----
14
14
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-6380
SELECT DISTINCT + - col1 + + col2 DIV + col1 AS col2 FROM tab2 AS cor0
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-6380
SELECT DISTINCT + - col1 + + col2 / + col1 AS col2 FROM tab2 AS cor0
----
-15
-31
-59

query I rowsort
SELECT DISTINCT + col0 * + col2 + col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT - col0 + col0 + + col1 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6383
SELECT + col2 DIV tab0.col2 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6383
SELECT + col2 / tab0.col2 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL - + col1 + + col0 AS col0 FROM tab2 cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6385
SELECT ALL + col2 DIV col0 + cor0.col1 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-6385
SELECT ALL + col2 / col0 + cor0.col1 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT DISTINCT + ( - cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6387
SELECT DISTINCT - + col2 DIV 40 + col0 * col0 * - col0 col0 FROM tab1 cor0
----
-262145
-28
-512002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6387
SELECT DISTINCT - + col2 / 40 + col0 * col0 * - col0 col0 FROM tab1 cor0
----
-262145
-28
-512002

query I rowsort
SELECT DISTINCT - 77 * col2 FROM tab0
----
-2541
-6314
-77

query I rowsort
SELECT ALL + cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL - 4 * + col1 AS col0 FROM tab0
----
-344
-364
-388

query I rowsort
SELECT DISTINCT - ( + 40 ) FROM tab0, tab0 AS cor0
----
-40

query I rowsort
SELECT DISTINCT + 44 * - tab0.col0 AS col2 FROM tab0
----
-1056
-1540
-3916

query I rowsort
SELECT + ( + 17 ) + col1 FROM tab0 AS cor0
----
103
108
114

query I rowsort
SELECT - 69 * - 77 FROM tab0 AS cor0
----
5313
5313
5313

query I rowsort
SELECT col0 * col1 + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - 23 + 18 AS col2 FROM tab0 AS cor0
----
-5
-5
-5

query I rowsort
SELECT ALL + ( + ( col2 ) ) AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT + col2 + - 59 * + col1 FROM tab1 AS cor0
----
-1480
-533
-671

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6399
SELECT DISTINCT + CAST( + 1 AS SIGNED ) + col2 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6399
SELECT DISTINCT + CAST ( + 1 AS INTEGER ) + col2 FROM tab0 cor0
----
2
34
83

query I rowsort
SELECT ( col0 ) + - col0 * - col1 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT col1 + 1 AS col2 FROM tab0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col2 FROM tab1
----
52
52
52

query I rowsort
SELECT + - 26 + + col1 FROM tab1 cor0
----
-13
-16
0

query I rowsort
SELECT - 62 * col0 + - col2 + + col0 AS col2 FROM tab0 AS cor0
----
-1497
-2136
-5511

query I rowsort
SELECT - 55 + + col2 FROM tab0 AS cor0
----
-22
-54
27

query I rowsort
SELECT - col0 + + cor0.col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT + tab0.col1 * + col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + 94 + - col2 + col1 FROM tab2 cor0
----
127
73
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 + col1 col2 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6411
SELECT - col1 + - col1 DIV + 12 FROM tab2
----
-18
-33
-63

skipif mysql # not compatible
query I rowsort label-6411
SELECT - col1 + - col1 / + 12 FROM tab2
----
-18
-33
-63

query I rowsort
SELECT ALL + ( - col0 ) + col0 * col2 + + col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT 81 - col0 FROM tab0
----
-8
46
57

query I rowsort
SELECT DISTINCT 74 * - tab2.col2 + - 34 FROM tab2
----
-1958
-2032
-2846

query I rowsort
SELECT 59 * - col2 + ( + col2 + + tab2.col1 ) * - col2 AS col1 FROM tab2
----
-3159
-3744
-4332

query I rowsort
SELECT col1 * + tab1.col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + 77 FROM tab2 cor0
----
77
77
77

query I rowsort
SELECT DISTINCT 32 + - col2 AS col1 FROM tab2 AS cor0
----
-6
5
6

query I rowsort
SELECT + col0 * - col1 + + col1 * - col0 AS col0 FROM tab2 cor0
----
-2686
-434
-9204

query I rowsort
SELECT - col0 * - col1 - - ( + cor0.col1 ) FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + + cor0.col0 * + col1 * cor0.col1 AS col0 FROM tab0 cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - - col2 * + ( - col2 + - col2 ) AS col0 FROM tab0 AS cor0
----
-13448
-2
-2178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col2 col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + + col2 * col2 + col0 AS col2 FROM tab1 AS cor0
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * ( cor0.col1 ) col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col2 + + col2 * + col0 + + col2 FROM tab0
----
37
7462
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6427
SELECT ALL + col2 * - col2 * CAST( + col1 AS SIGNED ) + col2 FROM tab0
----
-611802
-93621
-96

skipif mysql # not compatible
query I rowsort label-6427
SELECT ALL + col2 * - col2 * CAST ( + col1 AS INTEGER ) + col2 FROM tab0
----
-611802
-93621
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6428
SELECT DISTINCT 62 DIV col2 + col0 * - col1 col1 FROM tab1
----
-1040
-639
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6428
SELECT DISTINCT 62 / col2 + col0 * - col1 col1 FROM tab1
----
-1040
-639
-77

query I rowsort
SELECT DISTINCT 6 * col0 FROM tab1
----
18
384
480

onlyif mysql # use DIV operator for integer division
query I rowsort label-6430
SELECT DISTINCT - col1 + col0 DIV - cor0.col0 AS col0 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-6430
SELECT DISTINCT - col1 + col0 / - cor0.col0 AS col0 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT ALL + + col1 + + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT col1 + + cor0.col2 * col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT col0 * - col1 - + col2 * + col1 * - 31 AS col0 FROM tab2 AS cor0
----
18683
25730
42952

query I rowsort
SELECT + col1 + 78 * + col1 FROM tab2 AS cor0
----
1343
2449
4661

query I rowsort
SELECT DISTINCT 26 FROM tab2, tab2 AS cor0
----
26

query I rowsort
SELECT ALL - + tab1.col2 * + 45 AS col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 72c98f70263cd4aee94820671db31536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 38 col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT DISTINCT col1 + col2 * - col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - col0 * 39 - - col0 FROM tab2 AS cor0
----
-266
-2964
-3002

query I rowsort
SELECT ALL - - col1 + col2 * - col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * tab2.col1 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab0
----
50

query I rowsort
SELECT ALL - - cor0.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + + 52 * + cor0.col2 - col1 FROM tab1 AS cor0
----
2782
2954
4979

query I rowsort
SELECT ALL - ( - col0 + - col1 ) FROM tab0
----
110
132
180

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
3645 values hashing to a6775d4c5b4880512ff9492a52ee0905

query I rowsort
SELECT - col1 - col2 * - col1 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6448
SELECT + - 80 * + 41 - + col1 DIV ( + col1 * + col0 ) FROM tab1 AS cor0
----
-3280
-3280
-3280

skipif mysql # not compatible
query I rowsort label-6448
SELECT + - 80 * + 41 - + col1 / ( + col1 * + col0 ) FROM tab1 AS cor0
----
-3280
-3280
-3280

query I rowsort
SELECT col2 + + col1 + + col1 AS col1 FROM tab0
----
195
205
264

query I rowsort
SELECT - col1 + + 85 AS col0 FROM tab2
----
26
54
68

query I rowsort
SELECT DISTINCT col2 * - col0 + - tab1.col2 AS col0 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT + col1 + 5 AS col0 FROM tab2
----
22
36
64

query I rowsort
SELECT ALL + col1 + 96 + + ( col0 * col2 ) FROM tab0
----
228
7485
974

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6454
SELECT DISTINCT col2 * + CAST( NULL AS DECIMAL ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6454
SELECT DISTINCT col2 * + CAST ( NULL AS REAL ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col0 + ( - col0 ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6456
SELECT - col0 DIV + tab1.col2 AS col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6456
SELECT - col0 / + tab1.col2 AS col0 FROM tab1
----
-1
0
0

query I rowsort
SELECT + col0 * 0 + + col0 * 70 AS col2 FROM tab2 AS cor0
----
490
5460
5530

query I rowsort
SELECT ALL - - col0 + + 76 FROM tab1 cor0
----
140
156
79

query I rowsort
SELECT DISTINCT - + 30 * - col2 - col2 FROM tab2 AS cor0
----
1102
754
783

query I rowsort
SELECT ALL + cor0.col1 * 11 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT + + 36 + + col2 FROM tab1 cor0
----
132
90
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6462
SELECT + 73 * - 9 + col2 DIV - CAST( + col1 * col2 + + ( col0 ) AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-657
-657
-657

skipif mysql # not compatible
query I rowsort label-6462
SELECT + 73 * - 9 + col2 / - CAST ( + col1 * col2 + + ( col0 ) AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-657
-657
-657

query I rowsort
SELECT DISTINCT - col0 * 76 + col0 AS col2 FROM tab1 cor0
----
-225
-4800
-6000

query I rowsort
SELECT DISTINCT + - ( + col1 ) * col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT col1 * - 20 FROM tab1 cor0
----
-200
-260
-520

query I rowsort
SELECT - col1 * col1 + col2 AS col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + - col0 + col2 * + col0 * col2 FROM tab1 AS cor0
----
207872
737200
8745

query I rowsort
SELECT DISTINCT - - col2 + ( + col0 * col1 ) AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col0 + cor0.col0 * + 59 AS col0 FROM tab1 AS cor0
----
-2960
128
15

query I rowsort
SELECT - 3 + + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-36
-4
-85

query I rowsort
SELECT DISTINCT 61 * + col1 AS col2 FROM tab1 AS cor0
----
1586
610
793

onlyif mysql # use DIV operator for integer division
query I rowsort label-6472
SELECT col2 DIV + 56 + cor0.col2 FROM tab1 cor0
----
54
58
97

skipif mysql # not compatible
query I rowsort label-6472
SELECT col2 / + 56 + cor0.col2 FROM tab1 cor0
----
54
58
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6473
SELECT DISTINCT + CAST( ( - col2 ) AS SIGNED ) * - col2 - + col0 FROM tab2 cor0
----
1365
598
722

skipif mysql # not compatible
query I rowsort label-6473
SELECT DISTINCT + CAST ( ( - col2 ) AS INTEGER ) * - col2 - + col0 FROM tab2 cor0
----
1365
598
722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 21 col0 FROM tab1 AS cor0
----
-21

query I rowsort
SELECT ALL 92 * - col2 FROM tab1 AS cor0
----
-4968
-5244
-8832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6476
SELECT + 66 * col2 + + cor0.col0 * CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1291
13333
2754

skipif mysql # not compatible
query I rowsort label-6476
SELECT + 66 * col2 + + cor0.col0 * CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1291
13333
2754

onlyif mysql # use DIV operator for integer division
query I rowsort label-6477
SELECT ( col0 ) DIV 33 AS col0 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6477
SELECT ( col0 ) / 33 AS col0 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT cor1.col0 * - 81 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-567
-6318
-6399

query I rowsort
SELECT DISTINCT + cor0.col1 * tab1.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 819d50aeaf27d8e4e8dec203fb8f53ce

query I rowsort
SELECT ALL 64 * - col1 + 51 * - col1 AS col1 FROM tab0 AS cor0
----
-10465
-11155
-9890

query I rowsort
SELECT ALL + + 28 AS col1 FROM tab0 AS cor0
----
28
28
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6482
SELECT DISTINCT + col2 + cor0.col0 DIV 41 FROM tab0 AS cor0
----
1
33
84

skipif mysql # not compatible
query I rowsort label-6482
SELECT DISTINCT + col2 + cor0.col0 / 41 FROM tab0 AS cor0
----
1
33
84

query I rowsort
SELECT ( col2 ) * ( + col2 ) AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab1 cor0
----
36

query I rowsort
SELECT ALL 87 * col1 FROM tab1 AS cor0
----
1131
2262
870

query I rowsort
SELECT DISTINCT - col2 * col0 AS col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col0 + - col2 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6488
SELECT + + col2 DIV col1 col1 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6488
SELECT + + col2 / col1 col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL - 84 FROM tab1 AS cor0
----
-84
-84
-84

query I rowsort
SELECT ALL + cor0.col2 + col0 * - 99 * - col2 AS col0 FROM tab1 AS cor0
----
16092
361209
760416

query I rowsort
SELECT DISTINCT + 54 FROM tab2, tab0 cor0
----
54

query I rowsort
SELECT + col0 + cor0.col2 - + col1 * cor0.col1 FROM tab0 AS cor0
----
-7339
-8110
-9373

query I rowsort
SELECT - col1 + + ( col2 ) * col2 * + 19 AS col2 FROM tab2 AS cor0
----
12785
13820
27419

query I rowsort
SELECT + 12 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col0 + + col0 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-6496
SELECT ALL col2 + col2 DIV + 13 AS col2 FROM tab0 cor0
----
1
35
88

skipif mysql # not compatible
query I rowsort label-6496
SELECT ALL col2 + col2 / + 13 AS col2 FROM tab0 cor0
----
1
35
88

query I rowsort
SELECT + cor0.col0 + - ( col2 + + col0 ) * + 98 AS col0 FROM tab1 AS cor0
----
-11794
-17168
-5583

query I rowsort
SELECT DISTINCT - - col2 * + ( col2 * + cor0.col2 ) FROM tab1 AS cor0
----
157464
185193
884736

query I rowsort
SELECT DISTINCT - col2 * col2 * - col2 AS col2 FROM tab0 AS cor0
----
1
35937
551368

query I rowsort
SELECT + col0 + - col2 - - col0 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT tab2.col0 + + ( - cor0.col1 ) AS col2 FROM tab2, tab1 cor0
----
9 values hashing to a0891d923255f338145ac78ca8c0ccef

query I rowsort
SELECT ALL + col0 + col2 + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2121
3431
8270

onlyif mysql # use DIV operator for integer division
query I rowsort label-6503
SELECT + + col1 DIV ( col1 ) FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6503
SELECT + + col1 / ( col1 ) FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col0 * ( col2 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 + col2 col1 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT - col1 + + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 87 col1 FROM tab2 AS cor0
----
1479
2697
5133

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6508
SELECT + cor0.col2 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6508
SELECT + cor0.col2 * - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col1 + - 65 AS col0 FROM tab1 AS cor0
----
-39
-52
-55

query I rowsort
SELECT + col1 * 75 AS col0 FROM tab2 AS cor0
----
1275
2325
4425

query I rowsort
SELECT + cor0.col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6512
SELECT cor0.col0 * ( + cor0.col0 ) DIV + col0 col0 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6512
SELECT cor0.col0 * ( + cor0.col0 ) / + col0 col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + cor0.col1 + + 46 * 85 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 3e8467b977cc98e9d5973a54639108bb

query I rowsort
SELECT cor0.col2 * + 84 - + col0 FROM tab0 AS cor0
----
2748
49
6799

query I rowsort
SELECT - + 71 AS col2 FROM tab1 AS cor0
----
-71
-71
-71

query I rowsort
SELECT + + tab0.col0 AS col2 FROM tab1, tab2, tab0 cor0, tab0
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL 0 * + col0 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab1 AS cor0
----
68

query I rowsort
SELECT ALL + + cor0.col2 * + col0 * col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - col0 + col2 * + col1 + ( + col2 ) * + cor0.col2 FROM tab1 AS cor0
----
10384
3755
4317

query I rowsort
SELECT - - 58 * 24 * + col1 AS col0 FROM tab0 AS cor0
----
119712
126672
135024

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6523
SELECT CAST( NULL AS SIGNED ) + + col2 * col1 + 21 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6523
SELECT CAST ( NULL AS INTEGER ) + + col2 * col1 + 21 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( 30 ) + + col1 FROM tab1 AS cor0
----
40
43
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-6525
SELECT - col2 + - col1 * col0 DIV ( + col0 ) + col2 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6525
SELECT - col2 + - col1 * col0 / ( + col0 ) + col2 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + 40 AS col0 FROM tab0 cor0
----
40
40
40

query I rowsort
SELECT DISTINCT + col1 * col1 + col0 AS col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT - ( 23 ) + cor0.col1 * col1 FROM tab1 AS cor0
----
146
653
77

query I rowsort
SELECT ALL - 40 FROM tab1 AS cor0
----
-40
-40
-40

query I rowsort
SELECT - col0 * ( + col2 * + col1 ) FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col2 * + col2 AS col0 FROM tab2
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6532
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6532
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - 35 * col2 + - col1 AS col2 FROM tab0 cor0
----
-1241
-132
-2961

query I rowsort
SELECT ALL - col1 + 17 + + col2 FROM tab2 AS cor0
----
-16
13
38

query I rowsort
SELECT - cor0.col1 + - col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT ALL + - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + 66 * col2 AS col0 FROM tab2
----
1716
1782
2508

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 55 + - col2 col0 FROM tab1 AS cor0
----
-2
-41
1

query I rowsort
SELECT DISTINCT 95 * + 57 FROM tab0
----
5415

query I rowsort
SELECT col0 * col0 * + col0 AS col2 FROM tab0
----
13824
42875
704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-6541
SELECT - + col1 - 11 DIV - 37 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6541
SELECT - + col1 - 11 / - 37 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - cor0.col0 * - ( col1 ) + - col0 AS col1 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-6543
SELECT + col1 * + col1 - - col0 DIV - col0 AS col1 FROM tab0 AS cor0
----
7395
8280
9408

skipif mysql # not compatible
query I rowsort label-6543
SELECT + col1 * + col1 - - col0 / - col0 AS col1 FROM tab0 AS cor0
----
7395
8280
9408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6544
SELECT col2 + col2 * - CAST( - col0 AS SIGNED ) + col1 AS col0 FROM tab1
----
242
3715
7789

skipif mysql # not compatible
query I rowsort label-6544
SELECT col2 + col2 * - CAST ( - col0 AS INTEGER ) + col1 AS col0 FROM tab1
----
242
3715
7789

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6545
SELECT - col2 - - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6545
SELECT - col2 - - CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab1, tab1 AS cor0
----
43

query I rowsort
SELECT - 61 FROM tab1, tab0 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT ALL - col1 * + 95 * col0 AS col2 FROM tab2
----
-127585
-20615
-437190

query I rowsort
SELECT + tab1.col0 * + 1 FROM tab1, tab0 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT - cor0.col0 * col1 + - col1 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL + tab0.col0 - + col0 * col2 AS col1 FROM tab0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT col0 DIV col0 + col2 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6552
SELECT col0 / col0 + col2 FROM tab0 cor0
----
2
34
83

query I rowsort
SELECT DISTINCT col1 * - col1 - 93 AS col1 FROM tab0
----
-7489
-8374
-9502

query I rowsort
SELECT ALL + 51 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT col2 + 99 * + col2 FROM tab2 AS cor0
----
2600
2700
3800

query I rowsort
SELECT 4 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 85ee76cb25486c31b8f0abeb3f8683dc

query I rowsort
SELECT DISTINCT col2 * + col1 - col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT DISTINCT 91 + col2 * col1 AS col0 FROM tab2
----
1625
737
928

query I rowsort
SELECT 87 * + col2 FROM tab0
----
2871
7134
87

query I rowsort
SELECT - ( - 12 ) + col2 AS col0 FROM tab1 cor0
----
108
66
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + + col0 + - col1 col0 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT DISTINCT ( + 75 ) + + col0 FROM tab0 AS cor0
----
110
164
99

query I rowsort
SELECT + col2 * col2 + + col2 * col2 AS col1 FROM tab2 AS cor0
----
1352
1458
2888

onlyif mysql # use DIV operator for integer division
query I rowsort label-6565
SELECT DISTINCT ( + col2 ) DIV + col2 + + 47 * col2 * + col0 + tab1.col0 AS col0 FROM tab1
----
171521
361041
7618

skipif mysql # not compatible
query I rowsort label-6565
SELECT DISTINCT ( + col2 ) / + col2 + + 47 * col2 * + col0 + tab1.col0 AS col0 FROM tab1
----
171521
361041
7618

query I rowsort
SELECT col2 + col1 + + col2 FROM tab0
----
152
255
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 43 + + col1 * col2 col1 FROM tab0
----
2795
54
7419

onlyif mysql # use DIV operator for integer division
query I rowsort label-6568
SELECT + ( - col2 ) DIV + col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6568
SELECT + ( - col2 ) / + col1 FROM tab1
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 89 - - col2 col1 FROM tab1 AS cor0
----
-32
-35
7

query I rowsort
SELECT + 89 - col2 FROM tab2 AS cor0
----
51
62
63

query I rowsort
SELECT + 9 FROM tab0 cor0
----
9
9
9

query I rowsort
SELECT DISTINCT + + 64 AS col2 FROM tab2 AS cor0
----
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-6573
SELECT ( + 5 ) * + col0 DIV - col0 + 41 * col2 - col1 * col0 * - col1 FROM tab2 AS cor0
----
24384
272579
7829

skipif mysql # not compatible
query I rowsort label-6573
SELECT ( + 5 ) * + col0 / - col0 + 41 * col2 - col1 * col0 * - col1 FROM tab2 AS cor0
----
24384
272579
7829

query I rowsort
SELECT DISTINCT - + 49 FROM tab2 AS cor0
----
-49

query I rowsort
SELECT ALL + + ( col0 ) - col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6576
SELECT col0 * col2 * cor0.col1 + CAST( NULL AS SIGNED ) * - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6576
SELECT col0 * col2 * cor0.col1 + CAST ( NULL AS INTEGER ) * - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + ( col1 * col2 ) FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT ALL - col0 * col2 + + col1 + 20 * col1 FROM tab0 AS cor0
----
-5387
1014
2002

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 85e6cb74738e0d8388af8fb625b2bd38

query I rowsort
SELECT ALL col2 * - 38 - col0 AS col0 FROM tab2 AS cor0
----
-1033
-1066
-1523

query I rowsort
SELECT + ( col1 + 80 ) FROM tab2
----
111
139
97

query I rowsort
SELECT col2 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 79 + 14 * + cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to fa914834fb29469cfd4dd08de36fd327

onlyif mysql # use DIV operator for integer division
query I rowsort label-6584
SELECT - cor0.col2 DIV col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-6584
SELECT - cor0.col2 / col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6585
SELECT ALL + col0 DIV col0 AS col2 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6585
SELECT ALL + col0 / col0 AS col2 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col2 * col0 - - col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT col0 * 51 - col1 AS col0 FROM tab0 AS cor0
----
1138
1688
4448

onlyif mysql # use DIV operator for integer division
query I rowsort label-6588
SELECT DISTINCT col1 * - cor0.col0 * col2 + + col2 DIV - 22 col1 FROM tab0 AS cor0
----
-3395
-664121
-68113

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6588
SELECT DISTINCT col1 * - cor0.col0 * col2 + + col2 / - 22 col1 FROM tab0 AS cor0
----
-3395
-664121
-68113

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 - + 19 FROM tab0 AS cor0
----
-116
-2857
-7481

query I rowsort
SELECT ALL - col0 + - ( + col0 ) FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - col0 * ( 58 ) AS col2 FROM tab1 AS cor0
----
-174
-3712
-4640

onlyif mysql # use DIV operator for integer division
query I rowsort label-6592
SELECT DISTINCT + col1 DIV ( col2 ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6592
SELECT DISTINCT + col1 / ( col2 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT 4 AS col0 FROM tab1
----
4
4
4

query I rowsort
SELECT ( - col0 ) * - col0 + 33 AS col0 FROM tab1 cor0
----
4129
42
6433

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 col2 FROM tab0 cor0
----
56

query I rowsort
SELECT 97 AS col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT - col0 * col2 + cor0.col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL - 11 * cor0.col2 + + col1 AS col0 FROM tab0 AS cor0
----
-277
-811
86

query I rowsort
SELECT + - col1 * + col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT - 31 AS col0 FROM tab2
----
-31

query I rowsort
SELECT DISTINCT col0 * + col0 + - ( col1 ) + col2 FROM tab0
----
1129
523
7912

query I rowsort
SELECT col2 * 61 - col1 FROM tab0 AS cor0
----
-36
1927
4911

onlyif mysql # use DIV operator for integer division
query I rowsort label-6603
SELECT - col2 + col0 * 64 DIV - 84 + - col1 FROM tab0
----
-124
-137
-240

skipif mysql # not compatible
query I rowsort label-6603
SELECT - col2 + col0 * 64 / - 84 + - col1 FROM tab0
----
-124
-137
-240

onlyif mysql # use DIV operator for integer division
query I rowsort label-6604
SELECT ALL 84 * - col0 DIV - ( tab0.col0 ) + col1 + - col2 * - col2 FROM tab0
----
1259
182
6899

skipif mysql # not compatible
query I rowsort label-6604
SELECT ALL 84 * - col0 / - ( tab0.col0 ) + col1 + - col2 * - col2 FROM tab0
----
1259
182
6899

query I rowsort
SELECT 55 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT + - cor0.col0 + + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + 12 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT DISTINCT - 23 + col2 + - ( ( col0 ) ) AS col0 FROM tab1
----
-30
-7
28

query I rowsort
SELECT DISTINCT + ( col1 ) + + col1 AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT col0 * + col0 + + col1 FROM tab2
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6611
SELECT tab0.col2 * ( - tab0.col1 * col1 ) + - col0 * - tab0.col1 DIV col1 FROM tab0
----
-244044
-678953
-9374

skipif mysql # not compatible
query I rowsort label-6611
SELECT tab0.col2 * ( - tab0.col1 * col1 ) + - col0 * - tab0.col1 / col1 FROM tab0
----
-244044
-678953
-9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-6612
SELECT DISTINCT + 49 DIV col2 AS col2 FROM tab0 cor0
----
0
1
49

skipif mysql # not compatible
query I rowsort label-6612
SELECT DISTINCT + 49 / col2 AS col2 FROM tab0 cor0
----
0
1
49

query I rowsort
SELECT ALL - 49 + col0 FROM tab0 AS cor0
----
-14
-25
40

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT + - cor0.col1 + - col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + + ( 96 ) - cor0.col0 FROM tab0 AS cor0
----
61
7
72

query I rowsort
SELECT 13 AS col1 FROM tab0 AS cor0
----
13
13
13

query I rowsort
SELECT ALL - - 35 AS col2 FROM tab1 AS cor0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 93 + + col2 col2 FROM tab2 AS cor0
----
-55
-66
-67

query I rowsort
SELECT ALL - + 10 + - ( + col2 ) - col0 FROM tab2 AS cor0
----
-114
-127
-44

query I rowsort
SELECT + - 45 + col2 * col1 FROM tab1 AS cor0
----
1203
1359
525

onlyif mysql # use DIV operator for integer division
query I rowsort label-6622
SELECT ALL - ( + cor0.col0 ) * col0 + 12 DIV 21 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-6622
SELECT ALL - ( + cor0.col0 ) * col0 + 12 / 21 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * 95 + cor0.col1 col1 FROM tab1 cor0
----
5156
5425
9133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + 36 * cor0.col1 + - col2 FROM tab1 AS cor0
----
303
372
882

query I rowsort
SELECT ALL - - ( - col1 ) * - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + cor0.col2 * col1 AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - 95 + tab2.col2 FROM tab2
----
-57
-68
-69

skipif mysql # not compatible
query I rowsort
SELECT - + col0 + - ( col1 ) + CAST ( 94 AS REAL ) AS col1 FROM tab0 cor0
----
-16
-38
-86

query I rowsort
SELECT DISTINCT + 61 * col2 FROM tab2 cor0
----
1586
1647
2318

query I rowsort
SELECT DISTINCT 38 - cor0.col2 FROM tab1, tab2 cor0
----
0
11
12

query I rowsort
SELECT ALL 26 AS col2 FROM tab1 cor0
----
26
26
26

query I rowsort
SELECT DISTINCT 6 AS col0 FROM tab2, tab2 AS cor0
----
6

query I rowsort
SELECT - 82 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

query I rowsort
SELECT 31 AS col0 FROM tab2 AS cor0
----
31
31
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6636
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6636
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6637
SELECT - + col2 + - col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6637
SELECT - + col2 + - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 37 * cor0.col2 FROM tab0 AS cor0
----
-1221
-3034
-37

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6640
SELECT - col0 * - CAST( 70 AS SIGNED ) FROM tab1
----
210
4480
5600

skipif mysql # not compatible
query I rowsort label-6640
SELECT - col0 * - CAST ( 70 AS INTEGER ) FROM tab1
----
210
4480
5600

query I rowsort
SELECT - col2 * 17 FROM tab1 AS cor0
----
-1632
-918
-969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 23 * col2 col1 FROM tab2 AS cor0
----
652
657
891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6643
SELECT ALL + col2 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6643
SELECT ALL + col2 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6644
SELECT DISTINCT + col2 * - CAST( NULL AS SIGNED ) * + col1 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6644
SELECT DISTINCT + col2 * - CAST ( NULL AS INTEGER ) * + col1 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col2 * - tab0.col0 AS col2 FROM tab0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort
SELECT col0 * CAST ( + col1 AS REAL ) + - col1 FROM tab0 cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-6647
SELECT - - col1 * 50 DIV - col0 FROM tab1 AS cor0
----
-433
-7
-8

skipif mysql # not compatible
query I rowsort label-6647
SELECT - - col1 * 50 / - col0 FROM tab1 AS cor0
----
-433
-7
-8

query I rowsort
SELECT + col0 * + ( cor0.col2 ) + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + col1 * + 45 AS col0 FROM tab1 AS cor0
----
1170
450
585

query I rowsort
SELECT DISTINCT + - col2 * + 24 FROM tab0 AS cor0
----
-1968
-24
-792

query I rowsort
SELECT - cor0.col0 + ( + col2 ) AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - ( 98 ) FROM tab2 AS cor0
----
-98
-98
-98

query I rowsort
SELECT DISTINCT + col0 * + tab2.col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT cor0.col1 * + col2 - ( + col0 ) FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL 35 + 75 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to ebfbd032a0a7b9ce9f54a2516c43134d

query I rowsort
SELECT - 17 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

query I rowsort
SELECT - col1 * col0 + col1 AS col1 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT 97 * col2 + - ( col2 ) * - cor0.col1 AS col2 FROM tab0 cor0
----
15416
194
6039

query I rowsort
SELECT - col1 - + cor0.col0 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 - + col0 col0 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT - + col2 + col0 * ( 52 ) - - col2 * col1 FROM tab0 AS cor0
----
12008
1916
4053

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 * col2 col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - cor0.col0 * ( col1 ) AS col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col2 * - col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT - + col2 + - col2 * + col2 AS col0 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT - 96 AS col0 FROM tab0
----
-96
-96
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6667
SELECT ALL - col1 * CAST( col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-6667
SELECT ALL - col1 * CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 79 * 89 col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8ce54c386a03433944115a7be165dfe8

query I rowsort
SELECT 1 * 84 AS col2 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT - + ( + col0 ) * - col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ( 45 ) AS col2 FROM tab1 AS cor0
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6673
SELECT ALL CAST( 20 AS SIGNED ) FROM tab0
----
20
20
20

skipif mysql # not compatible
query I rowsort label-6673
SELECT ALL CAST ( 20 AS INTEGER ) FROM tab0
----
20
20
20

query I rowsort
SELECT DISTINCT col2 * col0 * tab1.col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT ALL - - col2 + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ( col1 * col1 ) AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL col1 * - 88 FROM tab0
----
-7568
-8008
-8536

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT ( + 18 ) FROM tab0
----
18

query I rowsort
SELECT + 21 * + tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 2354fbaf46e1fc99dfe1a3f3636dca29

query I rowsort
SELECT DISTINCT 8 * col1 AS col2 FROM tab1
----
104
208
80

query I rowsort
SELECT DISTINCT ( 0 ) FROM tab2
----
0

query I rowsort
SELECT DISTINCT + col1 * + col2 * col1 AS col1 FROM tab2
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col2 col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + ( + col0 ) + col1 * 72 FROM tab2 AS cor0
----
1303
2239
4326

query I rowsort
SELECT DISTINCT - 84 + col2 AS col2 FROM tab1 AS cor0
----
-27
-30
12

query I rowsort
SELECT ALL + + 2 + col0 FROM tab2 AS cor0
----
80
81
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6688
SELECT col0 * cor0.col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6688
SELECT col0 * cor0.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 98 * cor0.col0 + - 78 AS col0 FROM tab1 AS cor0
----
-372
-6350
-7918

query I rowsort
SELECT DISTINCT + - ( - col1 ) FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col0 FROM tab0 AS cor0
----
74
74
74

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab2, tab0 cor1
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 47 col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
81 values hashing to 905cbd63e2561d7f32ce36091d5b526a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - col2 * ( tab2.col1 ) col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + 41 - col2 FROM tab2
----
14
15
3

query I rowsort
SELECT ALL cor0.col2 * 47 FROM tab2, tab1 AS cor0
----
9 values hashing to f0515330288550c0798d66ea9d72a5c7

query I rowsort
SELECT ALL col0 + col0 * 50 - + col1 FROM tab0
----
1138
1688
4448

onlyif mysql # use DIV operator for integer division
query I rowsort label-6698
SELECT + col0 + - tab0.col0 * 20 * col2 + + col0 DIV - col1 AS col0 FROM tab0
----
-145871
-15816
-665

skipif mysql # not compatible
query I rowsort label-6698
SELECT + col0 + - tab0.col0 * 20 * col2 + + col0 / - col1 AS col0 FROM tab0
----
-145871
-15816
-665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + + cor0.col0 col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + cor0.col1 + + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - - 33 + + cor0.col2 FROM tab0 cor0
----
115
34
66

query I rowsort
SELECT ALL - col2 * 25 FROM tab2
----
-650
-675
-950

query I rowsort
SELECT DISTINCT col2 * + col1 + col1 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT + col1 + - col0 * 13 * - col2 FROM tab0
----
10382
552
94965

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6705
SELECT + col2 * + CAST( col0 AS SIGNED ) col0 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6705
SELECT + col2 * + CAST ( col0 AS INTEGER ) col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - + 17 FROM tab1, tab1 AS cor0
----
-17

query I rowsort
SELECT ALL + col1 * - tab1.col0 + - col2 AS col2 FROM tab1
----
-1136
-132
-697

query I rowsort
SELECT 21 FROM tab2 AS cor0
----
21
21
21

query I rowsort
SELECT ( 80 ) + tab2.col0 FROM tab2
----
158
159
87

query I rowsort
SELECT 37 + + col0 * - col1 FROM tab2 AS cor0
----
-1306
-180
-4565

query I rowsort
SELECT ALL ( 53 ) AS col1 FROM tab1 AS cor0
----
53
53
53

query I rowsort
SELECT - 38 * 59 FROM tab0 cor0
----
-2242
-2242
-2242

query I rowsort
SELECT + 63 * - col1 FROM tab0 AS cor0
----
-5418
-5733
-6111

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 ) col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - 40 * col0 AS col2 FROM tab1 AS cor0
----
120
2560
3200

onlyif mysql # use DIV operator for integer division
query I rowsort label-6716
SELECT DISTINCT 1 * + col1 + col0 DIV CAST( - col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-6716
SELECT DISTINCT 1 * + col1 + col0 / CAST ( - col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT - - ( + col0 ) * - col1 * - cor0.col0 + cor0.col1 FROM tab0 AS cor0
----
118922
49622
720902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 + + cor0.col0 col2 FROM tab1 AS cor0
----
-4
57
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 55 col0 FROM tab0 AS cor0
----
-55

query I rowsort
SELECT - 57 * ( - col0 + ( - col0 ) ) AS col2 FROM tab2 AS cor0
----
798
8892
9006

query I rowsort
SELECT ALL col2 * col2 + - col0 FROM tab1 AS cor0
----
2913
3185
9136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6722
SELECT DISTINCT + CAST( col1 AS SIGNED ) + col0 - - 14 AS col2 FROM tab1 AS cor0
----
107
43
88

skipif mysql # not compatible
query I rowsort label-6722
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + col0 - - 14 AS col2 FROM tab1 AS cor0
----
107
43
88

query I rowsort
SELECT ALL ( + 9 ) FROM tab2 AS cor0
----
9
9
9

query I rowsort
SELECT - - col2 + cor0.col1 * - col1 FROM tab1 AS cor0
----
-43
-622
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6725
SELECT ALL + - col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6725
SELECT ALL + - col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6726
SELECT - col0 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6726
SELECT - col0 * - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT cor0.col2 * - ( 86 ) + col1 FROM tab0 AS cor0
----
-2752
-6961
11

query I rowsort
SELECT DISTINCT - + col2 * - ( 33 ) AS col1 FROM tab0 AS cor0
----
1089
2706
33

query I rowsort
SELECT - col2 * - 28 FROM tab2 AS cor0
----
1064
728
756

query I rowsort
SELECT ( 11 ) AS col2 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT ALL + 21 AS col0 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT DISTINCT + col1 * - col0 + col1 * - ( + col1 ) AS col0 FROM tab2 AS cor0
----
-1178
-1632
-8083

query I rowsort
SELECT + col2 * - col1 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - 22 + 27 AS col1 FROM tab0 AS cor0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col2 FROM tab1 AS cor0
----
27
27
27

query I rowsort
SELECT DISTINCT - tab0.col1 * + cor0.col0 FROM tab0, tab0 cor0
----
9 values hashing to 5e05f50cc51e966d7e055a113d30a5e0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6739
SELECT ALL tab0.col1 DIV col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6739
SELECT ALL tab0.col1 / col2 FROM tab0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6740
SELECT + + col0 + + col1 DIV + 26 + + col2 AS col1 FROM tab1 cor0
----
121
176
58

skipif mysql # not compatible
query I rowsort label-6740
SELECT + + col0 + + col1 / + 26 + + col2 AS col1 FROM tab1 cor0
----
121
176
58

query I rowsort
SELECT DISTINCT ( col2 ) + - col1 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT + cor0.col0 * col1 + ( + col2 ) FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-6743
SELECT DISTINCT + 42 * - col1 + 50 DIV col1 + - col0 AS col0 FROM tab0 AS cor0
----
-3636
-3911
-4109

skipif mysql # not compatible
query I rowsort label-6743
SELECT DISTINCT + 42 * - col1 + 50 / col1 + - col0 AS col0 FROM tab0 AS cor0
----
-3636
-3911
-4109

query I rowsort
SELECT DISTINCT - + 34 * - cor0.col0 FROM tab0 AS cor0
----
1190
3026
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6745
SELECT + + col2 DIV col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6745
SELECT + + col2 / col1 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT ALL - cor0.col0 + - col2 * + col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - col0 * col1 + + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - col1 * col0 + + 87 + + col1 * col0 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT ALL + - 97 * - col0 AS col0 FROM tab1 AS cor0
----
291
6208
7760

query I rowsort
SELECT DISTINCT + + col1 * col2 + 70 * col1 + - col2 * col2 AS col1 FROM tab2 AS cor0
----
2278
392
4988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col0 + col2 col2 FROM tab1
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-6752
SELECT col1 - - col0 DIV - tab0.col2 FROM tab0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-6752
SELECT col1 - - col0 / - tab0.col2 FROM tab0
----
62
86
90

query I rowsort
SELECT 25 * 66 + col0 + ( + ( col1 ) ) AS col1 FROM tab2
----
1688
1746
1787

query I rowsort
SELECT 74 - - col1 AS col1 FROM tab2
----
105
133
91

query I rowsort
SELECT + 33 + - col1 FROM tab2
----
-26
16
2

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL + col1 * col1 AS col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + + cor0.col1 * - col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * - cor0.col2 + 57 * - col0 col2 FROM tab0 AS cor0
----
-1994
-279
1651

query I rowsort
SELECT ALL + + col1 * cor0.col0 * - 22 AS col0 FROM tab0 AS cor0
----
-178178
-45408
-74690

query I rowsort
SELECT 14 * col0 AS col0 FROM tab2
----
1092
1106
98

query I rowsort
SELECT 37 * - col2 + + col0 AS col1 FROM tab2
----
-1327
-884
-992

query I rowsort
SELECT ( + tab2.col1 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT 23 * col2 FROM tab2
----
598
621
874

query I rowsort
SELECT ALL 32 * - col1 FROM tab2
----
-1888
-544
-992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + 51 col2 FROM tab0, tab0 cor0
----
9 values hashing to f59de0c48223c6113ece1a43af1b5231

query I rowsort
SELECT tab0.col1 * + 85 FROM tab0, tab1 AS cor0
----
9 values hashing to 43e5153ae802335e917d6ce3c47e0b21

query I rowsort
SELECT col1 * - tab0.col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - ( tab1.col0 * col0 ) AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT 41 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

onlyif mysql # use DIV operator for integer division
query I rowsort label-6772
SELECT ALL - col1 DIV col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6772
SELECT ALL - col1 / col2 AS col0 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT ALL + + col0 * col2 * - col2 AS col1 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL 65 + - 74 AS col0 FROM tab1
----
-9
-9
-9

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 * + col1 col2 FROM tab2 AS cor0
----
1020
1860
3540

query I rowsort
SELECT col0 * + 24 AS col1 FROM tab0 cor0
----
2136
576
840

query I rowsort
SELECT ALL - - 89 * col0 FROM tab1 AS cor0
----
267
5696
7120

query I rowsort
SELECT + - col0 + - cor0.col0 * col1 FROM tab2 AS cor0
----
-1422
-224
-4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6780
SELECT DISTINCT + col2 DIV + ( - col0 ) + - col1 AS col0 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-6780
SELECT DISTINCT + col2 / + ( - col0 ) + - col1 AS col0 FROM tab1 AS cor0
----
-10
-14
-44

onlyif mysql # use DIV operator for integer division
query I rowsort label-6781
SELECT ALL + col0 * col1 - + col0 DIV - col1 FROM tab1 AS cor0
----
1046
646
78

skipif mysql # not compatible
query I rowsort label-6781
SELECT ALL + col0 * col1 - + col0 / - col1 FROM tab1 AS cor0
----
1046
646
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6782
SELECT col1 - cor0.col1 DIV col1 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-6782
SELECT col1 - cor0.col1 / col1 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT DISTINCT - - ( - col2 ) * + col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 85 + col1 FROM tab2 AS cor0
----
-26
-54
-68

query I rowsort
SELECT ALL + col0 * + cor0.col2 + + col1 + + col2 AS col0 FROM tab1 AS cor0
----
242
3715
7789

query I rowsort
SELECT 65 + - col2 FROM tab1 AS cor0
----
-31
11
8

query I rowsort
SELECT - + col1 * col1 - - ( col1 ) * cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 57 AS col2 FROM tab2
----
57
57
57

query I rowsort
SELECT ALL col0 - - col0 * col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - ( 29 ) FROM tab2
----
-29
-29
-29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6791
SELECT - CAST( + col1 AS SIGNED ) FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6791
SELECT - CAST ( + col1 AS INTEGER ) FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + tab2.col1 * col1 ) col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT - + cor0.col2 AS col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - col1 + - col1 * + col2 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL - - 8 + col2 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT + col1 * 16 - col0 FROM tab1
----
128
413
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6797
SELECT - CAST( NULL AS DECIMAL ) * col0 + - col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6797
SELECT - CAST ( NULL AS REAL ) * col0 + - col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * col1 + + 93 AS col0 FROM tab0 AS cor0
----
-7303
-8188
-9316

query I rowsort
SELECT ALL - ( col0 ) * col2 + col2 AS col1 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-6800
SELECT DISTINCT 95 - col0 DIV col0 FROM tab2 AS cor0
----
94

skipif mysql # not compatible
query I rowsort label-6800
SELECT DISTINCT 95 - col0 / col0 FROM tab2 AS cor0
----
94

query I rowsort
SELECT DISTINCT col0 + - col1 AS col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL - + col2 + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + col0 * + col0 + col2 AS col2 FROM tab1 cor0
----
4153
63
6496

query I rowsort
SELECT ( col2 ) + - cor0.col0 * + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6805
SELECT col0 * CAST( - 24 AS SIGNED ) FROM tab0
----
-2136
-576
-840

skipif mysql # not compatible
query I rowsort label-6805
SELECT col0 * CAST ( - 24 AS INTEGER ) FROM tab0
----
-2136
-576
-840

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - cor0.col0 + + CAST ( 31 * + col0 AS REAL ) col2 FROM tab1 AS cor0
----
1920
2400
90

query I rowsort
SELECT - + col2 + ( - col2 ) AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

query I rowsort
SELECT ALL + col1 * 84 + col2 AS col1 FROM tab1 AS cor0
----
1188
2238
897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 + + col0 col0 FROM tab2 AS cor0
----
-35
36
37

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT + - cor0.col2 * - 99 AS col2 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT ALL + + col2 + 93 AS col2 FROM tab0 AS cor0
----
126
175
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col2 col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT 38 + - col0 * col0 * + col2 - col0 AS col1 FROM tab2 AS cor0
----
-1292
-158224
-237199

query I rowsort
SELECT ALL + 71 AS col1 FROM tab2 cor0
----
71
71
71

query I rowsort
SELECT - + 54 * + col1 AS col0 FROM tab1 AS cor0
----
-1404
-540
-702

query I rowsort
SELECT ALL 20 FROM tab2 cor0
----
20
20
20

query I rowsort
SELECT DISTINCT + 76 FROM tab1 AS cor0
----
76

query I rowsort
SELECT + 79 FROM tab2
----
79
79
79

query I rowsort
SELECT + + col1 * - col2 + col1 * - col0 + col2 FROM tab2 cor0
----
-1027
-1951
-6110

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6822
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + 84 * col2 AS col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6822
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + 84 * col2 AS col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL + ( cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - - ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6825
SELECT DISTINCT col0 DIV + col1 + col0 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6825
SELECT DISTINCT col0 / + col1 + col0 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col0 * ( - col2 ) * + ( - col1 ) FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + ( col0 ) + col0 * - 68 AS col2 FROM tab1 cor0
----
-201
-4288
-5360

query I rowsort
SELECT ALL - 10 * col1 AS col2 FROM tab2 cor0
----
-170
-310
-590

query I rowsort
SELECT 82 * 42 FROM tab1 AS cor0
----
3444
3444
3444

query I rowsort
SELECT ALL - 53 FROM tab1 cor0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - - cor0.col1 * + col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - 86 FROM tab1 AS cor0
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - 48 + col0 col1 FROM tab1 AS cor0
----
-42
112
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6834
SELECT ALL CAST( + 84 AS SIGNED ) + - cor0.col1 FROM tab2 AS cor0
----
25
53
67

skipif mysql # not compatible
query I rowsort label-6834
SELECT ALL CAST ( + 84 AS INTEGER ) + - cor0.col1 FROM tab2 AS cor0
----
25
53
67

query I rowsort
SELECT DISTINCT - col2 * - col0 + cor0.col2 * + 54 FROM tab1 AS cor0
----
12864
3078
6726

query I rowsort
SELECT ALL + col2 + - col1 * ( - 94 + col2 ) FROM tab0 AS cor0
----
1174
5279
9022

query I rowsort
SELECT DISTINCT + ( + col1 ) + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - + ( - col2 ) * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - 9 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-33
-44
-98

query I rowsort
SELECT ALL + 11 FROM tab1, tab2 AS cor0, tab0, tab2 cor1
----
81 values hashing to 288f8fb62e079d095c14d7cf3e2d3359

query I rowsort
SELECT - cor0.col1 * ( 15 * col0 ) + - cor0.col1 FROM tab1 AS cor0
----
-1196
-15613
-9610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6844
SELECT DISTINCT col1 DIV 73 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6844
SELECT DISTINCT col1 / 73 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * tab1.col0 col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL - 31 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT DISTINCT + + col2 * - 24 AS col0 FROM tab1 AS cor0
----
-1296
-1368
-2304

query I rowsort
SELECT + col2 * + ( 45 ) FROM tab1 AS cor0
----
2430
2565
4320

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 + CAST ( + col1 * + col1 AS REAL ) AS col2 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col1 + col1 * + 87 AS col1 FROM tab0
----
7568
8008
8536

query I rowsort
SELECT - col2 * ( + col0 + col2 ) AS col2 FROM tab0
----
-14022
-1881
-36

query I rowsort
SELECT DISTINCT col2 * + cor0.col1 * + col2 + - col2 * + col0 + col2 AS col2 FROM tab0 AS cor0
----
604668
63
92895

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6854
SELECT + CAST( NULL AS SIGNED ) + col0 + + col2 / + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6854
SELECT + CAST ( NULL AS INTEGER ) + col0 + + col2 / + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - 13 ) AS col0 FROM tab2 AS cor0
----
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 47 + - col1 col2 FROM tab2 AS cor0
----
298
3607
3696

query I rowsort
SELECT + cor0.col2 + ( + 51 ) FROM tab1 AS cor0
----
105
108
147

onlyif mysql # use DIV operator for integer division
query I rowsort label-6858
SELECT ALL - col1 * ( 53 ) + - col1 + col0 DIV tab2.col1 AS col0 FROM tab2
----
-1674
-3185
-914

skipif mysql # not compatible
query I rowsort label-6858
SELECT ALL - col1 * ( 53 ) + - col1 + col0 / tab2.col1 AS col0 FROM tab2
----
-1674
-3185
-914

query I rowsort
SELECT col1 * + 37 FROM tab1
----
370
481
962

query I rowsort
SELECT DISTINCT + col1 * + col1 + - col0 AS col2 FROM tab0
----
7372
8192
9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6861
SELECT ALL - tab1.col1 + CAST( ( col1 ) AS SIGNED ) * 86 + - col1 * col1 AS col0 FROM tab1
----
1534
750
936

skipif mysql # not compatible
query I rowsort label-6861
SELECT ALL - tab1.col1 + CAST ( ( col1 ) AS INTEGER ) * 86 + - col1 * col1 AS col0 FROM tab1
----
1534
750
936

query I rowsort
SELECT DISTINCT - 47 FROM tab0, tab1 cor0
----
-47

query I rowsort
SELECT tab2.col1 + + tab2.col1 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT - 75 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - 23 * + cor0.col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
-1797
-735
12

query I rowsort
SELECT ( - col1 ) * col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6868
SELECT DISTINCT + ( - cor0.col2 ) DIV col2 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6868
SELECT DISTINCT + ( - cor0.col2 ) / col2 AS col1 FROM tab1 AS cor0
----
-1

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 2c9bc625661696fa1cf187c4d0f703a1

query I rowsort
SELECT - col0 * cor0.col1 + col2 * + col1 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL 83 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 34 col0 FROM tab0 AS cor0
----
116
35
67

query I rowsort
SELECT tab0.col1 * 7 * + col2 AS col0 FROM tab0
----
19866
52234
679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col2 * - col2 col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - col1 + - col0 * col1 AS col0 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT ALL + col1 + tab0.col1 * - col1 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT + ( + tab2.col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT col0 + + 88 * + col1 FROM tab1
----
1224
2291
944

query I rowsort
SELECT cor0.col2 + + 50 AS col1 FROM tab1 AS cor0
----
104
107
146

query I rowsort
SELECT DISTINCT + 76 AS col1 FROM tab2 AS cor0
----
76

query I rowsort
SELECT ALL - + cor0.col2 + - cor0.col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - - col1 * - col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + - cor0.col0 * 24 AS col1 FROM tab2 AS cor0
----
-168
-1872
-1896

query I rowsort
SELECT - 55 + - col1 FROM tab1 AS cor0
----
-65
-68
-81

query I rowsort
SELECT ALL + + col2 + cor0.col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 58 + col2 * col0 * + 37 AS col2 FROM tab0 AS cor0
----
1237
269968
29246

query I rowsort
SELECT - + col2 * col2 + - cor0.col0 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT - - 64 FROM tab0 cor0
----
64
64
64

query I rowsort
SELECT - cor0.col0 - col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * cor0.col0 col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6893
SELECT + col0 + col2 * CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6893
SELECT + col0 + col2 * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 61 + + col1 AS col2 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 + ( 75 + - col1 ) * cor0.col0 FROM tab1 cor0
----
-15
-2720
512

query I rowsort
SELECT ALL col2 - + col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL ( + 94 ) * col2 + col2 AS col1 FROM tab0
----
3135
7790
95

query I rowsort
SELECT DISTINCT 43 + - tab1.col1 AS col2 FROM tab1
----
17
30
33

query I rowsort
SELECT + col2 * ( col1 + col2 ) AS col0 FROM tab0
----
14186
3927
98

query I rowsort
SELECT DISTINCT - col1 * ( - col1 ) + - ( + col2 ) * col2 AS col1 FROM tab0
----
1557
6307
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-6901
SELECT 45 DIV - col0 - col0 FROM tab1 AS cor0
----
-18
-64
-80

skipif mysql # not compatible
query I rowsort label-6901
SELECT 45 / - col0 - col0 FROM tab1 AS cor0
----
-18
-64
-80

query I rowsort
SELECT - col2 + col1 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT tab2.col1 * col0 + col0 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT 76 * - cor0.col2 AS col1 FROM tab2 cor0
----
-1976
-2052
-2888

query I rowsort
SELECT + - col2 * col0 * cor0.col2 + + col0 AS col2 FROM tab1 cor0
----
-207872
-737200
-8745

query I rowsort
SELECT - cor0.col0 * col1 - + cor0.col2 * + col2 * + col0 FROM tab2 cor0
----
-115419
-5320
-57330

query I rowsort
SELECT ALL col1 - + 38 * + col1 * col1 AS col0 FROM tab2 AS cor0
----
-10965
-132219
-36487

query I rowsort
SELECT ALL col1 * + ( + col2 ) * col0 - cor0.col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
2808
35910
98592

query I rowsort
SELECT DISTINCT - + col0 * col1 + - col0 + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + + col2 * ( col2 ) FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6911
SELECT DISTINCT - - col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6911
SELECT DISTINCT - - col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT 56 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab2, tab0, tab1 cor0
----
4

query I rowsort
SELECT + tab1.col2 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + + 35 FROM tab0 AS cor0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab1 AS cor0
----
70
70
70

query I rowsort
SELECT DISTINCT 63 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
63

query I rowsort
SELECT - ( 42 ) AS col2 FROM tab2 cor0
----
-42
-42
-42

query I rowsort
SELECT - - col0 + + 11 * col0 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT ( col1 ) * col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL 93 FROM tab2, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT - 26 + 74 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL 51 + 42 FROM tab0
----
93
93
93

query I rowsort
SELECT DISTINCT + 23 + cor0.col2 + - col1 * 41 FROM tab0 AS cor0
----
-3470
-3626
-3953

query I rowsort
SELECT col1 + 4 AS col2 FROM tab1 AS cor0
----
14
17
30

query I rowsort
SELECT DISTINCT - ( - 64 ) FROM tab1 cor0
----
64

query I rowsort
SELECT + col2 * col0 * col2 AS col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL - - col1 + + ( col2 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - col2 + col1 * + col1 FROM tab0 AS cor0
----
7363
8199
9408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6930
SELECT ALL col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6930
SELECT ALL col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6931
SELECT - col2 * + CAST( NULL AS SIGNED ) + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6931
SELECT - col2 * + CAST ( NULL AS INTEGER ) + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 90 FROM tab2 AS cor0
----
-2340
-2430
-3420

onlyif mysql # use DIV operator for integer division
query I rowsort label-6933
SELECT col2 * col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6933
SELECT col2 * col0 / + col0 AS col1 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6934
SELECT - col0 DIV ( + col0 ) AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6934
SELECT - col0 / ( + col0 ) AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + 29 * + col1 col1 FROM tab0 AS cor0
----
2527
2721
2814

query I rowsort
SELECT ALL - cor0.col2 + + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 36 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

query I rowsort
SELECT - 79 + - 68 FROM tab2, tab2 AS cor0
----
9 values hashing to ac7b4e09e5053e067a501011b5a012bc

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to e660b5944e34dd8d75740286862b3252

query I rowsort
SELECT + + col2 + 90 FROM tab0 cor0
----
123
172
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6941
SELECT ALL + CAST( NULL AS SIGNED ) + 37 + tab2.col2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6941
SELECT ALL + CAST ( NULL AS INTEGER ) + 37 + tab2.col2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT ALL + + col1 * + col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + 75 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

onlyif mysql # use DIV operator for integer division
query I rowsort label-6945
SELECT DISTINCT + 67 + col2 DIV 11 AS col1 FROM tab1 AS cor0
----
71
72
75

skipif mysql # not compatible
query I rowsort label-6945
SELECT DISTINCT + 67 + col2 / 11 AS col1 FROM tab1 AS cor0
----
71
72
75

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 28412d50061391eec23a02d0efcfb3f9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6947
SELECT - col1 * - col1 + cor0.col0 - + col2 DIV cor0.col2 FROM tab0 AS cor0
----
7419
8369
9443

skipif mysql # not compatible
query I rowsort label-6947
SELECT - col1 * - col1 + cor0.col0 - + col2 / cor0.col2 FROM tab0 AS cor0
----
7419
8369
9443

query I rowsort
SELECT + - 8 AS col1 FROM tab1 AS cor0
----
-8
-8
-8

query I rowsort
SELECT ALL - 25 AS col1 FROM tab2
----
-25
-25
-25

query I rowsort
SELECT ALL 98 AS col0 FROM tab0
----
98
98
98

query I rowsort
SELECT - col1 + - tab0.col0 * + col2 FROM tab0
----
-132
-7389
-878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 + - cor0.col1 col2 FROM tab0 AS cor0
----
-104
-93
-98

query I rowsort
SELECT - - 12 + + col0 FROM tab1 AS cor0
----
15
76
92

query I rowsort
SELECT + col0 * cor0.col0 + 70 FROM tab0 AS cor0
----
1295
646
7991

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-90

query I rowsort
SELECT DISTINCT + col2 + col0 + col0 FROM tab1
----
185
256
60

query I rowsort
SELECT - + col2 + col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6958
SELECT DISTINCT + + col1 DIV - col0 + + col2 * + col1 - + col0 AS col0 FROM tab0 AS cor0
----
2811
60
7372

skipif mysql # not compatible
query I rowsort label-6958
SELECT DISTINCT + + col1 / - col0 + + col2 * + col1 - + col0 AS col0 FROM tab0 AS cor0
----
2811
60
7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-6959
SELECT ALL col1 + + col2 DIV - 3 AS col0 FROM tab2
----
22
5
51

skipif mysql # not compatible
query I rowsort label-6959
SELECT ALL col1 + + col2 / - 3 AS col0 FROM tab2
----
22
5
51

query I rowsort
SELECT + tab1.col0 * + col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - 30 + - col1 * col2 AS col1 FROM tab0
----
-127
-2868
-7492

query I rowsort
SELECT - 76 * + col1 FROM tab2 AS cor0
----
-1292
-2356
-4484

query I rowsort
SELECT + col1 + col0 * col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT 61 * + cor0.col2 FROM tab2 AS cor0
----
1586
1647
2318

onlyif mysql # use DIV operator for integer division
query I rowsort label-6965
SELECT - + 2 DIV + col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6965
SELECT - + 2 / + col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6966
SELECT cor0.col1 * - col2 + - col1 DIV col2 FROM tab0 AS cor0
----
-194
-2840
-7463

skipif mysql # not compatible
query I rowsort label-6966
SELECT cor0.col1 * - col2 + - col1 / col2 FROM tab0 AS cor0
----
-194
-2840
-7463

query I rowsort
SELECT + + cor0.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-6968
SELECT - cor0.col1 * CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-6968
SELECT - cor0.col1 * CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6969
SELECT DISTINCT col1 + CAST( col1 * col1 AS SIGNED ) FROM tab2 AS cor0
----
306
3540
992

skipif mysql # not compatible
query I rowsort label-6969
SELECT DISTINCT col1 + CAST ( col1 * col1 AS INTEGER ) FROM tab2 AS cor0
----
306
3540
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 * + col1 col1 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * ( col2 ) col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 72 * cor1.col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
1728
2520
6408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6973
SELECT DISTINCT + col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6973
SELECT DISTINCT + col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col1 + ( + col0 ) AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL + col2 + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT ALL + ( 83 ) + - col2 * col0 FROM tab1 AS cor0
----
-3565
-7597
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6977
SELECT + col2 DIV col0 col1 FROM tab0 cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6977
SELECT + col2 / col0 col1 FROM tab0 cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6978
SELECT DISTINCT + col0 DIV 67 AS col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6978
SELECT DISTINCT + col0 / 67 AS col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - col0 * col1 * col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + - ( - col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 3 * + cor0.col0 FROM tab1 AS cor0
----
-192
-240
-9

query I rowsort
SELECT DISTINCT - col1 * col1 + + 15 AS col1 FROM tab2 AS cor0
----
-274
-3466
-946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - cor0.col2 col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL + 8 - + col2 AS col1 FROM tab1 AS cor0
----
-46
-49
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-6985
SELECT ALL - - col2 DIV - col2 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6985
SELECT ALL - - col2 / - col2 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col2 + col1 col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - col0 * col1 + - cor0.col2 * - col1 AS col0 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT ALL - cor0.col2 * col0 - col1 FROM tab2 cor0
----
-2087
-220
-3019

query I rowsort
SELECT + col1 + - col0 * 54 FROM tab1 cor0
----
-136
-3446
-4307

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6990
SELECT ALL col0 * col1 + + col0 - - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6990
SELECT ALL col0 * col1 + + col0 - - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 - 9 FROM tab1
----
-105
-63
-66

query I rowsort
SELECT col2 + + tab1.col1 - + col0 AS col0 FROM tab1
----
29
3
77

query I rowsort
SELECT ALL 27 + 78 - col1 FROM tab0
----
14
19
8

query I rowsort
SELECT + col0 * - col1 - col1 AS col0 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT col0 + col2 * ( tab0.col1 + - col2 ) FROM tab0
----
131
1773
827

query I rowsort
SELECT + col0 - - 6 * + col0 FROM tab0 AS cor0
----
168
245
623

query I rowsort
SELECT + + ( 58 ) FROM tab0 AS cor0
----
58
58
58

query I rowsort
SELECT + col0 + ( - col2 ) + ( col0 ) AS col1 FROM tab2 AS cor0
----
-13
120
130

query I rowsort
SELECT DISTINCT + cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
3
64
80

query I rowsort
SELECT 39 FROM tab0, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

onlyif mysql # use DIV operator for integer division
query I rowsort label-7001
SELECT ALL 23 DIV col2 FROM tab0
----
0
0
23

skipif mysql # not compatible
query I rowsort label-7001
SELECT ALL 23 / col2 FROM tab0
----
0
0
23

query I rowsort
SELECT DISTINCT ( - col0 + col0 * col0 ) AS col1 FROM tab0
----
1190
552
7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7003
SELECT - CAST( col1 + - col1 AS SIGNED ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7003
SELECT - CAST ( col1 + - col1 AS INTEGER ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + 14 * 5 FROM tab1
----
70

query I rowsort
SELECT ( - 66 ) + + tab0.col1 AS col1 FROM tab0
----
20
25
31

query I rowsort
SELECT - col2 + 71 AS col2 FROM tab2
----
33
44
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col0 * col2 col2 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7008
SELECT ALL - + CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7008
SELECT ALL - + CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7009
SELECT DISTINCT + - cor0.col0 * - col0 * + col0 + col0 * - 97 * col0 + col0 DIV + 11 col0 FROM tab1 AS cor0
----
-108793
-135163
-846

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7009
SELECT DISTINCT + - cor0.col0 * - col0 * + col0 + col0 * - 97 * col0 + col0 / + 11 col0 FROM tab1 AS cor0
----
-108793
-135163
-846

query I rowsort
SELECT + 66 * col2 + col1 FROM tab1 AS cor0
----
3590
3772
6349

query I rowsort
SELECT ( + 32 ) * - cor0.col2 + col2 FROM tab0 AS cor0
----
-1023
-2542
-31

query I rowsort
SELECT DISTINCT - 97 - - 43 FROM tab0 AS cor0
----
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 - + cor0.col0 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 3a49f28af72cdaad02c689974d2f7c08

onlyif mysql # use DIV operator for integer division
query I rowsort label-7014
SELECT ALL col0 + col2 DIV col1 FROM tab1 cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-7014
SELECT ALL col0 + col2 / col1 FROM tab1 cor0
----
5
69
87

query I rowsort
SELECT ALL + 13 AS col0 FROM tab2
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + 44 col2 FROM tab2
----
-145
-1984
-2958

query I rowsort
SELECT - 36 * col0 * - ( cor0.col1 ) FROM tab1 AS cor0
----
23040
2808
37440

query I rowsort
SELECT tab0.col2 + + tab0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 5484e660e65aa37f29a1eca3fc30f5cc

onlyif mysql # use DIV operator for integer division
query I rowsort label-7019
SELECT DISTINCT + - col1 + col0 DIV col0 AS col1 FROM tab2 cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-7019
SELECT DISTINCT + - col1 + col0 / col0 AS col1 FROM tab2 cor0
----
-16
-30
-58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7020
SELECT - col0 * + CAST( NULL AS SIGNED ) - - cor0.col1 * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7020
SELECT - col0 * + CAST ( NULL AS INTEGER ) - - cor0.col1 * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 - - 12 FROM tab2 AS cor0
----
29
43
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7022
SELECT DISTINCT - - col0 * CAST( NULL AS SIGNED ) + + col1 / col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7022
SELECT DISTINCT - - col0 * CAST ( NULL AS INTEGER ) + + col1 / col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col0 + + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + - col2 + - ( + cor0.col2 ) AS col0 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT ALL + + col1 * - 55 AS col2 FROM tab2 AS cor0
----
-1705
-3245
-935

query I rowsort
SELECT DISTINCT - col0 + ( + cor0.col1 ) + - col2 FROM tab2 cor0
----
-100
-3
-45

query I rowsort
SELECT ALL + - col0 * + cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 - 88 * + 34 FROM tab2 AS cor0
----
-2954
-2965
-2966

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7029
SELECT ALL - - cor0.col2 / - CAST( NULL AS DECIMAL ) + col0 * cor0.col1 * CAST( - col0 AS SIGNED ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7029
SELECT ALL - - cor0.col2 / - CAST ( NULL AS REAL ) + col0 * cor0.col1 * CAST ( - col0 AS INTEGER ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + 7 FROM tab2 AS cor0
----
-19
-20
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-7031
SELECT - + col0 DIV 70 + 25 AS col0 FROM tab0 cor0
----
24
25
25

skipif mysql # not compatible
query I rowsort label-7031
SELECT - + col0 / 70 + 25 AS col0 FROM tab0 cor0
----
24
25
25

query I rowsort
SELECT DISTINCT + col2 * - col0 + cor0.col1 * - col2 AS col0 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT DISTINCT col2 + ( ( col1 ) ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col1 * - ( col0 ) AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT col1 * + 33 FROM tab1 AS cor0
----
330
429
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 72 col2 FROM tab1
----
216
4608
5760

query I rowsort
SELECT + col0 + ( ( col1 ) ) * col2 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT ALL + 87 FROM tab1, tab0 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT + cor0.col2 * 53 AS col0 FROM tab1 AS cor0
----
2862
3021
5088

query I rowsort
SELECT - col0 - - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT - col1 * + 87 + - col2 AS col1 FROM tab0 AS cor0
----
-7515
-7999
-8440

query I rowsort
SELECT - - 84 + - cor0.col2 FROM tab0 cor0
----
2
51
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7043
SELECT - CAST( 6 AS SIGNED ) * - col1 - - col0 FROM tab2 AS cor0
----
181
193
432

skipif mysql # not compatible
query I rowsort label-7043
SELECT - CAST ( 6 AS INTEGER ) * - col1 - - col0 FROM tab2 AS cor0
----
181
193
432

query I rowsort
SELECT - - 27 * col0 + col0 FROM tab2 AS cor0
----
196
2184
2212

onlyif mysql # use DIV operator for integer division
query I rowsort label-7045
SELECT + - 47 * col1 DIV + cor0.col1 + + 87 FROM tab2 AS cor0
----
40
40
40

skipif mysql # not compatible
query I rowsort label-7045
SELECT + - 47 * col1 / + cor0.col1 + + 87 FROM tab2 AS cor0
----
40
40
40

query I rowsort
SELECT - 17 AS col0 FROM tab2, tab1, tab2 AS cor0, tab0
----
81 values hashing to c2265365b5649c888846aefc3ede9a69

query I rowsort
SELECT DISTINCT + col1 * col0 * - 88 AS col1 FROM tab1
----
-56320
-6864
-91520

query I rowsort
SELECT - + 88 + - col0 AS col2 FROM tab2 AS cor0
----
-166
-167
-95

query I rowsort
SELECT - + cor0.col1 + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + + col2 * 87 AS col2 FROM tab0 AS cor0
----
2904
7216
88

query I rowsort
SELECT + - 60 AS col2 FROM tab1 AS cor0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + ( - col1 ) * + cor0.col0 * + col0 AS col2 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT + col0 + + col2 * col1 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL - + col0 * col0 FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-7055
SELECT DISTINCT 90 * - col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-90

skipif mysql # not compatible
query I rowsort label-7055
SELECT DISTINCT 90 * - col2 / col2 AS col2 FROM tab0 AS cor0
----
-90

query I rowsort
SELECT DISTINCT ( col2 ) * col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 9 + 2 FROM tab1
----
11
11
11

query I rowsort
SELECT DISTINCT 74 AS col2 FROM tab1
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-7059
SELECT + col1 + + col1 * + cor0.col1 DIV col1 FROM tab2 cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-7059
SELECT + col1 + + col1 * + cor0.col1 / col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT - ( col1 + + col1 ) FROM tab0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - + 86 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
-86

query I rowsort
SELECT ( 62 ) AS col2 FROM tab0
----
62
62
62

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab0, tab1, tab1 AS cor0
----
67

query I rowsort
SELECT 20 + - tab2.col1 + col2 FROM tab2
----
-13
16
41

query I rowsort
SELECT + 60 * + 82 FROM tab0
----
4920
4920
4920

query I rowsort
SELECT ALL - 94 * - col0 * + col2 + + col1 FROM tab0
----
3387
686103
74534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7067
SELECT - CAST( NULL AS SIGNED ) + + col1 / col0 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7067
SELECT - CAST ( NULL AS INTEGER ) + + col1 / col0 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * - 76 AS col2 FROM tab1 AS cor0
----
-4104
-4332
-7296

query I rowsort
SELECT ALL - + 51 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT + - col1 + 6 * + col2 FROM tab0 AS cor0
----
-91
112
401

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT + col0 + - 41 FROM tab2 AS cor0
----
-34
37
38

query I rowsort
SELECT ALL + col2 + + col1 * col0 + col2 AS col0 FROM tab2 AS cor0
----
1419
271
4654

query I rowsort
SELECT ALL + col2 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab0 AS cor0
----
93

query I rowsort
SELECT DISTINCT + 12 + col2 FROM tab1 AS cor0
----
108
66
69

query I rowsort
SELECT DISTINCT - 73 * col2 + + col0 * - 78 AS col0 FROM tab2 AS cor0
----
-2517
-7982
-8936

query I rowsort
SELECT ALL - ( + cor0.col1 ) * 29 FROM tab0 AS cor0
----
-2494
-2639
-2813

query I rowsort
SELECT ALL col0 * + col2 + col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + ( + 16 ) + col2 FROM tab2
----
42
43
54

query I rowsort
SELECT DISTINCT 73 * - tab0.col0 + + col1 AS col1 FROM tab0
----
-1666
-2458
-6406

query I rowsort
SELECT DISTINCT col0 * col2 - - col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + col0 - + col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT 80 FROM tab2, tab2 AS cor0
----
80

query I rowsort
SELECT col0 + 25 * - ( col2 * + 42 ) AS col1 FROM tab2 cor0
----
-27222
-28343
-39821

query I rowsort
SELECT - cor0.col2 * - col2 + cor0.col2 - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - col0 * col1 - col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT - col2 + + 65 FROM tab1 AS cor0
----
-31
11
8

query I rowsort
SELECT ALL col0 * col1 * - col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT + ( - tab2.col0 ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7091
SELECT - col0 DIV 98 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7091
SELECT - col0 / 98 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 * cor0.col0 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - - col1 * - 58 AS col2 FROM tab2 AS cor0
----
-1798
-3422
-986

query I rowsort
SELECT cor0.col2 + 73 AS col2 FROM tab1 AS cor0
----
127
130
169

query I rowsort
SELECT DISTINCT col1 * - col1 + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1209
-740
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7096
SELECT - - 99 DIV - col1 FROM tab1 AS cor0
----
-3
-7
-9

skipif mysql # not compatible
query I rowsort label-7096
SELECT - - 99 / - col1 FROM tab1 AS cor0
----
-3
-7
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7097
SELECT col1 DIV col0 + col0 AS col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-7097
SELECT col1 / col0 + col0 AS col0 FROM tab1 AS cor0
----
11
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 - col2 col1 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7099
SELECT DISTINCT - CAST( - 23 AS SIGNED ) DIV col0 AS col1 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-7099
SELECT DISTINCT - CAST ( - 23 AS INTEGER ) / col0 AS col1 FROM tab2 AS cor0
----
0
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7100
SELECT DISTINCT + CAST( ( col0 ) AS SIGNED ) * ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-7100
SELECT DISTINCT + CAST ( ( col0 ) AS INTEGER ) * ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col1 + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7102
SELECT ALL + CAST( ( col0 ) AS SIGNED ) * col0 * col1 AS col1 FROM tab0 AS cor0
----
118825
49536
720811

skipif mysql # not compatible
query I rowsort label-7102
SELECT ALL + CAST ( ( col0 ) AS INTEGER ) * col0 * col1 AS col1 FROM tab0 AS cor0
----
118825
49536
720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-7103
SELECT + 89 - 79 DIV + col2 FROM tab1 AS cor0
----
88
88
89

skipif mysql # not compatible
query I rowsort label-7103
SELECT + 89 - 79 / + col2 FROM tab1 AS cor0
----
88
88
89

query I rowsort
SELECT DISTINCT ( col1 ) * col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 24 + col0 AS col0 FROM tab2 AS cor0
----
-17
54
55

query I rowsort
SELECT DISTINCT + ( + 17 ) * - col0 FROM tab1 AS cor0
----
-1088
-1360
-51

query I rowsort
SELECT ( ( + col2 ) ) + + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + tab2.col1 * - 93 - - col1 FROM tab2
----
-1564
-2852
-5428

query I rowsort
SELECT DISTINCT col2 - col1 * 10 FROM tab1
----
-206
-34
-43

query I rowsort
SELECT ALL col1 + + col1 * - col2 + + col2 FROM tab2
----
-1449
-591
-779

query I rowsort
SELECT ALL 35 * cor0.col1 - 54 FROM tab2, tab1 AS cor0
----
9 values hashing to 8e227f35a419d251096c46b784979c88

query I rowsort
SELECT + col0 * - col2 + - col1 AS col2 FROM tab0
----
-132
-7389
-878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7113
SELECT DISTINCT CAST( + 75 AS SIGNED ) * col2 + - col2 FROM tab1 AS cor0
----
3996
4218
7104

skipif mysql # not compatible
query I rowsort label-7113
SELECT DISTINCT CAST ( + 75 AS INTEGER ) * col2 + - col2 FROM tab1 AS cor0
----
3996
4218
7104

query I rowsort
SELECT ALL + 56 * ( col2 + + col1 ) * - 28 FROM tab1 AS cor0
----
-105056
-125440
-170912

query I rowsort
SELECT - 31 * - col0 - - col0 FROM tab1 AS cor0
----
2048
2560
96

query I rowsort
SELECT + - 40 * col0 + + col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT ALL + + col1 * + col2 + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + ( + col0 ) + + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + + 50 * cor0.col1 - col2 AS col1 FROM tab0 AS cor0
----
4267
4468
4849

query I rowsort
SELECT DISTINCT - 78 + col0 FROM tab2 AS cor0
----
-71
0
1

query I rowsort
SELECT - col0 * - col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - + col1 + cor0.col0 * + col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT + 12 + - col1 * + col0 * col2 FROM tab1 cor0
----
-36468
-4200
-99828

query I rowsort
SELECT DISTINCT col2 * ( col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7125
SELECT ALL col2 DIV + 6 + + 24 FROM tab0 AS cor0
----
24
29
37

skipif mysql # not compatible
query I rowsort label-7125
SELECT ALL col2 / + 6 + + 24 FROM tab0 AS cor0
----
24
29
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7126
SELECT + + col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7126
SELECT + + col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + cor0.col2 + 29 col2 FROM tab2 AS cor0
----
-1415
-647
-700

query I rowsort
SELECT DISTINCT col1 + cor0.col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT + cor0.col0 + + ( col2 ) FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col2 + - col1 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + col1 * col1 * - col0 + col0 AS col1 FROM tab0 AS cor0
----
-177480
-329280
-736920

query I rowsort
SELECT - + 77 AS col2 FROM tab2 AS cor0
----
-77
-77
-77

query I rowsort
SELECT ALL - col1 - cor0.col1 * ( - ( - cor0.col0 ) + 86 ) * col0 AS col2 FROM tab0 AS cor0
----
-1417416
-227126
-410892

query I rowsort
SELECT DISTINCT + col1 * - col1 * col1 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT ALL - + 84 * col2 + - 3 FROM tab2 AS cor0
----
-2187
-2271
-3195

query I rowsort
SELECT DISTINCT + 76 - col1 AS col0 FROM tab2 AS cor0
----
17
45
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col1 * - cor0.col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col0 * col0 * col2 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT + cor0.col1 - - 85 * 43 * - col0 AS col2 FROM tab0 AS cor0
----
-127828
-325204
-87634

query I rowsort
SELECT ALL 9 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT col2 * 51 FROM tab0 AS cor0
----
1683
4182
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 col0 FROM tab2
----
-70
-70
-70

query I rowsort
SELECT DISTINCT - 21 + - col0 AS col0 FROM tab2
----
-100
-28
-99

query I rowsort
SELECT 75 * cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to d3c37d9bea3d7cc635929b3854990329

query I rowsort
SELECT + 70 * - 66 AS col0 FROM tab2 AS cor0
----
-4620
-4620
-4620

query I rowsort
SELECT - - col1 + 47 * col2 FROM tab1 AS cor0
----
2564
2689
4525

query I rowsort
SELECT - 6 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

onlyif mysql # use DIV operator for integer division
query I rowsort label-7149
SELECT ALL + ( col0 ) DIV + tab1.col2 AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7149
SELECT ALL + ( col0 ) / + tab1.col2 AS col0 FROM tab1
----
0
0
1

query I rowsort
SELECT DISTINCT - 62 FROM tab0, tab2, tab2 AS cor0
----
-62

query I rowsort
SELECT - ( - col2 ) + - col2 FROM tab2
----
0
0
0

query I rowsort
SELECT - 32 * + col1 + + col1 * - col2 AS col0 FROM tab0
----
-10374
-3201
-5590

query I rowsort
SELECT DISTINCT - - 29 AS col0 FROM tab0 AS cor0
----
29

query I rowsort
SELECT + + 32 * + col0 FROM tab2 cor0
----
224
2496
2528

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7155
SELECT ALL - CAST( + col0 AS SIGNED ) * col0 * - ( - 64 ) FROM tab2 AS cor0
----
-3136
-389376
-399424

skipif mysql # not compatible
query I rowsort label-7155
SELECT ALL - CAST ( + col0 AS INTEGER ) * col0 * - ( - 64 ) FROM tab2 AS cor0
----
-3136
-389376
-399424

query I rowsort
SELECT - col0 * 52 AS col2 FROM tab1 AS cor0
----
-156
-3328
-4160

query I rowsort
SELECT DISTINCT + cor0.col0 * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - 68 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7159
SELECT ALL CAST( NULL AS SIGNED ) * + col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7159
SELECT ALL CAST ( NULL AS INTEGER ) * + col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 83 FROM tab0
----
83

query I rowsort
SELECT + col1 * col2 - - tab2.col2 AS col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT cor0.col2 * - 7 FROM tab1, tab2 cor0
----
9 values hashing to a3bebbadd8bd4475be0b876b798c4db6

query I rowsort
SELECT + col1 * col0 + + col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - col1 + 97 AS col0 FROM tab0
----
0
11
6

query I rowsort
SELECT DISTINCT - tab0.col0 AS col0 FROM tab0, tab1, tab1 AS cor0, tab2
----
-24
-35
-89

query I rowsort
SELECT + cor0.col1 + 74 * col2 FROM tab1 cor0
----
4022
4228
7117

query I rowsort
SELECT DISTINCT - - col0 - 74 AS col0 FROM tab1 AS cor0
----
-10
-71
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 21 * - 76 + col2 col0 FROM tab1 AS cor0
----
-153120
-86130
-90915

query I rowsort
SELECT ( col1 ) + - col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + - 72 + + col0 AS col1 FROM tab2 AS cor0
----
-65
6
7

query I rowsort
SELECT - col2 * - 86 + col2 AS col2 FROM tab2 AS cor0
----
2262
2349
3306

onlyif mysql # use DIV operator for integer division
query I rowsort label-7172
SELECT - col1 DIV 13 AS col1 FROM tab1 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7172
SELECT - col1 / 13 AS col1 FROM tab1 AS cor0
----
-1
-2
0

query I rowsort
SELECT - col1 + - 47 AS col0 FROM tab0 AS cor0
----
-133
-138
-144

onlyif mysql # use DIV operator for integer division
query I rowsort label-7174
SELECT - 7 DIV col0 + - col2 * col2 FROM tab1 AS cor0
----
-2918
-3249
-9216

skipif mysql # not compatible
query I rowsort label-7174
SELECT - 7 / col0 + - col2 * col2 FROM tab1 AS cor0
----
-2918
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7175
SELECT - - CAST( col2 AS SIGNED ) + col0 * 67 FROM tab0 AS cor0
----
1641
2346
6045

skipif mysql # not compatible
query I rowsort label-7175
SELECT - - CAST ( col2 AS INTEGER ) + col0 * 67 FROM tab0 AS cor0
----
1641
2346
6045

query I rowsort
SELECT ALL + col1 AS col0 FROM tab1 WHERE NOT - col1 - col2 <> ( - col2 )
----

query I rowsort
SELECT ALL - col2 / col0 AS col0 FROM tab2 WHERE col1 - - col1 < NULL
----

query I rowsort
SELECT - col2 + col1 * - col1 AS col1 FROM tab1
----
-157
-265
-730

query I rowsort
SELECT ALL - col2 * col0 + col1 + col1 FROM tab2
----
-127
-1910
-2968

query I rowsort
SELECT col0 * - col0 * - col2 AS col2 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT + col2 * + col2 + col2 AS col0 FROM tab1
----
2970
3306
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-7182
SELECT DISTINCT + tab1.col2 DIV + col1 col2 FROM tab1
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7182
SELECT DISTINCT + tab1.col2 / + col1 col2 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7183
SELECT + col2 * col2 DIV col1 + + col1 * + col0 col2 FROM tab2 AS cor0
----
1427
240
4613

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7183
SELECT + col2 * col2 / col1 + + col1 * + col0 col2 FROM tab2 AS cor0
----
1427
240
4613

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 WHERE ( NULL ) BETWEEN ( col2 / - col1 ) AND NULL
----

query I rowsort
SELECT DISTINCT - col1 + col1 * col1 + - col1 * - tab2.col2 AS col0 FROM tab2
----
1767
4956
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-7186
SELECT DISTINCT col2 DIV tab1.col2 AS col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-7186
SELECT DISTINCT col2 / tab1.col2 AS col1 FROM tab1
----
1

query I rowsort
SELECT col2 * col1 * - col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT col2 * col1 * - tab1.col0 + col2 AS col0 FROM tab1
----
-36423
-4158
-99744

query I rowsort
SELECT ALL col0 * - col1 + - col0 AS col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT col1 * - tab2.col0 AS col0 FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 + - col2 * - tab2.col1 col1 FROM tab2
----
1560
684
864

query I rowsort
SELECT DISTINCT col0 + col0 * col0 * - col0 AS col2 FROM tab2
----
-336
-474474
-492960

query I rowsort
SELECT col2 AS col1 FROM tab2 WHERE - col2 + col0 NOT IN ( + col2 )
----
26
27
38

query I rowsort
SELECT DISTINCT + col0 * - col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL col0 * - col0 * col2 FROM tab2
----
-1323
-158184
-237158

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT IN ( - col1 + col1 )
----

query I rowsort
SELECT DISTINCT + col1 * + col1 + col0 * + col2 AS col0 FROM tab1
----
3748
7849
838

query I rowsort
SELECT ALL tab0.col0 FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7199
SELECT col1 * col1 * - col1 + - col1 DIV col0 FROM tab1
----
-1000
-17584
-2197

skipif mysql # not compatible
query I rowsort label-7199
SELECT col1 * col1 * - col1 + - col1 / col0 FROM tab1
----
-1000
-17584
-2197

query I rowsort
SELECT col2 * col1 + - col0 AS col1 FROM tab1
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7201
SELECT + col1 * col1 DIV col0 + col2 AS col2 FROM tab1
----
279
58
98

skipif mysql # not compatible
query I rowsort label-7201
SELECT + col1 * col1 / col0 + col2 AS col2 FROM tab1
----
279
58
98

query I rowsort
SELECT ALL col2 - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + col0 * col0 + col1 FROM tab1
----
35
4106
6413

query I rowsort
SELECT - tab0.col1 - col2 * - col2 AS col0 FROM tab0
----
-96
1003
6633

query I rowsort
SELECT ALL - col1 * col2 + - col2 * tab1.col2 FROM tab1
----
-10464
-3819
-4320

onlyif mysql # use DIV operator for integer division
query I rowsort label-7206
SELECT - cor0.col1 DIV + col1 col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7206
SELECT - cor0.col1 / + col1 col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col1 * col0 * col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT + col1 * col2 * col2 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT - - col1 * + col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - cor0.col0 * + col0 col2 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT - col2 FROM tab1 AS cor0 WHERE NULL <= ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7213
SELECT DISTINCT + col0 DIV col1 - - col1 * + col1 FROM tab2 AS cor0
----
293
3482
961

skipif mysql # not compatible
query I rowsort label-7213
SELECT DISTINCT + col0 / col1 - - col1 * + col1 FROM tab2 AS cor0
----
293
3482
961

query I rowsort
SELECT DISTINCT col1 - - col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col2 + - col0 + col2 FROM tab0 AS cor0
----
-33
42
75

query I rowsort
SELECT ALL cor0.col0 + - col1 AS col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - col1 - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab2, tab1 cor0 CROSS JOIN tab0 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT ALL col0 + col0 + col0 FROM tab0 WHERE - col1 NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL + - col2 * ( col1 ) FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7222
SELECT - + col2 DIV + 97 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7222
SELECT - + col2 / + 97 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * - col0 + col2 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + col0 + ( - col1 ) * col2 AS col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL - col1 + col0 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-104
-1053
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col0 col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT col0 + + col0 * col1 AS col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-7228
SELECT DISTINCT + cor0.col2 DIV col2 AS col1 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-7228
SELECT DISTINCT + cor0.col2 / col2 AS col1 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - - col2 * + col0 AS col0 FROM tab2 cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 83 + col1 col2 FROM tab1 cor0
----
4508
4741
7981

query I rowsort
SELECT DISTINCT - col2 - - 8 FROM tab0
----
-25
-74
7

query I rowsort
SELECT DISTINCT + col2 + + col0 * - ( col2 ) * col0 FROM tab2 AS cor0
----
-1296
-158158
-237120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 + - cor1.col2 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3e90c73a9472c2ad04dc98558dd40ae2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to f2e58df61204c8a189e87d6816ea9159

onlyif mysql # use DIV operator for integer division
query I rowsort label-7235
SELECT + col2 DIV - cor0.col2 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7235
SELECT + col2 / - cor0.col2 AS col0 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + tab0.col0 * - tab0.col1 + - col2 AS col2 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL + col2 * col1 AS col0 FROM tab2
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 + + col2 * 84 col2 FROM tab1 AS cor0
----
4448
4700
7976

query I rowsort
SELECT ALL 73 + - col2 AS col1 FROM tab1 AS cor0
----
-23
16
19

query III rowsort
SELECT ALL * FROM tab2 WHERE col0 + + col0 < + col2 + + col2
----
7
31
27

query I rowsort
SELECT + col0 + col0 * tab1.col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ALL + col2 * tab2.col0 + - col1 AS col2 FROM tab2
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 + - col1 * col1 col0 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT col0 AS col0 FROM tab2 WHERE ( col2 + col1 * col2 ) <= NULL
----

query I rowsort
SELECT col2 + - col2 + - col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col2 * - col2 + - col0 + + col0 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - ( 68 ) FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

query I rowsort
SELECT + 9 - - col0 FROM tab1
----
12
73
89

query I rowsort
SELECT ALL + tab0.col1 * col2 * tab0.col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT ALL - + col0 * col1 + - 41 * - col2 AS col1 FROM tab1 AS cor0
----
1697
2136
2896

query I rowsort
SELECT ALL + - 36 AS col2 FROM tab1 cor0
----
-36
-36
-36

query I rowsort
SELECT ALL + 94 - - 66 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ac5ffad908886e53c315f058c5fe2210

query I rowsort
SELECT ALL - col0 * + 81 + + 46 FROM tab0 AS cor0
----
-1898
-2789
-7163

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7255
SELECT ALL - col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7255
SELECT ALL - col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7256
SELECT DISTINCT - - cor0.col0 DIV col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7256
SELECT DISTINCT - - cor0.col0 / col2 AS col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT col1 + col0 * - col0 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - 48 + + cor0.col2 AS col1 FROM tab0, tab2 AS cor0
----
-10
-21
-22

query I rowsort
SELECT + ( 63 ) FROM tab1 AS cor0
----
63
63
63

query I rowsort
SELECT DISTINCT - ( col1 ) + - col1 + col2 FROM tab0 cor0
----
-100
-139
-193

query I rowsort
SELECT DISTINCT 15 + col2 FROM tab2 AS cor0
----
41
42
53

query I rowsort
SELECT - col2 * col2 + - col0 AS col1 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT ALL - ( + col1 ) * col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col2 * - 93 + 41 FROM tab2
----
-2377
-2470
-3493

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col2 FROM tab0 AS cor0
----
29
29
29

query I rowsort
SELECT - 54 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

query I rowsort
SELECT ALL + 81 + - col1 AS col2 FROM tab2 AS cor0
----
22
50
64

query I rowsort
SELECT + + col2 * - col0 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col2 + - col1 * + ( 79 * - col2 ) FROM tab2 AS cor0
----
121212
51072
66150

query I rowsort
SELECT ALL + 90 AS col0 FROM tab2 AS cor0
----
90
90
90

query I rowsort
SELECT DISTINCT 3 + + col1 FROM tab0
----
100
89
94

query I rowsort
SELECT - 1 * col1 + col0 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT cor0.col2 * col1 FROM tab1 cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 27 col0 FROM tab1, tab2, tab0 AS cor0
----
27

query I rowsort
SELECT + 0 * + tab2.col1 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - 27 AS col2 FROM tab0
----
-27
-27
-27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7277
SELECT - col1 * - CAST( - col1 AS SIGNED ) col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7277
SELECT - col1 * - CAST ( - col1 AS INTEGER ) col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - cor0.col2 * col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + col0 * col0 * col0 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT ALL ( - col2 ) * + col1 AS col1 FROM tab2
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-7281
SELECT ALL col1 * col0 DIV - col2 col0 FROM tab0
----
-3395
-62
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7281
SELECT ALL col1 * col0 / - col2 col0 FROM tab0
----
-3395
-62
-98

query I rowsort
SELECT ALL + 74 * col2 AS col2 FROM tab1
----
3996
4218
7104

onlyif mysql # use DIV operator for integer division
query I rowsort label-7283
SELECT - col0 + cor0.col0 * + col2 * cor0.col0 + col2 DIV col0 AS col1 FROM tab1 AS cor0
----
233408
501
614321

skipif mysql # not compatible
query I rowsort label-7283
SELECT - col0 + cor0.col0 * + col2 * cor0.col0 + col2 / col0 AS col1 FROM tab1 AS cor0
----
233408
501
614321

query I rowsort
SELECT DISTINCT - - col0 + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query III rowsort
SELECT * FROM tab2 WHERE + col1 + col1 NOT BETWEEN ( col0 ) AND + col0 + col2 * col2 * - col0 + col1 AND NOT - col1 IN ( + tab2.col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col2 * col2 * - col1 - col0 FROM tab2
----
-22606
-24627
-39962

query I rowsort
SELECT col0 * - col1 + + col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT - col1 * col2 + + cor0.col1 * - col2 + col1 FROM tab0 AS cor0
----
-14833
-5590
-97

query I rowsort
SELECT cor0.col0 + + col1 * + col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT col1 * + col2 * + col0 + + col1 + + col2 * col0 AS col1 FROM tab0
----
3527
671507
68990

query I rowsort
SELECT DISTINCT - col1 + 82 AS col0 FROM tab1
----
56
69
72

query I rowsort
SELECT ALL 7 + - 68 AS col1 FROM tab0
----
-61
-61
-61

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col1 AS REAL ) * - col2 + col0 FROM tab1
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7294
SELECT CAST( + col2 AS SIGNED ) DIV col0 col1 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7294
SELECT CAST ( + col2 AS INTEGER ) / col0 col1 FROM tab2
----
0
0
3

query I rowsort
SELECT + 22 + col1 FROM tab0 AS cor0
----
108
113
119

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7296
SELECT ALL CAST( - 25 AS SIGNED ) * - col2 + tab2.col0 * col1 + col0 AS col1 FROM tab2
----
2372
5330
899

skipif mysql # not compatible
query I rowsort label-7296
SELECT ALL CAST ( - 25 AS INTEGER ) * - col2 + tab2.col0 * col1 + col0 AS col1 FROM tab2
----
2372
5330
899

query I rowsort
SELECT ALL 71 + - col1 + + col0 * tab0.col1 FROM tab0
----
2049
3369
8079

onlyif mysql # use DIV operator for integer division
query I rowsort label-7298
SELECT CAST( col1 AS SIGNED ) DIV + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7298
SELECT CAST ( col1 AS INTEGER ) / + col2 FROM tab1
----
0
0
0

query I rowsort
SELECT 51 * - col1 * col0 AS col2 FROM tab1
----
-32640
-3978
-53040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * - 35 * + col1 col2 FROM tab0
----
-118825
-283465
-72240

query I rowsort
SELECT DISTINCT + ( tab2.col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT - 13 * col2 FROM tab1
----
-1248
-702
-741

onlyif mysql # use DIV operator for integer division
query I rowsort label-7303
SELECT + col2 * + col0 + + cor0.col0 DIV col1 + + col1 FROM tab2 AS cor0
----
2088
220
3023

skipif mysql # not compatible
query I rowsort label-7303
SELECT + col2 * + col0 + + cor0.col0 / col1 + + col1 FROM tab2 AS cor0
----
2088
220
3023

onlyif mysql # use DIV operator for integer division
query I rowsort label-7304
SELECT - - col0 * col2 + cor0.col0 DIV - col2 FROM tab1 AS cor0
----
162
3647
7680

skipif mysql # not compatible
query I rowsort label-7304
SELECT - - col0 * col2 + cor0.col0 / - col2 FROM tab1 AS cor0
----
162
3647
7680

query I rowsort
SELECT 78 * + tab1.col0 * - col0 FROM tab1
----
-319488
-499200
-702

query I rowsort
SELECT - 41 - col0 FROM tab1 AS cor0
----
-105
-121
-44

query I rowsort
SELECT col0 + - cor0.col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - 0 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - 77 AS col1 FROM tab1 AS cor0
----
-77
-77
-77

query I rowsort
SELECT ALL - 62 * col1 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
39680
4836
64480

query I rowsort
SELECT ALL + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7312
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7312
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - col1 + col0 - col2 AS col2 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT col2 + col0 + col1 FROM tab1
----
131
189
83

query I rowsort
SELECT + - cor0.col0 + + col1 * ( - 78 * - col2 ) FROM tab2 AS cor0
----
119574
50309
65279

query I rowsort
SELECT DISTINCT - - 59 AS col1 FROM tab0 AS cor0
----
59

query I rowsort
SELECT ALL + + ( col2 ) * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - col2 + - col1 * 14 FROM tab2 AS cor0
----
-276
-461
-852

onlyif mysql # use DIV operator for integer division
query I rowsort label-7319
SELECT + 50 * col0 DIV + col0 FROM tab1
----
50
50
50

skipif mysql # not compatible
query I rowsort label-7319
SELECT + 50 * col0 / + col0 FROM tab1
----
50
50
50

query I rowsort
SELECT ALL - tab0.col1 * + col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT - + 2 * col0 + col1 * 35 AS col1 FROM tab2 AS cor0
----
1071
1909
437

query I rowsort
SELECT ALL - - col0 + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + - 12 FROM tab1 AS cor0
----
-12
-12
-12

query I rowsort
SELECT ( col0 ) * - col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col0 * 44 + + col1 FROM tab2 AS cor0
----
339
3491
3493

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7326
SELECT + - CAST( - col2 AS SIGNED ) + + col1 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-7326
SELECT + - CAST ( - col2 AS INTEGER ) + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - col2 + - col2 * - col1 AS col2 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + + 67 FROM tab2 AS cor0
----
67

query I rowsort
SELECT ALL + col1 * - col2 * col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT 52 * - col1 + + col2 FROM tab2 AS cor0
----
-1585
-3042
-846

query I rowsort
SELECT DISTINCT 26 + 37 FROM tab0 AS cor0
----
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 92 col1 FROM tab2 AS cor0
----
-92
-92
-92

query I rowsort
SELECT + + ( col2 ) AS col0 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 + col0 * - ( + col1 * + tab2.col2 ) col0 FROM tab2
----
-124254
-52377
-6076

query I rowsort
SELECT DISTINCT + tab1.col0 * + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 819103d3cf87b5ea7ab7d6e1018478a0

query I rowsort
SELECT 20 + col1 FROM tab2
----
37
51
79

query I rowsort
SELECT col2 * + col0 + tab1.col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - ( - ( + col0 ) ) * + col1 + - tab0.col2 * - col2 AS col0 FROM tab0
----
14823
3153
3396

query I rowsort
SELECT DISTINCT - 64 * ( col2 ) FROM tab0
----
-2112
-5248
-64

query I rowsort
SELECT DISTINCT + col1 - - cor0.col0 * cor0.col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL col1 * + col1 * + col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL + 17 * 24 FROM tab1 AS cor0
----
408
408
408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7343
SELECT ALL col0 - - col2 DIV col0 AS col1 FROM tab0 AS cor0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-7343
SELECT ALL col0 - - col2 / col0 AS col1 FROM tab0 AS cor0
----
25
35
89

query I rowsort
SELECT ALL + 55 FROM tab1
----
55
55
55

query I rowsort
SELECT 89 + + col1 * + cor0.col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-177415
-329226
-736920

query I rowsort
SELECT + 35 * - col2 + 44 FROM tab0 AS cor0
----
-1111
-2826
9

query I rowsort
SELECT DISTINCT - + col1 + + col2 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT col2 * col0 + - col1 * col1 FROM tab0 AS cor0
----
-6604
-9374
-983

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL 71 * cor0.col2 - - ( cor0.col0 ) AS col0 FROM tab2 cor0
----
1924
1924
2777

onlyif mysql # use DIV operator for integer division
query I rowsort label-7351
SELECT ALL - + col0 + col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-7351
SELECT ALL - + col0 + col1 / + col0 AS col1 FROM tab0 AS cor0
----
-21
-33
-88

query I rowsort
SELECT + col1 + - 77 FROM tab0
----
14
20
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7353
SELECT CAST( ( col1 ) AS SIGNED ) + + 44 * + ( tab0.col1 + + 78 ) FROM tab0
----
7302
7527
7797

skipif mysql # not compatible
query I rowsort label-7353
SELECT CAST ( ( col1 ) AS INTEGER ) + + 44 * + ( tab0.col1 + + 78 ) FROM tab0
----
7302
7527
7797

query I rowsort
SELECT - 38 FROM tab1 AS cor0
----
-38
-38
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7355
SELECT DISTINCT + + col0 * 58 DIV col0 AS col1 FROM tab0 cor0
----
58

skipif mysql # not compatible
query I rowsort label-7355
SELECT DISTINCT + + col0 * 58 / col0 AS col1 FROM tab0 cor0
----
58

query I rowsort
SELECT ALL + + cor0.col1 - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - col0 - - 83 AS col0 FROM tab0 AS cor0
----
-6
48
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * 76 col1 FROM tab0 cor0
----
6536
6916
7372

query I rowsort
SELECT DISTINCT col2 * ( cor0.col2 ) AS col0 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7361
SELECT + - col1 + - CAST( - col2 AS SIGNED ) AS col0 FROM tab2 cor0
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-7361
SELECT + - col1 + - CAST ( - col2 AS INTEGER ) AS col0 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-7362
SELECT ALL - - col1 DIV 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-7362
SELECT ALL - - col1 / col2 col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT col0 + 31 AS col1 FROM tab0 cor0
----
120
55
66

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab1
----
59

query I rowsort
SELECT ALL + col0 * 71 AS col2 FROM tab2 AS cor0
----
497
5538
5609

query I rowsort
SELECT - cor0.col0 * + col1 + + col1 * + col2 FROM tab0 AS cor0
----
-3298
-637
774

onlyif mysql # use DIV operator for integer division
query I rowsort label-7367
SELECT DISTINCT tab2.col0 + tab2.col2 - col0 DIV - col0 FROM tab2
----
105
118
35

skipif mysql # not compatible
query I rowsort label-7367
SELECT DISTINCT tab2.col0 + tab2.col2 - col0 / - col0 FROM tab2
----
105
118
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-7368
SELECT DISTINCT + + cor0.col0 DIV - col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7368
SELECT DISTINCT + + cor0.col0 / - col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT DISTINCT - col2 + - ( + col0 ) * col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT - col0 - + ( col2 ) FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - + col0 * col0 + 70 FROM tab2 cor0
----
-6014
-6171
21

query I rowsort
SELECT - + col0 + - col0 * + cor0.col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-7374
SELECT col0 DIV - ( col1 ) + col1 FROM tab1
----
26
4
7

skipif mysql # not compatible
query I rowsort label-7374
SELECT col0 / - ( col1 ) + col1 FROM tab1
----
26
4
7

query I rowsort
SELECT DISTINCT col2 + ( tab1.col1 ) AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT - + 71 * + ( - col2 ) FROM tab1 AS cor0
----
3834
4047
6816

query I rowsort
SELECT DISTINCT - col2 * col1 * - col1 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT 51 * col1 AS col0 FROM tab0 AS cor0
----
4386
4641
4947

query I rowsort
SELECT - col0 + ( - 72 * + col1 ) + ( col1 ) AS col0 FROM tab0
----
-6130
-6550
-6922

query I rowsort
SELECT ALL - 42 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9894093f29c0defae91347934f060329

onlyif mysql # use DIV operator for integer division
query I rowsort label-7381
SELECT tab0.col1 DIV - col2 + col2 * + col1 AS col1 FROM tab0
----
0
2836
7461

skipif mysql # not compatible
query I rowsort label-7381
SELECT tab0.col1 / - col2 + col2 * + col1 AS col1 FROM tab0
----
0
2836
7461

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7382
SELECT DISTINCT CAST( NULL AS SIGNED ) / - cor1.col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7382
SELECT DISTINCT CAST ( NULL AS INTEGER ) / - cor1.col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT 92 * - col0 AS col1 FROM tab1
----
-276
-5888
-7360

query I rowsort
SELECT - col2 * col2 + + 98 FROM tab0 cor0
----
-6626
-991
97

query I rowsort
SELECT + 93 AS col0 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT DISTINCT 33 * col2 FROM tab0
----
1089
2706
33

query I rowsort
SELECT ALL + - 56 FROM tab1, tab0 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 34348c65780193c8d601ab14b29af6e7

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1, tab2 cor2
----
3645 values hashing to 4805bcb9c04e49d1f6f82defa880d751

query I rowsort
SELECT 0 + 44 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ( 39 ) FROM tab1
----
39
39
39

query I rowsort
SELECT ALL + tab2.col0 + 50 AS col0 FROM tab2
----
128
129
57

query I rowsort
SELECT DISTINCT - + col2 - 40 * + col1 FROM tab2 AS cor0
----
-1267
-2386
-718

query I rowsort
SELECT ALL ( 90 ) * col2 FROM tab0 AS cor0
----
2970
7380
90

query I rowsort
SELECT DISTINCT - col0 * col2 + + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - - ( col2 ) - + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 19 + - 31 AS col0 FROM tab1 AS cor0
----
-50

query I rowsort
SELECT + + col1 - col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - ( - col1 ) + + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - 12 AS col1 FROM tab2
----
-12
-12
-12

query I rowsort
SELECT - ( col0 ) * col0 + 36 AS col0 FROM tab1 AS cor0
----
-4060
-6364
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-7401
SELECT DISTINCT + col2 + - col0 DIV col2 AS col0 FROM tab0 AS cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-7401
SELECT DISTINCT + col2 + - col0 / col2 AS col0 FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT ALL + cor0.col1 * col2 + col0 - cor0.col1 FROM tab2 AS cor0
----
1553
708
813

query I rowsort
SELECT - ( + 52 ) AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT col0 + + col0 + - ( col0 ) * cor0.col0 FROM tab1 AS cor0
----
-3
-3968
-6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 28 col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT DISTINCT cor0.col2 + - col0 AS col1 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL - - col2 * col1 * + ( + cor0.col1 ) - - col0 FROM tab2 AS cor0
----
11061
25954
90584

query I rowsort
SELECT + col2 * - col1 - col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT - 69 AS col2 FROM tab0 AS cor0
----
-69

query I rowsort
SELECT + col2 * + col2 + + col0 AS col0 FROM tab1 cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + + col2 * + 64 AS col2 FROM tab0 AS cor0
----
2112
5248
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + 29 col2 FROM tab1 cor0
----
16
19
3

query I rowsort
SELECT col2 + + col0 * + col0 AS col2 FROM tab0 AS cor0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-7415
SELECT ALL col1 + + 69 DIV - col0 AS col2 FROM tab2 AS cor0
----
17
22
59

skipif mysql # not compatible
query I rowsort label-7415
SELECT ALL col1 + + 69 / - col0 AS col2 FROM tab2 AS cor0
----
17
22
59

query I rowsort
SELECT 52 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 7b4a664e9c62b46b517569587d5a621d

query I rowsort
SELECT - - 44 + 23 AS col0 FROM tab0 AS cor0
----
67
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7418
SELECT col2 + 36 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7418
SELECT col2 + 36 / cor0.col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ( - ( cor0.col0 ) ) * - col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - cor0.col2 + - cor0.col2 * - col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT 59 AS col2 FROM tab1, tab0 AS cor0
----
59

query I rowsort
SELECT - col1 * 31 FROM tab0 AS cor0
----
-2666
-2821
-3007

query I rowsort
SELECT ALL - ( - 19 ) + - col0 FROM tab0
----
-16
-5
-70

query I rowsort
SELECT + col0 + cor0.col0 - + col2 FROM tab1 AS cor0
----
-48
64
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7425
SELECT col0 * - col0 + col0 * col0 + col1 DIV ( - col2 ) FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-7425
SELECT col0 * - col0 + col0 * col0 + col1 / ( - col2 ) FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT ALL - 13 * col0 AS col1 FROM tab0 cor0
----
-1157
-312
-455

onlyif mysql # use DIV operator for integer division
query I rowsort label-7427
SELECT + tab0.col0 DIV - cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 70ab52182b1b5b0acda51ef06e5b4373

skipif mysql # not compatible
query I rowsort label-7427
SELECT + tab0.col0 / - cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 70ab52182b1b5b0acda51ef06e5b4373

query I rowsort
SELECT col1 * 46 - tab0.col0 FROM tab0
----
3932
4097
4427

onlyif mysql # use DIV operator for integer division
query I rowsort label-7429
SELECT DISTINCT ( 39 ) DIV - col2 col0 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7429
SELECT DISTINCT ( 39 ) / - col2 col0 FROM tab1
----
0

query I rowsort
SELECT + 66 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col2 FROM tab1
----
16
16
16

query I rowsort
SELECT DISTINCT - 31 FROM tab1
----
-31

query I rowsort
SELECT DISTINCT 57 * 41 * col1 AS col2 FROM tab0
----
200982
212667
226689

query I rowsort
SELECT ALL + - col2 * + ( - col2 * col0 ) FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL 64 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT tab0.col2 + ( col2 * - col0 ) FROM tab0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 63 col0 FROM tab2 AS cor0
----
1071
1953
3717

query I rowsort
SELECT DISTINCT 55 * col2 FROM tab1
----
2970
3135
5280

query I rowsort
SELECT + + col0 * 87 AS col2 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT col0 - ( 55 ) FROM tab0
----
-20
-31
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 * + ( + col2 ) col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 + - 39 * + col1 col1 FROM tab0 AS cor0
----
-3387
-3631
-3784

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7443
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7443
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL col0 * + col2 AS col1 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7445
SELECT + col1 * col2 - - 90 DIV col1 FROM tab1
----
1254
1407
579

skipif mysql # not compatible
query I rowsort label-7445
SELECT + col1 * col2 - - 90 / col1 FROM tab1
----
1254
1407
579

query I rowsort
SELECT ALL col1 * - 76 AS col0 FROM tab0
----
-6536
-6916
-7372

onlyif mysql # use DIV operator for integer division
query I rowsort label-7447
SELECT + col1 + - col0 * + 11 + - cor0.col0 DIV + col1 col1 FROM tab0 AS cor0
----
-178
-288
-888

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7447
SELECT + col1 + - col0 * + 11 + - cor0.col0 / + col1 col1 FROM tab0 AS cor0
----
-178
-288
-888

query I rowsort
SELECT DISTINCT - 77 * + col2 AS col1 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT 27 + cor0.col0 AS col0 FROM tab1 AS cor0
----
107
30
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-7450
SELECT ALL - - ( - col1 ) + - col0 DIV + ( col2 ) AS col0 FROM tab0 cor0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-7450
SELECT ALL - - ( - col1 ) + - col0 / + ( col2 ) AS col0 FROM tab0 cor0
----
-132
-86
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7451
SELECT - col2 * + cor0.col2 * CAST( NULL AS SIGNED ) + col2 * + col1 * cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7451
SELECT - col2 * + cor0.col2 * CAST ( NULL AS INTEGER ) + col2 * + col1 * cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 + col0 AS col2 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab2 AS cor0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 * + col2 * col1 col0 FROM tab0
----
139062
365638
4753

query I rowsort
SELECT - col1 * + col2 AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + col1 + col1 + + col1 AS col0 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT col2 * + cor0.col2 + - 36 AS col1 FROM tab2 AS cor0
----
1408
640
693

query I rowsort
SELECT DISTINCT col0 + col0 * 84 FROM tab2
----
595
6630
6715

query I rowsort
SELECT - tab2.col1 * col2 AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - col2 + + col0 * 22 FROM tab2
----
127
1690
1700

query I rowsort
SELECT - 67 * + col1 AS col0 FROM tab0
----
-5762
-6097
-6499

query I rowsort
SELECT ALL + col1 * col0 + col0 * col1 FROM tab0 cor0
----
16198
4128
6790

query I rowsort
SELECT DISTINCT - 85 + col0 FROM tab0
----
-50
-61
4

query I rowsort
SELECT 20 * - col1 FROM tab1
----
-200
-260
-520

query I rowsort
SELECT DISTINCT + 52 + + tab0.col2 FROM tab0
----
134
53
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7466
SELECT DISTINCT + + cor0.col0 DIV - 73 + - col2 + + col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7466
SELECT DISTINCT + + cor0.col0 / - 73 + - col2 + + col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL + col0 * - 89 FROM tab1 cor0
----
-267
-5696
-7120

query I rowsort
SELECT ALL col2 * + col1 + 31 FROM tab2 AS cor0
----
1565
677
868

query I rowsort
SELECT cor0.col2 * cor0.col2 + cor0.col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT cor0.col1 + col0 * col0 * col2 + col1 * col2 AS col0 FROM tab1 AS cor0
----
1916
234052
615661

query I rowsort
SELECT - col2 * - 90 + cor0.col0 FROM tab1 AS cor0
----
4863
5194
8720

query I rowsort
SELECT col0 * ( col0 ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - col0 + col0 * + col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT col1 + 20 * - col0 AS col0 FROM tab1 AS cor0
----
-1270
-1587
-34

query I rowsort
SELECT + col2 * + 27 + + col1 AS col2 FROM tab2 AS cor0
----
1043
760
761

onlyif mysql # use DIV operator for integer division
query I rowsort label-7476
SELECT DISTINCT col0 * col0 DIV col2 FROM tab0 AS cor0
----
1225
17
96

skipif mysql # not compatible
query I rowsort label-7476
SELECT DISTINCT col0 * col0 / col2 FROM tab0 AS cor0
----
1225
17
96

query I rowsort
SELECT ALL - - cor0.col1 + + col1 + + col1 * + col0 AS col0 FROM tab2 AS cor0
----
1377
279
4720

query I rowsort
SELECT - col1 * + 32 AS col0 FROM tab1 AS cor0
----
-320
-416
-832

query I rowsort
SELECT ALL - col0 * - 58 + col0 * cor0.col1 FROM tab1 AS cor0
----
252
4352
5680

query I rowsort
SELECT ALL + + col1 * + 60 + - col1 AS col2 FROM tab1 AS cor0
----
1534
590
767

query I rowsort
SELECT ALL 66 FROM tab2, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT ALL - - col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7483
SELECT + CAST( - col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7483
SELECT + CAST ( - col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7484
SELECT ALL + + col2 DIV 25 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-7484
SELECT ALL + + col2 / 25 col2 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7485
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + col2 * col0 * 28 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7485
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + col2 * col0 * 28 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 - - 99 AS col0 FROM tab0 AS cor0
----
123
134
188

query I rowsort
SELECT - + 74 FROM tab1 AS cor0
----
-74
-74
-74

query I rowsort
SELECT ALL - col0 * col2 - cor0.col0 AS col1 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT + ( + 25 ) * col0 * 13 AS col2 FROM tab0 AS cor0
----
11375
28925
7800

query I rowsort
SELECT ALL + + cor0.col2 + col0 * col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + col2 * - col2 * + col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT + col0 + + 6 + col1 AS col0 FROM tab0 cor0
----
116
138
186

onlyif mysql # use DIV operator for integer division
query I rowsort label-7493
SELECT DISTINCT - col0 DIV - col1 + 7 * - cor0.col2 FROM tab1 AS cor0
----
-378
-393
-666

skipif mysql # not compatible
query I rowsort label-7493
SELECT DISTINCT - col0 / - col1 + 7 * - cor0.col2 FROM tab1 AS cor0
----
-378
-393
-666

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ( col2 ) - + col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - + col0 - col2 * + 68 FROM tab1 AS cor0
----
-3675
-3940
-6608

query I rowsort
SELECT + col2 + - col1 * 52 FROM tab2 AS cor0
----
-1585
-3042
-846

query I rowsort
SELECT col2 * col0 - col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT - + 16 + col0 * + 55 + 10 FROM tab0 AS cor0
----
1314
1919
4889

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col2 + + col2 - - col1 FROM tab0 AS cor0
----
-2719
-7289
1

query I rowsort
SELECT - - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col1 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - ( 84 ) + + col2 AS col0 FROM tab0 AS cor0
----
-2
-51
-83

query I rowsort
SELECT + + col0 * + col2 * - col1 AS col0 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT col1 * col2 + - col0 + ( 14 ) AS col0 FROM tab2 cor0
----
1470
581
844

query I rowsort
SELECT - ( col0 ) + col2 * col1 * 58 AS col2 FROM tab0 AS cor0
----
164580
432707
5591

onlyif mysql # use DIV operator for integer division
query I rowsort label-7507
SELECT CAST( + ( - col1 ) AS SIGNED ) DIV - 4 AS col1 FROM tab0 AS cor0
----
21
22
24

skipif mysql # not compatible
query I rowsort label-7507
SELECT CAST ( + ( - col1 ) AS INTEGER ) / - 4 AS col1 FROM tab0 AS cor0
----
21
22
24

query I rowsort
SELECT col2 * col0 * col0 AS col1 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT 23 * col2 FROM tab0 AS cor0
----
1886
23
759

query I rowsort
SELECT + 6 - - 79 * - col2 AS col0 FROM tab0 AS cor0
----
-2601
-6472
-73

query I rowsort
SELECT ALL + col0 * col1 + - col0 AS col1 FROM tab2
----
1264
210
4524

query I rowsort
SELECT - - col2 + ( col1 ) * ( 18 ) AS col0 FROM tab2 cor0
----
1088
344
585

query I rowsort
SELECT ALL + col2 + ( tab0.col0 * col0 ) + col2 AS col1 FROM tab0
----
1227
642
8085

onlyif mysql # use DIV operator for integer division
query I rowsort label-7514
SELECT ALL col1 * - col1 + col1 DIV col0 AS col2 FROM tab2
----
-289
-3481
-957

skipif mysql # not compatible
query I rowsort label-7514
SELECT ALL col1 * - col1 + col1 / col0 AS col2 FROM tab2
----
-289
-3481
-957

query I rowsort
SELECT ALL - col1 * 33 FROM tab2
----
-1023
-1947
-561

query I rowsort
SELECT DISTINCT ( + col2 ) * col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 86 * col0 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT - 7 + + col2 + col0 FROM tab0 AS cor0
----
164
29
50

query I rowsort
SELECT ALL 40 * - col0 AS col0 FROM tab2 AS cor0
----
-280
-3120
-3160

query I rowsort
SELECT DISTINCT ( - col0 ) * - col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7521
SELECT DISTINCT + + 18 + + col0 DIV - col0 FROM tab0 AS cor0
----
17

skipif mysql # not compatible
query I rowsort label-7521
SELECT DISTINCT + + 18 + + col0 / - col0 FROM tab0 AS cor0
----
17

query I rowsort
SELECT + 25 * col2 FROM tab2 AS cor0
----
650
675
950

query I rowsort
SELECT DISTINCT + + 0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
0

query I rowsort
SELECT + ( - tab1.col2 ) + + tab1.col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - 89 AS col0 FROM tab2
----
-89
-89
-89

query I rowsort
SELECT ALL + tab1.col0 * + 37 FROM tab1, tab1 cor0
----
9 values hashing to ee43450a85e4c5537da3c485e3261ec5

query I rowsort
SELECT ALL - col0 + + 0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - cor0.col2 * 87 * - cor0.col1 FROM tab2 AS cor0
----
133458
56202
72819

query I rowsort
SELECT ALL - 35 FROM tab0, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT + col0 + - 14 FROM tab2 AS cor0
----
-7
64
65

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0 cor1, tab0 cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT ALL - col2 + - 56 * + col2 AS col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

query I rowsort
SELECT ALL + 97 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT ( + col1 ) + + col0 + + col2 AS col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT + 58 + - 22 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT col2 - - 50 AS col2 FROM tab1 AS cor0
----
104
107
146

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2, tab1, tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7538
SELECT ALL - CAST( NULL AS SIGNED ) * tab2.col1 - col2 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7538
SELECT ALL - CAST ( NULL AS INTEGER ) * tab2.col1 - col2 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 - + col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT - 17 * col2 + - col0 FROM tab0 cor0
----
-1483
-52
-585

query I rowsort
SELECT - 5 * col1 - cor0.col1 FROM tab1 AS cor0
----
-156
-60
-78

query I rowsort
SELECT - + cor0.col0 - col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL - - col2 * + 98 FROM tab2 AS cor0
----
2548
2646
3724

query I rowsort
SELECT DISTINCT + col1 - 23 FROM tab1 AS cor0
----
-10
-13
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7545
SELECT - CAST( col2 AS SIGNED ) * col2 + col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif mysql # not compatible
query I rowsort label-7545
SELECT - CAST ( col2 AS INTEGER ) * col2 + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT + + col0 * col1 * + col0 AS col2 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT - + 39 + - col1 FROM tab0 AS cor0
----
-125
-130
-136

query I rowsort
SELECT - col1 + + col0 * 70 AS col0 FROM tab0 AS cor0
----
1594
2353
6139

query I rowsort
SELECT ALL + + col1 * col0 + - col1 AS col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL + cor0.col2 * - ( col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT cor0.col0 * - col0 + col1 FROM tab1 cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT - col1 * + tab2.col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT col1 * + col1 + - col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL 89 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT ALL 55 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT ALL - col0 * col2 + + col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT - tab0.col0 + + col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT - tab1.col2 + col1 * col0 FROM tab1
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col1 + - col2 col1 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT + - col2 * col0 + col0 * col2 - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7561
SELECT ALL - - col1 DIV - col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
3
78
79

skipif mysql # not compatible
query I rowsort label-7561
SELECT ALL - - col1 / - col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
3
78
79

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 - - col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT col0 * + col0 + col2 AS col0 FROM tab2 AS cor0
----
6110
6279
76

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE col0 - col0 NOT IN ( col2 + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - col1 + col1 * - col0 * cor0.col0 col0 FROM tab0 cor0
----
-118922
-52374
-728273

query I rowsort
SELECT col0 * + col0 + col1 AS col1 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7567
SELECT DISTINCT col2 + col2 DIV col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7567
SELECT DISTINCT col2 + col2 / col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT ALL col2 * - cor0.col0 * + cor0.col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - tab2.col1 col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - tab1.col1 + col0 * col1 * col2 FROM tab1
----
36470
4186
99827

onlyif mysql # use DIV operator for integer division
query I rowsort label-7571
SELECT DISTINCT - col0 DIV - col0 + col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
30
75
94

skipif mysql # not compatible
query I rowsort label-7571
SELECT DISTINCT - col0 / - col0 + col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
30
75
94

query I rowsort
SELECT ALL + tab2.col2 + tab2.col1 * tab2.col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT - - cor0.col2 + col0 * cor0.col2 FROM tab0 AS cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 + cor0.col2 - - col2 col2 FROM tab2 AS cor0
----
2080
243
3078

query I rowsort
SELECT DISTINCT col1 * col2 + - col1 AS col1 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + col2 * - col1 - - col2 * col0 AS col2 FROM tab2 AS cor0
----
-648
2356
494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + col2 * + col2 col0 FROM tab0 AS cor0
----
-34
1065
6635

onlyif mysql # use DIV operator for integer division
query I rowsort label-7578
SELECT DISTINCT + col0 DIV - col2 + col1 AS col1 FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-7578
SELECT DISTINCT + col0 / - col2 + col1 AS col1 FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT ALL + col1 * + col0 - col0 * col2 AS col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT ALL col1 + - col1 - + col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + + col1 * - col1 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT col1 * col2 - + col1 * - col0 AS col2 FROM tab0 AS cor0
----
15561
3492
4902

query I rowsort
SELECT ALL - col0 * - col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT cor0.col0 + - col1 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - col1 * + col0 - col0 * col0 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT - col0 - cor0.col1 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7587
SELECT DISTINCT + + col0 + + col0 DIV - col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-7587
SELECT DISTINCT + + col0 + + col0 / - col1 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT cor0.col0 + + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-7589
SELECT DISTINCT col1 - tab1.col2 DIV col2 AS col1 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-7589
SELECT DISTINCT col1 - tab1.col2 / col2 AS col1 FROM tab1
----
12
25
9

query I rowsort
SELECT + col1 + col2 + col0 AS col2 FROM tab1
----
131
189
83

query I rowsort
SELECT ALL col1 * col2 - + tab1.col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL col0 * col1 - col1 * + col2 FROM tab1
----
-1326
-208
70

query I rowsort
SELECT DISTINCT - col0 - - col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT - tab1.col0 * - col1 - - col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT - col0 * + col0 - col2 * + col2 FROM tab1
----
-15616
-2925
-7345

query I rowsort
SELECT DISTINCT col0 - col0 AS col2 FROM tab1
----
0

query I rowsort
SELECT ALL col2 * col0 - - col2 * tab0.col1 FROM tab0
----
132
14760
3630

query I rowsort
SELECT DISTINCT col2 * - col0 + col2 * - ( - col0 ) FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 + - 23 col0 FROM tab2 AS cor0
----
-1557
-669
-860

query I rowsort
SELECT DISTINCT - - 63 AS col2 FROM tab1 AS cor0
----
63

query I rowsort
SELECT + 44 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT DISTINCT + 44 * + col2 * col0 FROM tab1 AS cor0
----
160512
337920
7128

query I rowsort
SELECT - col1 + col1 - - 94 FROM tab1 AS cor0
----
94
94
94

query I rowsort
SELECT + col2 + + tab1.col0 * + col1 AS col1 FROM tab1 WHERE NOT col0 NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT tab2.col0 - - col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT - 57 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT + col2 * - col1 + ( + 91 ) FROM tab0 AS cor0
----
-2747
-6
-7371

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 WHERE NOT col0 <> ( NULL )
----

query I rowsort
SELECT ALL - tab0.col1 + + col0 AS col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT col2 * col0 - col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT 60 AS col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab0, tab0 cor2
----
3645 values hashing to 862fba9ac85fdf2cec88a0bec0808b7e

query I rowsort
SELECT DISTINCT + ( col0 ) + + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT 52 * - col0 FROM tab1
----
-156
-3328
-4160

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) NOT IN ( tab1.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7616
SELECT + col1 DIV tab0.col2 col1 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7616
SELECT + col1 / tab0.col2 col1 FROM tab0
----
1
2
97

query I rowsort
SELECT + col1 AS col1 FROM tab1 WHERE NOT ( NULL ) > - col0 + + col2
----

query I rowsort
SELECT ALL col0 * + col2 - - col1 * - col0 FROM tab1
----
3008
6640
84

query I rowsort
SELECT DISTINCT col2 + col0 * - col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - col1 + - col2 * col0 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT + col2 FROM tab0 WHERE ( NULL ) IN ( + col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - col1 NOT IN ( + col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT - col0 - - col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT + col1 + col0 * col1 AS col1 FROM tab0
----
2150
3492
8190

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) IN ( col2 )
----

query I rowsort
SELECT - tab0.col0 * col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL col0 + col1 * + col1 AS col2 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT + tab1.col0 - tab1.col2 FROM tab1
----
-16
-51
7

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col2 = NULL
----

query I rowsort
SELECT ALL - col1 + + col0 AS col0 FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col0 col2 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7633
SELECT col1 + + col2 DIV + tab1.col2 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-7633
SELECT col1 + + col2 / + tab1.col2 FROM tab1
----
11
14
27

query I rowsort
SELECT tab1.col0 * - col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col2 + tab0.col0 * + col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT col1 + + col1 * + col1 FROM tab2
----
306
3540
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-7637
SELECT DISTINCT col1 - col0 DIV - col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-7637
SELECT DISTINCT col1 - col0 / - col1 FROM tab1
----
16
19
26

query I rowsort
SELECT ALL col0 + + col0 * + col1 * + col0 FROM tab2
----
106176
1526
359034

query I rowsort
SELECT DISTINCT + col0 + col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT + 18 AS col1 FROM tab0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - tab2.col2 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + tab1.col0 * col0 * - ( col2 ) AS col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT + 50 * - col0 AS col0 FROM tab1
----
-150
-3200
-4000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col2 + - 80 FROM tab2 AS cor0
----
-42
-53
-54

query I rowsort
SELECT + col0 * ( col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + col2 + cor0.col2 * - cor0.col0 + + cor0.col2 FROM tab0 AS cor0
----
-33
-7134
-726

query I rowsort
SELECT col2 - col1 AS col0 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT + cor0.col2 + 65 AS col1 FROM tab0 AS cor0
----
147
66
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7650
SELECT - col2 * + col2 + - cor0.col1 DIV - cor0.col0 FROM tab2 AS cor0
----
-1444
-676
-725

skipif mysql # not compatible
query I rowsort label-7650
SELECT - col2 * + col2 + - cor0.col1 / - cor0.col0 FROM tab2 AS cor0
----
-1444
-676
-725

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7651
SELECT col1 / - CAST( NULL AS SIGNED ) + + 88 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7651
SELECT col1 / - CAST ( NULL AS INTEGER ) + + 88 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 + 2 AS col1 FROM tab2 AS cor0
----
19
33
61

query I rowsort
SELECT ALL + col0 + - 52 FROM tab2 AS cor0
----
-45
26
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-7654
SELECT - col0 DIV - col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7654
SELECT - col0 / - col2 FROM tab1
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7655
SELECT col1 DIV 52 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7655
SELECT col1 / 52 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 * col1 col0 FROM tab1 AS cor0
----
-180
-234
-468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7657
SELECT DISTINCT + CAST( 34 AS SIGNED ) * + col1 AS col0 FROM tab2 AS cor0
----
1054
2006
578

skipif mysql # not compatible
query I rowsort label-7657
SELECT DISTINCT + CAST ( 34 AS INTEGER ) * + col1 AS col0 FROM tab2 AS cor0
----
1054
2006
578

onlyif mysql # use DIV operator for integer division
query I rowsort label-7658
SELECT ALL - - 49 DIV col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7658
SELECT ALL - - 49 / col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - ( - col1 ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + 65 + 40 * tab1.col0 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 258c3481ddac3a241fd686312d97ceae

query I rowsort
SELECT + col2 * - 36 FROM tab2
----
-1368
-936
-972

query I rowsort
SELECT + + 6 AS col0 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT - ( tab2.col1 ) + + 55 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 115632d9cf51ab58255c70f463f3face

query I rowsort
SELECT DISTINCT 81 + + cor1.col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
105
116
170

query I rowsort
SELECT + 10 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ALL + ( 18 ) FROM tab1
----
18
18
18

query I rowsort
SELECT + ( - 31 * + col1 ) FROM tab0
----
-2666
-2821
-3007

query I rowsort
SELECT DISTINCT col2 + - cor0.col1 AS col2 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL - + col0 * col2 + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( cor0.col0 ) col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + - 58 FROM tab0 cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 79 FROM tab0 AS cor0
----
79

query I rowsort
SELECT ALL - + ( + col0 ) * + col2 + + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT col0 + col1 * + col1 FROM tab0 cor0
----
7420
8370
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-7675
SELECT - 77 DIV col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7675
SELECT - 77 / col1 FROM tab1 AS cor0
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7676
SELECT DISTINCT + cor0.col1 + col1 DIV col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-7676
SELECT DISTINCT + cor0.col1 + col1 / col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL + 84 * tab1.col2 AS col1 FROM tab1
----
4536
4788
8064

onlyif mysql # use DIV operator for integer division
query I rowsort label-7678
SELECT DISTINCT col0 DIV + col2 col2 FROM tab0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7678
SELECT DISTINCT col0 / + col2 col2 FROM tab0
----
0
1
35

query I rowsort
SELECT + 97 * + 95 * col0 AS col0 FROM tab0
----
221160
322525
820135

query I rowsort
SELECT ALL 3 * + col2 AS col1 FROM tab2
----
114
78
81

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NOT NULL <> ( NULL ) AND NOT - col0 NOT IN ( col0 + col1 ) ) AND NOT ( NULL ) IN ( col0 )
----

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 + 86 * col0 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT + 1 - col1 AS col1 FROM tab0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 * + ( tab2.col2 ) col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - col0 * - 39 AS col0 FROM tab2 cor0
----
273
3042
3081

query I rowsort
SELECT + col2 * tab1.col1 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + col0 * + tab0.col1 + col2 + + col0 FROM tab0
----
2121
3431
8270

onlyif mysql # use DIV operator for integer division
query I rowsort label-7689
SELECT + + col2 * col2 DIV - 77 + col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
-20
-8
-9

skipif mysql # not compatible
query I rowsort label-7689
SELECT + + col2 * col2 / - 77 + col2 / - col1 AS col1 FROM tab2 AS cor0
----
-20
-8
-9

query I rowsort
SELECT ( - tab2.col1 ) * tab2.col1 FROM tab2
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + 14 + col2 col0 FROM tab2 cor0
----
276
461
852

onlyif mysql # use DIV operator for integer division
query I rowsort label-7692
SELECT DISTINCT 53 + col1 + col2 DIV - col1 AS col1 FROM tab2
----
112
68
84

skipif mysql # not compatible
query I rowsort label-7692
SELECT DISTINCT 53 + col1 + col2 / - col1 AS col1 FROM tab2
----
112
68
84

query I rowsort
SELECT ALL + col2 + + col0 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT col2 * tab2.col1 * col0 + col0 FROM tab2
----
119730
51113
5866

query I rowsort
SELECT + ( - col2 ) * - col1 + + col2 * - col2 AS col1 FROM tab1 AS cor0
----
-1512
-2679
-7968

query I rowsort
SELECT ALL - ( + col0 ) + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - col2 * - 28 * tab0.col1 FROM tab0
----
208936
2716
79464

query I rowsort
SELECT DISTINCT + col0 + - tab0.col2 * 86 FROM tab0
----
-2814
-51
-6963

onlyif mysql # use DIV operator for integer division
query I rowsort label-7699
SELECT DISTINCT - col2 DIV tab0.col0 - tab0.col0 * col1 FROM tab0
----
-2065
-3395
-8099

skipif mysql # not compatible
query I rowsort label-7699
SELECT DISTINCT - col2 / tab0.col0 - tab0.col0 * col1 FROM tab0
----
-2065
-3395
-8099

query I rowsort
SELECT ALL + 38 * + 25 + + col0 FROM tab0
----
1039
974
985

query I rowsort
SELECT ALL - + 30 * - 74 FROM tab2 AS cor0
----
2220
2220
2220

query I rowsort
SELECT + col2 * - col0 * - col2 + col0 + 31 FROM tab0 AS cor0
----
101
26191
598556

query I rowsort
SELECT DISTINCT - col0 * + col0 * + col0 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT - 80 * - col0 + col2 * col1 FROM tab1
----
1644
5690
7648

onlyif mysql # use DIV operator for integer division
query I rowsort label-7706
SELECT ALL + tab2.col0 DIV - col0 + - col2 FROM tab2
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-7706
SELECT ALL + tab2.col0 / - col0 + - col2 FROM tab2
----
-27
-28
-39

query I rowsort
SELECT - col1 + col0 * tab2.col1 AS col1 FROM tab2
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-7708
SELECT + 7 DIV + col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7708
SELECT + 7 / + col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 33 * - col2 + col0 FROM tab2 AS cor0
----
-1175
-780
-884

query I rowsort
SELECT col0 * col1 + - col1 * col2 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT ALL - col2 * - ( - col0 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col0 * - 17 + - col0 AS col0 FROM tab0 AS cor0
----
1424
384
560

query I rowsort
SELECT 85 * + col1 + + col1 AS col0 FROM tab0 AS cor0
----
7396
7826
8342

onlyif mysql # use DIV operator for integer division
query I rowsort label-7714
SELECT ALL + + col0 DIV + col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7714
SELECT ALL + + col0 / + col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - cor1.col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7716
SELECT + CAST( NULL AS SIGNED ) / + col2 - col0 * col0 / - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7716
SELECT + CAST ( NULL AS INTEGER ) / + col2 - col0 * col0 / - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7717
SELECT col0 * - col1 + - col1 DIV - col0 AS col1 FROM tab1
----
-1040
-640
-70

skipif mysql # not compatible
query I rowsort label-7717
SELECT col0 * - col1 + - col1 / - col0 AS col1 FROM tab1
----
-1040
-640
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7718
SELECT + col2 * - col2 + + col1 DIV col0 col2 FROM tab1
----
-2908
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7718
SELECT + col2 * - col2 + + col1 / col0 col2 FROM tab1
----
-2908
-3249
-9216

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 * + 51 * col1 AS col1 FROM tab1 AS cor0
----
-29006
-63568
-71601

onlyif mysql # use DIV operator for integer division
query I rowsort label-7720
SELECT DISTINCT + - cor0.col1 DIV - col1 + ( - col2 ) DIV + col0 FROM tab2 cor0
----
-2
1

skipif mysql # not compatible
query I rowsort label-7720
SELECT DISTINCT + - cor0.col1 / - col1 + ( - col2 ) / + col0 FROM tab2 cor0
----
-2
1

query I rowsort
SELECT - col0 + + col1 * - 65 AS col2 FROM tab2 cor0
----
-1184
-2022
-3913

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 972d282d6d92f451c90dc8ca51a18f3e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7723
SELECT DISTINCT + cor0.col2 - + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7723
SELECT DISTINCT + cor0.col2 - + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 - - col0 * col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL + col2 + + col2 + + col1 AS col0 FROM tab1 AS cor0
----
124
134
205

query I rowsort
SELECT ALL + + col1 + + 94 * + ( + col2 ) * col2 AS col0 FROM tab1 AS cor0
----
274130
305416
866317

query I rowsort
SELECT DISTINCT + - col1 * + col1 + - ( col2 ) FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT DISTINCT - - col1 * ( col1 ) AS col0 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL col0 + + 6 * + col1 FROM tab1 AS cor0
----
124
158
159

query I rowsort
SELECT ALL - col1 * col0 + - col1 AS col0 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7732
SELECT DISTINCT - - col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7732
SELECT DISTINCT - - col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 * - col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT DISTINCT 12 FROM tab0, tab0 AS cor0
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-7735
SELECT DISTINCT + col0 DIV + col1 + + 28 AS col0 FROM tab0 AS cor0
----
28

skipif mysql # not compatible
query I rowsort label-7735
SELECT DISTINCT + col0 / + col1 + + 28 AS col0 FROM tab0 AS cor0
----
28

query I rowsort
SELECT + 81 AS col0 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col2 * 83 col0 FROM tab0 AS cor0
----
-180
-2825
-6897

onlyif mysql # use DIV operator for integer division
query I rowsort label-7738
SELECT ALL + col0 DIV ( 94 ) AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7738
SELECT ALL + col0 / ( 94 ) AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col1 * - 48 * ( - col2 ) + + 76 AS col1 FROM tab1 AS cor0
----
-27284
-59828
-67316

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7740
SELECT ALL + - col1 + CAST( 23 AS SIGNED ) * + col2 col2 FROM tab0 AS cor0
----
-74
1795
673

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7740
SELECT ALL + - col1 + CAST ( 23 AS INTEGER ) * + col2 col2 FROM tab0 AS cor0
----
-74
1795
673

query I rowsort
SELECT - tab0.col0 * col2 - col1 FROM tab0
----
-132
-7389
-878

query I rowsort
SELECT + + 55 * + col0 + - cor0.col1 FROM tab1 cor0
----
139
3510
4387

query I rowsort
SELECT col2 - 78 FROM tab1 AS cor0
----
-21
-24
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-7744
SELECT DISTINCT 22 * + col1 - cor0.col1 DIV - 51 AS col2 FROM tab2 AS cor0
----
1299
374
682

skipif mysql # not compatible
query I rowsort label-7744
SELECT DISTINCT 22 * + col1 - cor0.col1 / - 51 AS col2 FROM tab2 AS cor0
----
1299
374
682

query I rowsort
SELECT + + 76 + - 75 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - + 12 AS col2 FROM tab0 AS cor0
----
-12
-12
-12

query I rowsort
SELECT ALL + col0 + - col2 * col2 + col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
131
1773
827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 col0 FROM tab0 AS cor0
----
29

query I rowsort
SELECT DISTINCT + - 13 * + col0 AS col2 FROM tab0 AS cor0
----
-1157
-312
-455

query I rowsort
SELECT ALL + 32 AS col2 FROM tab0 cor0
----
32
32
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-7751
SELECT 3 + - col0 DIV col2 AS col0 FROM tab0 AS cor0
----
-32
2
3

skipif mysql # not compatible
query I rowsort label-7751
SELECT 3 + - col0 / col2 AS col0 FROM tab0 AS cor0
----
-32
2
3

query I rowsort
SELECT - + col2 + - cor0.col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL 71 * - col1 AS col2 FROM tab1 AS cor0
----
-1846
-710
-923

query I rowsort
SELECT col1 + - col2 + + col0 * + col0 AS col2 FROM tab0 cor0
----
1321
629
7930

query I rowsort
SELECT DISTINCT - col0 + + col1 * + col1 FROM tab2 cor0
----
210
3403
954

query I rowsort
SELECT DISTINCT + ( - col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + - 81 AS col2 FROM tab0 AS cor0
----
-81

query I rowsort
SELECT + + cor0.col2 + + col0 + cor0.col0 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT + + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col2 * tab0.col2 * col1 + ( ( col0 ) ) FROM tab0
----
132
611973
93678

query I rowsort
SELECT 2 * + col1 + + col2 + ( - 25 + tab1.col2 ) AS col1 FROM tab1
----
109
135
193

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 9 + + col0 col2 FROM tab0
----
33
44
98

query I rowsort
SELECT + col0 * - col0 + + col2 * - 76 AS col0 FROM tab1
----
-13696
-4113
-8428

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col0 FROM tab2 cor0
----
-86
-86
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-7766
SELECT DISTINCT col1 + col1 DIV + col0 FROM tab1
----
10
13
34

skipif mysql # not compatible
query I rowsort label-7766
SELECT DISTINCT col1 + col1 / + col0 FROM tab1
----
10
13
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-7767
SELECT + col0 DIV + cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7767
SELECT + col0 / + cor0.col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7768
SELECT - col1 * + col1 + + 80 DIV cor0.col1 + col2 FROM tab1 cor0
----
-35
-619
-67

skipif mysql # not compatible
query I rowsort label-7768
SELECT - col1 * + col1 + + 80 / cor0.col1 + col2 FROM tab1 cor0
----
-35
-619
-67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7769
SELECT DISTINCT cor0.col1 * col0 DIV col1 AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7769
SELECT DISTINCT cor0.col1 * col0 / col1 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT 39 * tab1.col0 * 38 FROM tab1
----
118560
4446
94848

query I rowsort
SELECT ALL 12 * + col0 * + col0 AS col0 FROM tab2
----
588
73008
74892

query I rowsort
SELECT ALL - 71 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

onlyif mysql # use DIV operator for integer division
query I rowsort label-7774
SELECT - + col1 * col1 DIV + 7 FROM tab2 cor0
----
-137
-41
-497

skipif mysql # not compatible
query I rowsort label-7774
SELECT - + col1 * col1 / + 7 FROM tab2 cor0
----
-137
-41
-497

query I rowsort
SELECT ALL 13 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT + - 68 AS col1 FROM tab2 AS cor0
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col2 FROM tab0 AS cor0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 76 * + col1 col0 FROM tab0 AS cor0
----
6536
6916
7372

query I rowsort
SELECT DISTINCT + + col0 + col1 * - col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL col2 + + ( cor0.col1 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + col2 * ( col1 + col2 * col2 ) FROM tab0 AS cor0
----
38775
558830
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7782
SELECT col1 * - CAST( - col0 AS SIGNED ) FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-7782
SELECT col1 * - CAST ( - col0 AS INTEGER ) FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + + col2 * + col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + col1 * - 38 FROM tab0 AS cor0
----
-3268
-3458
-3686

query I rowsort
SELECT - - col2 + 24 AS col1 FROM tab0 AS cor0
----
106
25
57

query I rowsort
SELECT DISTINCT - cor0.col0 - col1 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - col2 * ( - cor0.col1 ) + cor0.col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7788
SELECT - + CAST( NULL AS SIGNED ) + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7788
SELECT - + CAST ( NULL AS INTEGER ) + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7789
SELECT - CAST( NULL AS SIGNED ) * col1 + + col1 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7789
SELECT - CAST ( NULL AS INTEGER ) * col1 + + col1 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor1.col0 - - cor1.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a948cb9564f9df3b844d27e9beda0cba

query I rowsort
SELECT ALL 73 AS col1 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7792
SELECT - ( col1 ) + col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7792
SELECT - ( col1 ) + col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 + ( - col1 ) col2 FROM tab2 AS cor0
----
-4
24
38

query I rowsort
SELECT ALL 64 * 24 * - col0 FROM tab1 AS cor0
----
-122880
-4608
-98304

query I rowsort
SELECT - col2 + 70 * + col0 AS col2 FROM tab0 AS cor0
----
1647
2449
6148

onlyif mysql # use DIV operator for integer division
query I rowsort label-7796
SELECT ALL ( col2 ) + - col2 DIV - col1 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-7796
SELECT ALL ( col2 ) + - col2 / - col1 FROM tab2 AS cor0
----
26
27
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 6 col2 FROM tab0
----
516
546
582

onlyif mysql # use DIV operator for integer division
query I rowsort label-7798
SELECT ALL 60 DIV + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7798
SELECT ALL 60 / + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 17 * 24 + + col0 AS col0 FROM tab0 AS cor0
----
432
443
497

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7800
SELECT ALL - CAST( + 59 AS SIGNED ) col1 FROM tab2 AS cor0
----
-59
-59
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7800
SELECT ALL - CAST ( + 59 AS INTEGER ) col1 FROM tab2 AS cor0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT ( col0 ) * + col0 + + col0 AS col2 FROM tab0 AS cor0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7802
SELECT + col1 + ( + col1 ) * + CAST( NULL AS SIGNED ) + - 44 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7802
SELECT + col1 + ( + col1 ) * + CAST ( NULL AS INTEGER ) + - 44 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * - ( col1 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT 25 AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
25

query I rowsort
SELECT + ( + col0 ) - col2 AS col1 FROM tab1
----
-16
-51
7

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + cor0.col1 AS col0 FROM tab1 cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-7807
SELECT DISTINCT + + cor0.col2 DIV 6 AS col2 FROM tab2 AS cor0
----
4
6

skipif mysql # not compatible
query I rowsort label-7807
SELECT DISTINCT + + cor0.col2 / 6 AS col2 FROM tab2 AS cor0
----
4
6

query I rowsort
SELECT col1 * - col1 * + 78 - - cor0.col0 FROM tab0 AS cor0
----
-576864
-645829
-733867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * ( col2 ) col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + - cor0.col1 * + 43 AS col0 FROM tab2 AS cor0
----
-1333
-2537
-731

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col1 * col1 col0 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT 75 * + col0 AS col1 FROM tab2
----
525
5850
5925

query I rowsort
SELECT ALL - ( - tab2.col0 ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT + 72 FROM tab0, tab2 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 col1 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT ALL 99 FROM tab2, tab0 cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT + 12 * - cor1.col0 + 70 * tab1.col0 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
9 values hashing to 64995cbd0d63d955d4c230414411267d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7818
SELECT - col0 + 80 DIV col0 FROM tab0 AS cor0
----
-21
-33
-89

skipif mysql # not compatible
query I rowsort label-7818
SELECT - col0 + 80 / col0 FROM tab0 AS cor0
----
-21
-33
-89

query I rowsort
SELECT ALL + col0 + + 73 * tab0.col2 - + col2 * col2 AS col1 FROM tab0
----
-649
107
1344

query I rowsort
SELECT col2 * - col2 * col2 - + tab0.col0 FROM tab0
----
-35961
-36
-551457

query I rowsort
SELECT + col2 + + col2 * + 56 FROM tab1 AS cor0
----
3078
3249
5472

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 * + 95 FROM tab1 AS cor0
----
389120
608000
855

query I rowsort
SELECT - col2 + + cor0.col1 * 97 * col2 FROM tab2 AS cor0
----
148772
62624
81162

query I rowsort
SELECT ALL - + col1 * col2 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT 27 * col1 AS col1 FROM tab1 AS cor0
----
270
351
702

query I rowsort
SELECT ALL - + col0 * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + 36 * col0 AS col1 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT ALL 77 * + col0 * + col0 FROM tab2 AS cor0
----
3773
468468
480557

query I rowsort
SELECT ALL + cor0.col2 * - col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT + - col1 + col0 * + 17 FROM tab1 AS cor0
----
1078
1347
25

query I rowsort
SELECT 71 AS col2 FROM tab2, tab1, tab1 cor0
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - col2 col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT 94 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT ALL 79 * col0 - ( col2 ) * + col1 FROM tab0
----
-431
-942
2668

query I rowsort
SELECT + + col2 - ( - col0 ) * col1 FROM tab2 AS cor0
----
1381
244
4628

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 DISTINCT + + 2 AS col2 FROM tab0 AS cor0
----
2

query I rowsort
SELECT DISTINCT + - 72 * + 78 FROM tab0 AS cor0
----
-5616

query I rowsort
SELECT + cor0.col1 + ( col2 ) AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT col1 * + 67 * + col1 + - col0 * 74 FROM tab1
----
1964
45070
5403

query I rowsort
SELECT - col1 + + col2 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT col0 * ( + col0 ) + + col2 AS col1 FROM tab1
----
4153
63
6496

query I rowsort
SELECT DISTINCT + 18 FROM tab2, tab0 AS cor0
----
18

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
24
35
89

query I rowsort
SELECT 58 AS col0 FROM tab2
----
58
58
58

query I rowsort
SELECT - 21 AS col1 FROM tab0
----
-21
-21
-21

query I rowsort
SELECT 92 + tab1.col0 * col2 FROM tab1
----
254
3740
7772

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 50 AS REAL ) + - cor0.col0 * ( + col0 ) AS col0 FROM tab1 AS cor0
----
-4146
-59
-6450

query I rowsort
SELECT - col1 + - 7 * + col2 FROM tab1 AS cor0
----
-404
-409
-685

query I rowsort
SELECT ALL - + ( - col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7851
SELECT ALL - CAST( + col0 AS SIGNED ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7851
SELECT ALL - CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - 90 AS col0 FROM tab0, tab1 AS cor0, tab0 cor1, tab0 AS cor2
----
81 values hashing to 7414b682e5ab5dac55bc20746601d17a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 * cor0.col1 + - col1 col0 FROM tab2 AS cor0
----
1736
3304
952

query I rowsort
SELECT ALL + - col1 * - col0 + - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT - 10 * - ( - col2 ) AS col2 FROM tab1 cor0
----
-540
-570
-960

query I rowsort
SELECT ALL + 10 * - col0 FROM tab2 AS cor0
----
-70
-780
-790

onlyif mysql # use DIV operator for integer division
query I rowsort label-7857
SELECT ALL tab1.col1 DIV + 51 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7857
SELECT ALL tab1.col1 / + 51 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 col0 FROM tab0 AS cor0
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 7 * col1 col2 FROM tab1 AS cor0
----
182
70
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + col2 col1 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col0 * col1 * + 10 FROM tab0
----
20640
33950
80990

query I rowsort
SELECT DISTINCT + + cor0.col0 + cor0.col1 AS col2 FROM tab2, tab0, tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - 7 AS col0 FROM tab1
----
-7
-7
-7

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + 97 * + 62 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 3513ed6b543476c6777223488ed4a761

onlyif mysql # use DIV operator for integer division
query I rowsort label-7866
SELECT - col2 DIV - col0 AS col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-7866
SELECT - col2 / - col0 AS col0 FROM tab2 AS cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7867
SELECT - col1 + - cor0.col2 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-7867
SELECT - col1 + - cor0.col2 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
-17
-28
-59

query I rowsort
SELECT 11 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT DISTINCT col0 * - ( - col1 ) * col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - - col1 * + 8 - + cor0.col0 FROM tab2 AS cor0
----
241
394
57

query I rowsort
SELECT DISTINCT + col2 * 50 + tab1.col2 FROM tab1
----
2754
2907
4896

query I rowsort
SELECT ALL - col0 + - tab2.col2 * + 46 FROM tab2
----
-1249
-1274
-1827

query I rowsort
SELECT DISTINCT col0 * + tab2.col0 AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT tab0.col1 * 4 + - col2 FROM tab0
----
282
311
387

query I rowsort
SELECT 29 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT + col0 - + cor0.col0 * col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL + col1 + col0 * 96 FROM tab2 cor0
----
703
7547
7601

onlyif mysql # use DIV operator for integer division
query I rowsort label-7878
SELECT DISTINCT cor0.col2 - col2 DIV ( + col1 ) FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-7878
SELECT DISTINCT cor0.col2 - col2 / ( + col1 ) FROM tab2 AS cor0
----
26
27
36

query I rowsort
SELECT ALL - col0 + + ( col2 + col1 ) FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT DISTINCT - col2 + - col1 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT + col2 * + col0 + col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + cor0.col1 + col2 * + 39 AS col0 FROM tab2 cor0
----
1073
1084
1499

query I rowsort
SELECT - ( 35 ) FROM tab2 AS cor0
----
-35
-35
-35

query I rowsort
SELECT - 30 * - col2 + col1 AS col0 FROM tab1 AS cor0
----
1646
1720
2893

onlyif mysql # use DIV operator for integer division
query I rowsort label-7886
SELECT + ( + col0 ) DIV + col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7886
SELECT + ( + col0 ) / + col2 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7887
SELECT DISTINCT - + col0 DIV cor0.col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7887
SELECT DISTINCT - + col0 / cor0.col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT + ( col0 ) * - col2 + ( + cor0.col2 ) * col2 AS col2 FROM tab2 AS cor0
----
-1352
-1558
540

query I rowsort
SELECT ALL col2 * + 54 * col0 + + col0 AS col1 FROM tab0 AS cor0
----
1925
394181
42792

query I rowsort
SELECT DISTINCT - - col1 + col1 * + col1 + - col0 * - ( col2 ) AS col0 FROM tab0 AS cor0
----
15670
8274
9541

query I rowsort
SELECT - + cor0.col0 + + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 55 * - 46 + cor0.col1 FROM tab0 AS cor0
----
-2433
-2439
-2444

onlyif mysql # use DIV operator for integer division
query I rowsort label-7893
SELECT - - ( col1 ) DIV + col2 + - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-7893
SELECT - - ( col1 ) / + col2 + - col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7894
SELECT ALL + CAST( NULL AS DECIMAL ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7894
SELECT ALL + CAST ( NULL AS REAL ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 * col1 * col2 col1 FROM tab0
----
244154
679133
9506

query I rowsort
SELECT DISTINCT + col0 + - 53 FROM tab1
----
-50
11
27

query I rowsort
SELECT - cor0.col0 + col2 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-29
-6136
-6282

query I rowsort
SELECT - ( + cor0.col2 ) + col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT + col2 + ( ( cor0.col0 ) ) AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT 23 * col0 * + tab0.col1 FROM tab0
----
186277
47472
78085

query I rowsort
SELECT DISTINCT + - col2 * col1 + - col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT tab1.col0 * col0 AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col1 * + 87 * - col1 + col2 AS col0 FROM tab0
----
-643419
-720365
-818582

onlyif mysql # use DIV operator for integer division
query I rowsort label-7904
SELECT + col1 DIV col1 - 98 FROM tab2
----
-97
-97
-97

skipif mysql # not compatible
query I rowsort label-7904
SELECT + col1 / col1 - 98 FROM tab2
----
-97
-97
-97

query I rowsort
SELECT DISTINCT col0 * - col2 + + col2 AS col1 FROM tab2
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-7906
SELECT ( col1 ) DIV - col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7906
SELECT ( col1 ) / - col1 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 * + col0 col0 FROM tab0 AS cor0
----
1920
2800
7120

query I rowsort
SELECT + + 96 FROM tab0, tab1, tab2 cor0
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT 87 * 20 AS col1 FROM tab0
----
1740
1740
1740

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7910
SELECT DISTINCT CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7910
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - + 8 + + col1 AS col2 FROM tab1 AS cor0
----
18
2
5

query I rowsort
SELECT + 59 * - tab0.col2 * + 35 AS col2 FROM tab0
----
-169330
-2065
-68145

query I rowsort
SELECT + 24 + - col1 FROM tab0 AS cor0
----
-62
-67
-73

query I rowsort
SELECT col2 + col0 * col2 + ( col1 ) AS col1 FROM tab1 AS cor0
----
242
3715
7789

onlyif mysql # use DIV operator for integer division
query I rowsort label-7915
SELECT + col0 DIV col2 col2 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7915
SELECT + col0 / col2 col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - 40 * - col1 - col0 * col2 FROM tab0 AS cor0
----
-3658
2648
3845

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - + cor0.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT + - col2 - + col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - col2 - tab2.col1 AS col0 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL + 50 + - col1 + + col2 AS col1 FROM tab0
----
-3
-46
41

query I rowsort
SELECT + ( + 13 ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT ALL + col2 * - col2 * col2 + - col0 FROM tab1 AS cor0
----
-157467
-185257
-884816

query I rowsort
SELECT cor0.col2 + ( col2 ) FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT col1 - col2 AS col0 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 18 col2 FROM tab2 cor0
----
-1062
-306
-558

query I rowsort
SELECT DISTINCT - - cor0.col1 + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT col0 + col0 * cor0.col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + cor0.col0 * - col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-7930
SELECT + col2 + 80 * cor0.col0 + col2 DIV + col0 AS col0 FROM tab1 AS cor0
----
312
5177
6497

skipif mysql # not compatible
query I rowsort label-7930
SELECT + col2 + 80 * cor0.col0 + col2 / + col0 AS col0 FROM tab1 AS cor0
----
312
5177
6497

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-7932
SELECT ALL - cor0.col0 DIV 84 AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7932
SELECT ALL - cor0.col0 / 84 AS col2 FROM tab2 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7933
SELECT - + col2 * CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-7933
SELECT - + col2 * CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - col1 + col1 * - col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT - - ( - 26 ) * - cor0.col0 FROM tab2 AS cor0
----
182
2028
2054

query I rowsort
SELECT + 53 + - col2 * + col2 FROM tab0 AS cor0
----
-1036
-6671
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7937
SELECT ALL col2 + cor0.col2 * + col1 * + CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-3394
-664036
-68079

skipif mysql # not compatible
query I rowsort label-7937
SELECT ALL col2 + cor0.col2 * + col1 * + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-3394
-664036
-68079

query I rowsort
SELECT DISTINCT + ( 11 ) * - col2 - col1 AS col1 FROM tab2 cor0
----
-328
-345
-435

query I rowsort
SELECT + col2 + + 7 FROM tab0 AS cor0
----
40
8
89

query I rowsort
SELECT ALL - + col0 * - col2 + + col0 * + ( - 34 ) * + col2 AS col2 FROM tab2 AS cor0
----
-6237
-66924
-99066

query I rowsort
SELECT ALL col2 + 90 * col2 FROM tab0 AS cor0
----
3003
7462
91

query I rowsort
SELECT DISTINCT - - 66 + col0 FROM tab0 AS cor0
----
101
155
90

query I rowsort
SELECT DISTINCT + + ( 15 ) - - cor0.col0 AS col0 FROM tab1 cor0
----
18
79
95

query I rowsort
SELECT - - 52 AS col0 FROM tab0 cor0
----
52
52
52

query I rowsort
SELECT - + col0 * - 37 FROM tab2 AS cor0
----
259
2886
2923

query I rowsort
SELECT ALL - col1 + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL - + col1 - + col0 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col2 * col2 * - col1 FROM tab0 cor0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT - ( col2 ) + + col2 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT + + cor0.col1 + col0 * col2 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
3645 values hashing to 677ef6b86493a7e48d2f6a3cfd7eea4c

query I rowsort
SELECT col1 * ( cor0.col2 ) + + cor0.col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col1 * + col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col2 + ( cor0.col1 ) + col2 AS col1 FROM tab1 AS cor0
----
124
134
205

query I rowsort
SELECT DISTINCT - col0 * + 57 AS col0 FROM tab1 AS cor0
----
-171
-3648
-4560

query I rowsort
SELECT DISTINCT tab0.col1 * 90 FROM tab0
----
7740
8190
8730

query I rowsort
SELECT DISTINCT - col0 * col0 - + ( - col1 ) FROM tab0 AS cor0
----
-1128
-490
-7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + ( col2 ) col0 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - 38 * + col2 * col0 col2 FROM tab1 AS cor0
----
-138614
-291827
-6130

query I rowsort
SELECT ALL - col1 - + col1 * - col0 AS col0 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT - col1 + - col2 * - col2 AS col1 FROM tab1 AS cor0
----
2890
3239
9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - 4 col1 FROM tab1 AS cor0
----
-216
-228
-384

query I rowsort
SELECT ALL + + col2 + col1 * cor0.col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - cor0.col2 + ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7965
SELECT ALL + cor0.col2 + ( - col0 ) DIV - col0 AS col2 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-7965
SELECT ALL + cor0.col2 + ( - col0 ) / - col0 AS col2 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT + col0 + + col1 * col1 + col2 AS col0 FROM tab0 AS cor0
----
7453
8452
9445

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7967
SELECT DISTINCT - - col1 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7967
SELECT DISTINCT - - col1 * - CAST ( NULL AS REAL ) AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL - - ( - cor0.col2 ) * + col2 + ( col2 ) FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT ALL + ( + col1 ) + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + col2 * 60 FROM tab1 AS cor0
----
3240
3420
5760

onlyif mysql # use DIV operator for integer division
query I rowsort label-7971
SELECT DISTINCT + col2 DIV col1 - col0 * - ( + 82 ) AS col0 FROM tab2 AS cor0
----
574
6396
6480

skipif mysql # not compatible
query I rowsort label-7971
SELECT DISTINCT + col2 / col1 - col0 * - ( + 82 ) AS col0 FROM tab2 AS cor0
----
574
6396
6480

query I rowsort
SELECT ALL col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + - col1 * 36 AS col2 FROM tab2 AS cor0
----
-1116
-2124
-612

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to cc4f069e61d0cc52f433f9e8c0058808

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7975
SELECT ALL CAST( NULL AS DECIMAL ) + 58 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7975
SELECT ALL CAST ( NULL AS REAL ) + 58 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 3 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2, tab1 AS cor3
----
243 values hashing to 651d73b1d4aaebc5a692f9febc779292

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 + + 40 col1 FROM tab0 AS cor0
----
2104
3435
8139

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7978
SELECT DISTINCT + col2 / + cor0.col0 + + CAST( NULL AS SIGNED ) * + 93 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7978
SELECT DISTINCT + col2 / + cor0.col0 + + CAST ( NULL AS INTEGER ) * + 93 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + col0 - - col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + 79 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 28 * col1 AS col0 FROM tab0 AS cor0
----
-2408
-2548
-2716

onlyif mysql # use DIV operator for integer division
query I rowsort label-7983
SELECT DISTINCT + col1 DIV + tab1.col2 - + col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7983
SELECT DISTINCT + col1 / + tab1.col2 - + col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + + 61 * col1 - ( + col0 ) AS col0 FROM tab1 AS cor0
----
1583
546
713

onlyif mysql # use DIV operator for integer division
query I rowsort label-7985
SELECT ALL + 79 * col1 + - CAST( 87 AS SIGNED ) DIV col1 col1 FROM tab1
----
1021
2051
782

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7985
SELECT ALL + 79 * col1 + - CAST ( 87 AS INTEGER ) / col1 col1 FROM tab1
----
1021
2051
782

query I rowsort
SELECT DISTINCT 23 * col2 + ( - col1 * col1 ) FROM tab0
----
-6395
-6637
-9386

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT col1 + - col2 * col0 AS col1 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT - col2 * col2 + - ( - col1 ) FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT col1 * col2 * col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT ALL tab2.col1 + col2 AS col1 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT col1 * - ( col1 ) + - col0 * + col0 FROM tab0 AS cor0
----
-10634
-16202
-7972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col2 * + 13 col2 FROM tab1 AS cor0
----
16224
18252
7410

query I rowsort
SELECT - col1 * - tab0.col2 + tab0.col0 FROM tab0
----
132
2862
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7996
SELECT col2 * + CAST( NULL AS SIGNED ) + - 0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7996
SELECT col2 * + CAST ( NULL AS INTEGER ) + - 0 AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7997
SELECT DISTINCT + col1 * + CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7997
SELECT DISTINCT + col1 * + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * + ( - 51 ) col0 FROM tab0
----
1683
4182
51

query I rowsort
SELECT DISTINCT + col2 * - 19 AS col0 FROM tab2
----
-494
-513
-722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL + ( 81 ) + - cor0.col1 + - cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 60132172f8753b22649dc75b2428ea1c

query I rowsort
SELECT col1 * col2 * - col1 + - col2 FROM tab1
----
-16320
-36558
-5757

query I rowsort
SELECT + col0 * - cor0.col0 + col2 + col1 FROM tab1 AS cor0
----
-4029
-6291
71

query I rowsort
SELECT DISTINCT col2 * 88 * 44 FROM tab0
----
127776
317504
3872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 27 col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT 63 AS col0 FROM tab1
----
63
63
63

query I rowsort
SELECT ALL + ( + col1 ) FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8008
SELECT ALL 86 DIV col2 AS col0 FROM tab0
----
1
2
86

skipif mysql # not compatible
query I rowsort label-8008
SELECT ALL 86 / col2 AS col0 FROM tab0
----
1
2
86

query I rowsort
SELECT - col0 + col2 + col2 AS col0 FROM tab2
----
-26
-3
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8010
SELECT col1 + ( - col2 + - CAST( col0 AS SIGNED ) * + col0 ) FROM tab2
----
-45
-6051
-6262

skipif mysql # not compatible
query I rowsort label-8010
SELECT col1 + ( - col2 + - CAST ( col0 AS INTEGER ) * + col0 ) FROM tab2
----
-45
-6051
-6262

query I rowsort
SELECT DISTINCT - 27 FROM tab2
----
-27

onlyif mysql # use DIV operator for integer division
query I rowsort label-8012
SELECT ALL + col0 * col2 DIV col0 col0 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8012
SELECT ALL + col0 * col2 / col0 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + 6 + - col2 FROM tab0 AS cor0
----
-27
-76
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 + cor0.col1 col0 FROM tab2 AS cor0
----
21
35
63

query I rowsort
SELECT ALL + col2 * col0 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 85 col2 FROM tab0, tab1 AS cor0
----
-85

query I rowsort
SELECT ALL + col2 * - col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 * cor0.col2 * col1 col0 FROM tab0 AS cor0
----
158928
417872
5432

query I rowsort
SELECT ALL + col0 * col1 + - ( + cor0.col2 ) * + col1 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT col2 * - col1 + 71 FROM tab0 AS cor0
----
-26
-2767
-7391

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8021
SELECT ALL - - cor0.col1 * + col1 + + CAST( - col0 * + col2 + - col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-2751
1427
745

skipif mysql # not compatible
query I rowsort label-8021
SELECT ALL - - cor0.col1 * + col1 + + CAST ( - col0 * + col2 + - col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-2751
1427
745

query I rowsort
SELECT + cor0.col0 + col2 * ( - cor0.col1 * col0 ) FROM tab0 cor0
----
-3360
-664029
-68088

query I rowsort
SELECT DISTINCT + - cor0.col0 * col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + - col1 * + col2 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT cor0.col2 - - col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col1 * 99 * - col0 col1 FROM tab2 AS cor0
----
132995
21510
455624

query I rowsort
SELECT DISTINCT + col1 * col0 + - cor0.col1 AS col1 FROM tab2 cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-8028
SELECT ALL - cor0.col1 + + col1 DIV 88 FROM tab0 AS cor0
----
-86
-90
-96

skipif mysql # not compatible
query I rowsort label-8028
SELECT ALL - cor0.col1 + + col1 / 88 FROM tab0 AS cor0
----
-86
-90
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8029
SELECT + + 87 + col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8029
SELECT + + 87 + col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + col2 + + col2 AS col0 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT - col0 - col1 * + col1 FROM tab0 cor0
----
-7420
-8370
-9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-8033
SELECT - col2 + + col1 DIV + cor0.col0 FROM tab1 AS cor0
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-8033
SELECT - col2 + + col1 / + cor0.col0 FROM tab1 AS cor0
----
-46
-57
-96

query I rowsort
SELECT 33 + 32 * col2 FROM tab0 cor0
----
1089
2657
65

skipif mysql # not compatible
query I rowsort
SELECT + + 42 * - ( - col0 + + CAST ( + col0 AS REAL ) ) * col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 66 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT 41 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 0733f496a5445ffeac9d19797afe4831

query I rowsort
SELECT + col0 * + 11 - col1 AS col1 FROM tab1 AS cor0
----
694
7
867

query I rowsort
SELECT - col0 + + 14 * - col1 AS col1 FROM tab2 AS cor0
----
-317
-441
-904

query I rowsort
SELECT ( col0 ) - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + col2 * + col0 + + 95 AS col2 FROM tab2 AS cor0
----
2123
284
3097

query I rowsort
SELECT - - col1 * col2 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + - col2 + - col2 AS col1 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT 47 * 95 FROM tab2
----
4465
4465
4465

query I rowsort
SELECT 93 - tab2.col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 879001f5a226b05dbaf78a91804f84d0

query I rowsort
SELECT DISTINCT 18 FROM tab2, tab0 AS cor0
----
18

query I rowsort
SELECT + ( col2 + - col0 ) FROM tab0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8048
SELECT DISTINCT - - cor0.col0 DIV + col0 - ( + col1 ) AS col0 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-8048
SELECT DISTINCT - - cor0.col0 / + col0 - ( + col1 ) AS col0 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT - ( + 58 ) * col0 FROM tab2
----
-406
-4524
-4582

query I rowsort
SELECT ( col2 ) * + tab0.col1 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT 90 AS col2 FROM tab1
----
90

query I rowsort
SELECT + 46 AS col2 FROM tab2
----
46
46
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-8053
SELECT col0 + + col1 DIV col2 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-8053
SELECT col0 + + col1 / col2 FROM tab0 AS cor0
----
132
26
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8054
SELECT + - col1 DIV + col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-8054
SELECT + - col1 / + col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT + col2 + + cor0.col1 * + 24 * col1 FROM tab1 AS cor0
----
16278
2457
4152

query I rowsort
SELECT - + col2 * col2 + + 45 FROM tab0 AS cor0
----
-1044
-6679
44

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab1 cor0, tab2 AS cor1
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

query I rowsort
SELECT 9 * - 97 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 308dd10ee43a684a9f6c57d7216e82dd

query I rowsort
SELECT 12 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT + col1 + + 28 AS col0 FROM tab1 AS cor0
----
38
41
54

query I rowsort
SELECT ALL ( 76 ) AS col1 FROM tab2, tab0 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to a8a6c4c5005303c62d4e50b6c96b584f

query I rowsort
SELECT - - col2 + cor0.col2 * - col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT - col1 * - 56 FROM tab2
----
1736
3304
952

query I rowsort
SELECT DISTINCT + 70 FROM tab1 cor0
----
70

query I rowsort
SELECT col2 + + 47 FROM tab0 AS cor0
----
129
48
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8066
SELECT ALL 18 + cor0.col2 DIV cor0.col0 + 74 * - col0 FROM tab2 cor0
----
-497
-5754
-5828

skipif mysql # not compatible
query I rowsort label-8066
SELECT ALL 18 + cor0.col2 / cor0.col0 + 74 * - col0 FROM tab2 cor0
----
-497
-5754
-5828

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab0 AS cor0
----
31

query I rowsort
SELECT + + 76 FROM tab2 AS cor0
----
76
76
76

query I rowsort
SELECT DISTINCT - - 67 * 4 AS col1 FROM tab1 AS cor0
----
268

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8070
SELECT DISTINCT - col2 * ( col2 + + tab2.col2 * CAST( NULL AS SIGNED ) ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8070
SELECT DISTINCT - col2 * ( col2 + + tab2.col2 * CAST ( NULL AS INTEGER ) ) FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8071
SELECT DISTINCT col0 * col0 DIV col0 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8071
SELECT DISTINCT col0 * col0 / col0 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT - tab1.col0 - - col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT 93 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT 50 FROM tab1, tab1 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT col1 + + 11 AS col1 FROM tab0
----
102
108
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8076
SELECT - col1 / col1 - + col2 * - col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8076
SELECT - col1 / col1 - + col2 * - col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 53 * col2 FROM tab1
----
2862
3021
5088

query I rowsort
SELECT - col1 + 57 FROM tab1
----
31
44
47

query I rowsort
SELECT ALL - tab1.col1 - col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT ALL + + 81 * + 74 AS col2 FROM tab0 AS cor0
----
5994
5994
5994

onlyif mysql # use DIV operator for integer division
query I rowsort label-8081
SELECT ALL + col2 * col0 DIV cor0.col0 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8081
SELECT ALL + col2 * col0 / cor0.col0 FROM tab0 cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8082
SELECT - + CAST( - col0 AS SIGNED ) + col2 * + col0 - 39 AS col1 FROM tab1 AS cor0
----
126
3673
7721

skipif mysql # not compatible
query I rowsort label-8082
SELECT - + CAST ( - col0 AS INTEGER ) + col2 * + col0 - 39 AS col1 FROM tab1 AS cor0
----
126
3673
7721

query I rowsort
SELECT DISTINCT ( - col0 ) AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + + ( col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col2 - 2 * col1 AS col0 FROM tab0 AS cor0
----
-100
-139
-193

query I rowsort
SELECT col2 * + col2 * col2 - + ( - 11 + + col1 ) FROM tab0 AS cor0
----
-85
35862
551288

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - - 57 AS col1 FROM tab0 AS cor0
----
57
57
57

query I rowsort
SELECT - 59 AS col0 FROM tab2 AS cor0
----
-59
-59
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col0 + + col0 col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT + 51 FROM tab2
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - col2 ) col1 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8093
SELECT col2 + - col1 DIV col1 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-8093
SELECT col2 + - col1 / col1 AS col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL - - col0 * - 99 FROM tab2 AS cor0
----
-693
-7722
-7821

query I rowsort
SELECT ALL - col0 * - ( - 54 * - col2 ) AS col0 FROM tab0 AS cor0
----
1890
394092
42768

query I rowsort
SELECT DISTINCT - col2 + + ( + 71 ) + col2 FROM tab0 AS cor0
----
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-8097
SELECT col1 + + ( ( col0 ) * - col2 ) + ( - col1 ) DIV 34 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-8097
SELECT col1 + + ( ( col0 ) * - col2 ) + ( - col1 ) / 34 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT + + col1 * 82 FROM tab2 AS cor0
----
1394
2542
4838

query I rowsort
SELECT ALL col1 + tab0.col0 * tab0.col0 * 95 FROM tab0
----
116472
54806
752586

query I rowsort
SELECT ALL - col1 * + col2 + col1 * - col1 + - col2 * + col0 FROM tab1
----
-2242
-4318
-9097

query I rowsort
SELECT DISTINCT 67 + + col2 AS col2 FROM tab0
----
100
149
68

query I rowsort
SELECT 93 * col2 + ( cor0.col0 ) + cor0.col0 AS col1 FROM tab1 AS cor0
----
5028
5429
9088

onlyif mysql # use DIV operator for integer division
query I rowsort label-8103
SELECT ALL - col1 + - col2 DIV col0 FROM tab1
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-8103
SELECT ALL - col1 + - col2 / col0 FROM tab1
----
-10
-14
-44

query I rowsort
SELECT DISTINCT tab0.col1 + + col0 * col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT 47 * + col0 + ( + ( col2 ) ) AS col1 FROM tab0
----
1161
1646
4265

onlyif mysql # use DIV operator for integer division
query I rowsort label-8106
SELECT ALL 8 + - col1 DIV + col1 + col1 * tab2.col0 col2 FROM tab2
----
1350
224
4609

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8106
SELECT ALL 8 + - col1 / + col1 + col1 * tab2.col0 col2 FROM tab2
----
1350
224
4609

query I rowsort
SELECT DISTINCT - cor0.col1 + ( col0 ) * + col0 * - col2 + - col1 * col2 FROM tab2 AS cor0
----
-159777
-2191
-237821

query I rowsort
SELECT ALL col2 * ( 46 ) + - col2 * - col2 AS col0 FROM tab0 AS cor0
----
10496
2607
47

query I rowsort
SELECT col1 * - col1 + 78 + + col1 AS col2 FROM tab1 cor0
----
-12
-572
-78

query I rowsort
SELECT DISTINCT ( 35 ) AS col0 FROM tab0, tab0 cor0
----
35

query I rowsort
SELECT col0 * 17 * + col1 AS col2 FROM tab2
----
22831
3689
78234

query I rowsort
SELECT ALL - - col1 * + ( + col1 ) * - col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-8113
SELECT - - col2 DIV + cor0.col1 + col1 DIV + col1 + - 31 * - ( + col1 ) col1 FROM tab1 AS cor0
----
316
411
809

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8113
SELECT - - col2 / + cor0.col1 + col1 / + col1 + - 31 * - ( + col1 ) col1 FROM tab1 AS cor0
----
316
411
809

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8114
SELECT + col0 * col0 * + col1 + + col0 + CAST( NULL AS SIGNED ) * 66 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8114
SELECT + col0 * col0 * + col1 + + col0 + CAST ( NULL AS INTEGER ) * 66 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 + - 90 AS col2 FROM tab1 AS cor0
----
-10
-26
-87

query I rowsort
SELECT ALL col2 + col2 + - col0 * + 38 * col2 FROM tab0 AS cor0
----
-1328
-277160
-30030

query I rowsort
SELECT - col1 * - cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT 38 FROM tab0 AS cor0
----
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8119
SELECT - + CAST( 58 AS SIGNED ) AS col2 FROM tab2 cor0
----
-58
-58
-58

skipif mysql # not compatible
query I rowsort label-8119
SELECT - + CAST ( 58 AS INTEGER ) AS col2 FROM tab2 cor0
----
-58
-58
-58

query I rowsort
SELECT ALL + ( + ( col2 ) ) AS col2 FROM tab1 cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8121
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col0 + + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8121
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col0 + + col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8122
SELECT CAST( + cor0.col1 AS SIGNED ) + cor0.col0 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-8122
SELECT CAST ( + cor0.col1 AS INTEGER ) + cor0.col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + col2 * ( cor0.col0 ) + - col1 AS col2 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8124
SELECT DISTINCT - CAST( + 67 AS SIGNED ) - col2 AS col0 FROM tab0 AS cor0
----
-100
-149
-68

skipif mysql # not compatible
query I rowsort label-8124
SELECT DISTINCT - CAST ( + 67 AS INTEGER ) - col2 AS col0 FROM tab0 AS cor0
----
-100
-149
-68

query I rowsort
SELECT DISTINCT + - cor0.col1 - col2 * + col2 AS col2 FROM tab0 cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 + - col1 * + col2 * + col1 AS col2 FROM tab2 AS cor0
----
-10336
-25110
-88972

query I rowsort
SELECT DISTINCT ( - col0 ) * - cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + ( 0 ) + col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + ( - 87 ) AS col0 FROM tab0 AS cor0
----
-87
-87
-87

query I rowsort
SELECT ALL 35 + - col1 FROM tab0 AS cor0
----
-51
-56
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8131
SELECT ALL ( col2 ) DIV - col0 + + col1 + + col2 AS col1 FROM tab1 AS cor0
----
108
62
67

skipif mysql # not compatible
query I rowsort label-8131
SELECT ALL ( col2 ) / - col0 + + col1 + + col2 AS col1 FROM tab1 AS cor0
----
108
62
67

query I rowsort
SELECT ALL + - cor0.col2 * + col1 + + col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + - col1 * + col2 + + col0 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

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-8135
SELECT DISTINCT + cor0.col0 + - col0 DIV 38 + + col0 * + cor0.col1 col0 FROM tab0 AS cor0
----
2088
3430
8186

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8135
SELECT DISTINCT + cor0.col0 + - col0 / 38 + + col0 * + cor0.col1 col0 FROM tab0 AS cor0
----
2088
3430
8186

onlyif mysql # use DIV operator for integer division
query I rowsort label-8136
SELECT ALL - - cor0.col0 DIV col2 + + col2 FROM tab1 AS cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-8136
SELECT ALL - - cor0.col0 / col2 + + col2 FROM tab1 AS cor0
----
54
58
96

query I rowsort
SELECT + 84 + col2 FROM tab0 AS cor0
----
117
166
85

query I rowsort
SELECT col1 * col2 + ( col2 ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
1566
4218
8928

query I rowsort
SELECT DISTINCT col2 * cor0.col0 + - col0 * col2 FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * + col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-8141
SELECT + 62 + col0 * col0 DIV ( 79 ) FROM tab2
----
139
141
62

skipif mysql # not compatible
query I rowsort label-8141
SELECT + 62 + col0 * col0 / ( 79 ) FROM tab2
----
139
141
62

query I rowsort
SELECT ALL + - 57 AS col0 FROM tab0 AS cor0
----
-57
-57
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 56 * col2 col0 FROM tab1 AS cor0
----
-3024
-3192
-5376

query I rowsort
SELECT - col0 * col0 + + col2 * col1 * + col0 FROM tab0 AS cor0
----
2170
656197
67536

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8145
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8145
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 * col1 + - 64 FROM tab0 AS cor0
----
-2128
-3459
-8163

query I rowsort
SELECT - 3 * col0 AS col1 FROM tab0 AS cor0
----
-105
-267
-72

query I rowsort
SELECT 87 * col1 * - ( col1 ) FROM tab0
----
-643452
-720447
-818583

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8150
SELECT ( - col1 ) DIV + col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-8150
SELECT ( - col1 ) / + col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT + ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL col1 + + col1 * col1 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT ALL - 95 FROM tab2, tab0 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT col0 + ( + 96 ) FROM tab2
----
103
174
175

query I rowsort
SELECT DISTINCT - 85 AS col2 FROM tab1, tab2 AS cor0
----
-85

query I rowsort
SELECT ALL + 61 * + col0 FROM tab0
----
1464
2135
5429

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + cor0.col0 col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL - + 72 + 78 AS col0 FROM tab1 cor0
----
6
6
6

query I rowsort
SELECT ( col0 ) + - col1 * col2 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-8160
SELECT ALL - ( col2 ) DIV - cor0.col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-8160
SELECT ALL - ( col2 ) / - cor0.col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT DISTINCT col0 * tab0.col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col1 * + 25 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT ALL + col1 * - tab1.col0 * col0 - tab1.col2 * col2 * - col1 AS col2 FROM tab1
----
-8470
36608
75582

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab1, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - ( col1 ) * + tab2.col2 * col1 + + col0 + col0 * ( - tab2.col0 ) FROM tab2
----
-17144
-25989
-96512

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab1 cor1, tab1 cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT ALL cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + 25 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 68fc0eecd4f434589f3ec576bbd0c540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8169
SELECT - - 43 * - 8 * col0 + CAST( NULL AS SIGNED ) / - col1 col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8169
SELECT - - 43 * - 8 * col0 + CAST ( NULL AS INTEGER ) / - col1 col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 14 * col0 FROM tab0 AS cor0
----
1246
336
490

query I rowsort
SELECT 48 * - 52 AS col2 FROM tab1 AS cor0
----
-2496
-2496
-2496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col1 FROM tab1 AS cor0
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT col2 + - tab1.col1 * ( col0 * + col0 ) FROM tab1
----
-180
-40903
-83104

query I rowsort
SELECT DISTINCT + col0 * - col2 + - 0 * col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col1 + 70 * - 1 FROM tab1 AS cor0
----
-44
-57
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-8177
SELECT DISTINCT + col2 DIV - 57 + - cor0.col1 col0 FROM tab0 AS cor0
----
-86
-92
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8177
SELECT DISTINCT + col2 / - 57 + - cor0.col1 col0 FROM tab0 AS cor0
----
-86
-92
-97

query I rowsort
SELECT DISTINCT + cor0.col0 * 32 + cor0.col2 * col1 FROM tab2 AS cor0
----
1061
3174
4030

query I rowsort
SELECT ALL 35 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT DISTINCT 52 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
52

query I rowsort
SELECT DISTINCT + + col2 * + 86 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT cor0.col2 * + 65 FROM tab0 AS cor0
----
2145
5330
65

query I rowsort
SELECT cor0.col0 * 72 FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT ALL - + cor0.col0 * col2 * ( col1 * col0 ) + - 46 FROM tab2 AS cor0
----
-4031732
-41059
-9332902

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 + CAST ( col1 * - col1 AS REAL ) AS col0 FROM tab0 AS cor0
----
-7429
-8363
-9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-8186
SELECT DISTINCT + + 79 DIV col0 FROM tab1 AS cor0
----
0
1
26

skipif mysql # not compatible
query I rowsort label-8186
SELECT DISTINCT + + 79 / col0 FROM tab1 AS cor0
----
0
1
26

query I rowsort
SELECT col0 + col1 * 54 FROM tab0
----
4668
5003
5273

query I rowsort
SELECT - tab2.col1 + - col1 * col2 AS col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT - - col0 * col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8190
SELECT ALL + - 31 * col2 DIV + CAST( - col0 AS SIGNED ) FROM tab2 cor0
----
10
119
14

skipif mysql # not compatible
query I rowsort label-8190
SELECT ALL + - 31 * col2 / + CAST ( - col0 AS INTEGER ) FROM tab2 cor0
----
10
119
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-8191
SELECT + ( + col2 ) DIV 95 + + col1 AS col2 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-8191
SELECT + ( + col2 ) / 95 + + col1 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col2 * + col0 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8193
SELECT ALL - ( 4 ) DIV col0 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8193
SELECT ALL - ( 4 ) / col0 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - 8 AS col2 FROM tab1
----
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8195
SELECT DISTINCT - col0 DIV col2 col1 FROM tab1 cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8195
SELECT DISTINCT - col0 / col2 col1 FROM tab1 cor0
----
-1
0

query I rowsort
SELECT - col0 + col0 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col0 * col2 + ( - 99 ) AS col2 FROM tab1 AS cor0
----
3549
63
7581

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + ( cor0.col2 ) + col1 * - col1 AS col0 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab0
----
28

query I rowsort
SELECT col0 * 18 AS col2 FROM tab2
----
126
1404
1422

query I rowsort
SELECT col1 * 19 AS col2 FROM tab2
----
1121
323
589

query I rowsort
SELECT - cor0.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT 58 FROM tab1, tab0 AS cor0
----
58

query I rowsort
SELECT DISTINCT ( tab1.col2 * col0 ) + + col1 + + tab1.col0 * col0 AS col0 FROM tab1
----
14093
197
7754

query I rowsort
SELECT ALL - 76 * cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to fbaf2b0c9ba1e39ead998418883bcc85

query I rowsort
SELECT cor0.col2 * col2 + - 36 FROM tab2 AS cor0
----
1408
640
693

query I rowsort
SELECT + - col0 + col0 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 92 FROM tab0 cor0
----
-92

query I rowsort
SELECT - cor0.col0 * - col2 + col0 - 0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8211
SELECT CAST( NULL AS SIGNED ) / - col2 + col2 * ( - 76 + col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8211
SELECT CAST ( NULL AS INTEGER ) / - col2 + col2 * ( - 76 + col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8212
SELECT + + 94 DIV 20 AS col1 FROM tab2 AS cor0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-8212
SELECT + + 94 / 20 AS col1 FROM tab2 AS cor0
----
4
4
4

query I rowsort
SELECT col2 * + col2 * col0 AS col0 FROM tab1 AS cor0
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) * cor0.col0 - + 33 col2 FROM tab2 AS cor0
----
156
1995
2969

query I rowsort
SELECT ALL + 68 FROM tab1 cor0
----
68
68
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-8216
SELECT col0 + col0 DIV col1 AS col2 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-8216
SELECT col0 + col0 / col1 AS col2 FROM tab2 AS cor0
----
7
79
83

query I rowsort
SELECT ALL + col0 + - col1 - - tab1.col1 * col0 FROM tab1
----
1107
55
694

query I rowsort
SELECT DISTINCT 22 * + 33 AS col1 FROM tab1, tab1 AS cor0
----
726

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8219
SELECT - tab2.col0 + + CAST( ( col2 ) AS SIGNED ) * + ( + col0 ) - col1 AS col1 FROM tab2
----
151
1891
2906

skipif mysql # not compatible
query I rowsort label-8219
SELECT - tab2.col0 + + CAST ( ( col2 ) AS INTEGER ) * + ( + col0 ) - col1 AS col1 FROM tab2
----
151
1891
2906

onlyif mysql # use DIV operator for integer division
query I rowsort label-8220
SELECT DISTINCT - ( 89 ) + col1 DIV - col2 + - col1 AS col1 FROM tab0
----
-177
-181
-283

skipif mysql # not compatible
query I rowsort label-8220
SELECT DISTINCT - ( 89 ) + col1 / - col2 + - col1 AS col1 FROM tab0
----
-177
-181
-283

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8221
SELECT + - CAST( - col1 AS SIGNED ) + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-8221
SELECT + - CAST ( - col1 AS INTEGER ) + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab1 cor0
----
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8223
SELECT - 54 * + cor0.col2 + col0 DIV col0 AS col1 FROM tab2 AS cor0
----
-1403
-1457
-2051

skipif mysql # not compatible
query I rowsort label-8223
SELECT - 54 * + cor0.col2 + col0 / col0 AS col1 FROM tab2 AS cor0
----
-1403
-1457
-2051

query I rowsort
SELECT ALL - + 67 * col1 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT ALL - ( + col0 ) * col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8226
SELECT ALL CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8226
SELECT ALL CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + - 19 FROM tab2 AS cor0
----
19
7
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8228
SELECT + col0 DIV - col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8228
SELECT + col0 / - col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + + col0 * col0 + + col0 + col0 AS col2 FROM tab0 AS cor0
----
1295
624
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT col0 + - col0 * col1 AS col0 FROM tab1 cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8232
SELECT ALL - col1 DIV ( - col0 ) AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8232
SELECT ALL - col1 / ( - col0 ) AS col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL col0 * 18 + col1 FROM tab1 AS cor0
----
1162
1453
80

query I rowsort
SELECT - + col2 * col2 * 80 AS col0 FROM tab0 AS cor0
----
-537920
-80
-87120

onlyif mysql # use DIV operator for integer division
query I rowsort label-8235
SELECT DISTINCT - col2 DIV - 10 + + col1 FROM tab1 AS cor0
----
15
22
31

skipif mysql # not compatible
query I rowsort label-8235
SELECT DISTINCT - col2 / - 10 + + col1 FROM tab1 AS cor0
----
15
22
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-8236
SELECT DISTINCT - cor0.col2 DIV - col0 AS col1 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8236
SELECT DISTINCT - cor0.col2 / - col0 AS col1 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT cor0.col2 * col2 FROM tab0 cor0
----
1
1089
6724

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 283f1c907a0999dbd972d3bd45746c06

query I rowsort
SELECT DISTINCT cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-8240
SELECT - col1 + + col1 DIV + 8 AS col2 FROM tab0 cor0
----
-76
-80
-85

skipif mysql # not compatible
query I rowsort label-8240
SELECT - col1 + + col1 / + 8 AS col2 FROM tab0 cor0
----
-76
-80
-85

query I rowsort
SELECT DISTINCT cor0.col1 + ( - cor0.col2 ) * - col2 FROM tab1 AS cor0
----
2942
3259
9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-8242
SELECT DISTINCT + col2 DIV 74 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8242
SELECT DISTINCT + col2 / 74 AS col1 FROM tab0 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8243
SELECT ALL - col2 + - col0 * 23 + col0 DIV 60 AS col2 FROM tab0 AS cor0
----
-2128
-585
-806

skipif mysql # not compatible
query I rowsort label-8243
SELECT ALL - col2 + - col0 * 23 + col0 / 60 AS col2 FROM tab0 AS cor0
----
-2128
-585
-806

query I rowsort
SELECT DISTINCT cor0.col2 + 8 * - col1 AS col1 FROM tab2 AS cor0
----
-221
-446
-98

query I rowsort
SELECT - col1 * - ( cor0.col0 ) + - cor0.col0 AS col2 FROM tab0 cor0
----
2040
3360
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8246
SELECT - CAST( NULL AS SIGNED ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8246
SELECT - CAST ( NULL AS INTEGER ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 43 * col0 + + col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
11926
3096
4900

query I rowsort
SELECT - - 37 * cor0.col1 FROM tab2 AS cor0
----
1147
2183
629

query I rowsort
SELECT ALL 34 AS col1 FROM tab0 AS cor0
----
34
34
34

query I rowsort
SELECT - + col2 * - col1 + - col1 AS col0 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT - - 95 AS col2 FROM tab0 cor0
----
95

query I rowsort
SELECT DISTINCT + - 68 + - col1 AS col1 FROM tab2 AS cor0
----
-127
-85
-99

query I rowsort
SELECT cor0.col1 + + cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to d994d266bacb99d3939b70b2c7903ce8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 * - col0 col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + + 31 * + cor0.col1 FROM tab0 cor0
----
2666
2821
3007

query I rowsort
SELECT + 52 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

query I rowsort
SELECT DISTINCT col1 + cor0.col1 * - cor0.col0 * - col1 FROM tab0 AS cor0
----
177590
329412
737100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col1 FROM tab2
----
49
49
49

query I rowsort
SELECT + col2 + ( + col0 ) FROM tab2 cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8260
SELECT col0 DIV + col1 + col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-8260
SELECT col0 / + col1 + col1 FROM tab1
----
16
19
26

query I rowsort
SELECT 93 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
26
27
38

query I rowsort
SELECT DISTINCT + + col0 * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - 46 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 5a5d45989dcc6a06d9ee5a08945518f9

query I rowsort
SELECT ALL 74 AS col1 FROM tab1
----
74
74
74

query I rowsort
SELECT DISTINCT 59 * - col0 AS col0 FROM tab0
----
-1416
-2065
-5251

query I rowsort
SELECT + tab2.col2 - - col0 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT - - 66 + col2 * + cor0.col0 FROM tab1 AS cor0
----
228
3714
7746

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 8d4d13f65f86e1b26b6004a6bdc662b3

query I rowsort
SELECT - col0 * + 65 AS col1 FROM tab1
----
-195
-4160
-5200

query I rowsort
SELECT tab0.col2 + ( tab0.col1 + - tab0.col2 ) * 51 * + col0 FROM tab0
----
171361
40933
64905

query I rowsort
SELECT - + col0 + ( 27 ) AS col2 FROM tab2 AS cor0
----
-51
-52
20

query I rowsort
SELECT 18 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 3 ) * + col1 + col0 col2 FROM tab0 AS cor0
----
-184
-234
-256

query I rowsort
SELECT 99 + + col0 AS col0 FROM tab2
----
106
177
178

query I rowsort
SELECT + + cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + cor0.col2 + 84 FROM tab1 cor0
----
138
141
180

query I rowsort
SELECT 46 + - col0 FROM tab1 AS cor0
----
-18
-34
43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8279
SELECT DISTINCT - - CAST( + col2 AS SIGNED ) * - col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-8279
SELECT DISTINCT - - CAST ( + col2 AS INTEGER ) * - col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8280
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-8280
SELECT + + col1 / col2 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 * + col2 * col0 + + col1 * - cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
-12804
-1343160
-312180

query I rowsort
SELECT 35 * col1 + - col2 AS col0 FROM tab0 AS cor0
----
2977
3103
3394

query I rowsort
SELECT + 96 * 59 + - col0 AS col0 FROM tab1 AS cor0
----
5584
5600
5661

query I rowsort
SELECT DISTINCT - 56 * + 48 + col1 * tab2.col2 AS col0 FROM tab2
----
-1154
-1851
-2042

onlyif mysql # use DIV operator for integer division
query I rowsort label-8285
SELECT ( + 31 ) DIV - col2 + cor0.col0 col1 FROM tab0 AS cor0
----
24
4
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8285
SELECT ( + 31 ) / - col2 + cor0.col0 col1 FROM tab0 AS cor0
----
24
4
89

query I rowsort
SELECT + tab2.col1 + tab2.col1 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab1, tab0 cor0, tab0 AS cor1, tab0 AS cor2
----
-53

query I rowsort
SELECT ALL + 56 + - 70 * col1 FROM tab2 AS cor0
----
-1134
-2114
-4074

onlyif mysql # use DIV operator for integer division
query I rowsort label-8289
SELECT ALL - - 54 - - col0 DIV - col0 col2 FROM tab0 AS cor0
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8289
SELECT ALL - - 54 - - col0 / - col0 col2 FROM tab0 AS cor0
----
53
53
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-8290
SELECT DISTINCT - + col2 * col1 DIV + col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8290
SELECT DISTINCT - + col2 * col1 / + col1 FROM tab0 AS cor0
----
-1
-33
-82

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab2 AS cor1, tab1 cor2
----
972 values hashing to 263f0eb7d5dfd4076c74918bc141bd9b

query I rowsort
SELECT - - col2 * - ( - col1 ) + 93 FROM tab2 AS cor0
----
1627
739
930

query I rowsort
SELECT DISTINCT + + col2 + - cor0.col0 * col0 FROM tab1 cor0
----
-4039
-6304
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8294
SELECT ALL - CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8294
SELECT ALL - CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT 64 AS col1 FROM tab0 AS cor0
----
64
64
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-8296
SELECT + 58 * col0 + col1 DIV ( col0 * + col1 ) FROM tab0 AS cor0
----
1392
2030
5162

skipif mysql # not compatible
query I rowsort label-8296
SELECT + 58 * col0 + col1 / ( col0 * + col1 ) FROM tab0 AS cor0
----
1392
2030
5162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col0 + + col0 col1 FROM tab0 cor0
----
-7209
-768
0

query I rowsort
SELECT ALL + 36 AS col1 FROM tab0 AS cor0
----
36
36
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8299
SELECT ALL + - col0 + col2 + CAST( cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8299
SELECT ALL + - col0 + col2 + CAST ( cor0.col0 AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT 51 * col1 * ( + ( col2 ) * ( col0 ) ) + col0 * + col0 FROM tab1 AS cor0
----
1864576
214821
5098240

query I rowsort
SELECT + 24 + col1 FROM tab2 AS cor0
----
41
55
83

query I rowsort
SELECT ALL ( col1 ) - ( col0 ) AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - 51 + col1 * - 50 AS col1 FROM tab0 AS cor0
----
-4351
-4601
-4901

query I rowsort
SELECT 50 + - cor0.col0 AS col1 FROM tab1 AS cor0
----
-14
-30
47

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + 1 * - col0 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - + col0 + col1 * + 30 AS col2 FROM tab0 AS cor0
----
2556
2641
2875

query I rowsort
SELECT - ( col1 ) + ( - col0 ) AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - col0 + + col2 * col0 AS col2 FROM tab1 cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-8310
SELECT ALL + col0 DIV - col2 + col2 AS col0 FROM tab0 AS cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-8310
SELECT ALL + col0 / - col2 + col2 AS col0 FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT DISTINCT - - 58 * + col2 + col1 FROM tab0 cor0
----
155
2000
4847

onlyif mysql # use DIV operator for integer division
query I rowsort label-8312
SELECT ALL 92 DIV ( - col2 ) + 70 FROM tab0
----
-22
68
69

skipif mysql # not compatible
query I rowsort label-8312
SELECT ALL 92 / ( - col2 ) + 70 FROM tab0
----
-22
68
69

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col0 + - col1 * 78 FROM tab0 AS cor0
----
-6732
-7187
-7601

onlyif mysql # use DIV operator for integer division
query I rowsort label-8315
SELECT ALL col2 DIV 16 FROM tab2
----
1
1
2

skipif mysql # not compatible
query I rowsort label-8315
SELECT ALL col2 / 16 FROM tab2
----
1
1
2

query I rowsort
SELECT + + col2 + - ( col0 ) FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8317
SELECT ALL col2 DIV - 77 AS col1 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8317
SELECT ALL col2 / - 77 AS col1 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + col2 - col2 * - col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-8319
SELECT + cor0.col1 * + col2 + - 92 * col0 - - ( + col2 ) DIV + cor0.col2 FROM tab1 AS cor0
----
-5317
-6111
1129

skipif mysql # not compatible
query I rowsort label-8319
SELECT + cor0.col1 * + col2 + - 92 * col0 - - ( + col2 ) / + cor0.col2 FROM tab1 AS cor0
----
-5317
-6111
1129

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8320
SELECT - - col1 * CAST( - col0 AS SIGNED ) + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-8320
SELECT - - col1 * CAST ( - col0 AS INTEGER ) + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - col2 col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL col2 * col2 * + col1 AS col0 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT + + col0 * - 47 * - cor0.col1 + - col0 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
26432
3504
41200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 - - 69 col1 FROM tab0 AS cor0
----
104
158
93

query I rowsort
SELECT DISTINCT + col2 + ( - col2 ) * col2 FROM tab2 cor0
----
-1406
-650
-702

query I rowsort
SELECT col1 * ( col2 ) + + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - col1 + col0 AS col2 FROM tab1 cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-8328
SELECT ALL + - cor0.col2 DIV + ( - col0 * - col0 ) - col2 AS col1 FROM tab1 AS cor0
----
-57
-60
-96

skipif mysql # not compatible
query I rowsort label-8328
SELECT ALL + - cor0.col2 / + ( - col0 * - col0 ) - col2 AS col1 FROM tab1 AS cor0
----
-57
-60
-96

query I rowsort
SELECT - ( + 50 ) FROM tab0 AS cor0
----
-50
-50
-50

query I rowsort
SELECT ALL - 76 + col1 * - col0 AS col0 FROM tab1 cor0
----
-1116
-154
-716

query I rowsort
SELECT - 90 * 38 FROM tab2 AS cor0
----
-3420
-3420
-3420

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8332
SELECT CAST( NULL AS SIGNED ) + + 67 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8332
SELECT CAST ( NULL AS INTEGER ) + + 67 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL tab2.col1 - - col0 AS col0 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8334
SELECT ALL + 0 * col2 + CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-8334
SELECT ALL + 0 * col2 + CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - ( - col1 + - col1 ) AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - + 36 + - col0 AS col0 FROM tab0 AS cor0
----
-125
-60
-71

query I rowsort
SELECT - 44 + col2 FROM tab2 AS cor0
----
-17
-18
-6

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - + col0 + + col2 AS col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT col1 * col2 + ( - col2 * col0 ) + + ( col2 ) * + col1 FROM tab0 AS cor0
----
159
4884
7626

query I rowsort
SELECT - col1 * 53 + + col2 FROM tab1 AS cor0
----
-1324
-473
-593

query I rowsort
SELECT 43 FROM tab1, tab2, tab0 cor0
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT - 72 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

query I rowsort
SELECT ALL + ( col1 ) + + col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + - col2 * ( col1 ) + + col0 AS col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - + 72 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-3888
-4104
-6912

query I rowsort
SELECT ALL col0 - col1 * + col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT - 37 * col0 + col2 FROM tab0 AS cor0
----
-1294
-3211
-855

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8349
SELECT ALL 89 / - 30 + - col0 - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8349
SELECT ALL 89 / - 30 + - col0 - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 62 + - col1 AS col2 FROM tab2 AS cor0
----
3
31
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8351
SELECT - + CAST( - col1 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-8351
SELECT - + CAST ( - col1 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col2 + + 40 * tab2.col0 FROM tab2
----
307
3146
3198

query I rowsort
SELECT ALL col1 + col1 * + col1 AS col1 FROM tab2
----
306
3540
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-8354
SELECT + col2 DIV ( col1 ) + + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8354
SELECT + col2 / ( col1 ) + + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - - col0 * 32 + + col1 FROM tab2 AS cor0
----
2545
255
2555

query I rowsort
SELECT - col0 * - col1 * col2 FROM tab0 cor0
----
3395
664118
68112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8357
SELECT DISTINCT tab1.col1 - cor0.col1 * CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8357
SELECT DISTINCT tab1.col1 - cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 col2 FROM tab1, tab2 AS cor0
----
86

query I rowsort
SELECT + cor0.col0 + col2 AS col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - 73 + col2 * col1 + col0 AS col2 FROM tab1 AS cor0
----
1255
1334
561

query I rowsort
SELECT ALL col1 * + ( col0 ) AS col0 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8362
SELECT DISTINCT - col0 DIV - col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
27
42

skipif mysql # not compatible
query I rowsort label-8362
SELECT DISTINCT - col0 / - col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
27
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8363
SELECT DISTINCT CAST( NULL AS DECIMAL ) * + col1 * - cor0.col0 + ( col2 * col0 ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8363
SELECT DISTINCT CAST ( NULL AS REAL ) * + col1 * - cor0.col0 + ( col2 * col0 ) FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 + - col1 col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL + ( + col0 + col2 ) FROM tab1
----
121
176
57

query I rowsort
SELECT ( col1 ) * col0 * 2 AS col0 FROM tab0
----
16198
4128
6790

query I rowsort
SELECT DISTINCT 55 FROM tab1, tab1 cor0
----
55

query I rowsort
SELECT DISTINCT 12 * + ( col0 + + ( col1 ) ) AS col2 FROM tab0
----
1320
1584
2160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8369
SELECT - CAST( + col1 AS SIGNED ) * - tab2.col0 + tab2.col1 AS col2 FROM tab2
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-8369
SELECT - CAST ( + col1 AS INTEGER ) * - tab2.col0 + tab2.col1 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT 37 * col0 FROM tab2
----
259
2886
2923

query I rowsort
SELECT - col2 * - col1 * + tab0.col1 AS col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT + ( + 89 ) AS col1 FROM tab1
----
89
89
89

query I rowsort
SELECT 14 + - tab2.col0 AS col2 FROM tab2
----
-64
-65
7

query I rowsort
SELECT col0 * - 91 * + col0 AS col1 FROM tab2
----
-4459
-553644
-567931

query I rowsort
SELECT ALL 89 * 95 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 90268638f72c009c723d32f0594c3241

query I rowsort
SELECT DISTINCT 38 FROM tab1
----
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8377
SELECT DISTINCT 46 DIV col1 col1 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8377
SELECT DISTINCT 46 / col1 col1 FROM tab0
----
0

query I rowsort
SELECT + + cor0.col0 * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8379
SELECT + + 56 * col1 + CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8379
SELECT + + 56 * col1 + CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab0 AS cor2
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8381
SELECT ALL col2 DIV ( col1 ) AS col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8381
SELECT ALL col2 / ( col1 ) AS col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + - col0 - + ( cor0.col2 ) FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL col0 + 9 AS col1 FROM tab0 cor0
----
33
44
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8384
SELECT + col1 DIV cor0.col1 + + col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-8384
SELECT + col1 / cor0.col1 + + col2 FROM tab1 AS cor0
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8385
SELECT DISTINCT + + col0 + - 86 DIV - col1 AS col2 FROM tab1 AS cor0
----
6
72
86

skipif mysql # not compatible
query I rowsort label-8385
SELECT DISTINCT + + col0 + - 86 / - col1 AS col2 FROM tab1 AS cor0
----
6
72
86

query I rowsort
SELECT + - col1 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT 15 * cor0.col2 FROM tab2, tab1 cor0
----
9 values hashing to 72fed7a9098e1b5b0fb7f9a5abdf3ec0

query I rowsort
SELECT ALL + cor0.col1 + + col1 * - col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT col2 * + 3 + - tab2.col2 * col0 FROM tab2
----
-108
-1950
-2888

query I rowsort
SELECT - col2 * ( - ( col1 ) ) + 2 AS col1 FROM tab1
----
1250
1406
572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col2 + 63 FROM tab1 AS cor0
----
-33
6
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + cor0.col0 col1 FROM tab1 cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 + col1 col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - 92 * + col1 FROM tab0
----
-7912
-8372
-8924

query I rowsort
SELECT cor0.col2 * + ( - col0 ) FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col1 + - 8 AS col0 FROM tab0 AS cor0
----
-105
-94
-99

query I rowsort
SELECT ALL + col1 + - 62 * - cor0.col2 FROM tab1 AS cor0
----
3374
3544
5965

query I rowsort
SELECT DISTINCT + 23 * col1 * col0 + - col2 * 81 * cor0.col1 FROM tab1 AS cor0
----
-111930
-31450
-77168

query I rowsort
SELECT col2 * + col2 + col2 * 76 AS col1 FROM tab1 AS cor0
----
16512
7020
7581

query I rowsort
SELECT DISTINCT - 63 + - ( - col1 ) * + col2 FROM tab2 cor0
----
1471
583
774

query I rowsort
SELECT DISTINCT - cor1.col0 + 32 FROM tab2, tab1 cor0, tab2 cor1
----
-46
-47
25

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 cor1, tab2 cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT + ( cor0.col1 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - - cor0.col2 * col2 + + col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL + col2 * + cor0.col2 FROM tab2 cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8408
SELECT - ( col2 ) - + CAST( - col2 AS SIGNED ) AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8408
SELECT - ( col2 ) - + CAST ( - col2 AS INTEGER ) AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - cor0.col0 - cor0.col2 FROM tab2 AS cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT ALL - tab0.col2 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8412
SELECT + 30 - col0 DIV 57 AS col2 FROM tab0
----
29
30
30

skipif mysql # not compatible
query I rowsort label-8412
SELECT + 30 - col0 / 57 AS col2 FROM tab0
----
29
30
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-8413
SELECT ALL col0 - col0 DIV - col1 AS col2 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-8413
SELECT ALL col0 - col0 / - col1 AS col2 FROM tab1
----
3
70
86

query I rowsort
SELECT ALL + col1 * + tab2.col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - 32 * + col1 FROM tab1
----
-320
-416
-832

query I rowsort
SELECT + 89 * col0 FROM tab1
----
267
5696
7120

query I rowsort
SELECT - col0 + col1 * + col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL - col1 - col2 AS col0 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT - 83 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT ALL - col2 * 7 AS col1 FROM tab0 AS cor0
----
-231
-574
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-8421
SELECT DISTINCT + col0 DIV + ( - col1 ) AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8421
SELECT DISTINCT + col0 / + ( - col1 ) AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT col2 * 71 * + col2 FROM tab0 AS cor0
----
477404
71
77319

query I rowsort
SELECT + ( col1 ) + + 71 AS col2 FROM tab1
----
81
84
97

query I rowsort
SELECT tab2.col1 * + 81 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 6eb6f2138a9ffb94f5a2ccdd5f393263

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - tab1.col2 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + tab0.col0 * - ( + tab0.col0 ) + col1 AS col2 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT 53 FROM tab1, tab2 AS cor0
----
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-8428
SELECT col2 + + col2 DIV - col1 AS col0 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-8428
SELECT col2 + + col2 / - col1 AS col0 FROM tab2 AS cor0
----
26
27
36

query I rowsort
SELECT - - col0 + col0 + + 57 AS col0 FROM tab2 AS cor0
----
213
215
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-8430
SELECT ALL - col0 + - col0 DIV - col0 AS col1 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-8430
SELECT ALL - col0 + - col0 / - col0 AS col1 FROM tab2
----
-6
-77
-78

query I rowsort
SELECT + - col0 * + ( - ( - col0 ) ) - col2 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT - cor0.col0 + + col0 * 64 * cor0.col0 AS col1 FROM tab0 AS cor0
----
36840
506855
78365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + + 56 col0 FROM tab0 AS cor0
----
-30
-35
-41

query I rowsort
SELECT ALL - - col1 * 90 AS col2 FROM tab0 AS cor0
----
7740
8190
8730

query I rowsort
SELECT DISTINCT + + col2 * + 82 - col2 AS col1 FROM tab1 AS cor0
----
4374
4617
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-8436
SELECT + col1 * - tab0.col1 - - col2 DIV + ( - col1 ) FROM tab0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-8436
SELECT + col1 * - tab0.col1 - - col2 / + ( - col1 ) FROM tab0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 25 col1 FROM tab1
----
-25
-25
-25

query I rowsort
SELECT - ( ( col0 ) ) AS col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT - col0 + 79 AS col2 FROM tab2
----
0
1
72

query I rowsort
SELECT ALL - 69 FROM tab2
----
-69
-69
-69

query I rowsort
SELECT cor2.col1 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT DISTINCT - 57 * - cor0.col2 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT + 92 * col2 FROM tab1 cor0
----
4968
5244
8832

query I rowsort
SELECT ALL - ( ( - col2 ) ) + cor0.col1 AS col2 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col0 col1 FROM tab1 cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-8446
SELECT col1 DIV col1 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8446
SELECT col1 / col1 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + 6 + + col0 FROM tab2 cor0
----
13
84
85

query I rowsort
SELECT DISTINCT 45 AS col1 FROM tab2 AS cor0
----
45

query I rowsort
SELECT ALL - - cor0.col0 AS col1 FROM tab2 cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8450
SELECT col0 + col0 * + col2 DIV col2 AS col1 FROM tab1 AS cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-8450
SELECT col0 + col0 * + col2 / col2 AS col1 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8451
SELECT DISTINCT + + col2 DIV col0 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8451
SELECT DISTINCT + + col2 / col0 AS col1 FROM tab0 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8452
SELECT - 51 + cor0.col0 * CAST( + 44 AS SIGNED ) DIV - col0 - 20 * col2 * col1 AS col1 FROM tab2 AS cor0
----
-13015
-16835
-30775

skipif mysql # not compatible
query I rowsort label-8452
SELECT - 51 + cor0.col0 * CAST ( + 44 AS INTEGER ) / - col0 - 20 * col2 * col1 AS col1 FROM tab2 AS cor0
----
-13015
-16835
-30775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 21 col1 FROM tab2, tab1 AS cor0
----
21

query I rowsort
SELECT DISTINCT - col0 + - col1 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT - cor0.col1 + - col0 * col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - - 53 FROM tab2 AS cor0
----
53
53
53

query I rowsort
SELECT ALL - - 63 + col0 AS col2 FROM tab2 AS cor0
----
141
142
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + tab2.col0 * + col0 col2 FROM tab2
----
6143
6258
80

query I rowsort
SELECT + col0 AS col1 FROM tab0 WHERE NULL < NULL AND NOT ( NULL ) < ( NULL )
----

query I rowsort
SELECT ALL + col1 + + col1 * - col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + - col1 + - col0 * col1 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL + - cor0.col1 * + col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 + + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-12800
-18
-8192

query I rowsort
SELECT ALL col1 + - col0 * - col0 AS col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT + col2 * + col1 + col2 + col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1267
1536
2384

onlyif mysql # use DIV operator for integer division
query I rowsort label-8466
SELECT - col2 * col0 DIV cor0.col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-8466
SELECT - col2 * col0 / cor0.col0 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8467
SELECT DISTINCT - col0 DIV col1 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-8467
SELECT DISTINCT - col0 / col1 AS col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT tab2.col0 * - col1 * - tab2.col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL col1 + - cor0.col1 - - col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + + ( col1 ) * + col0 + - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL + 75 * col1 AS col1 FROM tab0 AS cor0
----
6450
6825
7275

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT + + col0 * - col1 + col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT col0 + + col2 * - col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col2 + cor0.col2 col1 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-8477
SELECT col2 + + col0 DIV - col0 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-8477
SELECT col2 + + col0 / - col0 AS col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT + cor0.col0 + col1 * + col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT ALL - col2 - - col2 * cor0.col1 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + + 54 + col1 AS col2 FROM tab0 AS cor0
----
140
145
151

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 - + col0 col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + ( + ( + tab1.col0 ) ) - tab1.col1 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT col1 - - col1 FROM tab1
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8484
SELECT + col1 DIV 46 - + col0 * - col0 FROM tab0
----
1227
577
7922

skipif mysql # not compatible
query I rowsort label-8484
SELECT + col1 / 46 - + col0 * - col0 FROM tab0
----
1227
577
7922

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 9 * col2 col0 FROM tab0 AS cor0
----
-297
-738
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8486
SELECT DISTINCT - - 65 DIV col0 + col0 AS col0 FROM tab0 AS cor0
----
26
36
89

skipif mysql # not compatible
query I rowsort label-8486
SELECT DISTINCT - - 65 / col0 + col0 AS col0 FROM tab0 AS cor0
----
26
36
89

query I rowsort
SELECT ALL 33 * col0 FROM tab0 AS cor0
----
1155
2937
792

query I rowsort
SELECT + col2 + col0 + + col2 * - col1 FROM tab1
----
-1072
-1347
-449

query I rowsort
SELECT DISTINCT - 88 + - col0 AS col1 FROM tab2
----
-166
-167
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-8490
SELECT ALL - col0 + - col0 DIV col2 + + col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8490
SELECT ALL - col0 + - col0 / col2 + + col0 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL + col2 * + col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col1 * col1 + col2 + + col0 FROM tab0
----
7453
8452
9445

query I rowsort
SELECT DISTINCT col2 * col1 * col2 + - col0 + col2 FROM tab1
----
119824
32483
75867

query I rowsort
SELECT DISTINCT col1 * + col0 + - tab1.col1 + col0 * col1 AS col0 FROM tab1
----
1270
130
2067

onlyif mysql # use DIV operator for integer division
query I rowsort label-8495
SELECT ALL col2 * col0 * - col1 + col1 DIV - col2 + + col2 AS col2 FROM tab1
----
-36423
-4158
-99744

skipif mysql # not compatible
query I rowsort label-8495
SELECT ALL col2 * col0 * - col1 + col1 / - col2 + + col2 AS col2 FROM tab1
----
-36423
-4158
-99744

query I rowsort
SELECT tab1.col0 * col0 * + col1 FROM tab1
----
234
40960
83200

query I rowsort
SELECT - col2 * + col0 + col2 AS col1 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT ALL + col0 * tab2.col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL + col0 * tab0.col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL - col0 * tab0.col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL col2 FROM tab2 WHERE NULL NOT BETWEEN ( NULL ) AND - col0
----

query I rowsort
SELECT - col2 * tab2.col2 * col1 AS col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT tab1.col0 + col1 * - col1 - col2 AS col0 FROM tab1
----
-185
-727
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + tab0.col0 * - col2 col1 FROM tab0 WHERE NOT NULL > ( + col2 * col0 )
----

query I rowsort
SELECT col0 * col0 + - col0 FROM tab1
----
4032
6
6320

query I rowsort
SELECT DISTINCT - col1 + - tab1.col2 AS col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT col0 * col0 + - col0 AS col2 FROM tab2
----
42
6006
6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - col0 col2 FROM tab2
----
-20
41
52

query III rowsort
SELECT ALL * FROM tab2 WHERE col0 IN ( col0 - col0 * - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8510
SELECT DISTINCT + col2 * - col2 + + col2 DIV - col1 FROM tab2
----
-1446
-676
-729

skipif mysql # not compatible
query I rowsort label-8510
SELECT DISTINCT + col2 * - col2 + + col2 / - col1 FROM tab2
----
-1446
-676
-729

query I rowsort
SELECT ALL col0 * - col2 + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col1 * col1 + col0 * - tab2.col2 FROM tab2
----
-2713
1453
772

query I rowsort
SELECT ALL - col1 + tab2.col1 * - col0 * col1 AS col1 FROM tab2
----
-22848
-271577
-6758

query I rowsort
SELECT col1 - col1 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8515
SELECT ALL + tab2.col0 DIV col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8515
SELECT ALL + tab2.col0 / col0 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col2 + col1 + col0 AS col0 FROM tab1 WHERE NOT ( - col1 ) <= NULL
----

query I rowsort
SELECT col2 AS col0 FROM tab1 WHERE NOT col2 + col0 NOT BETWEEN - col0 + + col2 AND ( col1 )
----

query I rowsort
SELECT col0 + - col2 * + col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT - tab0.col0 * col2 + - col0 * col1 AS col0 FROM tab0
----
-15397
-2856
-3430

query I rowsort
SELECT ALL - col1 + col2 * col2 * col0 AS col0 FROM tab1
----
207926
737267
8722

query III rowsort
SELECT ALL * FROM tab2 WHERE col0 * col2 < NULL
----

query I rowsort
SELECT - col2 * col2 + - col0 * col1 AS col2 FROM tab2 AS cor0
----
-2787
-5278
-946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + col1 + - col1 * cor0.col2 col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT col0 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT + 15 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
81 values hashing to 97c4e033347d2076218e240ed49af0a7

query I rowsort
SELECT - 89 * - cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
1170
2340
900

query I rowsort
SELECT DISTINCT 93 + + col2 FROM tab1
----
147
150
189

query I rowsort
SELECT + + ( col1 ) * col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - 41 - + col2 AS col1 FROM tab0 AS cor0
----
-123
-42
-74

query I rowsort
SELECT ALL + col1 + + 92 AS col0 FROM tab2 AS cor0
----
109
123
151

query I rowsort
SELECT + - 34 AS col0 FROM tab2 AS cor0
----
-34
-34
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8533
SELECT - - col1 + - col1 DIV col2 + cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

skipif mysql # not compatible
query I rowsort label-8533
SELECT - - col1 + - col1 / col2 + cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-8534
SELECT ALL + - col1 + col1 + + cor0.col0 DIV ( col2 + col1 * - col2 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8534
SELECT ALL + - col1 + col1 + + cor0.col0 / ( col2 + col1 * - col2 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col2 * - col1 + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT + col2 * - col1 + col2 + - col0 FROM tab2 AS cor0
----
-1586
-687
-817

query I rowsort
SELECT ALL - col0 * col0 + ( + ( col1 ) ) FROM tab2 AS cor0
----
-18
-6025
-6224

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT col0 * + ( col2 ) FROM tab1 cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8540
SELECT + col1 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8540
SELECT + col1 * + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( col1 * + ( + col2 ) ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col1 - + cor0.col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8543
SELECT - tab0.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8543
SELECT - tab0.col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * col2 * + col1 - - col2 AS col1 FROM tab0 AS cor0
----
3396
664200
68145

query I rowsort
SELECT - col1 * 74 + - col2 AS col0 FROM tab1 AS cor0
----
-1058
-1978
-797

query I rowsort
SELECT DISTINCT - + 21 * 5 + + col0 + ( - 87 ) AS col1 FROM tab1 AS cor0
----
-112
-128
-189

query I rowsort
SELECT + - col0 + + col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - 46 * ( + tab2.col2 ) AS col2 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to c939bd2f7517f8ebe781ca64a49e6666

query I rowsort
SELECT + col2 * 32 AS col1 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT DISTINCT - ( col0 ) + cor0.col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + col0 * - 82 FROM tab1 AS cor0
----
-246
-5248
-6560

query I rowsort
SELECT ALL + + 40 * - col1 AS col1 FROM tab1 AS cor0
----
-1040
-400
-520

query I rowsort
SELECT 54 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + - ( col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8556
SELECT + col1 DIV + cor0.col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8556
SELECT + col1 / + cor0.col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT 73 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col0 AS REAL ) * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT 83 * + col0 AS col2 FROM tab0 AS cor0
----
1992
2905
7387

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 * - col1 col2 FROM tab2
----
-1360
-248
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8561
SELECT DISTINCT col2 / CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-8561
SELECT DISTINCT col2 / CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT ( + col0 ) - col1 FROM tab1
----
-23
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8563
SELECT ALL CAST( NULL AS SIGNED ) * col0 - + col0 * - col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8563
SELECT ALL CAST ( NULL AS INTEGER ) * col0 - + col0 * - col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 47 * col0 - - col0 AS col2 FROM tab1
----
144
3072
3840

query I rowsort
SELECT ALL - col2 + 90 + - col2 AS col2 FROM tab0
----
-74
24
88

query I rowsort
SELECT ALL 73 - + col0 AS col0 FROM tab2
----
-5
-6
66

query I rowsort
SELECT DISTINCT col0 * + 78 - + col0 FROM tab2
----
539
6006
6083

query I rowsort
SELECT - col0 - - tab0.col1 * + col0 FROM tab0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-8569
SELECT 9 DIV col1 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8569
SELECT 9 / col1 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL 71 + ( col1 ) - cor0.col2 AS col2 FROM tab2 AS cor0
----
104
50
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8571
SELECT ALL - + CAST( NULL AS SIGNED ) * + col0 * col0 + + col1 * + col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8571
SELECT ALL - + CAST ( NULL AS INTEGER ) * + col0 * col0 + + col1 * + col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 31 + col1 AS col2 FROM tab0 AS cor0
----
55
60
66

query I rowsort
SELECT ALL col2 + col0 * col0 + col1 AS col1 FROM tab0
----
1323
695
8094

query I rowsort
SELECT ALL + ( - 18 ) * col1 + col0 * + tab0.col2 FROM tab0
----
-1711
-756
5660

query I rowsort
SELECT ALL + col0 * - col0 + - col0 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT cor0.col0 + + col2 AS col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col1 * - ( - 8 * + col1 ) FROM tab2 AS cor0
----
-2312
-27848
-7688

query I rowsort
SELECT ALL 5 * col0 FROM tab1
----
15
320
400

query I rowsort
SELECT - ( col1 ) AS col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL tab1.col0 + tab1.col2 * - tab1.col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT ALL col0 * col1 + tab2.col0 AS col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT col0 * col2 + ( col2 ) + col0 * col2 AS col2 FROM tab2
----
405
4082
6042

query I rowsort
SELECT + 87 + col2 + + ( col0 + col0 * col1 ) FROM tab1 cor0
----
1303
222
848

onlyif mysql # use DIV operator for integer division
query I rowsort label-8584
SELECT ALL - tab1.col1 DIV + col0 + - col1 DIV col1 FROM tab1
----
-1
-1
-9

skipif mysql # not compatible
query I rowsort label-8584
SELECT ALL - tab1.col1 / + col0 + - col1 / col1 FROM tab1
----
-1
-1
-9

query I rowsort
SELECT - col0 * col1 + - col1 AS col1 FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT - col1 * col1 * 92 FROM tab2 AS cor0
----
-26588
-320252
-88412

onlyif mysql # use DIV operator for integer division
query I rowsort label-8587
SELECT col2 DIV ( col0 ) AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8587
SELECT col2 / ( col0 ) AS col2 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8588
SELECT - col1 + CAST( + col2 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
-1593
-663
-868

skipif mysql # not compatible
query I rowsort label-8588
SELECT - col1 + CAST ( + col2 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL - col0 + - col0 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL - cor0.col1 * - col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col1 * - col1 * + col0 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT - + col0 * - col2 * - col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - col2 * ( + col0 * + col2 ) FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT col1 * - 85 AS col2 FROM tab2 cor0
----
-1445
-2635
-5015

query I rowsort
SELECT DISTINCT 54 + col0 * 56 FROM tab2
----
4422
446
4478

skipif mysql # not compatible
query I rowsort
SELECT ALL - + CAST ( - 51 AS REAL ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT + 15 FROM tab2, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT - 54 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT - col2 * 32 AS col0 FROM tab2 AS cor0
----
-1216
-832
-864

query I rowsort
SELECT col2 * col1 * + 95 AS col0 FROM tab1
----
118560
133380
54150

query I rowsort
SELECT DISTINCT + 30 + - tab0.col0 AS col2 FROM tab0
----
-5
-59
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8603
SELECT tab1.col1 * - CAST( NULL AS SIGNED ) FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8603
SELECT tab1.col1 * - CAST ( NULL AS INTEGER ) FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL 40 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT col2 + ( + col2 ) FROM tab0
----
164
2
66

query I rowsort
SELECT col0 * col2 * col0 AS col1 FROM tab2
----
1323
158184
237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8607
SELECT + CAST( NULL AS SIGNED ) * + cor0.col0 + - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8607
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col0 + - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col0 * + col2 * + tab1.col1 AS col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - - col2 - 41 AS col2 FROM tab0 AS cor0
----
-40
-8
41

query I rowsort
SELECT ALL 7 FROM tab2, tab2 cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

onlyif mysql # use DIV operator for integer division
query I rowsort label-8612
SELECT ALL - col2 DIV + col1 + - col0 col0 FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8612
SELECT ALL - col2 / + col1 + - col0 col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - col1 + + col1 * cor0.col2 FROM tab1 AS cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 36 col1 FROM tab2 AS cor0
----
36
36
36

query I rowsort
SELECT - 54 + col1 * - ( - cor0.col0 ) FROM tab0 AS cor0
----
2010
3341
8045

query I rowsort
SELECT col1 * + col1 + col1 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT ALL + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 * - 52 FROM tab1 AS cor0
----
189696
399360
8424

query I rowsort
SELECT + - 71 * col1 AS col1 FROM tab0 AS cor0
----
-6106
-6461
-6887

query I rowsort
SELECT + col2 * col0 - + col0 AS col0 FROM tab0 AS cor0
----
0
7209
768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 - col2 col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col2 + col0 col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT 81 * col1 AS col0 FROM tab2
----
1377
2511
4779

query I rowsort
SELECT + + col1 * col0 + + ( - col1 ) * - col0 * - 36 FROM tab1 AS cor0
----
-22400
-2730
-36400

query I rowsort
SELECT DISTINCT + + col0 + - col1 AS col1 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL + + 4 FROM tab0 AS cor0
----
4
4
4

query I rowsort
SELECT - + col2 + - col2 AS col0 FROM tab0 cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-8628
SELECT + cor0.col1 DIV col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8628
SELECT + cor0.col1 / col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2, tab1 AS cor0, tab0 cor1
----
-54
-57
-96

query I rowsort
SELECT + 27 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT - ( - col2 ) * + col2 * 77 AS col2 FROM tab2 AS cor0
----
111188
52052
56133

query I rowsort
SELECT - 23 + col0 * col0 FROM tab1 AS cor0
----
-14
4073
6377

query I rowsort
SELECT + 27 + + col0 FROM tab2 cor0
----
105
106
34

query I rowsort
SELECT col1 * col2 - + ( col2 ) * - cor0.col0 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT - - col1 + + ( - 53 ) * col1 AS col2 FROM tab2 AS cor0
----
-1612
-3068
-884

query I rowsort
SELECT - col0 - 81 FROM tab2 AS cor0
----
-159
-160
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 34 * - 87 col2 FROM tab0 cor0
----
-254388
-269178
-286926

query I rowsort
SELECT + col1 + + col0 + + col0 AS col1 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT - - col0 + 98 * col1 + cor0.col1 FROM tab2 AS cor0
----
1762
3076
5919

query I rowsort
SELECT ALL 84 * col1 AS col1 FROM tab0
----
7224
7644
8148

query I rowsort
SELECT DISTINCT 76 * - col1 FROM tab0
----
-6536
-6916
-7372

query I rowsort
SELECT DISTINCT col2 + 93 AS col1 FROM tab2 AS cor0
----
119
120
131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col2 col0 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - cor0.col0 + ( + col1 ) AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT col0 * - col0 * + cor0.col1 - col0 * 15 * 75 AS col0 FROM tab0 AS cor0
----
-158200
-76536
-820936

query I rowsort
SELECT DISTINCT - col0 + + ( - cor0.col0 ) FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + col0 * 17 * 89 AS col0 FROM tab0 AS cor0
----
134657
36312
52955

query I rowsort
SELECT DISTINCT - col2 + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - col1 ) * col1 col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-8650
SELECT ALL + - col0 DIV col1 + + col0 col1 FROM tab2 cor0
----
7
75
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8650
SELECT ALL + - col0 / col1 + + col0 col1 FROM tab2 cor0
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-8651
SELECT DISTINCT + 41 + + col2 DIV col1 AS col1 FROM tab0 cor0
----
41

skipif mysql # not compatible
query I rowsort label-8651
SELECT DISTINCT + 41 + + col2 / col1 AS col1 FROM tab0 cor0
----
41

query I rowsort
SELECT 20 AS col2 FROM tab0 AS cor0
----
20
20
20

query I rowsort
SELECT + + 81 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT - ( - ( col1 ) ) * - col0 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - + 9 + 60 AS col0 FROM tab1 AS cor0
----
51
51
51

query I rowsort
SELECT ALL 73 FROM tab2, tab2 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT - 63 AS col0 FROM tab2
----
-63
-63
-63

query I rowsort
SELECT ALL 11 * col0 FROM tab1
----
33
704
880

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab1, tab1 AS cor0
----
16

query I rowsort
SELECT DISTINCT ( cor0.col0 * - 65 ) AS col2 FROM tab0, tab0 cor0, tab2 AS cor1
----
-1560
-2275
-5785

query I rowsort
SELECT DISTINCT col2 + cor0.col2 * + col2 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8662
SELECT + CAST( NULL AS SIGNED ) * 34 + cor0.col1 - - 94 * col1 / col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8662
SELECT + CAST ( NULL AS INTEGER ) * 34 + cor0.col1 - - 94 * col1 / col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 8 FROM tab2 cor0
----
8
8
8

query I rowsort
SELECT DISTINCT + 0 * + ( col1 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT - - col0 * + col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - - 74 FROM tab0 AS cor0
----
74
74
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-8667
SELECT DISTINCT tab2.col0 DIV - col0 AS col0 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-8667
SELECT DISTINCT tab2.col0 / - col0 AS col0 FROM tab2
----
-1

query I rowsort
SELECT + col0 + - ( + 12 ) FROM tab2
----
-5
66
67

query I rowsort
SELECT DISTINCT - 5 FROM tab0, tab2 AS cor0
----
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8670
SELECT col2 DIV tab0.col0 + + col1 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-8670
SELECT col2 / tab0.col0 + + col1 FROM tab0
----
87
91
97

query I rowsort
SELECT ALL 3 FROM tab2, tab0 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT ( col0 * - col0 ) + col1 FROM tab2
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col2 + + col2 col2 FROM tab2
----
111
85
93

query I rowsort
SELECT + + cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - + cor0.col2 + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT 89 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT + - col2 * col0 * col0 + col2 FROM tab0 cor0
----
-1224
-18975
-649440

query I rowsort
SELECT ALL - col2 - col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT - ( + col1 ) + col2 AS col0 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL 33 * - col2 FROM tab1 AS cor0
----
-1782
-1881
-3168

query I rowsort
SELECT ALL + 86 + col1 - + col0 AS col2 FROM tab2 cor0
----
110
24
67

query I rowsort
SELECT col2 * - 67 FROM tab1 AS cor0
----
-3618
-3819
-6432

query I rowsort
SELECT + ( + col2 ) * + col2 + - col1 * col2 AS col0 FROM tab0 AS cor0
----
-1749
-738
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8684
SELECT - ( col1 ) DIV + col1 AS col0 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8684
SELECT - ( col1 ) / + col1 AS col0 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 56 AS col0 FROM tab2 AS cor0
----
56
56
56

query I rowsort
SELECT - - col2 + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + col0 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + col2 * + col1 + - col2 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8689
SELECT + col0 DIV cor0.col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-8689
SELECT + col0 / cor0.col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT DISTINCT - - col1 * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8691
SELECT - + col0 DIV col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8691
SELECT - + col0 / col2 FROM tab1 AS cor0
----
-1
0
0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab2 AS cor1, tab0, tab1 cor2
----
3645 values hashing to def82b52aa9c83b91991d7d043276abe

query I rowsort
SELECT + 24 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT ALL + col1 + - 93 * cor0.col0 FROM tab2 AS cor0
----
-620
-7195
-7330

query I rowsort
SELECT ALL cor1.col2 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8696
SELECT ALL + + col1 * CAST( 49 AS SIGNED ) FROM tab0 AS cor0
----
4214
4459
4753

skipif mysql # not compatible
query I rowsort label-8696
SELECT ALL + + col1 * CAST ( 49 AS INTEGER ) FROM tab0 AS cor0
----
4214
4459
4753

query I rowsort
SELECT DISTINCT - col1 * col0 + 53 FROM tab1 AS cor0
----
-25
-587
-987

query I rowsort
SELECT DISTINCT - - col0 + cor0.col2 * col1 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + + col2 + col1 * + col2 FROM tab2 AS cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 * 81 * + col0 + ( ( col1 ) ) * + col2 col1 FROM tab1 AS cor0
----
-11772
-294975
-620928

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col2 col1 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8702
SELECT + col0 + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8702
SELECT + col0 + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + 98 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT ALL - col2 * ( 33 ) - - col0 FROM tab1 AS cor0
----
-1779
-1817
-3088

query I rowsort
SELECT ALL - - col1 * col0 + - 89 + col2 * col1 * + 22 FROM tab1 cor0
----
13091
28407
30877

onlyif mysql # use DIV operator for integer division
query I rowsort label-8706
SELECT ALL + col0 + + cor0.col1 DIV col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-8706
SELECT ALL + col0 + + cor0.col1 / col0 FROM tab1 AS cor0
----
11
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8707
SELECT - + col1 + col0 DIV + cor0.col0 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-8707
SELECT - + col1 + col0 / + cor0.col0 FROM tab2 AS cor0
----
-16
-30
-58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8708
SELECT ALL + col0 + - CAST( NULL AS SIGNED ) + - 89 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8708
SELECT ALL + col0 + - CAST ( NULL AS INTEGER ) + - 89 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8709
SELECT DISTINCT cor0.col1 * CAST( col2 AS SIGNED ) + col2 * 29 FROM tab1 AS cor0
----
2223
2970
4032

skipif mysql # not compatible
query I rowsort label-8709
SELECT DISTINCT cor0.col1 * CAST ( col2 AS INTEGER ) + col2 * 29 FROM tab1 AS cor0
----
2223
2970
4032

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8710
SELECT ALL + + col2 * CAST( NULL AS SIGNED ) - 58 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8710
SELECT ALL + + col2 * CAST ( NULL AS INTEGER ) - 58 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT + cor0.col2 * - 99 + col2 FROM tab1 AS cor0
----
-5292
-5586
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-8713
SELECT DISTINCT + CAST( + cor0.col2 AS SIGNED ) + + col2 DIV - ( col0 ) + - col1 FROM tab0 AS cor0
----
-54
-9
-96

skipif mysql # not compatible
query I rowsort label-8713
SELECT DISTINCT + CAST ( + cor0.col2 AS INTEGER ) + + col2 / - ( col0 ) + - col1 FROM tab0 AS cor0
----
-54
-9
-96

query I rowsort
SELECT ALL + - ( col2 ) + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( + cor0.col0 ) FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8716
SELECT CAST( col1 AS SIGNED ) * + col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-8716
SELECT CAST ( col1 AS INTEGER ) * + col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to b34c9987c389223e07378cde8a36e94f

query I rowsort
SELECT DISTINCT - col0 * col1 - 74 FROM tab2 AS cor0
----
-1417
-291
-4676

query I rowsort
SELECT ALL col1 + + col2 * col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT 77 + - col2 * - 51 AS col0 FROM tab1 AS cor0
----
2831
2984
4973

query I rowsort
SELECT DISTINCT - + col1 - col1 * cor0.col2 * 81 FROM tab1 AS cor0
----
-101101
-113750
-46180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 32 col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

query I rowsort
SELECT ( + col0 ) + + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col2 - col0 FROM tab2 cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT ( col0 ) + col1 * - 38 AS col0 FROM tab1 AS cor0
----
-316
-414
-985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + col0 * col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - cor0.col0 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8730
SELECT ALL col1 + 63 DIV - col0 FROM tab1 AS cor0
----
10
13
5

skipif mysql # not compatible
query I rowsort label-8730
SELECT ALL col1 + 63 / - col0 FROM tab1 AS cor0
----
10
13
5

query I rowsort
SELECT col0 * col0 + - col0 * - col2 AS col0 FROM tab1
----
14080
171
7744

query I rowsort
SELECT 29 + + col2 FROM tab0
----
111
30
62

query I rowsort
SELECT ALL col0 * col1 + - cor0.col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL + 82 + col2 AS col0 FROM tab1
----
136
139
178

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8735
SELECT - CAST( NULL AS SIGNED ) FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8735
SELECT - CAST ( NULL AS INTEGER ) FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - ( - col2 ) * cor0.col1 + col0 * cor0.col1 AS col1 FROM tab1 cor0
----
1210
1482
2288

query I rowsort
SELECT DISTINCT - col2 * col0 + - col2 * - col2 AS col2 FROM tab0 AS cor0
----
-34
-574
297

query I rowsort
SELECT ALL - 47 * col0 + - col2 FROM tab1 AS cor0
----
-195
-3065
-3856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - - cor0.col1 col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT + - 50 + col1 FROM tab1 AS cor0
----
-24
-37
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-8741
SELECT col1 DIV 14 - + col1 FROM tab0 AS cor0
----
-80
-85
-91

skipif mysql # not compatible
query I rowsort label-8741
SELECT col1 / 14 - + col1 FROM tab0 AS cor0
----
-80
-85
-91

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col2 * - 66 FROM tab1 AS cor0
----
-3564
-3762
-6336

query I rowsort
SELECT ALL col2 * + col2 + - tab1.col2 * col0 AS col0 FROM tab1
----
-399
1536
2754

query I rowsort
SELECT DISTINCT + 24 FROM tab0, tab0 AS cor0
----
24

query I rowsort
SELECT 11 * col0 FROM tab1
----
33
704
880

query I rowsort
SELECT - ( 82 ) AS col1 FROM tab0
----
-82
-82
-82

query I rowsort
SELECT ALL - 33 + - col1 AS col1 FROM tab0 AS cor0
----
-119
-124
-130

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8749
SELECT CAST( col1 + + col1 AS SIGNED ) FROM tab1
----
20
26
52

skipif mysql # not compatible
query I rowsort label-8749
SELECT CAST ( col1 + + col1 AS INTEGER ) FROM tab1
----
20
26
52

query I rowsort
SELECT + 58 * - 29 FROM tab1
----
-1682
-1682
-1682

query I rowsort
SELECT DISTINCT + col2 * + 22 AS col2 FROM tab0
----
1804
22
726

onlyif mysql # use DIV operator for integer division
query I rowsort label-8752
SELECT ALL 34 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8752
SELECT ALL 34 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - col1 ) * col2 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8754
SELECT - col2 + CAST( + 81 AS SIGNED ) DIV - col0 AS col1 FROM tab2 AS cor0
----
-27
-38
-39

skipif mysql # not compatible
query I rowsort label-8754
SELECT - col2 + CAST ( + 81 AS INTEGER ) / - col0 AS col1 FROM tab2 AS cor0
----
-27
-38
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 + + col2 * + col1 * - ( + col1 ) col2 FROM tab0
----
-244044
-678953
-9374

query I rowsort
SELECT - col1 * + col2 + 27 FROM tab0
----
-2811
-70
-7435

query I rowsort
SELECT + col1 + col0 * - col1 AS col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT - 82 + + col0 * - col1 AS col1 FROM tab2
----
-1425
-299
-4684

query I rowsort
SELECT - col1 + + 66 AS col2 FROM tab1
----
40
53
56

query I rowsort
SELECT ALL - + col1 + + col1 AS col1 FROM tab1 AS cor0
----
0
0
0

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-8762
SELECT ALL - col0 - CAST( col2 AS SIGNED ) * col2 FROM tab0 cor0
----
-1113
-36
-6813

skipif mysql # not compatible
query I rowsort label-8762
SELECT ALL - col0 - CAST ( col2 AS INTEGER ) * col2 FROM tab0 cor0
----
-1113
-36
-6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-8763
SELECT ALL + col0 DIV 17 AS col2 FROM tab1 AS cor0
----
0
3
4

skipif mysql # not compatible
query I rowsort label-8763
SELECT ALL + col0 / 17 AS col2 FROM tab1 AS cor0
----
0
3
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8764
SELECT DISTINCT col1 + CAST( NULL AS SIGNED ) * col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8764
SELECT DISTINCT col1 + CAST ( NULL AS INTEGER ) * col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT + col0 * 85 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT cor0.col1 * 88 FROM tab2 AS cor0
----
1496
2728
5192

query I rowsort
SELECT DISTINCT + col2 + - ( 83 ) * - col0 FROM tab0 AS cor0
----
2025
2906
7469

query I rowsort
SELECT ALL col2 * + 83 AS col2 FROM tab2 AS cor0
----
2158
2241
3154

query I rowsort
SELECT ALL col2 * 29 AS col0 FROM tab1
----
1566
1653
2784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

query I rowsort
SELECT col2 + ( cor0.col1 ) * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT col1 * 22 AS col0 FROM tab1
----
220
286
572

query I rowsort
SELECT ALL col1 * col2 * + col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + col0 * - cor0.col2 * - col1 AS col0 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT ALL 9 FROM tab2, tab2 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT ALL - tab0.col1 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT col2 + + col0 * col0 FROM tab0 AS cor0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + cor0.col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - ( 3 ) * col2 AS col2 FROM tab2 AS cor0
----
-114
-78
-81

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 col2 * + col1 + - col0 * + 56 FROM tab0 AS cor0
----
-1863
1494
2478

query I rowsort
SELECT ALL + + 86 * + col0 + + 19 FROM tab0 AS cor0
----
2083
3029
7673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - col0 col1 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8784
SELECT DISTINCT 0 DIV - col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8784
SELECT DISTINCT 0 / - col0 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + cor0.col1 * 62 col2 FROM tab0 AS cor0
----
5308
5553
5979

onlyif mysql # use DIV operator for integer division
query I rowsort label-8786
SELECT - - col2 DIV cor0.col1 + + cor0.col1 col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8786
SELECT - - col2 / cor0.col1 + + cor0.col1 col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + col0 * col2 - col1 AS col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT - 83 + - cor0.col1 FROM tab2 AS cor0
----
-100
-114
-142

onlyif mysql # use DIV operator for integer division
query I rowsort label-8789
SELECT ALL - col1 + + col0 DIV ( - col0 * col1 + col1 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8789
SELECT ALL - col1 + + col0 / ( - col0 * col1 + col1 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8790
SELECT + col2 + + col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8790
SELECT + col2 + + col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8791
SELECT CAST( NULL AS SIGNED ) col2 FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8791
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT - - 67 FROM tab2 AS cor0
----
67
67
67

skipif mysql # not compatible
query I rowsort
SELECT ALL ( cor0.col0 ) * + CAST ( - 46 AS REAL ) FROM tab0 AS cor0
----
-1104
-1610
-4094

query I rowsort
SELECT DISTINCT - + 46 FROM tab0 AS cor0
----
-46

query I rowsort
SELECT ALL - + col1 + - col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT + ( + col1 ) + 85 * - col2 AS col1 FROM tab0 AS cor0
----
-2719
-6879
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col0 col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ( - col1 ) * - col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + col2 * - cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + 25 - + col2 AS col0 FROM tab0 cor0
----
-57
-8
24

query I rowsort
SELECT DISTINCT - - 52 * col1 - + col1 * + col0 FROM tab1 AS cor0
----
-120
-364
1274

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 62 col0 FROM tab0 AS cor0
----
-62
-62
-62

query I rowsort
SELECT 93 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + cor0.col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 + col2 * col2 * + col1 FROM tab0 cor0
----
132
611973
93678

query I rowsort
SELECT DISTINCT + - 72 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8808
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * + col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8808
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * + col2 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - ( + 66 ) + col0 FROM tab2 AS cor0
----
-59
12
13

query I rowsort
SELECT 47 * - col0 + col0 AS col2 FROM tab0 cor0
----
-1104
-1610
-4094

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab1 cor3
----
3645 values hashing to 160649b428b8d254517cd2096e054d21

query I rowsort
SELECT - + 65 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 4ca93c42a91c7dff917e7b7090ba9e57

query I rowsort
SELECT 74 + - 30 + col1 * col0 FROM tab0 AS cor0
----
2108
3439
8143

query I rowsort
SELECT DISTINCT col0 + - 55 FROM tab2
----
-48
23
24

query I rowsort
SELECT DISTINCT 42 FROM tab0, tab0 AS cor0
----
42

query I rowsort
SELECT ALL + + cor0.col0 + 23 FROM tab0 AS cor0
----
112
47
58

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT - tab0.col0 FROM tab0, tab1 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 26e45cd9fe71a2b90a8bdef20c88e70d

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 AS col0 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8820
SELECT ALL + CAST( - col2 AS SIGNED ) * - cor0.col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-8820
SELECT ALL + CAST ( - col2 AS INTEGER ) * - cor0.col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + + 95 * col1 FROM tab2 AS cor0
----
1615
2945
5605

query I rowsort
SELECT ALL - 23 FROM tab1 AS cor0
----
-23
-23
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-8823
SELECT DISTINCT col0 + col0 * col1 + ( col0 ) DIV col0 FROM tab0 AS cor0
----
2089
3431
8189

skipif mysql # not compatible
query I rowsort label-8823
SELECT DISTINCT col0 + col0 * col1 + ( col0 ) / col0 FROM tab0 AS cor0
----
2089
3431
8189

onlyif mysql # use DIV operator for integer division
query I rowsort label-8824
SELECT DISTINCT + - col0 + + col2 * + col1 DIV col1 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-8824
SELECT DISTINCT + - col0 + + col2 * + col1 / col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - col1 * + 22 + - col0 FROM tab2 AS cor0
----
-1376
-453
-689

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8826
SELECT ALL + CAST( NULL AS SIGNED ) + col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8826
SELECT ALL + CAST ( NULL AS INTEGER ) + col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 93 FROM tab1, tab2 AS cor0, tab1 cor1
----
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8828
SELECT DISTINCT - 9 DIV + col0 AS col0 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8828
SELECT DISTINCT - 9 / + col0 AS col0 FROM tab2 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8829
SELECT + cor0.col2 DIV cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8829
SELECT + cor0.col2 / cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 * - col2 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8831
SELECT col1 + + col2 * - CAST( - col2 + col0 AS SIGNED ) FROM tab1 AS cor0
----
-389
1549
2780

skipif mysql # not compatible
query I rowsort label-8831
SELECT col1 + + col2 * - CAST ( - col2 + col0 AS INTEGER ) FROM tab1 AS cor0
----
-389
1549
2780

query I rowsort
SELECT ALL - cor0.col0 * - col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + 52 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8834
SELECT ALL cor0.col1 DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8834
SELECT ALL cor0.col1 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL col2 + - col2 * - col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + col1 + cor0.col2 * col0 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + col1 + - 32 FROM tab0 cor0
----
54
59
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col0 col2 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8840
SELECT DISTINCT + col1 DIV col0 + col0 AS col2 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-8840
SELECT DISTINCT + col1 / col0 + col0 AS col2 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT DISTINCT - col0 * ( + col2 ) - col1 FROM tab0 AS cor0
----
-132
-7389
-878

onlyif mysql # use DIV operator for integer division
query I rowsort label-8842
SELECT ALL + col0 DIV + cor0.col0 + - ( col2 ) * 95 + ( - col0 * + 24 ) FROM tab0 AS cor0
----
-3710
-934
-9925

skipif mysql # not compatible
query I rowsort label-8842
SELECT ALL + col0 / + cor0.col0 + - ( col2 ) * 95 + ( - col0 * + 24 ) FROM tab0 AS cor0
----
-3710
-934
-9925

query I rowsort
SELECT ALL - - col2 - + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - col2 - - 80 * - col0 FROM tab1 AS cor0
----
-14080
-402
-8768

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 - + col2 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT - + col1 - + 94 AS col2 FROM tab0 cor0
----
-180
-185
-191

query I rowsort
SELECT ALL + + col2 * - col0 + col0 * col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + ( + col2 ) AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col0 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - ( col1 ) + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - - 81 + - 23 FROM tab0 AS cor0
----
58
58
58

query I rowsort
SELECT + + 75 * + ( col0 ) + + 74 * + col0 FROM tab1 cor0
----
11920
447
9536

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8853
SELECT ALL - + CAST( NULL AS SIGNED ) * - 95 * - col2 + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8853
SELECT ALL - + CAST ( NULL AS INTEGER ) * - 95 * - col2 + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 15 + + col0 + col2 FROM tab1 cor0
----
136
191
72

query I rowsort
SELECT DISTINCT + col2 + 12 AS col1 FROM tab0 AS cor0
----
13
45
94

query I rowsort
SELECT - - cor0.col1 * - col0 + - col1 AS col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT - cor0.col2 + 49 * - col0 AS col2 FROM tab0 cor0
----
-1209
-1716
-4443

query I rowsort
SELECT ALL - cor0.col1 + - 97 AS col2 FROM tab2 AS cor0
----
-114
-128
-156

onlyif mysql # use DIV operator for integer division
query I rowsort label-8859
SELECT + col1 DIV + 60 + col2 AS col1 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8859
SELECT + col1 / + 60 + col2 AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - - 19 AS col1 FROM tab2 AS cor0
----
19

query I rowsort
SELECT DISTINCT - col1 * - col2 + - 46 - col0 AS col1 FROM tab1
----
1122
1355
460

query I rowsort
SELECT ALL col2 + + ( - col1 ) * col1 FROM tab2
----
-251
-3455
-934

onlyif mysql # use DIV operator for integer division
query I rowsort label-8863
SELECT DISTINCT col2 + ( 22 ) DIV col0 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8863
SELECT DISTINCT col2 + ( 22 ) / col0 AS col2 FROM tab0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8864
SELECT tab1.col2 + CAST( tab1.col0 AS SIGNED ) AS col1 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-8864
SELECT tab1.col2 + CAST ( tab1.col0 AS INTEGER ) AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT + col0 + 40 AS col1 FROM tab1
----
104
120
43

query I rowsort
SELECT DISTINCT + col2 * - col0 AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL + + cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + + col2 * - col0 + col0 FROM tab2 cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + - 53 + - col1 FROM tab0 AS cor0
----
-139
-144
-150

query I rowsort
SELECT + - 23 FROM tab0 AS cor0
----
-23
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 63 * cor0.col1 * + col0 col2 FROM tab0 AS cor0
----
130032
213885
510237

query I rowsort
SELECT ALL ( col2 ) * - col0 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT col0 + cor0.col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL 87 + - col1 + col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
2056
245
3072

query I rowsort
SELECT DISTINCT 3 * - col1 FROM tab2 AS cor0
----
-177
-51
-93

query I rowsort
SELECT + - col1 * + col0 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 + - cor0.col2 - - col2 col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT + col2 * col2 + - col2 AS col2 FROM tab2
----
1406
650
702

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col0 AS REAL ) + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - 76 FROM tab2
----
-76

query I rowsort
SELECT DISTINCT - ( col2 ) + cor0.col2 * + col2 * + col1 AS col2 FROM tab0 AS cor0
----
611802
93621
96

query I rowsort
SELECT DISTINCT + ( 63 ) + + col0 FROM tab2 AS cor0
----
141
142
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-8883
SELECT - + cor0.col0 DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8883
SELECT - + cor0.col0 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 96 * 49 FROM tab1
----
4704

query I rowsort
SELECT ( + col0 * + col0 + tab0.col0 ) FROM tab0
----
1260
600
8010

query I rowsort
SELECT DISTINCT + 8 FROM tab0, tab2 AS cor0
----
8

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab1 AS cor0 WHERE NOT NULL IN ( col0 )
----

query I rowsort
SELECT col2 * - col0 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL >= - col1
----

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 - col1 AS col2 FROM tab1 AS cor0 WHERE NOT NULL NOT IN ( col2 / col0 )
----

query I rowsort
SELECT ALL + col1 * - col0 * col1 FROM tab1
----
-13520
-2028
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col2 * - col2 col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL col1 * - col0 * col0 - + col0 AS col0 FROM tab2
----
-106176
-1526
-359034

query I rowsort
SELECT ALL col1 + - col1 * col2 FROM tab2
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-8895
SELECT col0 * tab0.col1 - tab0.col1 DIV col0 FROM tab0
----
2061
3393
8098

skipif mysql # not compatible
query I rowsort label-8895
SELECT col0 * tab0.col1 - tab0.col1 / col0 FROM tab0
----
2061
3393
8098

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE col2 NOT BETWEEN ( col0 * col2 ) AND + col1 * + col2
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT col0 FROM tab0 AS cor0 WHERE col0 <= ( col0 )
----
24
35
89

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 >= col0
----
78
59
26
79
17
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - - col1 col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT col0 * - col2 + - col2 FROM tab2
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-8901
SELECT ALL col1 + col0 DIV col0 AS col2 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-8901
SELECT ALL col1 + col0 / col0 AS col2 FROM tab1
----
11
14
27

query I rowsort
SELECT + col0 * - tab2.col2 AS col1 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8903
SELECT - tab0.col1 * - col1 DIV col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8903
SELECT - tab0.col1 * - col1 / col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL tab2.col0 * tab2.col2 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + tab0.col0 + col0 + - col2 * col2 AS col0 FROM tab0
----
-1041
-6546
69

query I rowsort
SELECT + - col1 + col0 * col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - tab1.col2 AS col0 FROM tab1 WHERE NOT - col0 >= NULL
----

query I rowsort
SELECT col1 * col0 + + col2 AS col2 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT - + col1 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8910
SELECT - cor0.col0 DIV col2 AS col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8910
SELECT - cor0.col0 / col2 AS col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT col0 + - tab1.col2 + col1 AS col2 FROM tab1
----
-25
-3
17

query I rowsort
SELECT ALL + col2 * 23 + col1 AS col2 FROM tab1
----
1268
1321
2221

onlyif mysql # use DIV operator for integer division
query I rowsort label-8913
SELECT - col0 DIV - col0 + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-8913
SELECT - col0 / - col0 + col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT col2 + 12 * + 83 * + col2 AS col1 FROM tab2 AS cor0
----
25922
26919
37886

onlyif mysql # use DIV operator for integer division
query I rowsort label-8915
SELECT DISTINCT - col1 DIV - CAST( + cor0.col0 AS SIGNED ) FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-8915
SELECT DISTINCT - col1 / - CAST ( + cor0.col0 AS INTEGER ) FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT 42 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - ( + cor0.col1 ) ) * col1 + - col1 col0 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT - 27 + col2 AS col0 FROM tab2 AS cor0
----
-1
0
11

query I rowsort
SELECT DISTINCT 12 + - 71 AS col2 FROM tab1 AS cor0
----
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 0 + col0 col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8921
SELECT ALL - + col2 DIV cor0.col1 + - col0 * ( + col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-8921
SELECT ALL - + col2 / cor0.col1 + - col0 * ( + col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8922
SELECT ALL CAST( cor0.col2 AS SIGNED ) col2 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8922
SELECT ALL CAST ( cor0.col2 AS INTEGER ) col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col2 + 57 * + col0 FROM tab0 AS cor0
----
1401
1996
5155

query I rowsort
SELECT ALL - col2 * col1 * + col0 AS col1 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 29 FROM tab0 AS cor0
----
-29

query I rowsort
SELECT ALL 62 * - col2 FROM tab0 AS cor0
----
-2046
-5084
-62

query I rowsort
SELECT ALL - + col2 * + col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col1 + + ( col0 ) FROM tab0
----
110
132
180

query I rowsort
SELECT ALL + col1 + col0 * col0 * - col2 FROM tab0
----
-1128
-18922
-649431

onlyif mysql # use DIV operator for integer division
query I rowsort label-8931
SELECT - col0 + - col1 DIV - cor0.col2 AS col2 FROM tab0 AS cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-8931
SELECT - col0 + - col1 / - cor0.col2 AS col2 FROM tab0 AS cor0
----
-22
-88
62

query I rowsort
SELECT ALL ( + cor0.col1 ) * + col0 + + cor0.col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT cor0.col2 + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col1 * + tab0.col2 + col2 * tab0.col2 FROM tab0
----
14186
3927
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8935
SELECT + - col0 + col2 / + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8935
SELECT + - col0 + col2 / + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 96 AS col1 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT ALL - col2 * col0 - 16 AS col0 FROM tab2 AS cor0
----
-2044
-205
-3018

query I rowsort
SELECT DISTINCT + - ( col2 ) AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - + 63 - - col2 FROM tab1 AS cor0
----
-6
-9
33

query I rowsort
SELECT + cor0.col1 + + col0 * 56 AS col2 FROM tab2 AS cor0
----
423
4427
4441

query I rowsort
SELECT - - col2 * - col2 - 71 FROM tab2 AS cor0
----
-1515
-747
-800

onlyif mysql # use DIV operator for integer division
query I rowsort label-8942
SELECT + 23 DIV col0 + col2 FROM tab1 AS cor0
----
57
61
96

skipif mysql # not compatible
query I rowsort label-8942
SELECT + 23 / col0 + col2 FROM tab1 AS cor0
----
57
61
96

query I rowsort
SELECT DISTINCT + col0 * tab2.col0 AS col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL - 35 + cor0.col2 FROM tab1 AS cor0
----
19
22
61

query I rowsort
SELECT ALL col2 + cor0.col2 * - 2 + + col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL col2 * - ( col2 ) * - col0 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-8947
SELECT + cor0.col1 DIV 17 FROM tab0 cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-8947
SELECT + cor0.col1 / 17 FROM tab0 cor0
----
5
5
5

query I rowsort
SELECT cor0.col0 + cor0.col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - - col1 * - ( + cor0.col0 ) + - col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + 74 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT - ( - 45 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT + 39 + tab2.col2 + ( 25 * col0 ) FROM tab2
----
2015
2052
241

query I rowsort
SELECT + cor0.col0 * + col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + col2 - - col0 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT - col2 + ( ( col2 ) ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + cor0.col2 + 52 * + col1 AS col0 FROM tab2 AS cor0
----
1639
3094
922

query I rowsort
SELECT DISTINCT - col2 - + col1 * - col1 FROM tab0
----
7363
8199
9408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8958
SELECT DISTINCT - col2 * CAST( NULL AS SIGNED ) - + 41 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8958
SELECT DISTINCT - col2 * CAST ( NULL AS INTEGER ) - + 41 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + - col1 col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - col0 + - ( cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT - col0 + - 35 * col1 - col0 FROM tab0 AS cor0
----
-3058
-3363
-3465

query I rowsort
SELECT - col2 + col1 + col1 * + 4 FROM tab2
----
128
269
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-8963
SELECT ALL col0 + + col1 DIV col1 AS col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-8963
SELECT ALL col0 + + col1 / col1 AS col2 FROM tab1
----
4
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-8964
SELECT DISTINCT 39 DIV - col0 + 72 * + 6 * - col2 FROM tab1
----
-23341
-24624
-41472

skipif mysql # not compatible
query I rowsort label-8964
SELECT DISTINCT 39 / - col0 + 72 * + 6 * - col2 FROM tab1
----
-23341
-24624
-41472

query I rowsort
SELECT - tab0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ALL + 64 - - tab1.col1 FROM tab1
----
74
77
90

query I rowsort
SELECT + col1 + col2 + - 26 * 79 AS col0 FROM tab1
----
-1945
-1974
-1987

query I rowsort
SELECT col0 + tab2.col1 * ( - col0 ) * + col1 - - col1 AS col0 FROM tab2
----
-22735
-271381
-6689

query I rowsort
SELECT 87 - col0 * - 98 * + tab1.col0 FROM tab1
----
401495
627287
969

onlyif mysql # use DIV operator for integer division
query I rowsort label-8970
SELECT DISTINCT col1 + + col0 DIV - 38 + - tab2.col2 * col0 FROM tab2
----
-158
-1971
-2987

skipif mysql # not compatible
query I rowsort label-8970
SELECT DISTINCT col1 + + col0 / - 38 + - tab2.col2 * col0 FROM tab2
----
-158
-1971
-2987

query I rowsort
SELECT DISTINCT 86 FROM tab0, tab1, tab2 AS cor0
----
86

query I rowsort
SELECT DISTINCT - col2 + + 64 * ( col1 * col1 ) FROM tab1
----
10720
43210
6343

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col2 * - col2 col2 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT DISTINCT - tab0.col0 + + 22 AS col1 FROM tab0
----
-13
-2
-67

query I rowsort
SELECT - 49 FROM tab1, tab0 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT col2 - ( - col2 ) AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + + col2 + + 0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - col2 + 98 AS col2 FROM tab1 AS cor0
----
2
41
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8979
SELECT ALL - col0 + CAST( NULL AS SIGNED ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8979
SELECT ALL - col0 + CAST ( NULL AS INTEGER ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( tab2.col2 ) * + col1 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8981
SELECT ALL - 46 DIV 50 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8981
SELECT ALL - 46 / 50 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col0 + + ( + cor0.col0 ) FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + 0 + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - + col2 * + col0 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 53 * - col0 FROM tab2 AS cor0
----
371
4134
4187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT + col0 + col2 * + col2 AS col2 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT ALL - 98 + col0 FROM tab0
----
-63
-74
-9

query I rowsort
SELECT ALL + col2 * + col2 + col1 FROM tab2
----
1461
735
760

query I rowsort
SELECT + col0 + - col2 * 29 FROM tab0 AS cor0
----
-2289
-933
6

query I rowsort
SELECT ALL 7 * cor0.col2 AS col0 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT DISTINCT + ( - col0 ) * + col0 FROM tab0 cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-8993
SELECT - 92 DIV - col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8993
SELECT - 92 / - col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT + ( + 58 ) AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT ALL + + 64 * cor0.col0 - + col1 * + 34 * + col1 FROM tab0 AS cor0
----
-249928
-275858
-317666

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 94 col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT DISTINCT 36 * col1 + 46 + col2 AS col0 FROM tab1 AS cor0
----
1036
463
610

query I rowsort
SELECT DISTINCT ( col2 ) * cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 5 * + ( col0 ) FROM tab2
----
35
390
395

query I rowsort
SELECT ALL + 54 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT - - cor0.col2 * + col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + col0 + 53 FROM tab1 AS cor0
----
117
133
56

query I rowsort
SELECT + ( + col1 ) * cor0.col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - + col0 + 29 * cor0.col1 FROM tab0 AS cor0
----
2470
2550
2778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9005
SELECT cor1.col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-9005
SELECT cor1.col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + cor1.col2 AS col0 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9007
SELECT DISTINCT - col0 + + col1 * 10 DIV + 69 FROM tab0 AS cor0
----
-12
-21
-76

skipif mysql # not compatible
query I rowsort label-9007
SELECT DISTINCT - col0 + + col1 * 10 / + 69 FROM tab0 AS cor0
----
-12
-21
-76

query I rowsort
SELECT DISTINCT + + col1 * - col2 AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 88 * + col0 FROM tab1
----
264
5632
7040

query I rowsort
SELECT - 93 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 373608b5054d92c1128be0c71db4d4ed

query I rowsort
SELECT + col2 * - col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT 20 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT DISTINCT + col2 + 11 AS col1 FROM tab2 AS cor0
----
37
38
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-9014
SELECT ALL - col2 * - 98 + col1 DIV col2 + - ( + col1 ) FROM tab1 cor0
----
5266
5576
9395

skipif mysql # not compatible
query I rowsort label-9014
SELECT ALL - col2 * - 98 + col1 / col2 + - ( + col1 ) FROM tab1 cor0
----
5266
5576
9395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col1 col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + col0 * 77 - + 31 AS col2 FROM tab2 AS cor0
----
508
5975
6052

query I rowsort
SELECT - cor0.col0 - + col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + - col2 * - col0 + col2 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-9020
SELECT col1 DIV - col1 + 13 + col1 * col0 * + 88 AS col2 FROM tab0 AS cor0
----
181644
298772
712724

skipif mysql # not compatible
query I rowsort label-9020
SELECT col1 / - col1 + 13 + col1 * col0 * + 88 AS col2 FROM tab0 AS cor0
----
181644
298772
712724

query I rowsort
SELECT + - cor0.col0 + - ( 49 ) * - col1 AS col1 FROM tab0 cor0
----
4190
4370
4718

query I rowsort
SELECT + cor0.col0 * 99 - + 65 * col2 FROM tab0 AS cor0
----
231
3400
3481

query I rowsort
SELECT ALL - cor0.col2 * + 68 * - col0 + col1 AS col0 FROM tab2 AS cor0
----
12883
137963
204153

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) * cor0.col0 * 18 FROM tab2, tab1 AS cor0
----
-138240
-2916
-65664

query I rowsort
SELECT - col0 * col1 - + col0 * + col0 FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT DISTINCT - col2 * + cor0.col2 + + col1 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + cor0.col2 - - 26 FROM tab0 AS cor0
----
108
27
59

query I rowsort
SELECT col0 + 5 FROM tab0 AS cor0
----
29
40
94

query I rowsort
SELECT + + 97 AS col0 FROM tab2 AS cor0
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9030
SELECT col1 DIV ( + col0 ) FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-9030
SELECT col1 / ( + col0 ) FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT 4 + col0 FROM tab1 AS cor0
----
68
7
84

query I rowsort
SELECT - 56 + + col2 AS col2 FROM tab0 AS cor0
----
-23
-55
26

query I rowsort
SELECT ALL 88 FROM tab2 cor0
----
88
88
88

query I rowsort
SELECT + cor0.col1 * col2 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + + 41 AS col1 FROM tab0 AS cor0
----
41

query I rowsort
SELECT - 57 + col2 AS col1 FROM tab0 cor0
----
-24
-56
25

query I rowsort
SELECT ALL + 73 * 66 FROM tab1 AS cor0
----
4818
4818
4818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 23 + - cor0.col2 col1 FROM tab0 AS cor0
----
-10
-59
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9039
SELECT DISTINCT - CAST( + 78 AS SIGNED ) AS col2 FROM tab2 cor0
----
-78

skipif mysql # not compatible
query I rowsort label-9039
SELECT DISTINCT - CAST ( + 78 AS INTEGER ) AS col2 FROM tab2 cor0
----
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9040
SELECT ALL + col2 * ( - col2 ) + col0 * CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9040
SELECT ALL + col2 * ( - col2 ) + col0 * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + - 15 * + col2 FROM tab2 cor0
----
-312
-398
-491

query I rowsort
SELECT ALL - col2 + 62 * + 15 FROM tab0
----
848
897
929

query I rowsort
SELECT cor0.col1 + - col0 AS col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT cor0.col2 + cor0.col1 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 993162448d72b066e1ac9ba4caa8d8d7

query I rowsort
SELECT DISTINCT - col1 * + ( + col0 ) + ( + col0 ) FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ( col1 ) + - col2 * + 49 FROM tab1 AS cor0
----
-2620
-2783
-4691

query I rowsort
SELECT + + 13 - ( col2 + cor0.col2 ) FROM tab2 cor0
----
-39
-41
-63

query I rowsort
SELECT - 30 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

query I rowsort
SELECT 13 * col2 + ( - col0 + + col2 ) AS col1 FROM tab0 AS cor0
----
-21
1059
438

onlyif mysql # use DIV operator for integer division
query I rowsort label-9050
SELECT ALL + col2 * col1 DIV + 63 FROM tab2 cor0
----
10
13
24

skipif mysql # not compatible
query I rowsort label-9050
SELECT ALL + col2 * col1 / + 63 FROM tab2 cor0
----
10
13
24

query I rowsort
SELECT DISTINCT - + col0 * col2 + col0 * col1 AS col1 FROM tab2 AS cor0
----
-1659
2574
28

query I rowsort
SELECT 30 * tab1.col1 AS col2 FROM tab1
----
300
390
780

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9053
SELECT ( + col0 ) * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9053
SELECT ( + col0 ) * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + - col1 * 52 FROM tab0 cor0
----
-4558
-4823
-5141

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 89 * - 70 col1 FROM tab1, tab0, tab2 AS cor0
----
-6230

query I rowsort
SELECT ALL 73 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT - col0 * - 54 * col0 AS col2 FROM tab2
----
2646
328536
337014

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9058
SELECT - cor0.col1 * - CAST( col0 * col0 + - col0 AS SIGNED ) FROM tab1 AS cor0
----
156
40320
82160

skipif mysql # not compatible
query I rowsort label-9058
SELECT - cor0.col1 * - CAST ( col0 * col0 + - col0 AS INTEGER ) FROM tab1 AS cor0
----
156
40320
82160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + ( col2 ) col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - - cor0.col2 * - ( 56 ) AS col0 FROM tab1 AS cor0
----
-3024
-3192
-5376

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 + + tab0.col2 col0 FROM tab0
----
127
176
95

query I rowsort
SELECT 73 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT DISTINCT + tab0.col0 AS col2 FROM tab0, tab1, tab2 AS cor0
----
24
35
89

query I rowsort
SELECT + ( + 82 + - tab0.col1 ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to aa2635aafcb5757b55822d069c40b682

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9065
SELECT - col2 * - CAST( 8 + - col2 AS SIGNED ) col1 FROM tab1
----
-2484
-2793
-8448

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9065
SELECT - col2 * - CAST ( 8 + - col2 AS INTEGER ) col1 FROM tab1
----
-2484
-2793
-8448

onlyif mysql # use DIV operator for integer division
query I rowsort label-9066
SELECT - 73 DIV col0 - - col0 AS col2 FROM tab1
----
-21
63
80

skipif mysql # not compatible
query I rowsort label-9066
SELECT - 73 / col0 - - col0 AS col2 FROM tab1
----
-21
63
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9067
SELECT + col0 DIV + col2 + + ( - col0 ) * col0 * col2 - ( col1 * col0 ) FROM tab1
----
-234111
-564
-615440

skipif mysql # not compatible
query I rowsort label-9067
SELECT + col0 / + col2 + + ( - col0 ) * col0 * col2 - ( col1 * col0 ) FROM tab1
----
-234111
-564
-615440

query I rowsort
SELECT DISTINCT col2 * col2 * + col1 - col1 FROM tab1
----
119795
32480
75790

onlyif mysql # use DIV operator for integer division
query I rowsort label-9069
SELECT - col2 DIV + tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9069
SELECT - col2 / + tab0.col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + col0 * + col1 * ( + col1 ) FROM tab1
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-9071
SELECT DISTINCT + col2 * col1 DIV col1 - + 58 FROM tab1
----
-1
-4
38

skipif mysql # not compatible
query I rowsort label-9071
SELECT DISTINCT + col2 * col1 / col1 - + 58 FROM tab1
----
-1
-4
38

query I rowsort
SELECT 29 + - col2 * cor0.col1 * col2 AS col1 FROM tab2 AS cor0
----
-22570
-24519
-39855

query I rowsort
SELECT + ( col0 ) + + col2 + col0 * + cor0.col0 FROM tab1 AS cor0
----
4217
6576
66

query I rowsort
SELECT ALL col1 + col1 + 66 FROM tab0
----
238
248
260

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT - + col2 + - ( - col1 ) FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL + + col1 + - col0 * + col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + cor0.col1 * + 20 AS col0 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT + col2 * 41 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT + col2 + + ( col2 ) + - col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - col2 * 39 AS col0 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT + col1 * + 59 FROM tab2 AS cor0
----
1003
1829
3481

query I rowsort
SELECT DISTINCT - - col0 + col2 * + col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT - col0 + col2 * tab0.col1 FROM tab0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 col2 FROM tab1
----
-54
-67
23

query III rowsort
SELECT * FROM tab2 WHERE + col2 IN ( tab2.col0 + col1 )
----

query I rowsort
SELECT ALL col1 * - col1 - tab2.col2 * - col0 AS col0 FROM tab2
----
-1453
-772
2713

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 col0 FROM tab0 WHERE NULL <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col1 + + col2 * + col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT col0 * - tab0.col1 AS col2 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9092
SELECT + tab0.col0 DIV col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9092
SELECT + tab0.col0 / col0 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL col0 * + col2 + tab2.col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 WHERE col1 IN ( + col1 )
----
10
13
26

query I rowsort
SELECT DISTINCT col2 * col1 * - tab0.col0 + col2 FROM tab0 WHERE col0 * - col1 >= NULL
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL <> - col0
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col0 NOT IN ( - tab2.col1 )
----

query I rowsort
SELECT DISTINCT tab2.col2 * col0 + tab2.col2 AS col2 FROM tab2
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col0 col1 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT cor0.col0 - - col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - + col2 * cor0.col1 * ( - col1 ) FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT - ( col1 ) - col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT + 17 AS col1 FROM tab1 AS cor0
----
17
17
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-9104
SELECT DISTINCT + 26 DIV - col0 + - CAST( + col0 + cor0.col1 AS SIGNED ) * col2 FROM tab0 AS cor0
----
-132
-14760
-3631

skipif mysql # not compatible
query I rowsort label-9104
SELECT DISTINCT + 26 / - col0 + - CAST ( + col0 + cor0.col1 AS INTEGER ) * col2 FROM tab0 AS cor0
----
-132
-14760
-3631

query I rowsort
SELECT col0 + - col2 * - col1 FROM tab2
----
1612
725
844

query I rowsort
SELECT ALL - col2 * + col0 + - col2 * col2 AS col1 FROM tab2
----
-2704
-4446
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-9107
SELECT + tab0.col0 DIV - tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9107
SELECT + tab0.col0 / - tab0.col1 FROM tab0
----
0
0
0

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <> col1 - col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - col0 + col2 * - col1 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT + col0 * col2 + - tab0.col1 * + col2 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT ALL - tab2.col0 * - col2 + - col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT DISTINCT + 33 + col2 AS col2 FROM tab2 AS cor0
----
59
60
71

query I rowsort
SELECT + 38 AS col0 FROM tab1 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col2 - col0 * col2 col0 FROM tab2 AS cor0
----
-2356
-494
648

onlyif mysql # use DIV operator for integer division
query I rowsort label-9116
SELECT DISTINCT - col1 DIV col1 col1 FROM tab1 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9116
SELECT DISTINCT - col1 / col1 col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL + + cor0.col1 + - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col2 + - col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT + + col1 + + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - col1 + col2 * + col0 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT ALL + col0 + col2 * + col2 * col1 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT DISTINCT - ( - 4 ) AS col1 FROM tab2
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col2 col1 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort
SELECT + col0 * CAST ( - 3 AS REAL ) - col0 AS col0 FROM tab2 AS cor0
----
-28
-312
-316

query I rowsort
SELECT 61 + 32 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

onlyif mysql # use DIV operator for integer division
query I rowsort label-9127
SELECT ALL col2 DIV - col0 + - col1 DIV 57 AS col1 FROM tab2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-9127
SELECT ALL col2 / - col0 + - col1 / 57 AS col1 FROM tab2
----
-1
-3
0

query I rowsort
SELECT ALL - - 5 FROM tab0 AS cor0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - ( col0 ) col2 FROM tab1 AS cor0
----
-128
-160
-6

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( - 36 AS REAL ) AS col2 FROM tab1 cor0
----
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-9131
SELECT DISTINCT + + 91 DIV col1 + col1 FROM tab1 AS cor0
----
19
20
29

skipif mysql # not compatible
query I rowsort label-9131
SELECT DISTINCT + + 91 / col1 + col1 FROM tab1 AS cor0
----
19
20
29

query I rowsort
SELECT DISTINCT - col1 * - col1 + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT + 52 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

onlyif mysql # use DIV operator for integer division
query I rowsort label-9134
SELECT col0 DIV + ( col1 ) - + col0 * + col0 * 98 AS col0 FROM tab2
----
-4802
-596231
-611614

skipif mysql # not compatible
query I rowsort label-9134
SELECT col0 / + ( col1 ) - + col0 * + col0 * 98 AS col0 FROM tab2
----
-4802
-596231
-611614

query I rowsort
SELECT - col2 + + 74 AS col1 FROM tab0
----
-8
41
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9137
SELECT ALL + 85 DIV + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 3294894d5691618c467f11d859a940f4

skipif mysql # not compatible
query I rowsort label-9137
SELECT ALL + 85 / + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 3294894d5691618c467f11d859a940f4

query I rowsort
SELECT 49 * + col0 + - col0 * + col1 * - col1 FROM tab0
----
178680
331030
741370

query I rowsort
SELECT DISTINCT 52 AS col2 FROM tab0
----
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-9140
SELECT ALL 94 DIV - col2 AS col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-9140
SELECT ALL 94 / - col2 AS col2 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT ALL + 32 * - col2 AS col0 FROM tab1 AS cor0
----
-1728
-1824
-3072

query I rowsort
SELECT ALL 62 * + col1 + + col1 FROM tab2 AS cor0
----
1071
1953
3717

query I rowsort
SELECT + + cor0.col0 + - col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - - col2 + - 42 AS col2 FROM tab0 AS cor0
----
-41
-9
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9145
SELECT + - col0 + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9145
SELECT + - col0 + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9146
SELECT ALL col1 / tab1.col1 + CAST( NULL AS SIGNED ) * + tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9146
SELECT ALL col1 / tab1.col1 + CAST ( NULL AS INTEGER ) * + tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + 77 FROM tab2, tab0 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL + + cor1.col1 + + cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 71bdffb602517a95c6721e05f7b4b3dd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9149
SELECT - - ( ( col1 ) ) * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9149
SELECT - - ( ( col1 ) ) * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 17 * + col2 FROM tab0 AS cor0
----
1394
17
561

onlyif mysql # use DIV operator for integer division
query I rowsort label-9151
SELECT ALL tab0.col1 DIV tab0.col1 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9151
SELECT ALL tab0.col1 / tab0.col1 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT + 39 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT + - col1 + + col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT cor0.col1 FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT + - 94 FROM tab1, tab1 cor0 CROSS JOIN tab2 AS cor1
----
27 values hashing to 7eeab220fc6bbc2fb3fa4aef8600159f

query I rowsort
SELECT + 0 * - cor0.col0 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT 74 * - col0 AS col0 FROM tab1
----
-222
-4736
-5920

onlyif mysql # use DIV operator for integer division
query I rowsort label-9158
SELECT ALL tab0.col0 DIV tab0.col2 FROM tab0, tab1 cor0
----
9 values hashing to 41f0a3543969085f79919f2dde47982a

skipif mysql # not compatible
query I rowsort label-9158
SELECT ALL tab0.col0 / tab0.col2 FROM tab0, tab1 cor0
----
9 values hashing to 41f0a3543969085f79919f2dde47982a

query I rowsort
SELECT ALL - 40 AS col0 FROM tab0
----
-40
-40
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-9160
SELECT col2 * tab2.col2 DIV - 44 AS col0 FROM tab2
----
-15
-16
-32

skipif mysql # not compatible
query I rowsort label-9160
SELECT col2 * tab2.col2 / - 44 AS col0 FROM tab2
----
-15
-16
-32

query I rowsort
SELECT ALL + col0 * col1 - col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT - - 40 + - col1 - - ( + col1 * - col1 ) FROM tab1 AS cor0
----
-142
-662
-70

query I rowsort
SELECT cor0.col1 * - col2 + - ( col2 ) - + col1 FROM tab2 AS cor0
----
-1619
-701
-895

query I rowsort
SELECT + - col1 * - col2 + - col2 * 98 + col1 FROM tab0 AS cor0
----
-310
-483
96

query I rowsort
SELECT DISTINCT col1 + cor0.col1 * col1 FROM tab1 AS cor0
----
110
182
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col2 - + ( - 3 ) col0 FROM tab1 AS cor0
----
111
117
195

query I rowsort
SELECT col1 - col1 * 26 FROM tab1 AS cor0
----
-250
-325
-650

query I rowsort
SELECT ALL + 68 AS col1 FROM tab2 AS cor0
----
68
68
68

query I rowsort
SELECT - tab2.col1 - cor0.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to fada44019ad084108f202db45f662e36

query I rowsort
SELECT - 31 * col1 AS col2 FROM tab0 AS cor0
----
-2666
-2821
-3007

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9171
SELECT - col1 + + CAST( + 67 AS SIGNED ) * col2 FROM tab0 AS cor0
----
-30
2125
5403

skipif mysql # not compatible
query I rowsort label-9171
SELECT - col1 + + CAST ( + 67 AS INTEGER ) * col2 FROM tab0 AS cor0
----
-30
2125
5403

query I rowsort
SELECT col1 - ( - cor0.col0 * col2 ) AS col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - 83 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 77a48ad722db122f51d5ef36604ad843

query I rowsort
SELECT col2 * + ( ( tab0.col0 ) ) AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT + + col1 + col1 - + col0 * + col2 FROM tab2 AS cor0
----
-127
-1910
-2968

query I rowsort
SELECT + 93 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

onlyif mysql # use DIV operator for integer division
query I rowsort label-9177
SELECT DISTINCT + col1 DIV + col1 + col2 + + col2 AS col2 FROM tab1 AS cor0
----
109
115
193

skipif mysql # not compatible
query I rowsort label-9177
SELECT DISTINCT + col1 / + col1 + col2 + + col2 AS col2 FROM tab1 AS cor0
----
109
115
193

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col1 col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9179
SELECT - + col2 DIV - ( - col2 ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9179
SELECT - + col2 / - ( - col2 ) FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - - col2 * - ( 70 * col1 ) FROM tab0 AS cor0
----
-198660
-522340
-6790

query I rowsort
SELECT - col2 + - ( ( col0 ) ) * cor0.col1 FROM tab2 AS cor0
----
-1381
-244
-4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 88 col1 FROM tab2, tab2 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 00f4aded8ec5b6d9904061ce3da09e20

query I rowsort
SELECT + ( + cor0.col2 ) + - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * + col1 * col1 AS col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT + cor0.col0 + - 74 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to a63d1b45b18c696e0e35cb4c1bb9a331

query I rowsort
SELECT - col0 * + ( - col1 ) FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9187
SELECT CAST( NULL AS SIGNED ) + ( col1 ) * 23 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9187
SELECT CAST ( NULL AS INTEGER ) + ( col1 ) * 23 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9188
SELECT + - col1 DIV col2 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-9188
SELECT + - col1 / col2 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT ALL + 6 AS col0 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT - cor0.col1 * col1 * - col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT DISTINCT - - col0 * col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + - col2 + + col1 * ( 33 ) AS col2 FROM tab0 AS cor0
----
2805
2921
3200

onlyif mysql # use DIV operator for integer division
query I rowsort label-9193
SELECT - - col0 DIV col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9193
SELECT - - col0 / col2 AS col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - 89 + - col1 * 77 FROM tab2 AS cor0
----
-1398
-2476
-4632

query I rowsort
SELECT - - ( col1 ) + 5 * col2 FROM tab1 AS cor0
----
295
296
493

query I rowsort
SELECT - 62 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT DISTINCT ( + 60 ) FROM tab0
----
60

query I rowsort
SELECT + + ( - col2 ) * col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col1 * - col0 + 19 * + col2 + col1 FROM tab0 cor0
----
-1351
-3279
-6450

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9200
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 79 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-9200
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 79 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT + + 40 * + 10 + col0 + 31 AS col2 FROM tab2 AS cor0
----
438
509
510

onlyif mysql # use DIV operator for integer division
query I rowsort label-9202
SELECT ALL - ( + col1 ) * col0 + - col0 DIV + 82 col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9202
SELECT ALL - ( + col1 ) * col0 + - col0 / + 82 col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL 18 - - 99 FROM tab0 AS cor0
----
117
117
117

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9204
SELECT DISTINCT CAST( NULL AS SIGNED ) + 60 * - col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9204
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 60 * - col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9205
SELECT DISTINCT - 36 DIV col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9205
SELECT DISTINCT - 36 / col2 AS col1 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 * 52 col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 217845634d5ce1d8a55b5ed3d9b6cc4f

query I rowsort
SELECT DISTINCT cor0.col0 + 60 FROM tab2 AS cor0
----
138
139
67

skipif mysql # not compatible
query I rowsort
SELECT ALL - ( cor0.col1 ) * col2 + - CAST ( + 73 * col2 AS REAL ) FROM tab1 AS cor0
----
-4731
-5346
-8256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 * + cor1.col2 * + 45 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 775a4cd738fe1c1e4dba39896e21489a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9210
SELECT DISTINCT CAST( 39 AS SIGNED ) FROM tab1, tab0 AS cor0
----
39

skipif mysql # not compatible
query I rowsort label-9210
SELECT DISTINCT CAST ( 39 AS INTEGER ) FROM tab1, tab0 AS cor0
----
39

query I rowsort
SELECT col1 - 87 * - col0 AS col2 FROM tab2
----
640
6845
6890

query I rowsort
SELECT ALL col2 + col0 * + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL + tab1.col0 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9214
SELECT ( col1 * + col2 ) + CAST( NULL AS SIGNED ) + ( col1 ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9214
SELECT ( col1 * + col2 ) + CAST ( NULL AS INTEGER ) + ( col1 ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 - - col2 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT col2 + + 67 * + col2 - + tab1.col0 * - col1 AS col2 FROM tab1
----
3750
4516
7568

query I rowsort
SELECT + 61 FROM tab0, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9218
SELECT + CAST( col2 AS SIGNED ) + col2 FROM tab1
----
108
114
192

skipif mysql # not compatible
query I rowsort label-9218
SELECT + CAST ( col2 AS INTEGER ) + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT - ( - col2 ) + col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9220
SELECT + ( - 72 ) DIV + col2 - col0 col0 FROM tab0 AS cor0
----
-107
-26
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9220
SELECT + ( - 72 ) / + col2 - col0 col0 FROM tab0 AS cor0
----
-107
-26
-89

query I rowsort
SELECT DISTINCT - col1 + + cor0.col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + col1 * col1 - - col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - - cor0.col1 + + col1 * + col1 * - 12 AS col1 FROM tab2 AS cor0
----
-11501
-3451
-41713

query I rowsort
SELECT ALL col0 + ( tab0.col0 ) FROM tab0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9225
SELECT DISTINCT ( - col2 ) * col2 + - CAST( col0 AS SIGNED ) + - col2 FROM tab0 AS cor0
----
-1146
-37
-6895

skipif mysql # not compatible
query I rowsort label-9225
SELECT DISTINCT ( - col2 ) * col2 + - CAST ( col0 AS INTEGER ) + - col2 FROM tab0 AS cor0
----
-1146
-37
-6895

query I rowsort
SELECT DISTINCT - + col2 + - col0 * - col2 * col1 AS col2 FROM tab2 AS cor0
----
119626
50996
5832

query I rowsort
SELECT DISTINCT + cor0.col0 - + ( - cor0.col0 ) * col2 AS col1 FROM tab2 AS cor0
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 col2 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9229
SELECT DISTINCT - ( + col1 ) / CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-9229
SELECT DISTINCT - ( + col1 ) / CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT ALL - col1 + - col0 * + ( - 67 ) + col1 * + tab1.col1 FROM tab1
----
4378
5516
851

onlyif mysql # use DIV operator for integer division
query I rowsort label-9231
SELECT + 17 + - col1 DIV - 47 AS col1 FROM tab0
----
18
18
19

skipif mysql # not compatible
query I rowsort label-9231
SELECT + 17 + - col1 / - 47 AS col1 FROM tab0
----
18
18
19

query I rowsort
SELECT + col0 * + 31 AS col0 FROM tab1 AS cor0
----
1984
2480
93

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 97b43fbe79eecd0bc6921392403b666d

query I rowsort
SELECT ALL - 71 FROM tab0, tab1 AS cor0
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

query I rowsort
SELECT ALL col0 * 75 FROM tab2 AS cor0
----
525
5850
5925

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9236
SELECT - col0 + CAST( NULL AS SIGNED ) * - 19 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9236
SELECT - col0 + CAST ( NULL AS INTEGER ) * - 19 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 * - 67 FROM tab0 AS cor0
----
2211
5494
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9238
SELECT DISTINCT - - col2 + + CAST( NULL AS SIGNED ) * col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9238
SELECT DISTINCT - - col2 + + CAST ( NULL AS INTEGER ) * col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * ( 17 ) FROM tab0 AS cor0
----
-1513
-408
-595

query I rowsort
SELECT + + col0 * + ( cor0.col1 ) AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - cor0.col2 * + 4 FROM tab2 AS cor0
----
-104
-108
-152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT + tab2.col2 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT + + 5 AS col1 FROM tab0, tab1 AS cor0
----
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9246
SELECT ALL + + col1 + - 89 DIV - col0 FROM tab2 AS cor0
----
18
43
60

skipif mysql # not compatible
query I rowsort label-9246
SELECT ALL + + col1 + - 89 / - col0 FROM tab2 AS cor0
----
18
43
60

query I rowsort
SELECT ALL - col0 + - col1 + col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col0 * - col1 * col2 FROM tab2
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-9249
SELECT col2 + 35 DIV + col1 AS col1 FROM tab1 cor0
----
55
60
98

skipif mysql # not compatible
query I rowsort label-9249
SELECT col2 + 35 / + col1 AS col1 FROM tab1 cor0
----
55
60
98

query I rowsort
SELECT - + 21 AS col1 FROM tab2 cor0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT - col2 + + col1 * col0 AS col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL - cor0.col0 + 76 FROM tab1 AS cor0
----
-4
12
73

query I rowsort
SELECT + - col2 * 50 * + col1 AS col1 FROM tab0 cor0
----
-141900
-373100
-4850

onlyif mysql # use DIV operator for integer division
query I rowsort label-9254
SELECT DISTINCT + ( col2 ) * col2 DIV col0 AS col1 FROM tab2 AS cor0
----
104
18
8

skipif mysql # not compatible
query I rowsort label-9254
SELECT DISTINCT + ( col2 ) * col2 / col0 AS col1 FROM tab2 AS cor0
----
104
18
8

query I rowsort
SELECT 94 * - col1 AS col1 FROM tab1 AS cor0
----
-1222
-2444
-940

onlyif mysql # use DIV operator for integer division
query I rowsort label-9256
SELECT DISTINCT + 7 DIV - cor0.col0 - col0 FROM tab2 AS cor0
----
-78
-79
-8

skipif mysql # not compatible
query I rowsort label-9256
SELECT DISTINCT + 7 / - cor0.col0 - col0 FROM tab2 AS cor0
----
-78
-79
-8

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
3645 values hashing to 2c9bc625661696fa1cf187c4d0f703a1

query I rowsort
SELECT - 92 AS col0 FROM tab2 cor0
----
-92
-92
-92

query I rowsort
SELECT ALL - 77 * - 25 + col2 + + cor0.col1 FROM tab1 AS cor0
----
1992
2005
2034

query I rowsort
SELECT DISTINCT + col0 * col0 - cor0.col1 FROM tab1 cor0
----
-17
4086
6387

query I rowsort
SELECT - col0 + + col0 * col2 AS col0 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-9262
SELECT + col2 DIV + col1 + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9262
SELECT + col2 / + col1 + col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9263
SELECT ALL - col0 DIV col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9263
SELECT ALL - col0 / col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - 82 * - 7 * - col2 FROM tab1 AS cor0
----
-30996
-32718
-55104

query I rowsort
SELECT ALL + - cor0.col1 + + col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + 65 * + col0 + + 16 * col2 FROM tab1 AS cor0
----
1059
5072
6736

query I rowsort
SELECT DISTINCT 55 AS col0 FROM tab0 AS cor0
----
55

query I rowsort
SELECT ALL - cor0.col0 * + col1 + col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL + col1 * tab1.col0 * - col0 AS col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT + cor0.col0 * + col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col2 + - cor0.col0 + - ( + col2 ) FROM tab0 AS cor0
----
-253
-37
-90

query I rowsort
SELECT DISTINCT 40 FROM tab2 AS cor0
----
40

query I rowsort
SELECT ALL - 42 + - col2 FROM tab0 cor0
----
-124
-43
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-9274
SELECT DISTINCT + col0 DIV - col0 + 41 - 54 col2 FROM tab0 AS cor0
----
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9274
SELECT DISTINCT + col0 / - col0 + 41 - 54 col2 FROM tab0 AS cor0
----
-14

onlyif mysql # use DIV operator for integer division
query I rowsort label-9275
SELECT 42 + col1 DIV - 21 AS col0 FROM tab2 AS cor0
----
40
41
42

skipif mysql # not compatible
query I rowsort label-9275
SELECT 42 + col1 / - 21 AS col0 FROM tab2 AS cor0
----
40
41
42

query I rowsort
SELECT - col0 * - col0 - col0 AS col1 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - cor0.col0 + + col0 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9279
SELECT DISTINCT - - col1 * + col0 - 21 * + ( col2 ) / - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9279
SELECT DISTINCT - - col1 * + col0 - 21 * + ( col2 ) / - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 64 * col1 * - 0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9281
SELECT DISTINCT col2 * + col2 + - 34 DIV + col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-9281
SELECT DISTINCT col2 * + col2 + - 34 / + col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT tab1.col0 * + col0 + col1 + tab1.col1 * + tab1.col0 AS col2 FROM tab1
----
113
4746
7453

query I rowsort
SELECT col2 * 80 AS col1 FROM tab2 AS cor0
----
2080
2160
3040

query I rowsort
SELECT DISTINCT ( 91 ) FROM tab0 cor0
----
91

query I rowsort
SELECT ALL 90 + col2 AS col1 FROM tab0 AS cor0
----
123
172
91

query I rowsort
SELECT + + 76 * - col1 + + col0 * col2 AS col0 FROM tab2 AS cor0
----
-2167
-2456
1710

query I rowsort
SELECT col2 * 54 AS col0 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab2, tab2 AS cor0, tab1, tab0 AS cor1
----
-67

query I rowsort
SELECT + 77 * cor0.col2 FROM tab2 AS cor0
----
2002
2079
2926

query I rowsort
SELECT + + col1 + + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9291
SELECT - + cor0.col1 DIV ( - col0 * 36 ) - + 83 FROM tab2 cor0
----
-83
-83
-83

skipif mysql # not compatible
query I rowsort label-9291
SELECT - + cor0.col1 / ( - col0 * 36 ) - + 83 FROM tab2 cor0
----
-83
-83
-83

query I rowsort
SELECT col0 + 29 FROM tab0 AS cor0
----
118
53
64

query I rowsort
SELECT + col1 + - col2 * - cor0.col1 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT 73 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT - col0 + + col0 * col0 * - col0 FROM tab2 cor0
----
-350
-474630
-493118

query I rowsort
SELECT col2 * - col2 + col0 + col1 FROM tab1 AS cor0
----
-2887
-3175
-9123

query I rowsort
SELECT col1 * - tab2.col0 + + col1 FROM tab2
----
-1326
-186
-4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9298
SELECT - col1 * - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9298
SELECT - col1 * - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9299
SELECT DISTINCT + col2 + cor0.col2 DIV + col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-9299
SELECT DISTINCT + col2 + cor0.col2 / + col0 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT - + col1 * ( 22 ) AS col0 FROM tab1 AS cor0
----
-220
-286
-572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) - cor0.col1 col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT 96 * + 18 FROM tab0, tab0 cor0
----
9 values hashing to e15a6dd5128a388519cad9336243d557

query I rowsort
SELECT DISTINCT - 66 FROM tab2, tab2 AS cor0
----
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9304
SELECT DISTINCT CAST( NULL AS SIGNED ) * 49 - - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9304
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 49 - - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 * 38 * col1 - col0 AS col0 FROM tab1 AS cor0
----
25685
3736
6342

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

onlyif mysql # use DIV operator for integer division
query I rowsort label-9307
SELECT col2 DIV 43 + col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9307
SELECT col2 / 43 + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL - 37 FROM tab2, tab1 cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT DISTINCT 20 AS col0 FROM tab0, tab1 cor0
----
20

query I rowsort
SELECT 78 AS col2 FROM tab2
----
78
78
78

query I rowsort
SELECT col2 * col1 * col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + col2 + - col0 * - col1 AS col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT col2 * - cor0.col0 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9314
SELECT + CAST( NULL AS SIGNED ) * col2 + col2 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9314
SELECT + CAST ( NULL AS INTEGER ) * col2 + col2 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL 69 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab1 AS cor0, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT col0 * - col0 * - col2 AS col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL ( + 48 ) FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT + 7 * + col1 * col2 AS col0 FROM tab1
----
3990
8736
9828

query I rowsort
SELECT - 39 + - col0 FROM tab0 AS cor0
----
-128
-63
-74

query I rowsort
SELECT + col2 * - 48 * - cor0.col1 FROM tab1 AS cor0
----
27360
59904
67392

query I rowsort
SELECT + col1 + 28 AS col0 FROM tab1 AS cor0
----
38
41
54

query I rowsort
SELECT col1 + col2 * col0 + col2 AS col2 FROM tab1 AS cor0
----
242
3715
7789

query I rowsort
SELECT col1 + + col2 * + col2 * col0 + col1 FROM tab0 AS cor0
----
229
26308
598618

query I rowsort
SELECT ALL - - col2 * - col1 * col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ( - col0 ) AS col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - col0 + col2 * col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT col2 * + col0 + col1 * col0 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT + ( + col1 ) + col0 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL + cor0.col0 * + col1 + col1 + + col2 * + cor0.col0 AS col1 FROM tab0 cor0
----
15488
2942
3527

query I rowsort
SELECT ALL - 98 + + col1 - ( + col2 ) AS col1 FROM tab1 AS cor0
----
-126
-145
-181

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - - ( col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 1 * + col1 + + tab2.col2 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab2
----
-56

query I rowsort
SELECT ALL - col0 + + 22 * - col1 FROM tab2 AS cor0
----
-1376
-453
-689

query I rowsort
SELECT DISTINCT - - cor0.col0 * 51 FROM tab0 AS cor0
----
1224
1785
4539

onlyif mysql # use DIV operator for integer division
query I rowsort label-9340
SELECT cor0.col1 DIV 89 col2 FROM tab0 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9340
SELECT cor0.col1 / 89 col2 FROM tab0 AS cor0
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9341
SELECT + tab0.col0 + tab0.col0 * ( col0 ) DIV + col2 AS col0 FROM tab0
----
1260
185
41

skipif mysql # not compatible
query I rowsort label-9341
SELECT + tab0.col0 + tab0.col0 * ( col0 ) / + col2 AS col0 FROM tab0
----
1260
185
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9342
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-9342
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9343
SELECT DISTINCT 48 DIV + col0 col0 FROM tab2
----
0
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9343
SELECT DISTINCT 48 / + col0 col0 FROM tab2
----
0
6

query I rowsort
SELECT - col0 - + col1 * 97 FROM tab2
----
-1728
-3014
-5801

query I rowsort
SELECT DISTINCT cor0.col2 - - col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + 23 * col1 + + col0 AS col2 FROM tab0 AS cor0
----
2002
2182
2266

query I rowsort
SELECT DISTINCT 17 + 79 FROM tab0 cor0
----
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9348
SELECT DISTINCT ( + cor0.col1 ) * + col0 - CAST( + cor0.col2 AS SIGNED ) FROM tab1 AS cor0
----
24
583
944

skipif mysql # not compatible
query I rowsort label-9348
SELECT DISTINCT ( + cor0.col1 ) * + col0 - CAST ( + cor0.col2 AS INTEGER ) FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + col0 + - col1 AS col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + 30 AS col0 FROM tab1 cor0
----
30

query I rowsort
SELECT ALL col0 * col2 + col0 * - ( - col2 ) AS col0 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT DISTINCT 36 - col0 * + col2 AS col1 FROM tab2 AS cor0
----
-153
-1992
-2966

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9353
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col2 * col1 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9353
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col2 * col1 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - + col1 + 80 AS col2 FROM tab1 AS cor0
----
54
67
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-9355
SELECT ALL + + 20 * col1 DIV col0 AS col0 FROM tab0 AS cor0
----
20
55
71

skipif mysql # not compatible
query I rowsort label-9355
SELECT ALL + + 20 * col1 / col0 AS col0 FROM tab0 AS cor0
----
20
55
71

query I rowsort
SELECT - 44 AS col0 FROM tab2 cor0
----
-44
-44
-44

query I rowsort
SELECT col2 + + ( tab2.col2 ) * + col1 + 9 * + col1 AS col1 FROM tab2
----
1143
2091
837

query I rowsort
SELECT DISTINCT 48 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
48

query I rowsort
SELECT ( - 63 ) * col2 FROM tab2
----
-1638
-1701
-2394

query I rowsort
SELECT cor0.col0 * - 40 FROM tab2 cor0
----
-280
-3120
-3160

query I rowsort
SELECT + ( + col2 ) + col1 * - ( col2 ) * col2 FROM tab2 AS cor0
----
-22572
-24510
-39858

query I rowsort
SELECT ALL + 33 * 49 FROM tab1 AS cor0
----
1617
1617
1617

query I rowsort
SELECT ALL col0 + col2 * - col2 FROM tab1
----
-2913
-3185
-9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-9364
SELECT ALL - col2 + 97 DIV + tab0.col2 FROM tab0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-9364
SELECT ALL - col2 + 97 / + tab0.col2 FROM tab0
----
-31
-81
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + col1 col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL 1 + + col1 AS col1 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT + 78 + - 27 AS col2 FROM tab0
----
51

query I rowsort
SELECT + ( - 12 ) FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT DISTINCT + - 82 AS col0 FROM tab1 AS cor0
----
-82

query I rowsort
SELECT 26 + - col2 AS col1 FROM tab2 AS cor0
----
-1
-12
0

query I rowsort
SELECT ALL - col0 + col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT 48 FROM tab0, tab1 cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT DISTINCT + 1 * + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT 46 + col1 FROM tab0 AS cor0
----
132
137
143

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9376
SELECT ALL + - col1 * col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9376
SELECT ALL + - col1 * col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 28 FROM tab2 AS cor0
----
-28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9378
SELECT + 73 * - col0 + CAST( + col1 AS SIGNED ) * - col0 + - col1 FROM tab0 AS cor0
----
-14687
-3902
-6047

skipif mysql # not compatible
query I rowsort label-9378
SELECT + 73 * - col0 + CAST ( + col1 AS INTEGER ) * - col0 + - col1 FROM tab0 AS cor0
----
-14687
-3902
-6047

query I rowsort
SELECT + 68 * col1 + col0 AS col0 FROM tab2 AS cor0
----
1235
2115
4090

query I rowsort
SELECT + 60 AS col0 FROM tab2 cor0
----
60
60
60

query I rowsort
SELECT DISTINCT 47 * col1 AS col0 FROM tab1 AS cor0
----
1222
470
611

query I rowsort
SELECT - - 93 + + col1 * cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
191
2964
7637

query I rowsort
SELECT + 92 + col0 * col0 FROM tab1 AS cor0
----
101
4188
6492

query I rowsort
SELECT ALL - tab0.col1 + col1 * col0 AS col2 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT + col2 + ( col1 ) + + col1 AS col1 FROM tab2
----
144
72
89

query I rowsort
SELECT ALL cor0.col0 * col0 + ( - col0 ) FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT + col0 * ( + 54 ) + cor0.col0 AS col1 FROM tab1 AS cor0
----
165
3520
4400

query I rowsort
SELECT DISTINCT + col1 + - 61 * - col1 FROM tab2 AS cor0
----
1054
1922
3658

onlyif mysql # use DIV operator for integer division
query I rowsort label-9389
SELECT DISTINCT + col2 DIV - col0 AS col2 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9389
SELECT DISTINCT + col2 / - col0 AS col2 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT col1 + ( 25 ) AS col1 FROM tab0 AS cor0
----
111
116
122

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9391
SELECT ALL - col0 + - CAST( NULL AS SIGNED ) * - cor0.col1 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9391
SELECT ALL - col0 + - CAST ( NULL AS INTEGER ) * - cor0.col1 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col0 + 57 FROM tab1 AS cor0
----
121
137
60

query I rowsort
SELECT - + col0 + + cor0.col2 - col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-1232
-1353
-577

query I rowsort
SELECT DISTINCT col2 + - col1 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + col0 * - col0 + col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT - col0 * - col0 + + 79 FROM tab1 AS cor0
----
4175
6479
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9397
SELECT ALL col0 + CAST( - col2 + + col0 AS SIGNED ) FROM tab1 AS cor0
----
-48
64
71

skipif mysql # not compatible
query I rowsort label-9397
SELECT ALL col0 + CAST ( - col2 + + col0 AS INTEGER ) FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT - col1 * - col0 + - 69 AS col1 FROM tab0 AS cor0
----
1995
3326
8030

onlyif mysql # use DIV operator for integer division
query I rowsort label-9399
SELECT ALL + cor0.col1 DIV 78 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9399
SELECT ALL + cor0.col1 / 78 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9400
SELECT ALL + + col2 + + ( col1 ) DIV col1 AS col2 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-9400
SELECT ALL + + col2 + + ( col1 ) / col1 AS col2 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col1 AS REAL ) * col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - col0 + ( - col2 ) * 72 AS col0 FROM tab0 AS cor0
----
-107
-2400
-5993

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab2 AS cor0
----
92

query I rowsort
SELECT ALL + ( - 9 ) * col0 FROM tab0 AS cor0
----
-216
-315
-801

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9405
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + col1 * cor0.col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9405
SELECT DISTINCT - CAST ( NULL AS REAL ) + col1 * cor0.col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - + cor0.col2 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 24 * + col2 col0 FROM tab0 AS cor0
----
-1968
-24
-792

query I rowsort
SELECT - - tab2.col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT + 66 AS col2 FROM tab1, tab2 cor0
----
66

query I rowsort
SELECT - + ( col2 ) * - col2 * col0 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-9411
SELECT - col0 DIV + 37 + col0 FROM tab2
----
7
76
77

skipif mysql # not compatible
query I rowsort label-9411
SELECT - col0 / + 37 + col0 FROM tab2
----
7
76
77

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 149298fc0224e93f3bc2df24a3ebeeb8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9413
SELECT + + col2 DIV + 89 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9413
SELECT + + col2 / + 89 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + 14 FROM tab1
----
-1344
-756
-798

query I rowsort
SELECT DISTINCT tab0.col2 * ( col1 ) FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 + col0 col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL 2 * col0 - + col0 * - 70 FROM tab0
----
1728
2520
6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-9418
SELECT col2 + + col2 DIV + cor0.col1 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-9418
SELECT col2 + + col2 / + cor0.col1 FROM tab2 AS cor0
----
26
27
40

query I rowsort
SELECT - - ( 38 ) FROM tab2 AS cor0
----
38
38
38

query I rowsort
SELECT - + 36 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-3096
-3276
-3492

onlyif mysql # use DIV operator for integer division
query I rowsort label-9421
SELECT - cor0.col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9421
SELECT - cor0.col1 / + col1 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9422
SELECT DISTINCT + - col0 DIV + col0 col1 FROM tab2 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9422
SELECT DISTINCT + - col0 / + col0 col1 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT ALL + - ( col2 ) AS col1 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9424
SELECT cor0.col0 DIV - col2 + + col2 AS col2 FROM tab1 AS cor0
----
54
56
96

skipif mysql # not compatible
query I rowsort label-9424
SELECT cor0.col0 / - col2 + + col2 AS col2 FROM tab1 AS cor0
----
54
56
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9425
SELECT col0 * cor0.col2 + CAST( 2 AS SIGNED ) + - col1 AS col2 FROM tab0 AS cor0
----
-60
708
7209

skipif mysql # not compatible
query I rowsort label-9425
SELECT col0 * cor0.col2 + CAST ( 2 AS INTEGER ) + - col1 AS col2 FROM tab0 AS cor0
----
-60
708
7209

query I rowsort
SELECT DISTINCT col0 + + col1 * 75 FROM tab1 AS cor0
----
1055
1953
814

onlyif mysql # use DIV operator for integer division
query I rowsort label-9427
SELECT 57 DIV + cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-9427
SELECT 57 / + cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9428
SELECT - + 8 * col0 + + 47 DIV + col2 FROM tab0 AS cor0
----
-191
-233
-712

skipif mysql # not compatible
query I rowsort label-9428
SELECT - + 8 * col0 + + 47 / + col2 FROM tab0 AS cor0
----
-191
-233
-712

query I rowsort
SELECT + + col1 * + 16 FROM tab1 AS cor0
----
160
208
416

onlyif mysql # use DIV operator for integer division
query I rowsort label-9430
SELECT + col1 DIV + 44 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9430
SELECT + col1 / + 44 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * ( 56 + col2 ) FROM tab2 AS cor0
----
-2132
-2241
-3572

query I rowsort
SELECT - 7 * - tab2.col1 * col2 + 36 FROM tab2
----
10774
4558
5895

query I rowsort
SELECT col2 * col0 + 91 FROM tab0 AS cor0
----
126
7389
883

query I rowsort
SELECT + + cor0.col1 + cor0.col2 * - col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT cor0.col0 * ( - col1 ) + + col1 * col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + - 69 AS col0 FROM tab1 AS cor0
----
-12
-15
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-9437
SELECT ALL - - col1 DIV 25 AS col0 FROM tab0 cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-9437
SELECT ALL - - col1 / 25 AS col0 FROM tab0 cor0
----
3
3
3

query I rowsort
SELECT - col0 * 84 FROM tab1 AS cor0
----
-252
-5376
-6720

query I rowsort
SELECT ALL col0 * 22 * 6 + col0 FROM tab0 AS cor0
----
11837
3192
4655

query I rowsort
SELECT ALL + col2 * + 85 + + 98 AS col2 FROM tab1 AS cor0
----
4688
4943
8258

query I rowsort
SELECT DISTINCT - - col1 + + 1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT 62 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

onlyif mysql # use DIV operator for integer division
query I rowsort label-9443
SELECT ALL + + cor0.col0 + + 62 DIV 17 col1 FROM tab0 AS cor0
----
27
38
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9443
SELECT ALL + + cor0.col0 + + 62 / 17 col1 FROM tab0 AS cor0
----
27
38
92

query I rowsort
SELECT col2 + + col1 * col1 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL col1 * - ( cor0.col2 ) + - col0 * col1 * col0 FROM tab1 AS cor0
----
-1638
-41530
-84448

query I rowsort
SELECT DISTINCT + + col0 - + 77 * col0 FROM tab2 AS cor0
----
-532
-5928
-6004

onlyif mysql # use DIV operator for integer division
query I rowsort label-9447
SELECT - CAST( + col1 AS SIGNED ) 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-9447
SELECT - CAST ( + col1 AS INTEGER ) / col1 col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9448
SELECT ALL - col1 DIV ( + col1 * + col0 + - col0 ) AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9448
SELECT ALL - col1 / ( + col1 * + col0 + - col0 ) AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + - col0 * ( col1 ) AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + + col2 * + 2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + 68 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + + col2 + - 48 col0 FROM tab0 AS cor0
----
-39
-55
-82

query I rowsort
SELECT ALL - 19 * col1 * cor0.col2 - - col1 FROM tab2 AS cor0
----
-12257
-15872
-29087

query I rowsort
SELECT - col0 - col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT + 78 * tab1.col1 FROM tab1
----
1014
2028
780

query I rowsort
SELECT DISTINCT ( - col0 * + tab1.col1 ) AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL - col1 + - col2 * col1 AS col1 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT tab0.col0 * - tab0.col2 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9459
SELECT 67 DIV + col2 + 72 AS col2 FROM tab0 AS cor0
----
139
72
74

skipif mysql # not compatible
query I rowsort label-9459
SELECT 67 / + col2 + 72 AS col2 FROM tab0 AS cor0
----
139
72
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-9460
SELECT col2 + + col0 DIV - 12 FROM tab1 AS cor0
----
52
54
90

skipif mysql # not compatible
query I rowsort label-9460
SELECT col2 + + col0 / - 12 FROM tab1 AS cor0
----
52
54
90

query I rowsort
SELECT + cor0.col1 + - col1 * - 15 * col1 FROM tab0 AS cor0
----
111026
124306
141232

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9462
SELECT col2 - + col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9462
SELECT col2 - + col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col1 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab2 cor0
----
17
31
59

query I rowsort
SELECT + col0 * tab0.col1 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 + + col1 * - col1 AS col0 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT - col2 * col1 + col2 * col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT col1 * + tab1.col1 + + col2 AS col1 FROM tab1
----
157
265
730

query I rowsort
SELECT DISTINCT - col1 * col0 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col0 * tab2.col2 + col2 * - tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * tab0.col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col2 * col2 * col2 + + col1 * - col1 AS col1 FROM tab1
----
156788
185093
884567

query I rowsort
SELECT col1 * - col2 * col2 + col2 * col0 AS col1 FROM tab0
----
-604586
-62
-92862

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL NOT BETWEEN ( NULL ) AND ( col1 )
----

query I rowsort
SELECT DISTINCT tab1.col1 * col0 + - col0 * col2 / tab1.col2 FROM tab1 WHERE NULL NOT IN ( + col0 )
----

query I rowsort
SELECT ALL + col0 + - col2 * col0 AS col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL tab1.col1 + tab1.col2 FROM tab1
----
109
67
80

query I rowsort
SELECT - col2 * col1 + col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL + - col1 * - col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9480
SELECT DISTINCT - + 63 + - cor0.col2 DIV - cor0.col0 AS col1 FROM tab2 AS cor0
----
-60
-63

skipif mysql # not compatible
query I rowsort label-9480
SELECT DISTINCT - + 63 + - cor0.col2 / - cor0.col0 AS col1 FROM tab2 AS cor0
----
-60
-63

query I rowsort
SELECT - 91 * col0 FROM tab0 AS cor0
----
-2184
-3185
-8099

query I rowsort
SELECT 92 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT ALL + col2 - - col1 * ( - cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT + 54 + - col1 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
7450
8335
9463

query I rowsort
SELECT + - 95 AS col2 FROM tab2 AS cor0
----
-95
-95
-95

query I rowsort
SELECT + col0 + - col2 * - col1 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-22592
-24469
-39806

query I rowsort
SELECT ALL tab1.col2 * col2 * + tab1.col1 AS col0 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT DISTINCT + col1 * - col2 + tab2.col1 * + col2 * col1 AS col0 FROM tab2
----
10336
25110
88972

query I rowsort
SELECT DISTINCT - col1 - - col0 AS col2 FROM tab0 AS cor0 WHERE ( NULL ) IN ( col2 * - col2 * col1 )
----

query I rowsort
SELECT + col0 * col2 - cor0.col1 FROM tab0 AS cor0
----
-62
706
7207

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( col2 )
----

query I rowsort
SELECT DISTINCT - col0 * + col0 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-9493
SELECT ALL col2 * + tab0.col2 + col2 + - col0 DIV + tab0.col0 col2 FROM tab0
----
1
1121
6805

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9493
SELECT ALL col2 * + tab0.col2 + col2 + - col0 / + tab0.col0 col2 FROM tab0
----
1
1121
6805

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE NOT NULL NOT IN ( - col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * - col1 - col2 col1 FROM tab2
----
251
3455
934

query I rowsort
SELECT + col1 * + col1 + col2 * col1 AS col2 FROM tab1
----
1417
2080
670

query I rowsort
SELECT ALL col2 * col1 * col2 FROM tab0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab2 WHERE NULL >= ( - col1 + - col0 )
----

query I rowsort
SELECT ALL cor0.col0 * col1 + + col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-9500
SELECT col2 + + col0 DIV col1 FROM tab1 cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-9500
SELECT col2 + + col0 / col1 FROM tab1 cor0
----
102
54
63

query I rowsort
SELECT - col0 * col1 - - col0 AS col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT col0 FROM tab2 AS cor0 WHERE + col2 + col2 * col2 + cor0.col2 BETWEEN col2 AND ( NULL )
----

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 WHERE NOT ( + col0 * col1 * col2 ) > NULL
----

query I rowsort
SELECT col0 + + tab0.col2 + tab0.col0 FROM tab0 WHERE ( col0 ) = - col2 / col0
----

query I rowsort
SELECT DISTINCT col0 * col2 FROM tab2 WHERE NULL NOT BETWEEN NULL AND col1 / col1
----

query I rowsort
SELECT col2 * + tab0.col2 + tab0.col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT DISTINCT + col1 FROM tab1 WHERE col2 + - col0 IN ( - tab1.col1 + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9508
SELECT ALL - col1 * col0 DIV - col1 + col0 DIV - col1 + + col1 * col1 DIV + tab2.col0 FROM tab2
----
121
144
78

skipif mysql # not compatible
query I rowsort label-9508
SELECT ALL - col1 * col0 / - col1 + col0 / - col1 + + col1 * col1 / + tab2.col0 FROM tab2
----
121
144
78

query I rowsort
SELECT ALL - col2 + col2 + tab1.col1 * col2 * col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT tab2.col2 * + col2 + tab2.col1 * col1 FROM tab2
----
1690
1733
4157

query I rowsort
SELECT + col0 * col0 * + col1 AS col0 FROM tab0
----
118825
49536
720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-9512
SELECT col1 DIV + col1 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9512
SELECT col1 / + col1 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT col2 * col0 + col1 + tab2.col1 FROM tab2
----
2146
251
3036

onlyif mysql # use DIV operator for integer division
query I rowsort label-9514
SELECT - tab1.col2 DIV col1 AS col2 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9514
SELECT - tab1.col2 / col1 AS col2 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT col1 + + col1 * + col0 FROM tab2
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 + - col0 * - col2 - col1 col2 FROM tab1
----
1540
4208
8915

onlyif mysql # use DIV operator for integer division
query I rowsort label-9517
SELECT ALL - col2 DIV - tab2.col1 AS col0 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9517
SELECT ALL - col2 / - tab2.col1 AS col0 FROM tab2
----
0
0
2

query I rowsort
SELECT DISTINCT - 33 AS col1 FROM tab1 AS cor0
----
-33

query I rowsort
SELECT ALL col1 + - col1 * col0 + - 17 FROM tab2 AS cor0
----
-1343
-203
-4560

query I rowsort
SELECT ALL + cor1.col2 FROM tab1, tab0 cor0, tab2 cor1, tab1 cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT 32 - - col1 AS col1 FROM tab1 AS cor0
----
42
45
58

query I rowsort
SELECT - 95 AS col2 FROM tab1
----
-95
-95
-95

query I rowsort
SELECT + cor0.col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-9524
SELECT tab0.col1 * ( col2 + col2 ) DIV - col0 FROM tab0
----
-167
-236
-5

skipif mysql # not compatible
query I rowsort label-9524
SELECT tab0.col1 * ( col2 + col2 ) / - col0 FROM tab0
----
-167
-236
-5

query I rowsort
SELECT + col1 * 23 FROM tab1
----
230
299
598

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - ( 56 * tab1.col1 ) AS col0 FROM tab1
----
-1456
-560
-728

query I rowsort
SELECT col2 * tab2.col0 - col1 AS col0 FROM tab2
----
158
1969
2985

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9529
SELECT + col0 * + CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-9529
SELECT + col0 * + CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 13 * - ( + col0 + ( col0 ) ) col0 FROM tab0 AS cor0
----
-2396
-657
-911

query I rowsort
SELECT + cor0.col2 * 91 FROM tab2, tab2 cor0
----
9 values hashing to 45ffe4033e4383b977f8da60b77dd9de

query I rowsort
SELECT DISTINCT col0 * + col2 * tab2.col0 AS col1 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT DISTINCT - ( tab2.col2 + col1 ) * + col1 FROM tab2
----
-1798
-5015
-935

query I rowsort
SELECT - ( cor0.col1 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

onlyif mysql # use DIV operator for integer division
query I rowsort label-9535
SELECT ALL - cor0.col1 * - col2 DIV - col2 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-9535
SELECT ALL - cor0.col1 * - col2 / - col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT + col2 * + 15 FROM tab1 AS cor0
----
1440
810
855

query I rowsort
SELECT DISTINCT - col1 * + ( ( col0 ) ) + + col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 56 col0 FROM tab0 AS cor0
----
1848
4592
56

query I rowsort
SELECT + - col0 * + 98 AS col1 FROM tab1 AS cor0
----
-294
-6272
-7840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9540
SELECT DISTINCT - col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9540
SELECT DISTINCT - col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT - col2 * 11 - - 82 AS col2 FROM tab2 cor0
----
-204
-215
-336

query I rowsort
SELECT - col1 + 67 FROM tab0 AS cor0
----
-19
-24
-30

query I rowsort
SELECT ALL col2 * - col1 + 3 FROM tab2 AS cor0
----
-1531
-643
-834

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + 63 * - 83 col2 FROM tab0 AS cor0
----
-5253
-5264
-5318

query I rowsort
SELECT + col0 + - ( - col1 ) * cor0.col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + - col0 + + ( + col0 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - col1 - col0 * + col0 * + col0 FROM tab1 AS cor0
----
-262154
-512013
-53

query I rowsort
SELECT ( 10 + + col2 ) * + col2 FROM tab1
----
10176
3456
3819

query I rowsort
SELECT DISTINCT 46 * + col2 * col0 FROM tab1
----
167808
353280
7452

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT - 89 FROM tab2, tab0 AS cor0
----
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col2 col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT tab0.col1 * cor0.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to ad4b5bcd52685802d192f96b3c1871da

query I rowsort
SELECT tab1.col0 * - 23 FROM tab1
----
-1472
-1840
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 col2 FROM tab2
----
75
75
75

query I rowsort
SELECT ALL - 46 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

query I rowsort
SELECT + 55 AS col0 FROM tab0 cor0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + cor0.col2 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL - ( + 49 ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT DISTINCT col1 * col2 + 35 FROM tab0
----
132
2873
7497

query I rowsort
SELECT DISTINCT - + col2 + cor0.col0 * + col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL col0 * - 55 + ( + col1 ) * col1 FROM tab1 AS cor0
----
-3420
-4231
511

query I rowsort
SELECT col0 + - col2 * - 36 FROM tab2 AS cor0
----
1014
1447
979

onlyif mysql # use DIV operator for integer division
query I rowsort label-9564
SELECT + col1 DIV 76 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9564
SELECT + col1 / 76 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 23 col2 FROM tab1 AS cor0
----
1242
1311
2208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * 92 + - col1 col1 FROM tab0 AS cor0
----
-189
-3122
-7635

query I rowsort
SELECT - cor0.col0 * 2 * col1 - - col0 AS col2 FROM tab2 AS cor0
----
-2607
-427
-9126

onlyif mysql # use DIV operator for integer division
query I rowsort label-9568
SELECT ALL + tab1.col2 DIV - col1 AS col2 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9568
SELECT ALL + tab1.col2 / - col1 AS col2 FROM tab1
----
-2
-5
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9569
SELECT + + CAST( NULL AS DECIMAL ) + cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9569
SELECT + + CAST ( NULL AS REAL ) + cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 col2 FROM tab2
----
80
80
80

query I rowsort
SELECT - 60 * col2 FROM tab1 AS cor0
----
-3240
-3420
-5760

query I rowsort
SELECT DISTINCT + cor0.col2 * 99 AS col1 FROM tab2 AS cor0
----
2574
2673
3762

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 * col0 + + 83 col0 FROM tab2
----
1426
300
4685

query I rowsort
SELECT + - 34 * col0 FROM tab0 AS cor0
----
-1190
-3026
-816

query I rowsort
SELECT - col1 * ( + tab0.col2 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col2 - - 15 AS col1 FROM tab0
----
16
48
97

query I rowsort
SELECT + ( col1 ) + - cor0.col0 * col0 FROM tab1 AS cor0
----
-4086
-6387
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * ( + col2 ) + - 68 + 13 * cor0.col2 col1 FROM tab1 AS cor0
----
-68
-770
103

query I rowsort
SELECT col1 * + col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + col1 * 49 + col0 * - col2 AS col2 FROM tab2 AS cor0
----
-2169
1330
863

query I rowsort
SELECT DISTINCT ( col1 ) AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT cor0.col2 * col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT 44 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-10
-13
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9584
SELECT ALL - + col2 * col1 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9584
SELECT ALL - + col2 * col1 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 11 FROM tab1 AS cor0
----
11

query I rowsort
SELECT + - col0 + - ( 94 ) FROM tab1 AS cor0
----
-158
-174
-97

query I rowsort
SELECT ALL 56 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 40 col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

query I rowsort
SELECT DISTINCT col2 + - cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col1 - - col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 46 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( + ( + tab2.col0 ) AS REAL ) AS col0 FROM tab2, tab0 AS cor0
----
7
78
79

query I rowsort
SELECT ALL cor0.col1 + 30 AS col1 FROM tab0 cor0
----
116
121
127

query I rowsort
SELECT - + ( col2 ) * col1 + - ( col2 ) * col1 + col0 * + ( col2 ) FROM tab1 AS cor0
----
-2646
2508
5184

query I rowsort
SELECT ALL - - col2 * 47 AS col0 FROM tab0 AS cor0
----
1551
3854
47

query I rowsort
SELECT DISTINCT col1 * 1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col1 + 78 AS col0 FROM tab1
----
104
88
91

query I rowsort
SELECT 46 FROM tab2, tab0 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

onlyif mysql # use DIV operator for integer division
query I rowsort label-9599
SELECT - col1 + 93 + 21 DIV col0 AS col0 FROM tab0
----
-4
2
7

skipif mysql # not compatible
query I rowsort label-9599
SELECT - col1 + 93 + 21 / col0 AS col0 FROM tab0
----
-4
2
7

query I rowsort
SELECT col0 * ( - col2 + col2 ) AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - - col1 + col1 * - 15 FROM tab0 AS cor0
----
-1204
-1274
-1358

query I rowsort
SELECT + col0 - - col1 * col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - - col0 + cor0.col0 FROM tab2 cor0
----
14
156
158

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9605
SELECT ALL + + col0 * CAST( col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-9605
SELECT ALL + + col0 * CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col0 + - tab1.col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL col1 * ( - col1 ) + col1 * - 58 + col1 AS col0 FROM tab1
----
-2158
-670
-910

query I rowsort
SELECT ALL col2 + tab0.col2 * - col0 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT ALL col0 * - col0 * + col1 + + col0 FROM tab1
----
-231
-40896
-83120

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab1 cor1, tab1, tab0 cor2
----
3645 values hashing to e660b5944e34dd8d75740286862b3252

query I rowsort
SELECT ALL - cor0.col0 * - col1 - 24 AS col2 FROM tab0 AS cor0
----
2040
3371
8075

query I rowsort
SELECT ALL + - col2 - + 19 AS col2 FROM tab2 AS cor0
----
-45
-46
-57

query I rowsort
SELECT DISTINCT - + col0 + col1 * + 58 * - col2 AS col1 FROM tab1 AS cor0
----
-33124
-72464
-81435

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9614
SELECT + CAST( - 31 AS SIGNED ) AS col1 FROM tab1, tab0, tab0 cor0
----
27 values hashing to c6c8eebeb1a59f7c046402e25630c0ac

skipif mysql # not compatible
query I rowsort label-9614
SELECT + CAST ( - 31 AS INTEGER ) AS col1 FROM tab1, tab0, tab0 cor0
----
27 values hashing to c6c8eebeb1a59f7c046402e25630c0ac

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 76 col2 FROM tab0
----
2508
6232
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - - col2 col1 FROM tab2
----
104
117
34

query I rowsort
SELECT ( col2 * - col0 ) + - ( - col2 ) * col0 * + col1 AS col1 FROM tab1
----
32832
4050
92160

query I rowsort
SELECT ALL + col1 * 3 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL - ( - col0 ) * col2 * - col0 AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT - col0 * + ( + col0 ) AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - tab1.col1 * + 7 * col0 FROM tab1
----
-4480
-546
-7280

query I rowsort
SELECT DISTINCT + col1 * col0 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT col0 * 35 FROM tab1 cor0
----
105
2240
2800

query I rowsort
SELECT - col0 * col2 + - 25 FROM tab2 cor0
----
-2053
-214
-3027

query I rowsort
SELECT + - col1 + + col1 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT DISTINCT 22 FROM tab1 AS cor0
----
22

query I rowsort
SELECT + col0 - - col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL 55 * - col0 AS col1 FROM tab2 AS cor0
----
-385
-4290
-4345

query I rowsort
SELECT ALL - 55 * col1 * + col0 FROM tab2 AS cor0
----
-11935
-253110
-73865

query I rowsort
SELECT - 9 * - col0 FROM tab2 AS cor0
----
63
702
711

query I rowsort
SELECT DISTINCT col0 * col1 * - col1 AS col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL - 65 * col2 + - col2 FROM tab1 AS cor0
----
-3564
-3762
-6336

query I rowsort
SELECT - 60 - col1 FROM tab1 AS cor0
----
-70
-73
-86

query I rowsort
SELECT DISTINCT + + col1 + + col0 * - 17 - 6 FROM tab2 AS cor0
----
-1273
-1332
-94

query I rowsort
SELECT DISTINCT - 54 + col0 AS col1 FROM tab0 AS cor0
----
-19
-30
35

query I rowsort
SELECT + 21 + col0 AS col0 FROM tab0 cor0
----
110
45
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-9638
SELECT ALL - ( col0 ) DIV col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9638
SELECT ALL - ( col0 ) / col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT - 20 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to eb3a66728062963cccbd15bd2f5c9eee

query I rowsort
SELECT ALL 3 * - col1 AS col0 FROM tab0
----
-258
-273
-291

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + - ( - col1 ) AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT - cor0.col2 - + col2 * col1 AS col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + cor0.col2 * + 62 AS col1 FROM tab1 cor0
----
3348
3534
5952

query I rowsort
SELECT col2 - + col1 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - cor0.col0 * col0 col2 FROM tab1 AS cor0
----
-233472
-486
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * cor0.col0 col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col0 * col0 * - ( - col0 ) + - col1 AS col0 FROM tab2
----
312
474493
493022

query I rowsort
SELECT DISTINCT + col1 * col0 + ( - col1 * - col0 ) + + col1 AS col0 FROM tab0
----
16289
4214
6887

onlyif mysql # use DIV operator for integer division
query I rowsort label-9651
SELECT DISTINCT + col0 DIV tab0.col2 + + ( - col1 ) DIV - col2 FROM tab0
----
132
2

skipif mysql # not compatible
query I rowsort label-9651
SELECT DISTINCT + col0 / tab0.col2 + + ( - col1 ) / - col2 FROM tab0
----
132
2

query I rowsort
SELECT 36 + col0 FROM tab2
----
114
115
43

query I rowsort
SELECT DISTINCT tab2.col1 + col0 + - col2 AS col2 FROM tab2
----
11
111
58

query I rowsort
SELECT DISTINCT - + col1 * - col0 + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9655
SELECT ALL CAST( col2 AS SIGNED ) + col0 + col1 AS col2 FROM tab1 AS cor0
----
131
189
83

skipif mysql # not compatible
query I rowsort label-9655
SELECT ALL CAST ( col2 AS INTEGER ) + col0 + col1 AS col2 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT DISTINCT col1 + + 97 * + col1 + + col0 * + 97 FROM tab0 AS cor0
----
10756
12901
17551

query I rowsort
SELECT - + 37 FROM tab2 AS cor0
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 25 + + col1 col0 FROM tab0 AS cor0
----
111
116
122

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9659
SELECT - + CAST( + col1 AS SIGNED ) + - col2 col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9659
SELECT - + CAST ( + col1 AS INTEGER ) + - col2 col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - + 6 - col0 AS col2 FROM tab2 AS cor0
----
-13
-84
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col2 * + col1 + col0 col0 FROM tab0 cor0
----
132
611973
93678

query I rowsort
SELECT DISTINCT - - 50 * - col2 + - col1 FROM tab2 cor0
----
-1359
-1381
-1917

query I rowsort
SELECT ALL - col2 * col1 + col2 + 12 AS col1 FROM tab1 AS cor0
----
-1140
-1338
-501

query I rowsort
SELECT ALL - cor0.col1 + 39 FROM tab0 AS cor0
----
-47
-52
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 36 ) + - col2 * - 49 col2 FROM tab2 AS cor0
----
1238
1287
1826

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

query I rowsort
SELECT ALL - col0 + + col0 * - 24 FROM tab1
----
-1600
-2000
-75

query I rowsort
SELECT ALL + 86 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT - 89 + 71 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2dbe09d9295cfd52d854fefabf2cec4e

query I rowsort
SELECT cor0.col0 + col2 * col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + 9 + col1 + col0 AS col1 FROM tab2 AS cor0
----
105
146
47

query I rowsort
SELECT ALL + 32 + col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
130
151
205

query I rowsort
SELECT ( 68 ) AS col0 FROM tab2 AS cor0
----
68
68
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9674
SELECT DISTINCT - col0 * ( col1 ) - - CAST( + col0 AS SIGNED ) * col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9674
SELECT DISTINCT - col0 * ( col1 ) - - CAST ( + col0 AS INTEGER ) * col1 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + 95 col2 FROM tab1 AS cor0
----
-1235
-2470
-950

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 * col0 col2 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT - - col0 * col2 * col1 + col0 * 40 + - cor0.col0 * + col0 FROM tab2 AS cor0
----
116688
47953
6090

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9678
SELECT - col2 * CAST( col1 AS SIGNED ) + - col2 AS col2 FROM tab2 cor0
----
-1560
-684
-864

skipif mysql # not compatible
query I rowsort label-9678
SELECT - col2 * CAST ( col1 AS INTEGER ) + - col2 AS col2 FROM tab2 cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT - 62 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-62

query I rowsort
SELECT DISTINCT - - col2 + + ( 84 ) AS col2 FROM tab1 cor0
----
138
141
180

query I rowsort
SELECT DISTINCT - ( ( - cor0.col0 ) ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + ( 39 ) * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT - ( + ( col2 ) ) * + ( col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 10 * + cor0.col0 + - col2 * - 55 AS col2 FROM tab0 cor0
----
2055
405
5400

query I rowsort
SELECT ALL + + 24 + col0 FROM tab2 AS cor0
----
102
103
31

query I rowsort
SELECT ALL + col2 * - cor0.col0 * col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT DISTINCT col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 5 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

query I rowsort
SELECT tab0.col0 FROM tab0, tab1 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-9690
SELECT DISTINCT tab1.col0 * col2 DIV col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9690
SELECT DISTINCT tab1.col0 * col2 / col0 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - col0 col1 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-9692
SELECT + cor0.col1 DIV - col0 + + col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-9692
SELECT + cor0.col1 / - col0 + + col0 FROM tab0 AS cor0
----
21
33
88

query I rowsort
SELECT col1 * + col0 * + ( col0 ) FROM tab2
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 97 col0 FROM tab0
----
97
97
97

query I rowsort
SELECT - - cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9696
SELECT DISTINCT - col0 * - CAST( NULL AS SIGNED ) * + col0 + - col1 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9696
SELECT DISTINCT - col0 * - CAST ( NULL AS INTEGER ) * + col0 + - col1 AS col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT col0 * 6 * - col2 + - cor0.col1 * - 54 * 62 AS col1 FROM tab1 AS cor0
----
-2556
11592
86076

query I rowsort
SELECT cor0.col0 - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT 47 * col1 + ( + 46 ) FROM tab1
----
1268
516
657

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( tab0.col2 ) col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col1 * + col0 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - col2 * + col0 col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT col1 * tab2.col1 + col2 FROM tab2
----
327
3507
988

query I rowsort
SELECT DISTINCT - col2 * col2 + + col2 * - col1 AS col0 FROM tab2
----
-1566
-2090
-2210

query I rowsort
SELECT + col0 * tab0.col0 * col2 + col0 + - col2 * 36 AS col1 FROM tab0
----
1224
17844
646659

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
97

query I rowsort
SELECT + col0 - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col2 * 38 + - ( + col0 ) * col0 + col1 * - col1 FROM tab0 AS cor0
----
-10672
-19318
-9226

query I rowsort
SELECT DISTINCT + + col1 - col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col1 * + col0 - - col0 * + col2 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT cor0.col1 - - 10 AS col0 FROM tab1 AS cor0
----
20
23
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9712
SELECT ALL - + cor0.col1 + - CAST( + cor0.col0 AS SIGNED ) * - col1 * - 34 FROM tab0 AS cor0
----
-115527
-275457
-70262

skipif mysql # not compatible
query I rowsort label-9712
SELECT ALL - + cor0.col1 + - CAST ( + cor0.col0 AS INTEGER ) * - col1 * - 34 FROM tab0 AS cor0
----
-115527
-275457
-70262

query I rowsort
SELECT - col0 - col2 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - 73 * 0 col0 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9715
SELECT DISTINCT + + col1 * + CAST( NULL AS SIGNED ) + cor0.col1 * + col2 * - CAST( NULL AS SIGNED ) - + 75 * + col2 col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9715
SELECT DISTINCT + + col1 * + CAST ( NULL AS INTEGER ) + cor0.col1 * + col2 * - CAST ( NULL AS INTEGER ) - + 75 * + col2 col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col0 * - ( col1 ) + ( col1 ) AS col2 FROM tab0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9717
SELECT + CAST( + col1 AS SIGNED ) + col0 * cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-9717
SELECT + CAST ( + col1 AS INTEGER ) + col0 * cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9718
SELECT DISTINCT cor0.col1 + col0 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9718
SELECT DISTINCT cor0.col1 + col0 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9719
SELECT DISTINCT cor0.col0 DIV + 4 FROM tab0, tab1 AS cor0
----
0
16
20

skipif mysql # not compatible
query I rowsort label-9719
SELECT DISTINCT cor0.col0 / + 4 FROM tab0, tab1 AS cor0
----
0
16
20

query I rowsort
SELECT ALL + col0 * cor0.col1 + ( 27 ) AS col2 FROM tab2 AS cor0
----
1370
244
4629

query I rowsort
SELECT - col1 * + col2 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT + col1 + + col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT - 56 * col2 FROM tab2 AS cor0
----
-1456
-1512
-2128

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2 cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT - 41 * - col1 AS col2 FROM tab1 cor0
----
1066
410
533

query I rowsort
SELECT DISTINCT 58 AS col2 FROM tab2 AS cor0
----
58

query I rowsort
SELECT - col1 + + col0 * col1 * ( ( + col0 ) ) FROM tab1 cor0
----
208
40950
83187

query I rowsort
SELECT DISTINCT + - 14 * - col0 AS col2 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT DISTINCT - ( col1 ) * + col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col1 * + 76 FROM tab2 AS cor0
----
1292
2356
4484

query I rowsort
SELECT + 7 * col2 AS col0 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT DISTINCT 66 + col1 AS col1 FROM tab2 AS cor0
----
125
83
97

query I rowsort
SELECT ALL + - 42 * + 16 FROM tab2 AS cor0
----
-672
-672
-672

query I rowsort
SELECT ALL + 29 + - col1 AS col2 FROM tab2 AS cor0
----
-2
-30
12

query I rowsort
SELECT - ( 24 ) * - col0 AS col2 FROM tab2 cor0
----
168
1872
1896

query I rowsort
SELECT DISTINCT - col2 + + col1 * + col1 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT 80 * - col2 + + col2 * ( - 9 ) AS col0 FROM tab1 AS cor0
----
-4806
-5073
-8544

query I rowsort
SELECT ALL - - 91 + cor0.col0 * cor0.col2 FROM tab2 AS cor0
----
2119
280
3093

query I rowsort
SELECT DISTINCT + + 52 + - col2 AS col0 FROM tab2 AS cor0
----
14
25
26

query I rowsort
SELECT DISTINCT 92 + + col2 * cor0.col2 * col2 FROM tab0 AS cor0
----
36029
551460
93

query IIIIII rowsort
SELECT * FROM tab2, tab1 cor0 WHERE NULL > tab2.col2
----

query I rowsort
SELECT cor0.col0 - + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( + col2 ) + col0 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT 92 + + col1 AS col2 FROM tab1
----
102
105
118

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab2, tab2 AS cor1
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9746
SELECT ALL - 49 + 77 DIV - col2 FROM tab0
----
-126
-49
-51

skipif mysql # not compatible
query I rowsort label-9746
SELECT ALL - 49 + 77 / - col2 FROM tab0
----
-126
-49
-51

query I rowsort
SELECT ALL + tab1.col0 + 30 + col1 FROM tab1
----
104
123
59

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * col1 * - ( - col2 ) col0 FROM tab0
----
1067
31218
82082

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - 40 col0 FROM tab2 AS cor0
----
-280
-3120
-3160

query I rowsort
SELECT DISTINCT + cor0.col1 + - 16 FROM tab1 AS cor0
----
-3
-6
10

query I rowsort
SELECT ALL cor0.col2 + - ( - col1 ) AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col1 * col1 + tab1.col1 * col2 FROM tab1
----
1417
2080
670

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * ( 48 ) col1 FROM tab1 AS cor0
----
-144
-3072
-3840

query I rowsort
SELECT DISTINCT - col1 * col2 + - ( + col1 ) AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9756
SELECT ALL CAST( NULL AS SIGNED ) 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-9756
SELECT ALL CAST ( NULL AS INTEGER ) col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL col2 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9758
SELECT ALL - - col0 * CAST( + 36 AS SIGNED ) AS col0 FROM tab2 cor0
----
252
2808
2844

skipif mysql # not compatible
query I rowsort label-9758
SELECT ALL - - col0 * CAST ( + 36 AS INTEGER ) AS col0 FROM tab2 cor0
----
252
2808
2844

query I rowsort
SELECT DISTINCT + col2 + col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL 9 * col0 AS col1 FROM tab0
----
216
315
801

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 88 col2 FROM tab0
----
-88
-88
-88

query I rowsort
SELECT 56 * + col2 AS col1 FROM tab0
----
1848
4592
56

query I rowsort
SELECT + + 6 * col0 + + 89 FROM tab2 AS cor0
----
131
557
563

query I rowsort
SELECT DISTINCT - 93 AS col0 FROM tab0 AS cor0
----
-93

query I rowsort
SELECT ALL - - ( col2 ) * + ( 83 ) + col1 FROM tab0 AS cor0
----
180
2825
6897

query I rowsort
SELECT DISTINCT + - ( col2 ) AS col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT col2 - - col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT - cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - - col1 + + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT + - col1 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col0 + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9772
SELECT ALL cor0.col2 + CAST( + col0 AS SIGNED ) FROM tab2 cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-9772
SELECT ALL cor0.col2 + CAST ( + col0 AS INTEGER ) FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL + - col2 + ( + col1 ) AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL - ( tab2.col1 ) + col2 AS col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT + - 17 + + cor0.col2 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 1512d41f40d5f5dcd462ae6296bb1ae7

query I rowsort
SELECT ALL col0 + col0 + + col1 AS col2 FROM tab0
----
134
167
269

query I rowsort
SELECT - col0 + - col2 * col2 + col1 FROM tab0 AS cor0
----
-1027
-6722
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9778
SELECT CAST( + col1 AS SIGNED ) FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9778
SELECT CAST ( + col1 AS INTEGER ) FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9779
SELECT - 14 DIV 2 FROM tab0
----
-7
-7
-7

skipif mysql # not compatible
query I rowsort label-9779
SELECT - 14 / 2 FROM tab0
----
-7
-7
-7

query I rowsort
SELECT col0 + col2 * col1 + - tab2.col2 AS col0 FROM tab2
----
1586
687
817

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9781
SELECT + CAST( col0 + + col1 AS SIGNED ) col0 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9781
SELECT + CAST ( col0 + + col1 AS INTEGER ) col0 FROM tab2
----
137
38
96

query I rowsort
SELECT + + 3 * col1 AS col1 FROM tab1 AS cor0
----
30
39
78

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT + ( col1 ) + cor0.col1 * - col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-208
-40950
-83187

query I rowsort
SELECT cor0.col0 + 70 AS col0 FROM tab2 AS cor0
----
148
149
77

query I rowsort
SELECT + ( col1 ) * - col2 - col0 * - col2 FROM tab0 AS cor0
----
-164
-2046
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 col0 FROM tab2 AS cor0
----
96
96
96

query I rowsort
SELECT + - col2 + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 74 - + cor0.col2 AS col2 FROM tab0 AS cor0
----
-8
41
73

query I rowsort
SELECT - col2 + + cor0.col0 * cor0.col0 * - col0 FROM tab2 AS cor0
----
-370
-474578
-493077

query I rowsort
SELECT - - col2 + col0 * col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col1 * + col2 AS col1 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col2 col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - - col2 * col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT 47 + col0 FROM tab2 AS cor0
----
125
126
54

query I rowsort
SELECT ALL - 58 * col1 FROM tab0 AS cor0
----
-4988
-5278
-5626

onlyif mysql # use DIV operator for integer division
query I rowsort label-9797
SELECT - cor0.col2 * - col2 DIV - col2 FROM tab1 cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-9797
SELECT - cor0.col2 * - col2 / - col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + + col0 * col0 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9799
SELECT + - cor0.col0 + - col1 DIV col1 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-9799
SELECT + - cor0.col0 + - col1 / col1 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT col2 + + 56 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT ALL + - col0 * 85 AS col1 FROM tab2 cor0
----
-595
-6630
-6715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 + col2 * - col1 * col2 col1 FROM tab2 AS cor0
----
-23560
-24837
-43365

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9803
SELECT col1 + - col0 * CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9803
SELECT col1 + - col0 * CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 + - col0 col1 FROM tab1
----
10
26
87

query I rowsort
SELECT col1 * - ( + col0 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 46 + col2 * col0 AS col1 FROM tab2 AS cor0
----
143
1982
2956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9807
SELECT + CAST( NULL AS SIGNED ) + 43 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9807
SELECT + CAST ( NULL AS INTEGER ) + 43 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 52 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT - col1 + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - - col0 + cor0.col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - cor0.col1 * - col2 + col2 * - col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 * - col1 * col2 AS col2 FROM tab0 cor0
----
3395
664118
68112

query I rowsort
SELECT ALL cor0.col0 + - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - + col0 * + cor0.col0 * + col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT + col1 + + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT col2 + col2 * cor0.col0 + - col0 AS col0 FROM tab1 AS cor0
----
213
3641
7696

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2
----
17
31
59

query I rowsort
SELECT - col0 * - col0 * col1 - col2 AS col0 FROM tab0
----
118824
49503
720729

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( + col1 ) <= ( NULL )
----

query I rowsort
SELECT ALL + + col1 * col0 AS col0 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-9821
SELECT ALL - col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9821
SELECT ALL - col2 / + col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT - col1 * col2 + - tab0.col1 + + col2 * - col0 FROM tab0
----
-14851
-229
-3716

query I rowsort
SELECT 31 * col1 + col2 AS col2 FROM tab2 AS cor0
----
1855
565
988

query I rowsort
SELECT + - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT DISTINCT + cor1.col0 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

query I rowsort
SELECT ALL + col2 * col0 + col0 + tab0.col1 FROM tab0
----
167
7478
902

query I rowsort
SELECT ALL + col2 + + col0 * col2 FROM tab2
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9828
SELECT ALL tab2.col2 * col0 + + col2 DIV + col0 AS col0 FROM tab2
----
192
2028
3002

skipif mysql # not compatible
query I rowsort label-9828
SELECT ALL tab2.col2 * col0 + + col2 / + col0 AS col0 FROM tab2
----
192
2028
3002

query I rowsort
SELECT DISTINCT - col0 * + col0 * + col1 AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT + - col1 * col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - cor0.col2 * col2 + cor0.col1 * + col2 FROM tab0 cor0
----
1749
738
96

query I rowsort
SELECT ALL + col1 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT 79 * + col2 FROM tab1 cor0
----
4266
4503
7584

query I rowsort
SELECT ALL + + cor0.col0 * + col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - 63 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

query I rowsort
SELECT DISTINCT + col2 * col1 + 80 AS col0 FROM tab2 AS cor0
----
1614
726
917

query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 * - col2 AS col1 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT + cor0.col1 * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col2 + - col2 * + col0 FROM tab2 cor0
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + 25 * - cor0.col0 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT + cor0.col0 * col2 * - ( + col2 ) FROM tab1 cor0
----
-207936
-737280
-8748

query I rowsort
SELECT ALL - + col1 + + cor0.col1 * col1 FROM tab2 AS cor0
----
272
3422
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-9844
SELECT - cor0.col0 DIV + col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9844
SELECT - cor0.col0 / + col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col2 * col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + 59 * - col1 FROM tab2 AS cor0
----
-1003
-1829
-3481

query I rowsort
SELECT DISTINCT 96 AS col2 FROM tab2 cor0
----
96

query I rowsort
SELECT DISTINCT col0 + ( + col1 ) * - col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - col2 + - 78 * - col0 FROM tab2 AS cor0
----
519
6058
6124

query I rowsort
SELECT ALL col2 + col1 + - 14 * col0 AS col0 FROM tab0 AS cor0
----
-1073
-217
-392

query I rowsort
SELECT DISTINCT + - col2 * ( + col0 ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - 76 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d90b4aa5f03b4a149aa925c4a88acca0

query I rowsort
SELECT - col1 + col1 + - col0 * + col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9854
SELECT ALL col2 + + 5 + + col1 DIV col1 FROM tab0 AS cor0
----
39
7
88

skipif mysql # not compatible
query I rowsort label-9854
SELECT ALL col2 + + 5 + + col1 / col1 FROM tab0 AS cor0
----
39
7
88

query I rowsort
SELECT ALL - ( col0 ) + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - - ( - col0 ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - - cor0.col1 FROM tab0, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL + + 98 + - cor0.col1 * + col1 FROM tab1 AS cor0
----
-2
-578
-71

query I rowsort
SELECT - col0 + col2 + col0 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + + col1 * ( col0 ) * ( 14 ) FROM tab0 AS cor0
----
113386
28896
47530

query I rowsort
SELECT DISTINCT - + ( 17 ) AS col0 FROM tab1 AS cor0
----
-17

onlyif mysql # use DIV operator for integer division
query I rowsort label-9862
SELECT ALL + tab0.col2 + - ( + col1 ) + col0 DIV - col0 FROM tab0
----
-10
-54
-97

skipif mysql # not compatible
query I rowsort label-9862
SELECT ALL + tab0.col2 + - ( + col1 ) + col0 / - col0 FROM tab0
----
-10
-54
-97

query I rowsort
SELECT ALL - col2 * - 77 + col2 * col0 AS col0 FROM tab2
----
2268
4030
5928

query I rowsort
SELECT DISTINCT + - col2 + - col2 * + col2 AS col0 FROM tab1 cor0
----
-2970
-3306
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9865
SELECT + tab1.col0 * col0 * + col1 - - CAST( - ( col0 ) AS SIGNED ) AS col0 FROM tab1
----
231
40896
83120

skipif mysql # not compatible
query I rowsort label-9865
SELECT + tab1.col0 * col0 * + col1 - - CAST ( - ( col0 ) AS INTEGER ) AS col0 FROM tab1
----
231
40896
83120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9866
SELECT - - CAST( + 1 AS SIGNED ) FROM tab0, tab2, tab0 cor0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

skipif mysql # not compatible
query I rowsort label-9866
SELECT - - CAST ( + 1 AS INTEGER ) FROM tab0, tab2, tab0 cor0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT 35 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

onlyif mysql # use DIV operator for integer division
query I rowsort label-9868
SELECT DISTINCT + + cor0.col0 + - ( - col2 ) DIV + col1 AS col2 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-9868
SELECT DISTINCT + + cor0.col0 + - ( - col2 ) / + col1 AS col2 FROM tab1 AS cor0
----
5
69
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9869
SELECT - - CAST( + 7 AS SIGNED ) * col0 + CAST( + col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
572
591
76

skipif mysql # not compatible
query I rowsort label-9869
SELECT - - CAST ( + 7 AS INTEGER ) * col0 + CAST ( + col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
572
591
76

query I rowsort
SELECT ALL 57 + + 16 * + col1 AS col1 FROM tab0
----
1433
1513
1609

query I rowsort
SELECT col0 * col2 * - col2 + ( - col0 ) * + col1 FROM tab1
----
-208576
-738320
-8826

query I rowsort
SELECT cor1.col0 + 66 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to a545c16a35245a7c6bbfd68fd32483cf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 + col1 * col1 col1 FROM tab1
----
113
44
620

query I rowsort
SELECT + 58 * + col1 + - col2 * 52 AS col2 FROM tab1 AS cor0
----
-1300
-2384
-4238

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9875
SELECT - CAST( NULL AS SIGNED ) * - col1 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9875
SELECT - CAST ( NULL AS INTEGER ) * - col1 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 65 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col0 FROM tab1
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 col0 FROM tab1
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 8 col0 FROM tab0
----
-8

query I rowsort
SELECT 59 * - cor0.col0 + col0 FROM tab2 AS cor0
----
-406
-4524
-4582

query I rowsort
SELECT DISTINCT + ( + col2 ) FROM tab0
----
1
33
82

query I rowsort
SELECT ( - tab1.col2 ) * tab1.col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL col1 * - col0 * + col2 - cor0.col2 FROM tab0 AS cor0
----
-3396
-664200
-68145

onlyif mysql # use DIV operator for integer division
query I rowsort label-9884
SELECT + col2 DIV - tab2.col0 AS col0 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9884
SELECT + col2 / - tab2.col0 AS col0 FROM tab2
----
-3
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9885
SELECT ALL col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9885
SELECT ALL col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 + 12 * - tab1.col1 FROM tab1
----
-184
-236
-315

onlyif mysql # use DIV operator for integer division
query I rowsort label-9887
SELECT - col1 DIV 37 + 71 AS col1 FROM tab1
----
71
71
71

skipif mysql # not compatible
query I rowsort label-9887
SELECT - col1 / 37 + 71 AS col1 FROM tab1
----
71
71
71

query I rowsort
SELECT DISTINCT - col1 + - 49 FROM tab2
----
-108
-66
-80

query I rowsort
SELECT DISTINCT col0 + + col0 AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT - col1 + - tab2.col2 * 16 FROM tab2
----
-463
-475
-625

query I rowsort
SELECT DISTINCT + 93 * - tab1.col2 AS col2 FROM tab1, tab0 cor0
----
-5022
-5301
-8928

query I rowsort
SELECT DISTINCT + 43 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
43

query I rowsort
SELECT ALL - cor0.col0 * 37 AS col1 FROM tab2 AS cor0
----
-259
-2886
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col1 * col0 col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col2 * + col0 * + col0 AS col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT - 58 * tab0.col1 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to bab7d1274af8faa5925fc59db8efef1f

query I rowsort
SELECT DISTINCT col0 * + 87 + col0 FROM tab1 AS cor0
----
264
5632
7040

query I rowsort
SELECT cor0.col1 + 7 FROM tab2 AS cor0
----
24
38
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-9899
SELECT DISTINCT 68 * + col0 + - col0 DIV col2 AS col2 FROM tab0 AS cor0
----
1632
2345
6051

skipif mysql # not compatible
query I rowsort label-9899
SELECT DISTINCT 68 * + col0 + - col0 / col2 AS col2 FROM tab0 AS cor0
----
1632
2345
6051

onlyif mysql # use DIV operator for integer division
query I rowsort label-9900
SELECT ALL + ( col0 ) DIV + col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9900
SELECT ALL + ( col0 ) / + col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + col1 - ( cor0.col2 * + 47 ) AS col2 FROM tab0 AS cor0
----
-1465
-3763
50

query I rowsort
SELECT DISTINCT - - ( - 9 ) + col0 AS col1 FROM tab2 AS cor0
----
-2
69
70

query I rowsort
SELECT + col1 + - 34 FROM tab1 AS cor0
----
-21
-24
-8

query I rowsort
SELECT DISTINCT - + 66 * - 22 + + col1 FROM tab0 AS cor0
----
1538
1543
1549

query I rowsort
SELECT ALL + col0 - + col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 28 + - col1 * - col2 FROM tab0 AS cor0
----
2810
69
7434

query I rowsort
SELECT + col2 + + 23 AS col2 FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT - 94 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-658
-7332
-7426

query I rowsort
SELECT - col0 - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT col0 + + 48 - cor0.col2 FROM tab2 AS cor0
----
100
28
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 + col1 col2 FROM tab0 AS cor0
----
139
144
150

onlyif mysql # use DIV operator for integer division
query I rowsort label-9912
SELECT DISTINCT - 86 * - 93 + col0 DIV + 60 FROM tab2 AS cor0
----
7998
7999

skipif mysql # not compatible
query I rowsort label-9912
SELECT DISTINCT - 86 * - 93 + col0 / + 60 FROM tab2 AS cor0
----
7998
7999

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col0 col2 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9914
SELECT ALL + CAST( col2 AS SIGNED ) * cor0.col0 - - col2 FROM tab0 cor0
----
36
7380
825

skipif mysql # not compatible
query I rowsort label-9914
SELECT ALL + CAST ( col2 AS INTEGER ) * cor0.col0 - - col2 FROM tab0 cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9915
SELECT + CAST( NULL AS SIGNED ) + 80 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9915
SELECT + CAST ( NULL AS INTEGER ) + 80 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9916
SELECT DISTINCT - 69 DIV cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9916
SELECT DISTINCT - 69 / cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - - col2 * 75 FROM tab0 AS cor0
----
2475
6150
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9918
SELECT CAST( NULL AS SIGNED ) * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9918
SELECT CAST ( NULL AS INTEGER ) * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 98 * - col2 AS col2 FROM tab2 AS cor0
----
2548
2646
3724

query I rowsort
SELECT + - cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9921
SELECT ALL + CAST( - col2 AS SIGNED ) - + col2 FROM tab1 cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-9921
SELECT ALL + CAST ( - col2 AS INTEGER ) - + col2 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT - ( - 94 ) - col1 * 33 AS col0 FROM tab0 AS cor0
----
-2744
-2909
-3107

query I rowsort
SELECT ALL col1 + + 54 AS col2 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT tab1.col2 * 19 + ( col0 ) * col1 FROM tab1
----
1104
1723
2864

query I rowsort
SELECT DISTINCT + 35 FROM tab1, tab2 AS cor0
----
35

query I rowsort
SELECT col2 * 81 + col2 AS col2 FROM tab1
----
4428
4674
7872

query I rowsort
SELECT DISTINCT + 62 * col0 - - col0 FROM tab2
----
441
4914
4977

query I rowsort
SELECT - + 29 AS col2 FROM tab1 AS cor0
----
-29
-29
-29

query I rowsort
SELECT col1 * + col1 * - col1 AS col2 FROM tab0
----
-636056
-753571
-912673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 24 col2 FROM tab2
----
24

query I rowsort
SELECT - 27 * + col1 * tab1.col1 FROM tab1
----
-18252
-2700
-4563

query I rowsort
SELECT - cor0.col0 + cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2, tab0, tab2 AS cor0, tab1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT DISTINCT 55 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
55

query I rowsort
SELECT - cor0.col0 + 11 AS col1 FROM tab1 AS cor0
----
-53
-69
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9936
SELECT - col1 * + CAST( NULL AS DECIMAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9936
SELECT - col1 * + CAST ( NULL AS REAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * cor0.col2 + + col1 FROM tab2 cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-9938
SELECT ALL - + col2 * col2 DIV col0 AS col1 FROM tab0 AS cor0
----
-45
-75
0

skipif mysql # not compatible
query I rowsort label-9938
SELECT ALL - + col2 * col2 / col0 AS col1 FROM tab0 AS cor0
----
-45
-75
0

query I rowsort
SELECT col2 + 95 FROM tab0 AS cor0
----
128
177
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9940
SELECT ALL col2 DIV - 94 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9940
SELECT ALL col2 / - 94 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 + col0 + col0 * tab2.col0 * - col2 AS col2 FROM tab2
----
-1285
-158047
-237062

query I rowsort
SELECT ALL + col2 * + ( col2 ) AS col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - col2 * 0 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * + col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * ( - col1 ) + - col0 + - col0 col2 FROM tab2 AS cor0
----
1378
488
823

query I rowsort
SELECT + col2 + col2 + + 58 FROM tab0 AS cor0
----
124
222
60

query I rowsort
SELECT ALL + - col2 * + col1 + col1 * cor0.col0 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT DISTINCT + + col0 * - ( - col2 + 87 ) FROM tab1 AS cor0
----
-1920
-99
720

query I rowsort
SELECT DISTINCT - col1 + - cor0.col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT + - ( + ( col1 ) ) + col2 * col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + col2 - + col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - + col1 + col2 * + col1 AS col0 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9953
SELECT DISTINCT CAST( col2 AS SIGNED ) DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9953
SELECT DISTINCT CAST ( col2 AS INTEGER ) / cor0.col0 AS col1 FROM tab0 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9954
SELECT DISTINCT - ( + 23 ) DIV - cor0.col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9954
SELECT DISTINCT - ( + 23 ) / - cor0.col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 ) col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col1 AS REAL ) / col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + - col1 * + col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9958
SELECT - + 15 DIV + col0 AS col2 FROM tab1 AS cor0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-9958
SELECT - + 15 / + col0 AS col2 FROM tab1 AS cor0
----
-5
0
0

query I rowsort
SELECT ALL + + col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 46 * col1 AS col2 FROM tab2 AS cor0
----
1426
2714
782

query I rowsort
SELECT col0 + + 16 * col2 FROM tab0
----
1401
51
552

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 92 col2 FROM tab1
----
146
149
188

query I rowsort
SELECT ALL + col2 * - ( col2 * col2 ) + col0 + - col0 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT - 30 * - col0 * col2 FROM tab0 AS cor0
----
1050
218940
23760

query I rowsort
SELECT DISTINCT + col1 * 51 FROM tab0 AS cor0
----
4386
4641
4947

onlyif mysql # use DIV operator for integer division
query I rowsort label-9967
SELECT + col0 DIV col0 + col2 * + col0 * col0 FROM tab2 cor0
----
1324
158185
237159

skipif mysql # not compatible
query I rowsort label-9967
SELECT + col0 / col0 + col2 * + col0 * col0 FROM tab2 cor0
----
1324
158185
237159

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9968
SELECT DISTINCT - 26 + col2 / CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9968
SELECT DISTINCT - 26 + col2 / CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - cor0.col0 col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - col1 + + col1 * - 16 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-21505
-3503
-73691

query I rowsort
SELECT - col0 - + col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL 52 + col1 * + col1 AS col2 FROM tab2 cor0
----
1013
341
3533

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + col0 * ( col2 ) col1 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT col2 - cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 10 AS col2 FROM tab1
----
-10
-10
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-9976
SELECT - col0 DIV 96 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9976
SELECT - col0 / 96 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * col1 col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - ( - col2 ) * - 58 + - ( col2 ) FROM tab2 AS cor0
----
-1534
-1593
-2242

query I rowsort
SELECT + cor0.col2 * col1 - - col0 * cor0.col0 * col0 FROM tab0 AS cor0
----
16662
42972
712431

query I rowsort
SELECT ALL 13 + - cor0.col2 * - col2 FROM tab1 AS cor0
----
2929
3262
9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-9981
SELECT + - 42 + - col0 DIV col0 FROM tab2 AS cor0
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-9981
SELECT + - 42 + - col0 / col0 FROM tab2 AS cor0
----
-43
-43
-43

query I rowsort
SELECT - cor1.col1 FROM tab0 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ALL + 81 + - col0 FROM tab1
----
1
17
78

query I rowsort
SELECT - + col2 * - 79 FROM tab0 AS cor0
----
2607
6478
79

query I rowsort
SELECT - col1 * - col0 * - 71 AS col2 FROM tab0 cor0
----
-146544
-241045
-575029

onlyif mysql # use DIV operator for integer division
query I rowsort label-9986
SELECT ALL 21 + col0 + col2 DIV col0 AS col1 FROM tab0
----
110
46
56

skipif mysql # not compatible
query I rowsort label-9986
SELECT ALL 21 + col0 + col2 / col0 AS col1 FROM tab0
----
110
46
56

query I rowsort
SELECT + col0 * col0 * ( - 70 ) AS col1 FROM tab2
----
-3430
-425880
-436870

onlyif mysql # use DIV operator for integer division
query I rowsort label-9988
SELECT DISTINCT col0 + + tab1.col2 DIV 62 + tab1.col2 FROM tab1
----
121
177
57

skipif mysql # not compatible
query I rowsort label-9988
SELECT DISTINCT col0 + + tab1.col2 / 62 + tab1.col2 FROM tab1
----
121
177
57

query I rowsort
SELECT - 17 * tab2.col2 * col1 FROM tab2
----
-10982
-14229
-26078

query I rowsort
SELECT ALL ( - col1 * + col0 ) + - 41 + col1 AS col0 FROM tab2
----
-1367
-227
-4584

query I rowsort
SELECT ALL 91 + - tab1.col1 FROM tab1
----
65
78
81

query I rowsort
SELECT ALL + ( - col0 ) * col0 * - col2 + + col2 * col0 AS col0 FROM tab1
----
237120
622080
648

query I rowsort
SELECT - + col2 + col2 * col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + - col1 + + col2 * - col2 FROM tab2 cor0
----
-1461
-735
-760

query I rowsort
SELECT ( 24 ) AS col2 FROM tab0
----
24
24
24

query I rowsort
SELECT - ( + col0 ) * col2 + 52 * col0 FROM tab1
----
-320
-3520
-6

query I rowsort
SELECT ALL ( + col0 ) * - col1 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT tab2.col1 * - ( tab2.col0 ) FROM tab2
----
-1343
-217
-4602

