sqllogictest
Artifact Content
Not logged in

Artifact 1879910b7052cf9759527123d7c9be8bd6488463:


hash-threshold 8

statement ok
CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
INSERT INTO tab0 VALUES(89,91,82)

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 60 FROM tab1 AS cor0
----
-60
-60
-60

query I rowsort
SELECT 83 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7138
7553
8051

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab2 cor1
----
243 values hashing to ce53c0e8839c969b0513568da6eb2c4b

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-6
SELECT DISTINCT + - CAST ( col1 AS INTEGER ) * + col0 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

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

query I rowsort
SELECT - ( - 15 ) FROM tab1 cor0
----
15
15
15

query I rowsort
SELECT ALL - 52 + + col0 FROM tab1 AS cor0
----
-49
12
28

query I rowsort
SELECT - ( - col2 ) FROM tab2
----
26
27
38

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

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

query I rowsort
SELECT - 2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

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

query I rowsort
SELECT - 75 * + col2 FROM tab2 cor0
----
-1950
-2025
-2850

query I rowsort
SELECT DISTINCT - 13 FROM tab1 AS cor0
----
-13

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

query I rowsort
SELECT ALL 43 AS col0 FROM tab2 AS cor0
----
43
43
43

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

skipif mysql # not compatible
query I rowsort label-19
SELECT DISTINCT + col1 / - 99 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 24 + - col2 AS REAL ) AS col0 FROM tab2
----
-14
-2
-3

query I rowsort
SELECT - 82 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

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

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

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0
----
-3
-64
-80

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * 98 + col1 col1 FROM tab0 AS cor0
----
8514
9009
9603

query I rowsort
SELECT DISTINCT - col0 * tab2.col0 FROM tab2
----
-49
-6084
-6241

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

query I rowsort
SELECT + 26 AS col0 FROM tab2
----
26
26
26

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

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

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT + col0 * col0 * + col0 AS col1 FROM tab2
----
343
474552
493039

query I rowsort
SELECT col2 + 47 + - col1 AS col0 FROM tab0 AS cor0
----
-49
-6
38

query I rowsort
SELECT + + col0 + + 86 AS col0 FROM tab1 cor0
----
150
166
89

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

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

query I rowsort
SELECT + col0 + - col1 * col0 + + col2 FROM tab2 AS cor0
----
-1226
-183
-4498

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

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

query I rowsort
SELECT DISTINCT col0 + - col2 * - col2 + - col1 AS col2 FROM tab0
----
-61
1027
6722

query I rowsort
SELECT - tab1.col2 * + col1 + + col1 + col1 * - col2 FROM tab1
----
-1130
-2483
-2782

query I rowsort
SELECT DISTINCT + col0 + col2 FROM tab1
----
121
176
57

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * + col2 + + col0 col1 FROM tab0
----
133
2895
7633

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-47
SELECT ALL col1 + col0 + col0 DIV + col1 AS col1 FROM tab2
----
100
138
38

skipif mysql # not compatible
query I rowsort label-47
SELECT ALL col1 + col0 + col0 / + col1 AS col1 FROM tab2
----
100
138
38

query I rowsort
SELECT ALL - col1 + + col1 AS col2 FROM tab2
----
0
0
0

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

query I rowsort
SELECT tab1.col1 + col0 + - col2 * col0 AS col0 FROM tab1
----
-133
-3574
-7587

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

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

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

query I rowsort
SELECT col2 * cor0.col0 + col1 * - col1 AS col2 FROM tab2 cor0
----
-1453
-772
2713

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab1 AS cor0 WHERE col2 + col2 NOT IN ( + cor0.col0 ) OR + col0 * - col1 BETWEEN ( NULL ) AND NULL
----
10
13
26

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

skipif mysql # not compatible
query I rowsort label-57
SELECT DISTINCT col0 / - col1 - + cor0.col0 AS col0 FROM tab1 AS cor0
----
-3
-70
-86

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

query I rowsort
SELECT ALL - tab0.col1 FROM tab0 WHERE NULL BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-60
SELECT + + col2 * - col1 DIV col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-60
SELECT + + col2 * - col1 / col1 FROM tab1 AS cor0
----
-54
-57
-96

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

query I rowsort
SELECT DISTINCT - col0 * + col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + - col2 AS col0 FROM tab0 cor0
----
-1
-33
-82

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

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

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
26
27
38

query I rowsort
SELECT DISTINCT 39 - col0 AS col0 FROM tab2
----
-39
-40
32

query I rowsort
SELECT - col2 * col2 + col0 + - col0 * col1 AS col1 FROM tab2 AS cor0
----
-2708
-5200
-939

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col0 + col0 col0 FROM tab0 AS cor0
----
260
71
81

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

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

query I rowsort
SELECT 29 FROM tab2 AS cor0
----
29
29
29

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

query I rowsort
SELECT DISTINCT 14 * + col2 FROM tab2 AS cor0
----
364
378
532

query I rowsort
SELECT ALL + 37 FROM tab2 cor0
----
37
37
37

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

query I rowsort
SELECT - ( col2 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 + - col1 col2 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col0 * + col2 * col2 AS col2 FROM tab1 AS cor0
----
207926
737267
8722

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

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

query I rowsort
SELECT - cor0.col2 * col0 + + col2 * + cor0.col2 + + col0 AS col2 FROM tab0 AS cor0
----
-485
1
321

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

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

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-87
SELECT + col2 DIV - col1 - + col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1345
-217
-4602

skipif mysql # not compatible
query I rowsort label-87
SELECT + col2 / - col1 - + col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1345
-217
-4602

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

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

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab0 cor1
----
54 values hashing to 3352c458f45211cf9aa3236c2cd6dd38

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

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

query I rowsort
SELECT ALL + col1 * + col1 FROM tab1 cor0
----
100
169
676

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

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

query I rowsort
SELECT ALL 54 + - 3 + + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 381e4fd952dc61760af737f37f450cdf

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

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

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

query I rowsort
SELECT DISTINCT + col1 * col1 + - col0 + - col2 * col1 FROM tab1 AS cor0
----
-1159
-534
-731

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

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

query I rowsort
SELECT 68 FROM tab1 cor0
----
68
68
68

query I rowsort
SELECT ALL - cor0.col1 + col0 + col2 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL 73 + cor0.col2 AS col0 FROM tab1 AS cor0
----
127
130
169

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

query I rowsort
SELECT ALL - + 86 * + col1 + - 46 FROM tab2 AS cor0
----
-1508
-2712
-5120

query I rowsort
SELECT DISTINCT + + 5 + - col2 * - col0 FROM tab0 AS cor0
----
40
7303
797

query I rowsort
SELECT ALL - 69 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

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

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

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

query I rowsort
SELECT col0 * - col1 - - col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT cor0.col1 + 44 * col1 AS col0 FROM tab2 cor0
----
1395
2655
765

query I rowsort
SELECT ALL 21 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

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

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

query I rowsort
SELECT 37 FROM tab2, tab0 AS cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT ALL + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-118
SELECT DISTINCT tab0.col1 / col0 col1 FROM tab0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-119
SELECT ALL + 49 + - col0 DIV col1 FROM tab2 AS cor0
----
45
48
49

skipif mysql # not compatible
query I rowsort label-119
SELECT ALL + 49 + - col0 / col1 FROM tab2 AS cor0
----
45
48
49

query I rowsort
SELECT 8 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to a42c42e56e75960d97c09dd731d99c01

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

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

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

query I rowsort
SELECT DISTINCT + - 53 + 2 + col0 AS col1 FROM tab0 AS cor0
----
-16
-27
38

query I rowsort
SELECT + + 97 + col1 AS col2 FROM tab0 cor0
----
183
188
194

query I rowsort
SELECT DISTINCT + - col2 + col0 * + col2 + - 92 AS col2 FROM tab1 AS cor0
----
16
3499
7492

query I rowsort
SELECT DISTINCT + - cor1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
-54
-57
-96

query I rowsort
SELECT ALL + 6 FROM tab1 cor0
----
6
6
6

query I rowsort
SELECT ALL col2 + - col1 * col0 FROM tab0
----
-2031
-3394
-8017

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

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

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

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

query I rowsort
SELECT 62 * - 30 AS col1 FROM tab1 AS cor0
----
-1860
-1860
-1860

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

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

query I rowsort
SELECT + 19 * - cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 98809c23be637c38a4fa37bc942368f1

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

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

query I rowsort
SELECT ALL 71 AS col0 FROM tab1 cor0
----
71
71
71

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

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

skipif mysql # not compatible
query I rowsort label-142
SELECT - col1 / - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 7 FROM tab2, tab1 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

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

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

query I rowsort
SELECT DISTINCT - 78 * + 7 * col2 FROM tab1
----
-29484
-31122
-52416

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

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

query I rowsort
SELECT 68 AS col1 FROM tab0
----
68
68
68

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

query I rowsort
SELECT - 50 + + col0 FROM tab1
----
-47
14
30

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

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

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

skipif mysql # not compatible
query I rowsort label-154
SELECT ALL + + col1 + - col0 * + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
1360
248
4661

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

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

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

query I rowsort
SELECT DISTINCT - 70 FROM tab1 AS cor0
----
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 col2 FROM tab1
----
162
3648
7680

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col2 FROM tab2
----
7
78
79

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-164
SELECT DISTINCT col0 DIV + col2 + ( col1 ) * + col1 * - col2 + col2 AS col1 FROM tab1
----
-16128
-36450
-5642

skipif mysql # not compatible
query I rowsort label-164
SELECT DISTINCT col0 / + col2 + ( col1 ) * + col1 * - col2 + col2 AS col1 FROM tab1
----
-16128
-36450
-5642

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-168
SELECT ALL - col2 DIV + ( col0 + tab0.col0 * - 24 ) AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-168
SELECT ALL - col2 / + ( col0 + tab0.col0 * - 24 ) AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - tab2.col2 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

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

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

query I rowsort
SELECT ALL col0 * tab2.col0 + 10 FROM tab2
----
59
6094
6251

query I rowsort
SELECT + tab0.col2 + - tab0.col0 + col2 AS col2 FROM tab0
----
-33
42
75

query I rowsort
SELECT ALL - col0 * + col0 * - 60 FROM tab2
----
2940
365040
374460

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

query I rowsort
SELECT ALL col1 + 19 * col0 FROM tab2 AS cor0
----
1518
1541
164

query I rowsort
SELECT DISTINCT - - 3 * ( col0 ) - col1 FROM tab2 cor0
----
-10
175
220

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) col2 FROM tab2 AS cor0
----
-17
-31
-59

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

query I rowsort
SELECT ( + 75 ) + col1 AS col0 FROM tab0 AS cor0
----
161
166
172

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-182
SELECT + CAST( col2 AS SIGNED ) * - col2 - cor0.col1 * col1 FROM tab2 AS cor0
----
-1690
-1733
-4157

skipif mysql # not compatible
query I rowsort label-182
SELECT + CAST ( col2 AS INTEGER ) * - col2 - cor0.col1 * col1 FROM tab2 AS cor0
----
-1690
-1733
-4157

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-186
SELECT + - CAST( col2 AS SIGNED ) * - col2 + ( - 92 ) AS col0 FROM tab2 cor0
----
1352
584
637

skipif mysql # not compatible
query I rowsort label-186
SELECT + - CAST ( col2 AS INTEGER ) * - col2 + ( - 92 ) AS col0 FROM tab2 cor0
----
1352
584
637

query I rowsort
SELECT DISTINCT - ( + 32 ) * cor0.col1 AS col0 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT - 92 * + col0 AS col2 FROM tab0 AS cor0
----
-2208
-3220
-8188

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

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

query I rowsort
SELECT DISTINCT col0 + - col2 + col2 * col0 FROM tab1
----
111
3655
7664

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

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

query I rowsort
SELECT + + col0 + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL 48 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT DISTINCT - - col2 * + 38 FROM tab0 AS cor0
----
1254
3116
38

query I rowsort
SELECT + col0 * 3 FROM tab2 AS cor0
----
21
234
237

onlyif mysql # use DIV operator for integer division
query I rowsort label-198
SELECT + col2 DIV ( col0 ) FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-198
SELECT + col2 / ( col0 ) FROM tab2 cor0
----
0
0
3

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

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

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

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

query I rowsort
SELECT ALL - col1 + + 74 AS col2 FROM tab1 AS cor0
----
48
61
64

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-204
SELECT CAST( - col2 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-204
SELECT CAST ( - col2 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 86 AS col2 FROM tab0 cor0
----
86
86
86

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

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

query I rowsort
SELECT ALL - + cor0.col1 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - + col2 * - 4 AS col0 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT DISTINCT + 38 * tab0.col0 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
1330
3382
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-210
SELECT ALL - tab0.col1 DIV col0 AS col1 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-210
SELECT ALL - tab0.col1 / col0 AS col1 FROM tab0
----
-1
-2
-3

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

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

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

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

query I rowsort
SELECT ( + col1 ) * 67 + - 85 AS col2 FROM tab1 AS cor0
----
1657
585
786

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

skipif mysql # not compatible
query I rowsort label-216
SELECT 82 / + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT + + 91 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT - ( 27 + + col2 ) * + col2 FROM tab2
----
-1378
-1458
-2470

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

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

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

query I rowsort
SELECT 83 FROM tab1
----
83
83
83

query I rowsort
SELECT DISTINCT 54 FROM tab0
----
54

query I rowsort
SELECT DISTINCT + col0 + 14 * + cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
214
275
393

query I rowsort
SELECT - col1 + col0 * - ( 3 ) FROM tab1 cor0
----
-202
-253
-35

query I rowsort
SELECT + ( + col0 ) * + 66 FROM tab1
----
198
4224
5280

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-229
SELECT ALL + + col2 * + 58 + 59 DIV col0 - - ( col1 ) FROM tab2 AS cor0
----
1567
1605
2221

skipif mysql # not compatible
query I rowsort label-229
SELECT ALL + + col2 * + 58 + 59 / col0 - - ( col1 ) FROM tab2 AS cor0
----
1567
1605
2221

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ( col0 * - col0 ) FROM tab2
----
-49
-6084
-6241

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

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

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

query I rowsort
SELECT + cor0.col2 - - 48 * ( col1 + cor0.col1 ) FROM tab1 AS cor0
----
1017
1344
2550

query I rowsort
SELECT ALL col0 * - col1 * - col0 + - col0 AS col0 FROM tab0 AS cor0
----
118790
49512
720722

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

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

query I rowsort
SELECT + col0 + col0 * col0 * col0 FROM tab1 AS cor0
----
262208
30
512080

query I rowsort
SELECT DISTINCT + col0 + col2 * 63 FROM tab0 AS cor0
----
2103
5255
98

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

query I rowsort
SELECT DISTINCT - col2 + + col0 - col1 AS col0 FROM tab2
----
-51
-7
24

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab1 cor1
----
243 values hashing to 89e3b35a4a4f02d7b83645addb9dcdc3

onlyif mysql # use DIV operator for integer division
query I rowsort label-243
SELECT DISTINCT - col1 - - col2 DIV - 18 FROM tab0
----
-87
-95
-97

skipif mysql # not compatible
query I rowsort label-243
SELECT DISTINCT - col1 - - col2 / - 18 FROM tab0
----
-87
-95
-97

query I rowsort
SELECT - col1 * + tab2.col1 FROM tab2
----
-289
-3481
-961

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-246
SELECT 91 DIV col0 + col1 - + col1 FROM tab2
----
1
1
13

skipif mysql # not compatible
query I rowsort label-246
SELECT 91 / col0 + col1 - + col1 FROM tab2
----
1
1
13

query I rowsort
SELECT 13 * col0 AS col0 FROM tab2
----
1014
1027
91

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

query I rowsort
SELECT DISTINCT - col2 + - col2 * 32 FROM tab0 AS cor0
----
-1089
-2706
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( 52 ) + - col1 col2 FROM tab1 AS cor0
----
2782
2954
4979

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

skipif mysql # not compatible
query I rowsort label-251
SELECT ALL - + col2 * CAST ( - 47 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1551
3854
47

query I rowsort
SELECT DISTINCT - col0 * - 92 FROM tab1 AS cor0
----
276
5888
7360

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-255
SELECT ALL - col1 / + col0 col1 FROM tab2 AS cor0
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - - col0 + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL - - cor0.col1 * + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9708a433b981d9b5fd095bfe2ea45aea

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

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

query I rowsort
SELECT + + 19 AS col2 FROM tab2 AS cor0
----
19
19
19

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

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

query I rowsort
SELECT - 68 FROM tab2
----
-68
-68
-68

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

query I rowsort
SELECT 99 FROM tab0 AS cor0
----
99
99
99

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

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

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

query I rowsort
SELECT + 80 + + col0 * cor0.col1 FROM tab2 AS cor0
----
1423
297
4682

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

skipif mysql # not compatible
query I rowsort label-270
SELECT DISTINCT col0 / col0 FROM tab1 AS cor0
----
1

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

query I rowsort
SELECT DISTINCT - 29 + - col0 FROM tab1 AS cor0
----
-109
-32
-93

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + + 43 AS col0 FROM tab1 AS cor0
----
43
43
43

query I rowsort
SELECT + col0 * - 88 AS col0 FROM tab1 AS cor0
----
-264
-5632
-7040

query I rowsort
SELECT + 78 * 34 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
2738
2743
2749

query I rowsort
SELECT + 37 FROM tab2, tab2 AS cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT + tab0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

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

skipif mysql # not compatible
query I rowsort label-280
SELECT DISTINCT - CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL

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

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

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

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

query I rowsort
SELECT ALL - - col2 * + col2 - col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

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

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

query I rowsort
SELECT 4 * + col0 * - col2 + - 20 * + col1 FROM tab0 AS cor0
----
-2080
-31012
-4888

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-287
SELECT + - CAST( col2 AS SIGNED ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

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

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

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

query I rowsort
SELECT DISTINCT - col2 * col2 + - cor0.col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL - + col1 - col1 * col1 AS col0 FROM tab2 cor0
----
-306
-3540
-992

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

skipif mysql # not compatible
query I rowsort label-292
SELECT - CAST ( 92 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-92
-92
-92

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

query I rowsort
SELECT - 67 * + col0 + + ( tab2.col0 * + col1 ) FROM tab2
----
-252
-3950
-624

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-296
SELECT ( 36 ) + - cor1.col1 DIV ( + 72 ) FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

skipif mysql # not compatible
query I rowsort label-296
SELECT ( 36 ) + - cor1.col1 / ( + 72 ) FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

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

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

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

query I rowsort
SELECT + - 35 * col1 AS col2 FROM tab2 cor0
----
-1085
-2065
-595

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 60 * + col0 * + col2 col0 FROM tab0 cor0
----
-2100
-437880
-47520

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

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

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

query I rowsort
SELECT ALL - 19 + + col0 * + 36 AS col1 FROM tab0 AS cor0
----
1241
3185
845

onlyif mysql # use DIV operator for integer division
query I rowsort label-306
SELECT DISTINCT + col1 DIV + col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-306
SELECT DISTINCT + col1 / + col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT col2 * col0 * - 97 FROM tab1
----
-15714
-353856
-744960

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-309
SELECT ALL - 82 DIV - col1 AS col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-309
SELECT ALL - 82 / - col1 AS col1 FROM tab2 AS cor0
----
1
2
4

query I rowsort
SELECT ALL - + 7 * col1 + + col2 FROM tab1 AS cor0
----
-128
-13
5

query I rowsort
SELECT col1 + col0 + - col1 * + col0 * - col2 AS col1 FROM tab1 AS cor0
----
36554
4241
99933

query I rowsort
SELECT DISTINCT - + 28 * col2 AS col2 FROM tab0 AS cor0
----
-2296
-28
-924

query I rowsort
SELECT 16 * col2 AS col2 FROM tab0 AS cor0
----
1312
16
528

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

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

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

query I rowsort
SELECT - col2 * ( col1 ) * + col0 + - col1 FROM tab0 AS cor0
----
-3492
-664209
-68198

query I rowsort
SELECT DISTINCT cor0.col0 * - 49 FROM tab2 cor0
----
-343
-3822
-3871

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

query I rowsort
SELECT DISTINCT - - col1 * - col1 * + col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-321
SELECT - col2 * col2 + col2 * col0 DIV col1 col1 FROM tab0 AS cor0
----
-1
-1080
-6644

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-321
SELECT - col2 * col2 + col2 * col0 / col1 col1 FROM tab0 AS cor0
----
-1
-1080
-6644

onlyif mysql # use DIV operator for integer division
query I rowsort label-322
SELECT ALL - col1 + ( 66 ) DIV + col1 AS col0 FROM tab1 AS cor0
----
-24
-4
-8

skipif mysql # not compatible
query I rowsort label-322
SELECT ALL - col1 + ( 66 ) / + col1 AS col0 FROM tab1 AS cor0
----
-24
-4
-8

query I rowsort
SELECT ALL col2 * + tab0.col0 * col0 + 40 FROM tab0
----
1265
19048
649562

query I rowsort
SELECT DISTINCT 93 * - cor0.col2 FROM tab2, tab2 AS cor0
----
-2418
-2511
-3534

query I rowsort
SELECT ALL + col1 + + 92 AS col0 FROM tab0 AS cor0
----
178
183
189

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

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

query I rowsort
SELECT - col0 + 94 * - col0 - - col2 AS col2 FROM tab0 AS cor0
----
-2247
-3324
-8373

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 58 * col1 col0 FROM tab2 AS cor0
----
1003
1829
3481

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

query I rowsort
SELECT - cor0.col1 + + 62 - col0 * + col2 * - col1 AS col1 FROM tab2 cor0
----
119655
51079
5890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + + col2 + col0 * col0 col1 FROM tab2 AS cor0
----
265
8138
9281

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

query I rowsort
SELECT - 39 * col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT + 51 + 6 + col0 AS col1 FROM tab0 cor0
----
146
81
92

query I rowsort
SELECT + col0 * - col0 AS col0 FROM tab2
----
-49
-6084
-6241

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

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

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

query I rowsort
SELECT DISTINCT col0 * - 71 FROM tab1
----
-213
-4544
-5680

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

query I rowsort
SELECT - 76 + col1 + col2 * - 37 AS col2 FROM tab2
----
-1044
-1465
-979

query I rowsort
SELECT + 3 * - col0 FROM tab0
----
-105
-267
-72

query I rowsort
SELECT col0 - - ( - col2 ) * col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT - 40 * 25 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 85283903182a7ae903c96febc04838ff

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + tab1.col1 * col0 col1 FROM tab1
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-349
SELECT - col1 DIV col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-349
SELECT - col1 / col1 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT ALL + 67 * - col1 + + 77 * ( + col2 + 44 ) AS col2 FROM tab2 AS cor0
----
1437
3390
5175

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

query I rowsort
SELECT DISTINCT 8 AS col1 FROM tab1
----
8

query I rowsort
SELECT - cor0.col2 + - ( + tab1.col1 ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 64d6eb9ac86c1abd3d9db46cc516c43c

query I rowsort
SELECT 63 FROM tab1
----
63
63
63

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

query I rowsort
SELECT + ( - col1 ) * col2 + col1 * col1 * - col2 AS col1 FROM tab1 AS cor0
----
-17472
-37908
-6270

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

query I rowsort
SELECT ALL + col0 - ( - col2 ) * col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL 65 FROM tab2, tab1 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT - 59 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

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

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

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

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

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT - 18 FROM tab2, tab0 AS cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

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

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

query I rowsort
SELECT 33 FROM tab1, tab2 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

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

query I rowsort
SELECT ALL + col1 * col2 AS col0 FROM tab0
----
2838
7462
97

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

query I rowsort
SELECT DISTINCT 93 FROM tab0 AS cor0
----
93

query I rowsort
SELECT ALL ( - 81 ) AS col2 FROM tab1 AS cor0
----
-81
-81
-81

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-376
SELECT DISTINCT + CAST( 38 AS SIGNED ) * + col2 AS col1 FROM tab1 AS cor0
----
2052
2166
3648

skipif mysql # not compatible
query I rowsort label-376
SELECT DISTINCT + CAST ( 38 AS INTEGER ) * + col2 AS col1 FROM tab1 AS cor0
----
2052
2166
3648

query I rowsort
SELECT - - col2 * + cor0.col1 * + col1 + col0 FROM tab0 cor0
----
244092
679131
9444

query I rowsort
SELECT + + 17 - col2 FROM tab1 AS cor0
----
-37
-40
-79

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

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

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

query I rowsort
SELECT 82 * - col1 FROM tab1 AS cor0
----
-1066
-2132
-820

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

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

query I rowsort
SELECT ALL 96 * + 88 AS col0 FROM tab0 AS cor0
----
8448
8448
8448

query I rowsort
SELECT ALL + ( cor0.col1 ) * + col1 * - 46 AS col0 FROM tab0 cor0
----
-340216
-380926
-432814

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-385
SELECT DISTINCT + ( + col2 ) / cor0.col2 col1 FROM tab0 AS cor0
----
1

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 61 ) col0 FROM tab2, tab1 cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

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

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

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

query I rowsort
SELECT + ( 94 ) FROM tab2
----
94
94
94

query I rowsort
SELECT ALL + ( + cor0.col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + col2 + - col0 * col1 * 55 FROM tab0 AS cor0
----
-113487
-186724
-445363

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT ALL + 57 + + col1 FROM tab2 cor0
----
116
74
88

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

query I rowsort
SELECT 89 AS col2 FROM tab2 AS cor0
----
89
89
89

query I rowsort
SELECT DISTINCT - + ( col1 ) + col1 * 97 FROM tab2 AS cor0
----
1632
2976
5664

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

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

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

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

query I rowsort
SELECT + 38 - - col1 FROM tab1 AS cor0
----
48
51
64

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

skipif mysql # not compatible
query I rowsort label-403
SELECT CAST ( 12 AS INTEGER ) + col1 + + ( - col1 ) AS col1 FROM tab2
----
12
12
12

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-406
SELECT ALL - + col1 DIV col1 col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-406
SELECT ALL - + col1 / col1 col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ( col2 ) + col1 FROM tab1 AS cor0
----
109
67
80

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

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

query I rowsort
SELECT - col0 * col2 - col1 * - col2 FROM tab1 cor0
----
-3078
-6432
1242

query I rowsort
SELECT ALL - 50 + cor0.col2 FROM tab0 cor0
----
-17
-49
32

query I rowsort
SELECT DISTINCT - 14 AS col0 FROM tab0
----
-14

query I rowsort
SELECT ALL 63 * tab2.col1 - col2 * tab2.col1 AS col0 FROM tab2
----
1116
2183
425

query I rowsort
SELECT 62 * - col0 * col1 FROM tab2
----
-13454
-285324
-83266

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

query I rowsort
SELECT + + cor0.col1 + 54 AS col0 FROM tab2 cor0
----
113
71
85

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

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

query I rowsort
SELECT DISTINCT + col1 * 54 + - 44 * - cor0.col2 AS col1 FROM tab0 cor0
----
5282
6096
8522

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

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

query I rowsort
SELECT ALL - + col0 + col2 - 83 FROM tab2 AS cor0
----
-124
-135
-63

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

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

query I rowsort
SELECT ALL - col1 + 92 AS col0 FROM tab2 AS cor0
----
33
61
75

query I rowsort
SELECT DISTINCT - + col1 * col0 + 58 * + col0 + + col0 FROM tab1 AS cor0
----
3136
3680
99

query I rowsort
SELECT ( tab2.col1 ) * ( + col1 * tab2.col0 ) FROM tab2
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 * - col2 * - ( - tab1.col2 ) col0 FROM tab1
----
239112
266418
755712

query I rowsort
SELECT + 34 AS col1 FROM tab2
----
34
34
34

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col1 / CAST ( ( + col1 ) AS REAL ) AS col1 FROM tab0
----
-1

query I rowsort
SELECT cor0.col0 * 4 + + col1 * + col0 FROM tab2 AS cor0
----
1659
245
4914

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

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

query I rowsort
SELECT - col2 + 45 FROM tab0 cor0
----
-37
12
44

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

query I rowsort
SELECT DISTINCT - + col0 + - 74 AS col2 FROM tab1 AS cor0
----
-138
-154
-77

query I rowsort
SELECT ALL 35 FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

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

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

query I rowsort
SELECT + + 15 + + col0 AS col0 FROM tab2 AS cor0
----
22
93
94

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

query I rowsort
SELECT + + 55 * + col1 + + ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
1736
3304
952

query I rowsort
SELECT ALL - col1 + col0 * - 15 FROM tab1 AS cor0
----
-1213
-71
-970

query I rowsort
SELECT DISTINCT - - 2 * + cor0.col2 + col0 * col0 AS col1 FROM tab1 AS cor0
----
117
4210
6592

query I rowsort
SELECT DISTINCT + 21 + col2 * - ( 0 ) FROM tab0 AS cor0
----
21

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

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

query I rowsort
SELECT DISTINCT - col2 + + col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0, tab1 AS cor0
----
3
64
80

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 * - cor0.col0 - + 54 * 17 col2 FROM tab1 AS cor0
----
-1110
-5014
-6038

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + + tab1.col0 col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT col2 + + 85 + col1 * col2 FROM tab2
----
1645
769
949

query I rowsort
SELECT + ( 91 ) AS col1 FROM tab1
----
91
91
91

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + col0 AS REAL ) * - col2 + 45 * - col1 FROM tab1
----
-1332
-4098
-8265

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 + col0 col0 FROM tab0
----
123
134
188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-457
SELECT ALL + CAST( - 21 AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

skipif mysql # not compatible
query I rowsort label-457
SELECT ALL + CAST ( - 21 AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 56 * col2 * col1 col1 FROM tab2
----
36176
46872
85904

onlyif mysql # use DIV operator for integer division
query I rowsort label-459
SELECT DISTINCT - ( col0 ) DIV 16 AS col0 FROM tab0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-459
SELECT DISTINCT - ( col0 ) / 16 AS col0 FROM tab0
----
-1
-2
-5

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

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

query I rowsort
SELECT DISTINCT + + cor0.col1 * col1 - col0 AS col2 FROM tab0 AS cor0
----
7372
8192
9374

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

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

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

query I rowsort
SELECT ALL col0 - + col2 * + 92 FROM tab2 AS cor0
----
-2314
-2477
-3417

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

query I rowsort
SELECT ALL - + 26 + 16 * - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 68ef74c8f30d319575175948de0098ac

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-470
SELECT ALL - cor1.col2 DIV 10 col1 FROM tab2 cor0 CROSS JOIN tab0, tab1 cor1, tab0 cor2
----
81 values hashing to 03703d55a8188b5225d2c06108116610

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-470
SELECT ALL - cor1.col2 / 10 col1 FROM tab2 cor0 CROSS JOIN tab0, tab1 cor1, tab0 cor2
----
81 values hashing to 03703d55a8188b5225d2c06108116610

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

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

query I rowsort
SELECT DISTINCT col2 * - 34 * 37 AS col1 FROM tab2 AS cor0
----
-32708
-33966
-47804

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

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

query I rowsort
SELECT ALL - + col0 + col1 * + col1 FROM tab1 AS cor0
----
36
673
89

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-478
SELECT CAST( col1 AS SIGNED ) DIV col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-478
SELECT CAST ( col1 AS INTEGER ) / col0 FROM tab1
----
0
0
8

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

skipif mysql # not compatible
query I rowsort label-479
SELECT col1 * col2 - + col0 * CAST ( col2 AS INTEGER ) * + col1 FROM tab1 AS cor0
----
-2808
-35910
-98592

query I rowsort
SELECT DISTINCT - col2 + + ( + col0 ) * ( + 76 ) AS col0 FROM tab0 AS cor0
----
1791
2659
6682

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

query I rowsort
SELECT ALL + 62 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 - col1 col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL + col0 + + 11 * - col0 FROM tab1
----
-30
-640
-800

query I rowsort
SELECT cor0.col0 * + 71 AS col2 FROM tab1 AS cor0
----
213
4544
5680

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

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

query I rowsort
SELECT + 9 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT DISTINCT - - cor0.col2 * 89 + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b5ed3ac478ca0bfd589514a22aef4123

query I rowsort
SELECT - 81 * col0 FROM tab1 AS cor0
----
-243
-5184
-6480

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-493
SELECT DISTINCT + CAST ( - col0 AS INTEGER ) * col1 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

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-495
SELECT - 71 * col2 * - col0 + - cor0.col1 DIV - col1 FROM tab0 AS cor0
----
2486
518159
56233

skipif mysql # not compatible
query I rowsort label-495
SELECT - 71 * col2 * - col0 + - cor0.col1 / - col1 FROM tab0 AS cor0
----
2486
518159
56233

query I rowsort
SELECT 28 AS col1 FROM tab0
----
28
28
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-497
SELECT - col2 - col2 * 29 DIV 7 FROM tab0 AS cor0
----
-169
-421
-5

skipif mysql # not compatible
query I rowsort label-497
SELECT - col2 - col2 * 29 / 7 FROM tab0 AS cor0
----
-169
-421
-5

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2, tab1 cor0
----
54
57
96

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

query I rowsort
SELECT - - 33 * col0 - + 42 FROM tab1 cor0
----
2070
2598
57

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

query I rowsort
SELECT ALL + + col2 + ( 24 ) + + col2 * + col1 FROM tab2 AS cor0
----
1584
708
888

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

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

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

query I rowsort
SELECT - col1 + 33 AS col2 FROM tab2 cor0
----
-26
16
2

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

query I rowsort
SELECT ALL + 64 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 * - col0 col0 FROM tab2 cor0
----
-238
-2652
-2686

query I rowsort
SELECT + 8 * col2 FROM tab2 cor0
----
208
216
304

query I rowsort
SELECT + 86 FROM tab1, tab0, tab0 AS cor0, tab2
----
81 values hashing to e219687f6f4ab6f7ee442792edcebca9

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

query I rowsort
SELECT ALL - col2 + + col1 + col1 FROM tab1 AS cor0
----
-2
-37
-70

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

query I rowsort
SELECT ALL col0 - - 21 AS col0 FROM tab0 AS cor0
----
110
45
56

query I rowsort
SELECT cor0.col1 * - 50 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 6db5ca93d5facf44cc4fe562a982ec50

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

query I rowsort
SELECT - col0 - - 52 AS col2 FROM tab1
----
-12
-28
49

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

query I rowsort
SELECT DISTINCT col0 * 76 - + 4 FROM tab0
----
1820
2656
6760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( tab1.col1 * - col0 ) col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL - col2 * ( + 37 + col2 ) FROM tab2
----
-1638
-1728
-2850

query I rowsort
SELECT - col1 * + col0 + col2 - - tab1.col2 FROM tab1
----
-526
-848
30

query I rowsort
SELECT - + col1 * 4 + - col1 * col2 FROM tab2 AS cor0
----
-1770
-714
-961

query I rowsort
SELECT col2 * ( + col2 ) + - col1 FROM tab1 AS cor0
----
2890
3239
9203

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

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

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

query I rowsort
SELECT DISTINCT - tab2.col2 * 32 AS col2 FROM tab2
----
-1216
-832
-864

query I rowsort
SELECT cor1.col0 * - 46 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7c2ff736fb78afe6c2ad084c94d9d26d

query I rowsort
SELECT - tab2.col0 * - 84 FROM tab2
----
588
6552
6636

query I rowsort
SELECT col0 * 92 FROM tab0
----
2208
3220
8188

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

query I rowsort
SELECT - 13 * + col0 FROM tab0 AS cor0
----
-1157
-312
-455

query I rowsort
SELECT ( col0 ) AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT 37 * + col0 AS col1 FROM tab1
----
111
2368
2960

query I rowsort
SELECT DISTINCT col2 * - col2 AS col1 FROM tab0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-537
SELECT DISTINCT col0 + 61 DIV col2 AS col1 FROM tab0
----
25
89
96

skipif mysql # not compatible
query I rowsort label-537
SELECT DISTINCT col0 + 61 / col2 AS col1 FROM tab0
----
25
89
96

query I rowsort
SELECT - 22 AS col1 FROM tab0
----
-22
-22
-22

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

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

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

query I rowsort
SELECT DISTINCT - - col0 FROM tab0 cor0
----
24
35
89

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

query I rowsort
SELECT + + 67 * col0 * col2 AS col1 FROM tab2 AS cor0
----
12663
135876
201134

query I rowsort
SELECT + + col2 + + col0 * - col0 FROM tab0 AS cor0
----
-1224
-543
-7839

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col0 * cor0.col0 col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 90419a192c361a642cd324efcc88b14d

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

query I rowsort
SELECT ALL - - cor0.col1 AS col0 FROM tab2 cor0
----
17
31
59

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

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

query I rowsort
SELECT ALL - 78 * col1 AS col2 FROM tab1 AS cor0
----
-1014
-2028
-780

query I rowsort
SELECT DISTINCT + col0 * col2 + 52 FROM tab2 AS cor0
----
2080
241
3054

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * cor0.col0 col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + + col2 * + 70 FROM tab1 AS cor0
----
3780
3990
6720

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

query I rowsort
SELECT DISTINCT + col1 + - col0 * + col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + + cor0.col0 * - col2 - col0 * + col0 FROM tab1 AS cor0
----
-14080
-171
-7744

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 * + 70 AS col2 FROM tab1 AS cor0
----
-1820
-700
-910

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

query I rowsort
SELECT DISTINCT + 31 * - col0 + + col1 + ( + col0 ) FROM tab2 AS cor0
----
-179
-2281
-2353

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

query I rowsort
SELECT ALL - col0 * col1 + col2 AS col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + 33 * + col0 + + col2 * ( cor0.col2 ) * col2 FROM tab0 AS cor0
----
1156
36729
554305

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col2 AS REAL ) * col0 * col0 + cor0.col1 FROM tab2 AS cor0
----
1354
158243
237175

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

query I rowsort
SELECT ALL + col1 FROM tab2 cor0
----
17
31
59

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

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

query I rowsort
SELECT DISTINCT - 49 + + col1 AS col2 FROM tab2 AS cor0
----
-18
-32
10

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

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

query I rowsort
SELECT col0 + + 5 AS col0 FROM tab2 AS cor0
----
12
83
84

query I rowsort
SELECT DISTINCT - cor0.col2 + col0 * - col2 * - col0 AS col0 FROM tab2 cor0
----
1296
158158
237120

query I rowsort
SELECT DISTINCT - col1 * col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

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

query I rowsort
SELECT ALL - 46 * col1 AS col2 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) + + col1 * col1 * - col1 FROM tab2 AS cor0
----
-205301
-29784
-4834

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-589
SELECT ALL - 49 / - cor0.col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 83 * col1 AS col1 FROM tab2
----
1411
2573
4897

query I rowsort
SELECT - 60 FROM tab0, tab0 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT 27 * - col1 * - col1 AS col0 FROM tab2
----
25947
7803
93987

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

query I rowsort
SELECT - cor0.col0 * 59 + - col1 FROM tab1 AS cor0
----
-203
-3786
-4733

query I rowsort
SELECT DISTINCT + col1 * 43 FROM tab0 AS cor0
----
3698
3913
4171

query I rowsort
SELECT ALL - col1 + - 24 * + col0 AS col2 FROM tab1 AS cor0
----
-1546
-1933
-98

query I rowsort
SELECT - col0 + + 98 + - col2 AS col2 FROM tab1 AS cor0
----
-23
-78
41

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

query I rowsort
SELECT 8 + + col1 FROM tab1 AS cor0
----
18
21
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-600
SELECT - + col0 * + cor0.col0 - + col1 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-600
SELECT - + col0 * + cor0.col0 - + col1 / cor0.col2 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - 33 * col0 + - col0 FROM tab2 cor0
----
-238
-2652
-2686

query I rowsort
SELECT col1 + + cor0.col0 + + ( - col1 ) * col1 FROM tab1 AS cor0
----
-26
-647
-76

query I rowsort
SELECT + 75 * - col1 AS col2 FROM tab2 cor0
----
-1275
-2325
-4425

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

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

query I rowsort
SELECT + 78 - + tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to f5def429e40d8b7b2fe53850ac2d93e4

onlyif mysql # use DIV operator for integer division
query I rowsort label-607
SELECT DISTINCT 59 * - col1 + col0 DIV col1 AS col1 FROM tab2
----
-1829
-3480
-999

skipif mysql # not compatible
query I rowsort label-607
SELECT DISTINCT 59 * - col1 + col0 / col1 AS col1 FROM tab2
----
-1829
-3480
-999

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

query I rowsort
SELECT DISTINCT cor1.col1 * + 97 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
8342
8827
9409

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

query I rowsort
SELECT ALL - col1 + - col0 + + col0 FROM tab2 AS cor0
----
-17
-31
-59

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 * 10 + col2 FROM tab0 AS cor0
----
-827
-828
-969

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0, tab1, tab0 AS cor0
----
24
35
89

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

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0
----
17
31
59

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

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

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

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

query I rowsort
SELECT DISTINCT + col2 + + 36 * col0 * col2 + 77 FROM tab0 AS cor0
----
1338
262887
28622

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

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

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

skipif mysql # not compatible
query I rowsort label-630
SELECT DISTINCT + col1 / col0 + col1 AS col0 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT - 42 FROM tab0 AS cor0
----
-42
-42
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-632
SELECT ALL ( - col2 ) DIV + col0 col2 FROM tab2 AS cor0
----
-3
0
0

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

query I rowsort
SELECT + ( + col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 46 + - col2 * col1 FROM tab2 cor0
----
-1488
-600
-791

query I rowsort
SELECT ALL + cor0.col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - ( - 76 ) AS col1 FROM tab0
----
76
76
76

query I rowsort
SELECT - - cor0.col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT col0 * + col1 FROM tab2
----
1343
217
4602

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

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

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

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

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

query I rowsort
SELECT - - col2 * 92 FROM tab1 AS cor0
----
4968
5244
8832

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

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

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

query I rowsort
SELECT + + 68 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

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

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

query I rowsort
SELECT + + cor0.col2 + col0 * 13 FROM tab1 AS cor0
----
1136
889
93

query I rowsort
SELECT + + col2 * + col0 * - ( 56 ) FROM tab1 AS cor0
----
-204288
-430080
-9072

onlyif mysql # use DIV operator for integer division
query I rowsort label-651
SELECT - col2 + tab0.col1 DIV 81 AS col0 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-651
SELECT - col2 + tab0.col1 / 81 AS col0 FROM tab0
----
-32
-81
0

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

skipif mysql # not compatible
query I rowsort label-652
SELECT + + ( + col0 ) / col0 FROM tab1 AS cor0
----
1
1
1

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

query I rowsort
SELECT ALL - 51 + col1 * ( cor0.col1 ) FROM tab2 AS cor0
----
238
3430
910

query I rowsort
SELECT DISTINCT + + col2 * - col1 * col2 + - 75 * col0 AS col2 FROM tab0 AS cor0
----
-2722
-618559
-95454

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

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

query I rowsort
SELECT DISTINCT + 53 + cor0.col0 AS col2 FROM tab0 AS cor0
----
142
77
88

query I rowsort
SELECT + 9 * - col1 FROM tab0 AS cor0
----
-774
-819
-873

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

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

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

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

query I rowsort
SELECT - col0 + col0 FROM tab0 cor0
----
0
0
0

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

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

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

query I rowsort
SELECT ALL col2 * ( + col2 ) + - col1 FROM tab1 AS cor0
----
2890
3239
9203

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

query I rowsort
SELECT ALL 85 * + col0 * col0 FROM tab1
----
348160
544000
765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - 25 col2 FROM tab1 AS cor0
----
-1350
-1425
-2400

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

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

skipif mysql # not compatible
query I rowsort label-670
SELECT DISTINCT + col2 + col0 / col1 AS col2 FROM tab1 AS cor0
----
102
54
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col1 + + 35 ) col0 FROM tab1
----
45
48
61

query I rowsort
SELECT - 56 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

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

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

query I rowsort
SELECT DISTINCT + - 1 FROM tab2 cor0
----
-1

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

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

query I rowsort
SELECT 64 AS col2 FROM tab0 AS cor0
----
64
64
64

query I rowsort
SELECT 12 FROM tab2, tab0 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

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

query I rowsort
SELECT ALL 42 FROM tab1, tab1 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

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

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

query I rowsort
SELECT 73 * + col0 * col0 + tab1.col2 * 66 FROM tab1
----
302770
4221
473536

query I rowsort
SELECT + 92 AS col2 FROM tab0
----
92
92
92

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab1
----
36

query I rowsort
SELECT 54 AS col1 FROM tab2
----
54
54
54

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

query I rowsort
SELECT + 80 AS col2 FROM tab1
----
80
80
80

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

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

query I rowsort
SELECT ALL - 17 + - col1 * + col1 AS col1 FROM tab2
----
-306
-3498
-978

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + 21 ) + + col2 * ( col2 ) col1 FROM tab0
----
1110
22
6745

query I rowsort
SELECT + 20 FROM tab1, tab2 cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT ALL - 21 AS col1 FROM tab2 AS cor0
----
-21
-21
-21

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

query I rowsort
SELECT 25 + + col2 * + cor0.col1 FROM tab2 AS cor0
----
1559
671
862

query I rowsort
SELECT ALL - col2 + - col1 * col2 AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

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

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

query IIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0 CROSS JOIN tab0
----
243 values hashing to b3323704f6873113d863f8e27386b356

query I rowsort
SELECT ALL col0 * + tab2.col2 * - col1 + col2 * col2 * + col2 AS col0 FROM tab2
----
-102076
13824
3838

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

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

query I rowsort
SELECT cor0.col1 * 51 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 98c668e36be52a824d29bbc0004a3f1b

query I rowsort
SELECT ( - ( cor0.col1 ) ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

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

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

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

query I rowsort
SELECT ALL cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL - - col0 * + col0 * - col1 + + col1 * col2 * + ( ( col0 ) ) + - 71 AS col1 FROM tab2 cor0
----
-239375
-55134
4269

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

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

query I rowsort
SELECT DISTINCT + - cor0.col0 * + col2 - + 49 FROM tab0 AS cor0
----
-7347
-84
-841

query I rowsort
SELECT + col0 * - col0 + + 11 * 74 AS col2 FROM tab2 AS cor0
----
-5270
-5427
765

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-718
SELECT ALL + col1 - + 35 DIV 69 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-718
SELECT ALL + col1 - + 35 / 69 FROM tab1
----
10
13
26

query I rowsort
SELECT + col0 + 12 - col0 AS col1 FROM tab2
----
12
12
12

query I rowsort
SELECT ALL col1 * + 65 * col2 FROM tab2 AS cor0
----
41990
54405
99710

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

query I rowsort
SELECT ALL + 57 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col2 * + tab2.col0 col2 FROM tab2
----
-1323
-158184
-237158

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

query I rowsort
SELECT 22 * - cor0.col2 + - col2 * + col2 AS col1 FROM tab2 AS cor0
----
-1248
-1323
-2280

query I rowsort
SELECT DISTINCT 87 + - col2 AS col1 FROM tab1 AS cor0
----
-9
30
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 0 + - col2 col2 FROM tab0 AS cor0
----
-1
-33
-82

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-729
SELECT ALL + 53 * - col1 - col0 DIV col1 AS col0 FROM tab0 AS cor0
----
-4558
-4823
-5141

skipif mysql # not compatible
query I rowsort label-729
SELECT ALL + 53 * - col1 - col0 / col1 AS col0 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT ALL 38 * - col1 AS col0 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT DISTINCT ( + col2 ) + + cor0.col2 + 54 FROM tab2 AS cor0
----
106
108
130

query I rowsort
SELECT DISTINCT - + col0 * 3 AS col2 FROM tab1 AS cor0
----
-192
-240
-9

query I rowsort
SELECT ALL - 69 * col0 * col1 + cor0.col1 FROM tab1 AS cor0
----
-44150
-5356
-71747

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

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

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

query I rowsort
SELECT DISTINCT 25 + + 16 AS col2 FROM tab2
----
41

query I rowsort
SELECT 13 * 89 FROM tab0 AS cor0
----
1157
1157
1157

query I rowsort
SELECT + + 14 + - col2 + - cor0.col1 FROM tab1 AS cor0
----
-53
-66
-95

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

query I rowsort
SELECT DISTINCT - 69 + 72 AS col2 FROM tab2 AS cor0
----
3

query I rowsort
SELECT ALL + 18 * col1 FROM tab0 AS cor0
----
1548
1638
1746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * col2 col2 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-743
SELECT - + 19 - col1 DIV col0 FROM tab1 cor0
----
-19
-19
-27

skipif mysql # not compatible
query I rowsort label-743
SELECT - + 19 - col1 / col0 FROM tab1 cor0
----
-19
-19
-27

query I rowsort
SELECT + 17 * + col2 * col1 AS col1 FROM tab0 AS cor0
----
126854
1649
48246

query I rowsort
SELECT - cor0.col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

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

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col1 AS REAL ) + + col1 * - 84 FROM tab2 cor0
----
-1411
-2573
-4897

query I rowsort
SELECT + - 4 AS col1 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL - col1 * 32 - - cor0.col1 FROM tab0 AS cor0
----
-2666
-2821
-3007

onlyif mysql # use DIV operator for integer division
query I rowsort label-752
SELECT ALL + col2 DIV + col0 + + col1 AS col2 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-752
SELECT ALL + col2 / + col0 + + col1 AS col2 FROM tab1 AS cor0
----
10
14
44

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

query I rowsort
SELECT DISTINCT - 8 FROM tab1 AS cor0
----
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-755
SELECT ALL + - 20 DIV - col1 FROM tab2 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-755
SELECT ALL + - 20 / - col1 FROM tab2 cor0
----
0
0
1

query I rowsort
SELECT ALL - 71 * cor0.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to cb4783e87cbaab3f7fafc73904bfe5b3

query I rowsort
SELECT 86 * + col2 + col0 FROM tab1
----
4647
4966
8336

query I rowsort
SELECT - 33 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT DISTINCT + 3 FROM tab2 cor0
----
3

query I rowsort
SELECT ALL - - ( - cor0.col2 ) * + 52 AS col1 FROM tab1 AS cor0
----
-2808
-2964
-4992

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

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

query I rowsort
SELECT ALL 5 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-765
SELECT - col2 + ( 43 ) DIV + col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-765
SELECT - col2 + ( 43 ) / + col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + cor0.col1 * 43 - ( col2 * ( - 8 ) + + col0 ) AS col1 FROM tab1 AS cor0
----
1247
1547
822

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-768
SELECT DISTINCT + col1 DIV - 31 + + 18 AS col0 FROM tab1 AS cor0
----
18

skipif mysql # not compatible
query I rowsort label-768
SELECT DISTINCT + col1 / - 31 + + 18 AS col0 FROM tab1 AS cor0
----
18

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

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

query I rowsort
SELECT - 11 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-773
SELECT DISTINCT - + col0 * 93 + - ( - col1 ) DIV - col0 FROM tab1 AS cor0
----
-287
-5952
-7440

skipif mysql # not compatible
query I rowsort label-773
SELECT DISTINCT - + col0 * 93 + - ( - col1 ) / - col0 FROM tab1 AS cor0
----
-287
-5952
-7440

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-776
SELECT + col0 + CAST( NULL AS SIGNED ) * - col1 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-776
SELECT + col0 + CAST ( NULL AS INTEGER ) * - col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL - 14 * + tab1.col2 AS col0 FROM tab1
----
-1344
-756
-798

query I rowsort
SELECT + col1 + - 69 * col2 AS col2 FROM tab2 AS cor0
----
-1735
-1832
-2605

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 37 col1 FROM tab2 AS cor0
----
1147
2183
629

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

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

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

skipif mysql # not compatible
query I rowsort label-784
SELECT CAST ( 15 AS INTEGER ) * + col2 * + col2 AS col1 FROM tab0 AS cor0
----
100860
15
16335

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

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

query I rowsort
SELECT tab2.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

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

query I rowsort
SELECT 71 + - cor0.col1 AS col2 FROM tab0 cor0
----
-15
-20
-26

query I rowsort
SELECT DISTINCT + + col0 AS col0 FROM tab2 cor0
----
7
78
79

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

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

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

query I rowsort
SELECT cor0.col0 * + col2 * cor0.col2 + - ( + col0 * - col0 ) AS col2 FROM tab0 cor0
----
1260
26712
606357

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

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

query I rowsort
SELECT ( - col1 ) * + cor0.col2 + 76 AS col2 FROM tab2 AS cor0
----
-1458
-570
-761

query I rowsort
SELECT DISTINCT - ( 54 ) * - col2 + + 4 * - 15 FROM tab1 AS cor0
----
2856
3018
5124

query I rowsort
SELECT - 89 * col1 FROM tab0 AS cor0
----
-7654
-8099
-8633

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

query I rowsort
SELECT - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 11 col1 FROM tab2, tab1 AS cor0
----
11

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-808
SELECT 90 DIV col1 FROM tab1 AS cor0
----
3
6
9

skipif mysql # not compatible
query I rowsort label-808
SELECT 90 / col1 FROM tab1 AS cor0
----
3
6
9

query I rowsort
SELECT + 98 * cor0.col2 + - col1 AS col2 FROM tab0 AS cor0
----
1
3148
7945

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

query I rowsort
SELECT - 8 FROM tab0 AS cor0
----
-8
-8
-8

query I rowsort
SELECT + + cor0.col0 + - col0 * - 64 AS col0 FROM tab0 AS cor0
----
1560
2275
5785

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-814
SELECT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-814
SELECT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-815
SELECT ALL col1 / - tab2.col0 col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT col0 + - ( 80 ) AS col2 FROM tab2 AS cor0
----
-1
-2
-73

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

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

query I rowsort
SELECT ALL col0 * 69 AS col2 FROM tab0 AS cor0
----
1656
2415
6141

query I rowsort
SELECT + + 48 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-823
SELECT ALL + col1 * - ( ( col0 ) ) + + col1 DIV tab1.col0 FROM tab1
----
-1040
-640
-70

skipif mysql # not compatible
query I rowsort label-823
SELECT ALL + col1 * - ( ( col0 ) ) + + col1 / tab1.col0 FROM tab1
----
-1040
-640
-70

query I rowsort
SELECT 79 * col2 + - col0 * + ( + col2 ) FROM tab2 AS cor0
----
0
1944
26

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

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

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

skipif mysql # not compatible
query I rowsort label-827
SELECT + CAST ( ( col0 ) AS INTEGER ) + col1 AS col2 FROM tab2 AS cor0
----
137
38
96

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

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

skipif mysql # not compatible
query I rowsort label-829
SELECT CAST ( - col1 AS INTEGER ) * tab1.col0 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL 87 * col1 + col1 AS col1 FROM tab1 AS cor0
----
1144
2288
880

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

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

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab2
----
28

query I rowsort
SELECT col2 + - 32 * + col1 FROM tab2 AS cor0
----
-1862
-506
-965

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

query I rowsort
SELECT DISTINCT + col0 * col0 + + 7 AS col0 FROM tab1
----
16
4103
6407

query I rowsort
SELECT DISTINCT - col0 + 12 * + col0 FROM tab2
----
77
858
869

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

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

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

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

query I rowsort
SELECT + - col2 + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - col1 + col0 + - col1 AS col0 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT ALL col1 * + ( - col2 * - col2 ) FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT + tab2.col0 * + 15 FROM tab2
----
105
1170
1185

query I rowsort
SELECT + + 12 AS col1 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT + + col1 * 84 FROM tab2 AS cor0
----
1428
2604
4956

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

query I rowsort
SELECT DISTINCT 53 FROM tab0 AS cor0
----
53

query I rowsort
SELECT + - col2 * 69 FROM tab1 cor0
----
-3726
-3933
-6624

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-849
SELECT ALL + - col0 - + ( col0 ) DIV col1 AS col0 FROM tab2 AS cor0
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-849
SELECT ALL + - col0 - + ( col0 ) / col1 AS col0 FROM tab2 AS cor0
----
-7
-79
-83

query I rowsort
SELECT DISTINCT + 68 * col2 FROM tab0 cor0
----
2244
5576
68

query I rowsort
SELECT 16 FROM tab1 cor0
----
16
16
16

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

skipif mysql # not compatible
query I rowsort label-852
SELECT ALL col1 / - ( col0 + cor0.col0 ) FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT ALL + col1 + + col1 * - col0 * - cor0.col0 FROM tab1 AS cor0
----
260
40970
83213

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 95920403df268a272c4e933cd0bbe0be

query I rowsort
SELECT - 63 FROM tab2, tab1 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

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

skipif mysql # not compatible
query I rowsort
SELECT cor0.col0 + + col2 / col1 + ( col1 ) * - CAST ( col1 AS REAL ) FROM tab2 AS cor0
----
-208
-3403
-954

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

query I rowsort
SELECT col1 * col1 + + col2 * 6 FROM tab0 cor0
----
7594
8773
9415

query I rowsort
SELECT ALL - - col1 * cor0.col2 + 72 + col1 AS col0 FROM tab0 AS cor0
----
266
2996
7625

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

query I rowsort
SELECT + - 81 + col1 - 65 FROM tab0 AS cor0
----
-49
-55
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-863
SELECT - 55 + col0 + col2 DIV + 62 FROM tab2 AS cor0
----
-48
23
24

skipif mysql # not compatible
query I rowsort label-863
SELECT - 55 + col0 + col2 / + 62 FROM tab2 AS cor0
----
-48
23
24

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

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

query I rowsort
SELECT DISTINCT - col1 * + ( - col1 ) AS col2 FROM tab0 AS cor0
----
7396
8281
9409

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-868
SELECT + col1 * - CAST( NULL AS SIGNED ) / - 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-868
SELECT + col1 * - CAST ( NULL AS INTEGER ) / - col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-869
SELECT DISTINCT col2 DIV ( col2 * col2 ) + - 44 * + col0 AS col0 FROM tab0 AS cor0
----
-1056
-1539
-3916

skipif mysql # not compatible
query I rowsort label-869
SELECT DISTINCT col2 / ( col2 * col2 ) + - 44 * + col0 AS col0 FROM tab0 AS cor0
----
-1056
-1539
-3916

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

query I rowsort
SELECT DISTINCT - + col2 * ( col2 ) + col2 AS col2 FROM tab1 cor0
----
-2862
-3192
-9120

query I rowsort
SELECT + cor0.col2 + col1 + ( + col2 ) * - col2 AS col2 FROM tab0 AS cor0
----
-6551
-970
97

query I rowsort
SELECT tab0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-874
SELECT 88 + - col0 DIV 98 - + ( - col2 + col1 ) * 89 FROM tab2
----
-268
-2849
1957

skipif mysql # not compatible
query I rowsort label-874
SELECT 88 + - col0 / 98 - + ( - col2 + col1 ) * 89 FROM tab2
----
-268
-2849
1957

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

query I rowsort
SELECT DISTINCT col2 - col1 * + col1 * tab2.col0 FROM tab2
----
-22793
-271492
-6700

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

query I rowsort
SELECT + 11 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-880
SELECT + CAST( - 59 AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 1e6537c922fa953e0fd2f59430803703

skipif mysql # not compatible
query I rowsort label-880
SELECT + CAST ( - 59 AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 1e6537c922fa953e0fd2f59430803703

query I rowsort
SELECT DISTINCT - col0 + - 69 + 99 * col1 FROM tab2 cor0
----
1535
2993
5694

query I rowsort
SELECT ALL col0 * 8 AS col1 FROM tab2 AS cor0
----
56
624
632

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

query I rowsort
SELECT ALL col0 * col0 + col2 + cor0.col1 FROM tab1 AS cor0
----
4163
6509
89

query I rowsort
SELECT ALL - cor0.col1 + - 76 FROM tab1 AS cor0
----
-102
-86
-89

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col0 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col2 col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - + col0 * col1 - - col2 FROM tab2 AS cor0
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 86 * ( col2 ) * tab2.col2 + ( tab2.col0 * + 66 ) col0 FROM tab2
----
-118891
-52910
-62225

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col1 col0 FROM tab2
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + tab0.col0 * col2 col1 FROM tab0
----
132
7389
878

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

query I rowsort
SELECT cor0.col2 + 35 FROM tab1, tab1 AS cor0
----
9 values hashing to a6f5bd3c132ae500bfca6e845fb8129f

query I rowsort
SELECT DISTINCT + col0 + - ( + col2 * col0 + + col2 ) AS col0 FROM tab2 AS cor0
----
-1976
-209
-2961

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-902
SELECT ALL - + col0 DIV - 9 + + 21 AS col0 FROM tab0 AS cor0
----
23
24
30

skipif mysql # not compatible
query I rowsort label-902
SELECT ALL - + col0 / - 9 + + 21 AS col0 FROM tab0 AS cor0
----
23
24
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-903
SELECT DISTINCT col2 + CAST( - col2 AS SIGNED ) DIV + col1 FROM tab2
----
26
27
36

skipif mysql # not compatible
query I rowsort label-903
SELECT DISTINCT col2 + CAST ( - col2 AS INTEGER ) / + col1 FROM tab2
----
26
27
36

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

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

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

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

query I rowsort
SELECT ALL + - 12 FROM tab1 AS cor0
----
-12
-12
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-908
SELECT ALL - 81 DIV + col0 + + col0 AS col0 FROM tab1 AS cor0
----
-24
63
79

skipif mysql # not compatible
query I rowsort label-908
SELECT ALL - 81 / + col0 + + col0 AS col0 FROM tab1 AS cor0
----
-24
63
79

query I rowsort
SELECT + - ( - col0 ) * 32 AS col2 FROM tab2 AS cor0
----
224
2496
2528

query I rowsort
SELECT ALL + 19 AS col0 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT ALL + 45 * - col1 AS col0 FROM tab2
----
-1395
-2655
-765

query I rowsort
SELECT DISTINCT ( - col1 ) FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 - col1 col2 FROM tab2 cor0
----
-118
-34
-62

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-915
SELECT ALL col0 - - col0 DIV col2 AS col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-915
SELECT ALL col0 - - col0 / col2 AS col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT ALL col2 + + col2 + col2 * + col1 FROM tab2 AS cor0
----
1586
722
891

query I rowsort
SELECT DISTINCT - - col1 + col1 + col1 AS col0 FROM tab1 AS cor0
----
30
39
78

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 + col1 + 84 FROM tab1 AS cor0
----
151
164
193

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

skipif mysql # not compatible
query I rowsort label-921
SELECT DISTINCT - + col2 - - col1 / 75 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

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

query I rowsort
SELECT ALL ( + col2 ) AS col2 FROM tab2 cor0
----
26
27
38

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

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

query I rowsort
SELECT 64 * col0 FROM tab0 AS cor0
----
1536
2240
5696

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

query I rowsort
SELECT + 60 * + 92 FROM tab0 AS cor0
----
5520
5520
5520

query I rowsort
SELECT 2 FROM tab1 AS cor0
----
2
2
2

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

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab1, tab2 cor1
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

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

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

query I rowsort
SELECT DISTINCT - - ( - col1 ) * cor0.col2 * + col2 + - col1 FROM tab0 AS cor0
----
-194
-611975
-93740

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

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

query I rowsort
SELECT - 58 FROM tab1
----
-58
-58
-58

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

skipif mysql # not compatible
query I rowsort label-936
SELECT - CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

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

skipif mysql # not compatible
query I rowsort label-937
SELECT DISTINCT CAST ( col2 AS INTEGER ) AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL 20 AS col0 FROM tab2
----
20
20
20

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col2 + col0 * - col2 * col1 col2 FROM tab1
----
-109056
-39729
-7128

query I rowsort
SELECT col1 * + col1 + col2 + + 1 FROM tab2
----
328
3508
989

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

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

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

query I rowsort
SELECT DISTINCT 36 + col1 AS col0 FROM tab1
----
46
49
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-946
SELECT ( col1 ) * tab2.col2 DIV col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-946
SELECT ( col1 ) * tab2.col2 / col1 FROM tab2
----
26
27
38

query I rowsort
SELECT - 6 + col2 FROM tab2 cor0
----
20
21
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-948
SELECT DISTINCT - ( col2 ) + + 63 * 7 DIV tab1.col1 AS col2 FROM tab1
----
-13
-38
-63

skipif mysql # not compatible
query I rowsort label-948
SELECT DISTINCT - ( col2 ) + + 63 * 7 / tab1.col1 AS col2 FROM tab1
----
-13
-38
-63

query I rowsort
SELECT ALL 54 + + col2 FROM tab0
----
136
55
87

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * cor0.col0 col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col1 + 20 + + col2 FROM tab2 AS cor0
----
105
75
78

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

query I rowsort
SELECT col2 * 61 + + 28 AS col0 FROM tab2 AS cor0
----
1614
1675
2346

query I rowsort
SELECT - col1 * 94 + - col0 AS col0 FROM tab0 AS cor0
----
-8108
-8643
-9153

query I rowsort
SELECT - - col1 + 68 * ( col0 + - col2 ) AS col1 FROM tab0 AS cor0
----
-526
2409
567

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 * - ( + col2 + col2 ) AS col1 FROM tab2 AS cor0
----
-1292
-1674
-3068

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-962
SELECT ALL + + cor0.col0 * + ( - col1 ) + col0 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
-1339
-217
-4601

skipif mysql # not compatible
query I rowsort label-962
SELECT ALL + + cor0.col0 * + ( - col1 ) + col0 / cor0.col1 AS col2 FROM tab2 AS cor0
----
-1339
-217
-4601

query I rowsort
SELECT DISTINCT tab2.col2 * + 45 FROM tab2
----
1170
1215
1710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * + col1 col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT + col0 + - tab1.col1 FROM tab1
----
-23
54
67

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

skipif mysql # not compatible
query I rowsort label-966
SELECT ALL + + CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

onlyif mysql # use DIV operator for integer division
query I rowsort label-967
SELECT col2 DIV col0 col0 FROM tab1
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-967
SELECT col2 / col0 col0 FROM tab1
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-968
SELECT col2 DIV col2 + - col0 * col0 * ( 58 ) FROM tab1 AS cor0
----
-237567
-371199
-521

skipif mysql # not compatible
query I rowsort label-968
SELECT col2 / col2 + - col0 * col0 * ( 58 ) FROM tab1 AS cor0
----
-237567
-371199
-521

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

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

query I rowsort
SELECT DISTINCT - col1 * col1 - col0 FROM tab1
----
-164
-249
-679

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

skipif mysql # not compatible
query I rowsort label-972
SELECT - tab0.col2 + - ( col0 ) / - col0 - tab0.col0 AS col1 FROM tab0
----
-170
-35
-56

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

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

query I rowsort
SELECT 33 + col0 FROM tab2 AS cor0
----
111
112
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 + + col2 * col1 + + col1 col2 FROM tab0
----
231
2961
7590

query I rowsort
SELECT + 41 * col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT + 88 * - col1 FROM tab0 AS cor0
----
-7568
-8008
-8536

query I rowsort
SELECT ALL - cor0.col2 + - 70 + + col0 FROM tab0 AS cor0
----
-36
-63
-79

query I rowsort
SELECT + col0 * + 60 * 70 FROM tab2
----
29400
327600
331800

query I rowsort
SELECT DISTINCT tab1.col0 * + 32 * col2 FROM tab1
----
116736
245760
5184

query I rowsort
SELECT - cor0.col1 * + 21 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1521
-1950
-780

query I rowsort
SELECT DISTINCT 79 + col2 * + col1 FROM tab0 AS cor0
----
176
2917
7541

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

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

query I rowsort
SELECT DISTINCT + 70 + 6 FROM tab0 AS cor0
----
76

query I rowsort
SELECT DISTINCT + 73 + + col1 AS col0 FROM tab2 cor0
----
104
132
90

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-989
SELECT ALL - + cor0.col0 + cor0.col2 DIV - col0 - + 37 col2 FROM tab2 AS cor0
----
-115
-116
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-989
SELECT ALL - + cor0.col0 + cor0.col2 / - col0 - + 37 col2 FROM tab2 AS cor0
----
-115
-116
-47

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

query I rowsort
SELECT DISTINCT cor0.col0 + 85 AS col1 FROM tab2 AS cor0
----
163
164
92

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT - + col1 - + col2 * 48 FROM tab2 AS cor0
----
-1307
-1327
-1841

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

query I rowsort
SELECT ALL + 20 * col1 + + cor0.col0 FROM tab1 cor0
----
264
340
523

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

query I rowsort
SELECT DISTINCT + col1 * - col1 + ( 87 ) FROM tab0 AS cor0
----
-7309
-8194
-9322

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1004
SELECT ALL - 21 + - cor0.col0 * + CAST( + cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
-1246
-597
-7942

skipif mysql # not compatible
query I rowsort label-1004
SELECT ALL - 21 + - cor0.col0 * + CAST ( + cor0.col0 AS INTEGER ) FROM tab0 AS cor0
----
-1246
-597
-7942

query I rowsort
SELECT DISTINCT + - 85 FROM tab2 AS cor0
----
-85

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

query I rowsort
SELECT - col1 * - col0 + - 80 AS col0 FROM tab2 AS cor0
----
1263
137
4522

query I rowsort
SELECT DISTINCT col1 * col1 - col1 FROM tab1
----
156
650
90

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1010
SELECT + 38 DIV col0 AS col0 FROM tab2
----
0
0
5

skipif mysql # not compatible
query I rowsort label-1010
SELECT + 38 / col0 AS col0 FROM tab2
----
0
0
5

query I rowsort
SELECT ALL col0 + col0 AS col1 FROM tab2
----
14
156
158

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

skipif mysql # not compatible
query I rowsort label-1012
SELECT col0 + tab1.col1 / - 32 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT + col0 * col1 + - 83 FROM tab0 AS cor0
----
1981
3312
8016

query I rowsort
SELECT + 92 * col2 - - col1 AS col2 FROM tab0 AS cor0
----
189
3122
7635

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

query I rowsort
SELECT + - 39 * col0 + + 88 FROM tab2 AS cor0
----
-185
-2954
-2993

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 52 FROM tab1 AS cor0
----
52
52
52

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

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

query I rowsort
SELECT ALL 24 * col0 AS col2 FROM tab2 AS cor0
----
168
1872
1896

query I rowsort
SELECT DISTINCT - col0 + col1 + 71 * - col0 AS col2 FROM tab2
----
-473
-5557
-5671

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

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

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

query I rowsort
SELECT 11 FROM tab2, tab0 cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT - cor0.col1 * - 86 * 15 FROM tab0 AS cor0
----
110940
117390
125130

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1031
SELECT - 40 * 91 DIV col1 col2 FROM tab1
----
-140
-280
-364

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1031
SELECT - 40 * 91 / col1 col2 FROM tab1
----
-140
-280
-364

query I rowsort
SELECT DISTINCT + 19 + 7 * - col1 FROM tab1
----
-163
-51
-72

query I rowsort
SELECT DISTINCT - col2 * + col2 - - col0 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-513
1197
1224

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

query I rowsort
SELECT ALL 78 + col2 - col1 * cor0.col0 * - col1 FROM tab0 AS cor0
----
177615
329394
737169

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( + col0 AS REAL ) * col0 * - 50 + + cor0.col1 FROM tab2 AS cor0
----
-2419
-304141
-312033

query I rowsort
SELECT ( + cor0.col1 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + + ( - col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1039
SELECT DISTINCT - col1 * 27 + + col2 + ( - col1 + + col2 ) DIV cor0.col0 FROM tab1 AS cor0
----
-213
-254
-639

skipif mysql # not compatible
query I rowsort label-1039
SELECT DISTINCT - col1 * 27 + + col2 + ( - col1 + + col2 ) / cor0.col0 FROM tab1 AS cor0
----
-213
-254
-639

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1041
SELECT ALL + - CAST( 94 AS SIGNED ) + col2 DIV - col0 FROM tab2 AS cor0
----
-94
-94
-97

skipif mysql # not compatible
query I rowsort label-1041
SELECT ALL + - CAST ( 94 AS INTEGER ) + col2 / - col0 FROM tab2 AS cor0
----
-94
-94
-97

query I rowsort
SELECT ALL ( ( col0 ) ) FROM tab2
----
7
78
79

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab2, tab2 AS cor1, tab0 AS cor2
----
13122 values hashing to b9333b9b0baa770b103608f7716145e0

query I rowsort
SELECT tab0.col2 + 16 * + cor0.col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 9de058ef3003304dd75df64a7214bb92

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT ALL - 97 AS col0 FROM tab2 AS cor0
----
-97
-97
-97

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

query I rowsort
SELECT - col1 + 6 * - cor0.col0 FROM tab1 AS cor0
----
-394
-44
-493

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

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

query I rowsort
SELECT ALL - ( 60 ) FROM tab2 AS cor0
----
-60
-60
-60

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

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

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

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-1056
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

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

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

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

query I rowsort
SELECT 18 AS col1 FROM tab0
----
18
18
18

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab1 cor1
----
243 values hashing to 70c6a01760d7239f3003db4da92180a4

query I rowsort
SELECT - 86 FROM tab1, tab2 cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query I rowsort
SELECT DISTINCT col2 * - 13 + + cor0.col0 * col2 AS col0 FROM tab0 AS cor0
----
22
363
6232

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT col0 + - 41 * - 12 AS col0 FROM tab1 AS cor0
----
495
556
572

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

query I rowsort
SELECT col1 * 73 FROM tab1 AS cor0
----
1898
730
949

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1067
SELECT DISTINCT col0 * CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-1067
SELECT DISTINCT col0 * CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
1225
576
7921

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1069
SELECT ALL + col2 + + col2 * 28 DIV + col2 FROM tab1 AS cor0
----
124
82
85

skipif mysql # not compatible
query I rowsort label-1069
SELECT ALL + col2 + + col2 * 28 / + col2 FROM tab1 AS cor0
----
124
82
85

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

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

query I rowsort
SELECT ALL ( col2 ) + ( 96 * col0 ) AS col2 FROM tab1
----
342
6201
7776

query I rowsort
SELECT ALL 26 * col2 + - col0 AS col1 FROM tab0
----
-9
2043
834

query I rowsort
SELECT - 84 * - col1 - col2 FROM tab1
----
2130
783
996

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

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

skipif mysql # not compatible
query I rowsort label-1075
SELECT - cor0.col0 * + CAST ( - col0 * col2 AS INTEGER ) FROM tab1 AS cor0
----
233472
486
614400

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 79 FROM tab0, tab1 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT ALL col2 * 87 * 81 AS col1 FROM tab0
----
232551
577854
7047

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1087
SELECT ALL col0 DIV - ( - col1 ) AS col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-1087
SELECT ALL col0 / - ( - col1 ) AS col1 FROM tab2
----
0
1
4

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

query I rowsort
SELECT - col1 + + col2 + - col1 * + col1 AS col0 FROM tab0 AS cor0
----
-7449
-8290
-9505

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - col0 * + col0 col2 FROM tab2 AS cor0
----
-22
-6058
-6203

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

query I rowsort
SELECT DISTINCT col0 + col0 * col1 + + col0 FROM tab1 AS cor0
----
1200
768
84

query I rowsort
SELECT - col0 * cor0.col0 * col0 + col1 FROM tab0 AS cor0
----
-13738
-42778
-704878

query I rowsort
SELECT ALL - col0 + - col0 * + col0 AS col2 FROM tab0
----
-1260
-600
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-1097
SELECT ALL col0 * + col1 * col0 + col1 DIV - col0 AS col2 FROM tab2
----
106097
1515
358956

skipif mysql # not compatible
query I rowsort label-1097
SELECT ALL col0 * + col1 * col0 + col1 / - col0 AS col2 FROM tab2
----
106097
1515
358956

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

skipif mysql # not compatible
query I rowsort label-1098
SELECT - col0 / col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - col2 * - col2 + col0 + + col2 * - col0 * cor0.col2 FROM tab0 cor0
----
-25023
-591623
1

query I rowsort
SELECT + col2 - - col2 FROM tab1 WHERE - col1 >= + col2 * col1 * col1 - - col1
----

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

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

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

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

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

query I rowsort
SELECT ALL - col0 * + col1 AS col2 FROM tab2 WHERE NOT - col1 * tab2.col1 IN ( col2 )
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-1107
SELECT - tab1.col1 * col0 + col0 * col1 DIV - tab1.col0 FROM tab1
----
-104
-1053
-650

skipif mysql # not compatible
query I rowsort label-1107
SELECT - tab1.col1 * col0 + col0 * col1 / - tab1.col0 FROM tab1
----
-104
-1053
-650

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + col1 * - cor0.col0 * cor0.col1 - col2 AS col1 FROM tab0 AS cor0
----
-177537
-329316
-737091

query I rowsort
SELECT - - col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL tab0.col1 * col0 FROM tab0 WHERE NOT NULL >= ( NULL )
----

query I rowsort
SELECT + col2 - + col2 AS col1 FROM tab0 WHERE NOT - col2 + + col1 > ( - tab0.col0 * + col1 )
----

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

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

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

query I rowsort
SELECT ALL + col1 + - col0 + - col2 AS col1 FROM tab2 AS cor0
----
-100
-3
-45

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1123
SELECT ALL + col0 + - cor0.col0 / col1 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT DISTINCT col1 * col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT + col2 + + col2 * col1 * + col1 AS col0 FROM tab2 AS cor0
----
11020
25974
90532

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1129
SELECT DISTINCT 64 DIV - 1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-64

skipif mysql # not compatible
query I rowsort label-1129
SELECT DISTINCT 64 / - 1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-64

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1132
SELECT DISTINCT col1 * + CAST( cor0.col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-1132
SELECT DISTINCT col1 * + CAST ( cor0.col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + col1 + + cor0.col1 * + 76 * - col2 AS col2 FROM tab2 AS cor0
----
-116643
-49113
-63643

query I rowsort
SELECT ALL col0 + - 6 * - col1 FROM tab2 AS cor0
----
181
193
432

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

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab0, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT 77 FROM tab0
----
77

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
243 values hashing to 89e3b35a4a4f02d7b83645addb9dcdc3

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

query I rowsort
SELECT - col1 - 77 FROM tab1 AS cor0
----
-103
-87
-90

query I rowsort
SELECT - cor0.col2 * - col1 + col1 * col1 AS col2 FROM tab1 AS cor0
----
1417
2080
670

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

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

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

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

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

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

query III rowsort
SELECT * FROM tab2 WHERE NULL BETWEEN - col0 AND NULL
----

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col1 * tab2.col0 col0 FROM tab2
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-1152
SELECT col0 DIV - col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1152
SELECT col0 / - col2 FROM tab1
----
-1
0
0

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

query I rowsort
SELECT ALL - col1 - col0 * - col2 FROM tab0
----
-62
706
7207

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

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

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

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

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

query I rowsort
SELECT - col1 + + col0 * + col1 + - tab2.col1 FROM tab2
----
1309
155
4484

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

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

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

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

query I rowsort
SELECT ALL - tab2.col2 + tab2.col1 AS col0 FROM tab2
----
-21
33
4

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

query I rowsort
SELECT DISTINCT + col1 * + 90 FROM tab0 AS cor0
----
7740
8190
8730

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + col2 * col0 FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 cor0
----
-3
-64
-80

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

query I rowsort
SELECT DISTINCT + col0 * + ( - col0 + col2 ) * col2 AS col0 FROM tab2 AS cor0
----
-105456
-123082
3780

query I rowsort
SELECT - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT 57 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

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

skipif mysql # not compatible
query I rowsort label-1174
SELECT DISTINCT col0 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col0 + 14 FROM tab0 AS cor0
----
-10
-21
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * 22 col1 FROM tab1 cor0
----
1188
1254
2112

query I rowsort
SELECT col2 - - col1 * + 27 FROM tab1
----
327
447
756

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

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

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

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

query I rowsort
SELECT ALL 34 + 17 FROM tab1, tab0 cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL + col0 - + CAST ( + col1 AS REAL ) FROM tab0
----
-2
-62
-62

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

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

query I rowsort
SELECT + ( tab2.col1 ) AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

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

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

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

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

query I rowsort
SELECT ALL + ( col2 ) * col2 + + tab0.col0 AS col0 FROM tab0
----
1113
36
6813

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1196
SELECT ALL col1 DIV col1 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1196
SELECT ALL col1 / col1 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL + 10 FROM tab2
----
10
10
10

query I rowsort
SELECT 71 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT ALL - ( col0 ) + - 12 FROM tab2 cor0
----
-19
-90
-91

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 70 * + col0 AS col0 FROM tab1 AS cor0
----
210
4480
5600

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

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

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col1 FROM tab2 cor0
----
49
6084
6241

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 93 + - col0 + col0 FROM tab1
----
93
93
93

query I rowsort
SELECT DISTINCT 82 + + col1 * - col0 FROM tab2
----
-1261
-135
-4520

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

query I rowsort
SELECT col2 * 13 - col2 * + col0 FROM tab0 AS cor0
----
-22
-363
-6232

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col1 + col2 * + col0 col1 FROM tab1 AS cor0
----
3008
6640
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1229
SELECT DISTINCT cor0.col0 + col1 DIV - col0 AS col1 FROM tab2 cor0
----
3
78
79

skipif mysql # not compatible
query I rowsort label-1229
SELECT DISTINCT cor0.col0 + col1 / - col0 AS col1 FROM tab2 cor0
----
3
78
79

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

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

query I rowsort
SELECT ALL + + col2 * col1 * + col2 + col2 * col2 FROM tab1 AS cor0
----
129024
35739
78732

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

query I rowsort
SELECT 17 + - col2 FROM tab1 AS cor0
----
-37
-40
-79

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

query I rowsort
SELECT - 55 * col0 FROM tab1 AS cor0
----
-165
-3520
-4400

query I rowsort
SELECT ALL + - 90 AS col1 FROM tab2 AS cor0
----
-90
-90
-90

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

query I rowsort
SELECT ALL + 88 * + cor0.col2 AS col0 FROM tab1 cor0
----
4752
5016
8448

onlyif mysql # use DIV operator for integer division
query I rowsort label-1240
SELECT col2 * cor0.col2 + cor0.col1 DIV + cor0.col1 FROM tab1 AS cor0
----
2917
3250
9217

skipif mysql # not compatible
query I rowsort label-1240
SELECT col2 * cor0.col2 + cor0.col1 / + cor0.col1 FROM tab1 AS cor0
----
2917
3250
9217

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

query I rowsort
SELECT + col0 - 61 FROM tab1
----
-58
19
3

query I rowsort
SELECT - col0 + col0 + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT - ( + 88 ) * + col2 + + col2 + col1 FROM tab2
----
-2203
-2318
-3289

query I rowsort
SELECT DISTINCT col2 + - col1 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col0 + - col1 * col2 * col1 AS col2 FROM tab0
----
-244044
-678953
-9374

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 + 97 col0 FROM tab0
----
171
171
171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 col2 FROM tab1
----
4096
6400
9

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

query I rowsort
SELECT DISTINCT - 92 * col0 + tab2.col1 FROM tab2
----
-613
-7117
-7251

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

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

query I rowsort
SELECT 1 + 54 * - col0 FROM tab0 AS cor0
----
-1295
-1889
-4805

query I rowsort
SELECT DISTINCT + + col0 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6162

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

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

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

query I rowsort
SELECT DISTINCT 15 FROM tab1
----
15

query I rowsort
SELECT 6 - - col0 AS col2 FROM tab1 AS cor0
----
70
86
9

query I rowsort
SELECT + 21 * tab1.col2 AS col2 FROM tab1
----
1134
1197
2016

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

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

query I rowsort
SELECT ALL tab0.col2 + col0 FROM tab0
----
171
36
57

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

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

query I rowsort
SELECT - + col2 * col0 + 69 AS col0 FROM tab1 AS cor0
----
-3579
-7611
-93

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

query I rowsort
SELECT ALL + col0 + col1 * + 30 AS col1 FROM tab0 AS cor0
----
2604
2819
2945

query I rowsort
SELECT DISTINCT col2 * + col0 + + 78 FROM tab1 AS cor0
----
240
3726
7758

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

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-1272
SELECT col2 * CAST( col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1444
676
729

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

query I rowsort
SELECT - col0 + 94 FROM tab0 AS cor0
----
5
59
70

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

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

skipif mysql # not compatible
query I rowsort label-1275
SELECT - ( - col2 ) / cor0.col0 AS col1 FROM tab2 cor0
----
0
0
3

query I rowsort
SELECT - 93 AS col0 FROM tab1 AS cor0
----
-93
-93
-93

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

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

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

query I rowsort
SELECT col2 + - 28 AS col0 FROM tab1 cor0
----
26
29
68

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

query I rowsort
SELECT ALL - cor1.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

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

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col2 * col1 + CAST ( 85 AS REAL ) AS col0 FROM tab2 cor0
----
1619
731
922

query I rowsort
SELECT DISTINCT - + 44 * col2 FROM tab1 AS cor0
----
-2376
-2508
-4224

query I rowsort
SELECT DISTINCT + + 29 AS col1 FROM tab0 AS cor0
----
29

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

skipif mysql # not compatible
query I rowsort label-1290
SELECT ALL + col2 / + tab1.col0 FROM tab1
----
0
1
18

query I rowsort
SELECT ALL - 97 * + 16 AS col1 FROM tab1
----
-1552
-1552
-1552

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - cor1.col0 * - cor1.col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
1225
576
7921

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0, tab0 AS cor0, tab0 AS cor1
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query I rowsort
SELECT DISTINCT + + col2 + + 1 FROM tab1 AS cor0
----
55
58
97

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

query I rowsort
SELECT DISTINCT - 65 + 48 FROM tab2, tab0 cor0, tab1 AS cor1
----
-17

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1302
SELECT - + col0 * col0 + + col1 DIV col2 AS col0 FROM tab0 AS cor0
----
-1128
-574
-7920

skipif mysql # not compatible
query I rowsort label-1302
SELECT - + col0 * col0 + + col1 / col2 AS col0 FROM tab0 AS cor0
----
-1128
-574
-7920

query I rowsort
SELECT + col0 + 75 * col1 FROM tab1 AS cor0
----
1055
1953
814

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1305
SELECT - col1 + CAST( col1 AS SIGNED ) 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-1305
SELECT - col1 + CAST ( col1 AS INTEGER ) col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * + 85 * col0 FROM tab1 AS cor0
----
13770
310080
652800

query I rowsort
SELECT ALL + col1 * col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL col1 * - col1 AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + 44 * - col2 AS col1 FROM tab0 AS cor0
----
-1452
-3608
-44

query I rowsort
SELECT DISTINCT - 42 * col1 FROM tab1 AS cor0
----
-1092
-420
-546

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

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

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

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

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 * col1 - - col2 AS col0 FROM tab0 cor0
----
-2031
-3394
-8017

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

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

query I rowsort
SELECT DISTINCT - col0 + 25 * - ( - cor0.col1 ) AS col2 FROM tab0 cor0
----
2126
2186
2390

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

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

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

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

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

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

query I rowsort
SELECT 15 + + col2 * tab0.col2 FROM tab0
----
1104
16
6739

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

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

query I rowsort
SELECT + col0 + ( 95 ) AS col0 FROM tab0 AS cor0
----
119
130
184

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

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

query I rowsort
SELECT 93 + + 40 + cor0.col1 * 10 AS col2 FROM tab2 AS cor0
----
303
443
723

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( 94 AS REAL ) AS col0 FROM tab1 AS cor0
----
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1333
SELECT CAST( 81 AS SIGNED ) + + col2 FROM tab0 AS cor0
----
114
163
82

skipif mysql # not compatible
query I rowsort label-1333
SELECT CAST ( 81 AS INTEGER ) + + col2 FROM tab0 AS cor0
----
114
163
82

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

query I rowsort
SELECT ALL + + col1 FROM tab2 cor0
----
17
31
59

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

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

query I rowsort
SELECT ALL - - 45 FROM tab2 AS cor0
----
45
45
45

query I rowsort
SELECT - - 68 * - cor0.col0 * + cor0.col1 FROM tab0 AS cor0
----
-140352
-230860
-550732

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

query I rowsort
SELECT - 91 + col0 FROM tab2 AS cor0
----
-12
-13
-84

query I rowsort
SELECT DISTINCT - 66 FROM tab0, tab0 cor0
----
-66

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

query I rowsort
SELECT 62 * col0 + col0 FROM tab1 AS cor0
----
189
4032
5040

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

query I rowsort
SELECT 27 FROM tab0, tab1 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT - tab2.col2 * + ( 39 ) * - col1 FROM tab2
----
25194
32643
59826

query I rowsort
SELECT DISTINCT + - col0 * + 47 AS col1 FROM tab0 cor0
----
-1128
-1645
-4183

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 + + col2 col1 FROM tab1 AS cor0
----
101
140
98

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

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

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

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

query I rowsort
SELECT + col1 + col0 * col1 * + col1 FROM tab0 AS cor0
----
177590
329412
737100

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 17 + + col2 FROM tab1 AS cor0
----
113
71
74

query I rowsort
SELECT - 92 + col2 FROM tab2 AS cor0
----
-54
-65
-66

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

query I rowsort
SELECT ALL 57 AS col2 FROM tab2 AS cor0
----
57
57
57

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1370
SELECT + col0 / - col1 AS col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT ( 90 ) * col2 AS col0 FROM tab2
----
2340
2430
3420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + - 67 * - col1 col0 FROM tab0 AS cor0
----
13158
14378
15908

query I rowsort
SELECT ( - col1 ) + col2 FROM tab1
----
28
47
83

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

query I rowsort
SELECT + 53 * - col1 + col0 FROM tab2
----
-1636
-3049
-822

query I rowsort
SELECT tab1.col1 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

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

query I rowsort
SELECT 62 * col1 + - 4 AS col0 FROM tab1 AS cor0
----
1608
616
802

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

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

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

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

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

query I rowsort
SELECT col1 + - 55 AS col2 FROM tab1
----
-29
-42
-45

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

query I rowsort
SELECT + 43 FROM tab2 cor0
----
43
43
43

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

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

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

skipif mysql # not compatible
query I rowsort label-1389
SELECT CAST ( col1 AS INTEGER ) + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - + 50 * + col0 * col2 + col2 FROM tab1 AS cor0
----
-182343
-383904
-8046

onlyif mysql # use DIV operator for integer division
query I rowsort label-1391
SELECT DISTINCT + col0 DIV 83 + tab0.col1 * ( 78 ) FROM tab0
----
6708
7099
7566

skipif mysql # not compatible
query I rowsort label-1391
SELECT DISTINCT + col0 / 83 + tab0.col1 * ( 78 ) FROM tab0
----
6708
7099
7566

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab2 AS cor0, tab1 AS cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * col0 col2 FROM tab1
----
1136
132
697

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1396
SELECT DISTINCT + CAST( 34 AS SIGNED ) * col0 + col0 + 33 FROM tab0 AS cor0
----
1258
3148
873

skipif mysql # not compatible
query I rowsort label-1396
SELECT DISTINCT + CAST ( 34 AS INTEGER ) * col0 + col0 + 33 FROM tab0 AS cor0
----
1258
3148
873

query I rowsort
SELECT + 54 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0 cor2
----
81 values hashing to c12c2f39593b3ce157086f29d8391c32

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

query I rowsort
SELECT ALL + 93 * + col0 + + col2 FROM tab2 AS cor0
----
678
7280
7385

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

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

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

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

query I rowsort
SELECT ALL tab0.col1 * - col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL 76 FROM tab2, tab2 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT - 96 * - 14 FROM tab1
----
1344
1344
1344

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

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

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

query I rowsort
SELECT ALL ( 91 * - tab2.col2 ) AS col1 FROM tab2
----
-2366
-2457
-3458

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1412
SELECT DISTINCT col1 DIV col1 - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-1412
SELECT DISTINCT col1 / col1 - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
3
64
80

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

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

query I rowsort
SELECT + 43 + col1 AS col1 FROM tab2 AS cor0
----
102
60
74

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

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

query I rowsort
SELECT ALL - col1 + - col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

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

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

query I rowsort
SELECT ALL 62 * - col1 FROM tab1 AS cor0
----
-1612
-620
-806

query I rowsort
SELECT - - 45 * - col0 AS col1 FROM tab1 AS cor0
----
-135
-2880
-3600

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab1 AS cor0, tab0 cor1
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT ALL ( col0 ) FROM tab2
----
7
78
79

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

query I rowsort
SELECT + + col0 + - cor0.col1 * 93 FROM tab0 AS cor0
----
-7974
-8374
-8986

query I rowsort
SELECT 13 * - cor0.col0 + ( col2 ) FROM tab2 AS cor0
----
-64
-988
-989

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1429
SELECT + 54 DIV - col1 + - col0 AS col1 FROM tab1 AS cor0
----
-5
-69
-84

skipif mysql # not compatible
query I rowsort label-1429
SELECT + 54 / - col1 + - col0 AS col1 FROM tab1 AS cor0
----
-5
-69
-84

query I rowsort
SELECT col0 * col0 + ( cor0.col2 + cor0.col1 ) FROM tab2 AS cor0
----
107
6169
6296

query I rowsort
SELECT + ( col1 * + 90 ) + - col0 FROM tab1
----
1090
2337
836

query I rowsort
SELECT - col0 - col2 * 37 * col1 AS col1 FROM tab2
----
-23981
-30976
-56836

query I rowsort
SELECT DISTINCT + + 39 * + cor0.col2 FROM tab1, tab2, tab1 AS cor0
----
2106
2223
3744

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1435
SELECT - - cor0.col2 DIV - cor0.col1 AS col0 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-1435
SELECT - - cor0.col2 / - cor0.col1 AS col0 FROM tab1 AS cor0
----
-2
-5
-7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1437
SELECT + + ( col2 ) DIV 24 + - col2 * col0 FROM tab2 AS cor0
----
-188
-2027
-3001

skipif mysql # not compatible
query I rowsort label-1437
SELECT + + ( col2 ) / 24 + - col2 * col0 FROM tab2 AS cor0
----
-188
-2027
-3001

query I rowsort
SELECT ALL - cor0.col0 * 23 FROM tab1 AS cor0
----
-1472
-1840
-69

query I rowsort
SELECT ALL col2 - 68 FROM tab2 AS cor0
----
-30
-41
-42

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

skipif mysql # not compatible
query I rowsort label-1440
SELECT col0 + ( ( col1 ) ) * + CAST ( - ( + col1 ) AS INTEGER ) AS col1 FROM tab2 cor0
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-1441
SELECT ALL + + col0 DIV 82 col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1441
SELECT ALL + + col0 / 82 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - ( tab2.col1 ) * - 59 AS col2 FROM tab2
----
1003
1829
3481

query I rowsort
SELECT 14 AS col1 FROM tab2
----
14
14
14

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

query I rowsort
SELECT DISTINCT - 25 FROM tab2
----
-25

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

query I rowsort
SELECT + 75 FROM tab1
----
75
75
75

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 * - col2 col0 FROM tab0
----
-132
-328
-4

query I rowsort
SELECT + 76 FROM tab2
----
76
76
76

query I rowsort
SELECT - 32 * - col2 + cor0.col1 - col1 FROM tab0 AS cor0
----
1056
2624
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + col0 * col2 - 56 col0 FROM tab1 AS cor0
----
3582
7611
80

query I rowsort
SELECT + + 82 * col0 AS col1 FROM tab1 AS cor0
----
246
5248
6560

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

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

query I rowsort
SELECT DISTINCT col2 + 58 FROM tab0
----
140
59
91

query I rowsort
SELECT col2 * ( + 83 * col0 ) AS col1 FROM tab1
----
13446
302784
637440

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

query I rowsort
SELECT ALL - 29 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

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

query I rowsort
SELECT + 49 + col1 + col2 AS col0 FROM tab1 AS cor0
----
116
129
158

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

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

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

query I rowsort
SELECT DISTINCT col2 + ( + 29 ) + - col0 FROM tab1
----
22
45
80

query I rowsort
SELECT 45 AS col2 FROM tab0 AS cor0
----
45
45
45

query I rowsort
SELECT ALL - 56 - 35 * col1 FROM tab0
----
-3066
-3241
-3451

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

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

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

query I rowsort
SELECT + col1 + + 90 + col0 FROM tab0
----
200
222
270

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

query I rowsort
SELECT col0 * + 54 + col1 * - col2 FROM tab1
----
-1242
2886
3072

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

query I rowsort
SELECT DISTINCT - col1 + col0 * - 8 * + col0 AS col2 FROM tab0
----
-4694
-63459
-9897

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

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

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

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

query I rowsort
SELECT ALL + tab0.col0 * - col0 + col0 FROM tab0
----
-1190
-552
-7832

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

query I rowsort
SELECT - ( 20 ) * - col0 FROM tab2 AS cor0
----
140
1560
1580

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1481
SELECT DISTINCT - + col2 + col0 * - col0 + + ( - 17 + - col2 ) DIV ( col2 ) FROM tab0 AS cor0
----
-1244
-610
-8004

skipif mysql # not compatible
query I rowsort label-1481
SELECT DISTINCT - + col2 + col0 * - col0 + + ( - 17 + - col2 ) / ( col2 ) FROM tab0 AS cor0
----
-1244
-610
-8004

query I rowsort
SELECT ( 15 ) FROM tab1 AS cor0
----
15
15
15

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

query I rowsort
SELECT DISTINCT - - 20 + - col0 FROM tab1 AS cor0
----
-44
-60
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-1485
SELECT + ( 62 * - col1 ) + - col1 DIV - col1 FROM tab0
----
-5331
-5641
-6013

skipif mysql # not compatible
query I rowsort label-1485
SELECT + ( 62 * - col1 ) + - col1 / - col1 FROM tab0
----
-5331
-5641
-6013

query I rowsort
SELECT DISTINCT - cor0.col0 + 21 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-14
-3
-68

query I rowsort
SELECT DISTINCT - - ( + col0 ) - - col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - cor0.col2 * + col2 + + col2 AS col1 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT - 83 * - ( col2 ) AS col1 FROM tab2 AS cor0
----
2158
2241
3154

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

query I rowsort
SELECT - 7 + 78 * - col2 FROM tab1 AS cor0
----
-4219
-4453
-7495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * - col1 + col2 col0 FROM tab0 AS cor0
----
2871
7544
98

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

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

query I rowsort
SELECT - - col0 + - 90 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-7716
-8101
-8695

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

query I rowsort
SELECT ALL - 98 FROM tab0 AS cor0
----
-98
-98
-98

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

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

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

query I rowsort
SELECT 1 * col2 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - - 38 * - col2 + - cor0.col2 * + col2 + + col2 * + col2 FROM tab1 cor0
----
-2052
-2166
-3648

query I rowsort
SELECT 29 * 24 + + col0 AS col0 FROM tab1 AS cor0
----
699
760
776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 + tab1.col0 * 0 col0 FROM tab1
----
3
64
80

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

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

query I rowsort
SELECT 88 + col2 * col0 FROM tab0
----
123
7386
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - cor0.col0 col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - 39 * col2 FROM tab1 cor0
----
-2106
-2223
-3744

query I rowsort
SELECT - - 89 - col2 * col0 FROM tab2 AS cor0
----
-100
-1939
-2913

query I rowsort
SELECT - 43 * - col0 FROM tab1 AS cor0
----
129
2752
3440

query I rowsort
SELECT DISTINCT - 42 + + col0 AS col2 FROM tab2 AS cor0
----
-35
36
37

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

query I rowsort
SELECT - + ( cor0.col0 ) * ( + col2 ) * col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT + - 85 * col1 FROM tab0 AS cor0
----
-7310
-7735
-8245

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 cor0
----
-7
-78
-79

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-1520
SELECT ALL - col1 * CAST( col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-1520
SELECT ALL - col1 * CAST ( col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col2 col1 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT cor0.col0 * + cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cf1383d310e5e3e19470e0b8dc064d0c

query I rowsort
SELECT + - col0 * + 91 + - 16 AS col0 FROM tab1 AS cor0
----
-289
-5840
-7296

query I rowsort
SELECT DISTINCT - col1 * ( - 37 ) AS col1 FROM tab0 AS cor0
----
3182
3367
3589

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

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

query I rowsort
SELECT DISTINCT + col2 * ( + 76 ) FROM tab0 AS cor0
----
2508
6232
76

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

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

query I rowsort
SELECT - + col1 * + ( col0 ) + + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - - col1 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL - - cor0.col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - col1 * + col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - + cor0.col1 + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT col0 + - 97 FROM tab2 AS cor0
----
-18
-19
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1536
SELECT col1 DIV - ( ( - col0 ) ) - col2 * - col0 * col2 AS col0 FROM tab2 AS cor0
----
114076
5107
52728

skipif mysql # not compatible
query I rowsort label-1536
SELECT col1 / - ( ( - col0 ) ) - col2 * - col0 * col2 AS col0 FROM tab2 AS cor0
----
114076
5107
52728

query I rowsort
SELECT ALL - col2 + 3 * - 18 AS col0 FROM tab1 AS cor0
----
-108
-111
-150

query I rowsort
SELECT + cor0.col2 * col0 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT + - col1 + col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT col2 + col0 * + col0 + col2 AS col1 FROM tab2 AS cor0
----
103
6136
6317

query I rowsort
SELECT + col0 - 14 FROM tab2 AS cor0
----
-7
64
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-1542
SELECT DISTINCT - + col2 DIV + 18 FROM tab1 AS cor0
----
-3
-5

skipif mysql # not compatible
query I rowsort label-1542
SELECT DISTINCT - + col2 / + 18 FROM tab1 AS cor0
----
-3
-5

query I rowsort
SELECT - - col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + 35 + tab1.col1 * col0 * + tab1.col0 - col0 FROM tab1
----
266
40931
83155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1545
SELECT ALL + col2 * CAST( 50 AS SIGNED ) FROM tab0 AS cor0
----
1650
4100
50

skipif mysql # not compatible
query I rowsort label-1545
SELECT ALL + col2 * CAST ( 50 AS INTEGER ) FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT DISTINCT col1 * ( 64 ) AS col0 FROM tab2 AS cor0
----
1088
1984
3776

query I rowsort
SELECT - col2 + col2 + col0 FROM tab2 cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + col0 + 1 * - 0 + + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + cor0.col2 * - 40 AS col2 FROM tab1 AS cor0
----
-2160
-2280
-3840

query I rowsort
SELECT tab1.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + + col1 * ( + col0 ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col1 + col2 + col1 AS col0 FROM tab1 AS cor0
----
106
122
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1554
SELECT + tab2.col1 * CAST( col2 AS SIGNED ) * + col1 FROM tab2
----
10982
25947
90506

skipif mysql # not compatible
query I rowsort label-1554
SELECT + tab2.col1 * CAST ( col2 AS INTEGER ) * + col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 * + ( 7 ) + - cor0.col1 * + 28 FROM tab1 AS cor0
----
19684
22463
64148

query I rowsort
SELECT DISTINCT - - 67 FROM tab0 AS cor0
----
67

query I rowsort
SELECT + 45 FROM tab0 cor0
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - + ( col1 ) * ( 91 ) FROM tab2 AS cor0
----
-1547
-2821
-5369

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 col1 FROM tab2, tab1 AS cor0
----
17
31
59

query I rowsort
SELECT col0 + 62 AS col1 FROM tab1
----
126
142
65

query I rowsort
SELECT ALL + tab1.col0 - tab1.col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT - cor0.col1 * - 50 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 471280131e0a9a3f690f954384ad6cf9

query I rowsort
SELECT - tab1.col2 + col0 FROM tab1
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1566
SELECT - - 57 DIV + col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1566
SELECT - - 57 / + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - 25 AS col0 FROM tab2
----
-25
-25
-25

query I rowsort
SELECT + tab2.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT 64 * col2 AS col2 FROM tab1 cor0
----
3456
3648
6144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - col1 * + col0 * + col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT + col1 + col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT cor0.col1 * + col0 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT col1 * + col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + cor0.col0 * col0 + col1 * + col2 * col1 FROM tab0 AS cor0
----
10634
244644
686963

query I rowsort
SELECT - col1 * + col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - col1 + - cor0.col1 FROM tab2 AS cor0
----
-118
-34
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 * col1 col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-1580
SELECT DISTINCT col2 DIV - col1 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-1580
SELECT DISTINCT col2 / - col1 FROM tab2
----
-2
0

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col2 * - col2 col1 FROM tab0 AS cor0
----
-1
-35937
-551368

query I rowsort
SELECT - col2 * + col1 * - col1 AS col0 FROM tab2 cor0
----
10982
25947
90506

query I rowsort
SELECT ALL col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query III rowsort
SELECT ALL * FROM tab2 cor0 WHERE NULL BETWEEN ( - col1 + col1 ) AND col2 + - cor0.col1
----

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL col0 * tab0.col2 FROM tab0
----
35
7298
792

query III rowsort
SELECT * FROM tab0 WHERE - col1 IN ( col2 * col0 )
----

query I rowsort
SELECT ALL col0 * - col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL col1 * + tab2.col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + 37 + + col2 AS col0 FROM tab0
----
119
38
70

query I rowsort
SELECT - - col0 * - col0 - col2 * col2 FROM tab2 AS cor0
----
-6760
-7685
-778

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL col1 * + col2 AS col0 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-1595
SELECT ALL + col1 DIV col1 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1595
SELECT ALL + col1 / col1 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT + tab2.col1 * + col0 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-1597
SELECT ALL - col0 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1597
SELECT ALL - col0 / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + + col2 * - col1 + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT + col2 + - col2 + + cor0.col1 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT tab0.col0 * + col1 + col0 AS col2 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - col1 + + col2 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + tab2.col1 * - tab2.col2 - col1 * + col0 AS col2 FROM tab2
----
-1054
-1989
-6136

onlyif mysql # use DIV operator for integer division
query I rowsort label-1603
SELECT DISTINCT col0 DIV + col1 - - col0 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-1603
SELECT DISTINCT col0 / + col1 - - col0 FROM tab1
----
3
70
86

query I rowsort
SELECT col1 * - col1 + + col1 * + col0 AS col0 FROM tab0
----
-182
-5332
-6014

onlyif mysql # use DIV operator for integer division
query I rowsort label-1605
SELECT ALL col2 DIV - col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-1605
SELECT ALL col2 / - col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT + 35 + 89 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 994279bc121ca89b790ad34ec9af8ec1

query I rowsort
SELECT ALL ( - col2 ) * + col2 - 21 FROM tab0 AS cor0
----
-1110
-22
-6745

query I rowsort
SELECT ALL + col1 - col1 * + col0 FROM tab1
----
-1027
-52
-630

query III rowsort
SELECT ALL * FROM tab0 WHERE - col0 <> col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT col2 AS col0 FROM tab0 WHERE + col0 - col2 <= + col2 / + col2
----
33

query I rowsort
SELECT + col2 + + col2 FROM tab2
----
52
54
76

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT IN ( col1 * - col1 )
----

query I rowsort
SELECT DISTINCT - col1 * - col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT col0 * - col2 + col2 * col2 + col0 AS col2 FROM tab0
----
-485
1
321

onlyif mysql # use DIV operator for integer division
query I rowsort label-1615
SELECT ALL col0 DIV - col0 AS col0 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1615
SELECT ALL col0 / - col0 AS col0 FROM tab2
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1616
SELECT DISTINCT col1 DIV + col0 FROM tab1
----
0
8

skipif mysql # not compatible
query I rowsort label-1616
SELECT DISTINCT col1 / + col0 FROM tab1
----
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1617
SELECT col0 * col0 DIV + col2 FROM tab0
----
1225
17
96

skipif mysql # not compatible
query I rowsort label-1617
SELECT col0 * col0 / + col2 FROM tab0
----
1225
17
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1618
SELECT ALL col1 DIV col2 col2 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1618
SELECT ALL col1 / col2 col2 FROM tab0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1619
SELECT DISTINCT col0 DIV + col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-1619
SELECT DISTINCT col0 / + col1 FROM tab2
----
0
1
4

query I rowsort
SELECT ALL + col2 + + col0 + - col0 * + col0 FROM tab1
----
-3975
-6224
48

query I rowsort
SELECT + col2 + - col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + col2 + col2 * + cor0.col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1623
SELECT ALL - col0 + col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1623
SELECT ALL - col0 + col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1624
SELECT col1 * - tab1.col2 + - col1 DIV col1 FROM tab1
----
-1249
-1405
-571

skipif mysql # not compatible
query I rowsort label-1624
SELECT col1 * - tab1.col2 + - col1 / col1 FROM tab1
----
-1249
-1405
-571

query I rowsort
SELECT ALL + col2 + - col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - + ( - col1 ) + - col1 * col2 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL + 73 * col0 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT + + col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - cor0.col0 * + col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - - 33 AS col0 FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT - - col1 * cor0.col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + tab2.col0 - - col1 FROM tab2
----
137
38
96

query I rowsort
SELECT - col1 + + col1 + col2 FROM tab2
----
26
27
38

query I rowsort
SELECT col0 * - col0 FROM tab2
----
-49
-6084
-6241

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL IN ( - col0 + - col1 - tab1.col0 )
----

query I rowsort
SELECT ALL - col2 - tab2.col0 FROM tab2
----
-104
-117
-34

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE + col1 * - col1 IN ( + col1 * - tab1.col2 + col1 * col1 )
----

query I rowsort
SELECT col2 + - col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 AS cor0 WHERE NULL = NULL
----

query I rowsort
SELECT - cor0.col2 FROM tab0, tab2 cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

onlyif mysql # use DIV operator for integer division
query I rowsort label-1641
SELECT ALL + cor0.col0 DIV - cor0.col0 + - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 0eba5939df2239d1766e37a497daf90f

skipif mysql # not compatible
query I rowsort label-1641
SELECT ALL + cor0.col0 / - cor0.col0 + - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 0eba5939df2239d1766e37a497daf90f

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - col2 + col1 * - col1 FROM tab1 AS cor0 WHERE NOT NULL IN ( - col1 * col2 - + col0 )
----

query I rowsort
SELECT tab2.col2 * - col1 * col1 AS col2 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT + col1 - + tab0.col2 * + col2 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + col1 * + col1 * - col1 AS col1 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT col0 + + col2 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT col2 * - col2 - tab0.col0 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT DISTINCT - col1 + - tab0.col2 + col2 * col1 FROM tab0
----
-1
2719
7289

query I rowsort
SELECT DISTINCT - col0 * + tab2.col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + col0 * - col2 * col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT ALL + col0 * - tab1.col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col0 * + col2 - - col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT DISTINCT + col2 * + col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + col0 - tab0.col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT + col1 + col1 AS col1 FROM tab2
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-1658
SELECT + col1 DIV - col0 + - col0 FROM tab0
----
-27
-37
-90

skipif mysql # not compatible
query I rowsort label-1658
SELECT + col1 / - col0 + - col0 FROM tab0
----
-27
-37
-90

query I rowsort
SELECT ALL + col0 * col2 + - col2 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-1660
SELECT + cor0.col2 + col1 DIV + cor0.col0 FROM tab1 AS cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-1660
SELECT + cor0.col2 + col1 / + cor0.col0 FROM tab1 AS cor0
----
57
62
96

query I rowsort
SELECT ALL + cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1662
SELECT ALL + 37 * + col1 + - cor0.col1 + ( col2 ) DIV + col1 col0 FROM tab2 AS cor0
----
1116
2124
614

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1662
SELECT ALL + 37 * + col1 + - cor0.col1 + ( col2 ) / + col1 col0 FROM tab2 AS cor0
----
1116
2124
614

query I rowsort
SELECT DISTINCT + + ( + col2 ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + - col1 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + col2 * col2 * 76 AS col0 FROM tab2 cor0
----
109744
51376
55404

query I rowsort
SELECT + - 51 + + col0 * - col1 - - col0 AS col0 FROM tab2 AS cor0
----
-1315
-261
-4575

onlyif mysql # use DIV operator for integer division
query I rowsort label-1667
SELECT DISTINCT 66 * col2 + - col1 DIV col0 + + col2 FROM tab0 AS cor0
----
2208
5493
65

skipif mysql # not compatible
query I rowsort label-1667
SELECT DISTINCT 66 * col2 + - col1 / col0 + + col2 FROM tab0 AS cor0
----
2208
5493
65

query I rowsort
SELECT DISTINCT col1 - + col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 - - 68 col2 FROM tab1 AS cor0
----
-3580
-7612
-94

query I rowsort
SELECT + 43 FROM tab2, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT 42 * col2 FROM tab0
----
1386
3444
42

query I rowsort
SELECT DISTINCT + col1 + col2 FROM tab1
----
109
67
80

query I rowsort
SELECT + 2 + col1 FROM tab1
----
12
15
28

query I rowsort
SELECT + col2 + tab2.col0 * 31 + 83 AS col0 FROM tab2
----
2527
2570
327

query I rowsort
SELECT 67 * + col2 + ( - tab0.col1 + + col0 ) * + col2 FROM tab0
----
165
5
5330

query I rowsort
SELECT ( + col1 ) * tab1.col1 AS col2 FROM tab1
----
100
169
676

query I rowsort
SELECT - 55 AS col0 FROM tab0
----
-55
-55
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-1679
SELECT ALL + col0 * col1 + ( ( + col0 ) + + col1 ) DIV - col1 FROM tab0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-1679
SELECT ALL + col0 * col1 + ( ( + col0 ) + + col1 ) / - col1 FROM tab0
----
2063
3394
8098

query I rowsort
SELECT ALL - 30 * cor1.col0 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to b3733ccb209f4e5a59b62b834eb9fa94

query I rowsort
SELECT DISTINCT col0 + col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-1682
SELECT col1 * col2 + col1 + 5 DIV - cor0.col0 FROM tab1 cor0
----
1261
1429
580

skipif mysql # not compatible
query I rowsort label-1682
SELECT col1 * col2 + col1 + 5 / - cor0.col0 FROM tab1 cor0
----
1261
1429
580

query I rowsort
SELECT ( col1 * col0 ) + col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + ( col2 ) + + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2 FROM tab1, tab2 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT cor0.col0 + + 65 AS col0 FROM tab2 AS cor0
----
143
144
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1687
SELECT ALL CAST( + 88 AS SIGNED ) + - col0 * ( col1 ) AS col0 FROM tab2 AS cor0
----
-1255
-129
-4514

skipif mysql # not compatible
query I rowsort label-1687
SELECT ALL CAST ( + 88 AS INTEGER ) + - col0 * ( col1 ) AS col0 FROM tab2 AS cor0
----
-1255
-129
-4514

query I rowsort
SELECT DISTINCT + - col0 + - col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ALL col1 + + col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1690
SELECT DISTINCT - CAST( col0 AS SIGNED ) * + col2 * - CAST( col1 + - col0 AS SIGNED ) FROM tab1 AS cor0
----
-196992
-514560
3726

skipif mysql # not compatible
query I rowsort label-1690
SELECT DISTINCT - CAST ( col0 AS INTEGER ) * + col2 * - CAST ( col1 + - col0 AS INTEGER ) FROM tab1 AS cor0
----
-196992
-514560
3726

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 31 col1 FROM tab1 AS cor0
----
31
31
31

query I rowsort
SELECT DISTINCT - + col0 * 3 + cor0.col2 * + col1 FROM tab2 cor0
----
1300
409
816

query I rowsort
SELECT DISTINCT - + tab0.col0 FROM tab0, tab2, tab2 AS cor0
----
-24
-35
-89

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 CROSS JOIN tab0
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT ALL col2 * - col2 + col1 AS col2 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + - col0 * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 098e223d780e18b6582523fd6f55eec9

query I rowsort
SELECT ALL 93 * 38 + col0 FROM tab0 AS cor0
----
3558
3569
3623

query I rowsort
SELECT DISTINCT - ( + col2 ) * - col0 * - 75 AS col0 FROM tab2 AS cor0
----
-14175
-152100
-225150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL + - 85 * col1 AS col1 FROM tab1 AS cor0
----
-1105
-2210
-850

query I rowsort
SELECT DISTINCT + - col0 * + col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + 11 * col2 AS col1 FROM tab1 AS cor0
----
1056
594
627

query I rowsort
SELECT + - 23 AS col0 FROM tab2 AS cor0
----
-23
-23
-23

query I rowsort
SELECT col0 * + 60 FROM tab2 AS cor0
----
420
4680
4740

query I rowsort
SELECT DISTINCT - 68 * col2 FROM tab2 cor0
----
-1768
-1836
-2584

query I rowsort
SELECT + cor0.col2 + - col1 * - cor0.col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ( + 24 + - col1 ) AS col2 FROM tab0
----
-62
-67
-73

query I rowsort
SELECT 51 + col0 * tab1.col2 FROM tab1
----
213
3699
7731

query I rowsort
SELECT 96 AS col2 FROM tab1
----
96
96
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1711
SELECT col0 + col1 DIV col2 FROM tab0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-1711
SELECT col0 + col1 / col2 FROM tab0
----
132
26
90

query I rowsort
SELECT 73 + col1 * col0 FROM tab0
----
2137
3468
8172

query I rowsort
SELECT ALL - 6 FROM tab1
----
-6
-6
-6

query I rowsort
SELECT ALL - col0 * - col0 FROM tab1
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 col2 FROM tab1 AS cor0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + 1 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT ALL 28 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT + - cor0.col2 + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - + 37 + + cor0.col2 AS col2 FROM tab0 cor0
----
-36
-4
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1720
SELECT - CAST( - 10 + col0 AS SIGNED ) col2 FROM tab0
----
-14
-25
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1720
SELECT - CAST ( - 10 + col0 AS INTEGER ) col2 FROM tab0
----
-14
-25
-79

query I rowsort
SELECT + 13 AS col0 FROM tab1
----
13
13
13

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 * - col0 - col2 FROM tab1 AS cor0
----
-207993
-737376
-8802

query I rowsort
SELECT ( col1 ) + col1 * - col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + 41 - col1 FROM tab2 AS cor0
----
-18
10
24

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT - col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + + cor0.col0 col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT col0 * - col2 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - + col2 * cor0.col2 - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL + cor0.col0 + col2 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + col2 + + col0 + col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT 14 FROM tab0 AS cor0
----
14
14
14

query I rowsort
SELECT - 43 FROM tab2 cor0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT + col2 + ( col2 ) AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - col0 + - 41 FROM tab2 AS cor0
----
-119
-120
-48

query I rowsort
SELECT ALL + + col0 + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + 57 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT - col2 * 41 FROM tab0
----
-1353
-3362
-41

query I rowsort
SELECT DISTINCT + col2 * + col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT col2 + - col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + col0 * - 93 AS col2 FROM tab0 AS cor0
----
-2232
-3255
-8277

query I rowsort
SELECT ALL + col0 + 32 AS col2 FROM tab2 AS cor0
----
110
111
39

query I rowsort
SELECT DISTINCT - - cor0.col0 * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - + col1 + - col0 * col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1745
SELECT DISTINCT + col0 - - CAST( + 74 * + col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
109
2466
6157

skipif mysql # not compatible
query I rowsort label-1745
SELECT DISTINCT + col0 - - CAST ( + 74 * + col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
109
2466
6157

query I rowsort
SELECT DISTINCT + col1 + 29 FROM tab1 AS cor0
----
39
42
55

query I rowsort
SELECT - col1 * col1 + - col1 * + col2 FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT ALL - col0 * - col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT cor0.col2 + + col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1750
SELECT ALL col1 + + col2 DIV col0 AS col0 FROM tab0 cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-1750
SELECT ALL col1 + + col2 / col0 AS col0 FROM tab0 cor0
----
87
91
97

query I rowsort
SELECT DISTINCT col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + + col1 AS col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + 58 + + col1 col2 FROM tab1 AS cor0
----
-9
4
81

query I rowsort
SELECT + col2 + + col0 AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT 52 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + cor0.col0 + - col1 * col1 FROM tab2 cor0
----
-210
-3403
-954

query I rowsort
SELECT col2 * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1760
SELECT cor0.col2 * + CAST( NULL AS SIGNED ) + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1760
SELECT cor0.col2 * + CAST ( NULL AS INTEGER ) + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 - - 41 FROM tab2, tab1 AS cor0
----
9 values hashing to 6c7ea0353add2a405c19398aeb2264ab

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1762
SELECT CAST( + ( - cor0.col2 ) AS SIGNED ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-1762
SELECT CAST ( + ( - cor0.col2 ) AS INTEGER ) FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1763
SELECT + col0 DIV - 12 AS col1 FROM tab0 AS cor0
----
-2
-2
-7

skipif mysql # not compatible
query I rowsort label-1763
SELECT + col0 / - 12 AS col1 FROM tab0 AS cor0
----
-2
-2
-7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 3a186ad492d315801f56fb30a5e89dbb

query I rowsort
SELECT col0 * - ( - col2 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col0 + + cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT ( - col2 ) AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT col2 + col0 * 39 FROM tab2 AS cor0
----
300
3068
3119

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1, tab2 AS cor1
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT + 16 AS col0 FROM tab1
----
16
16
16

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0, tab2, tab2 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1775
SELECT - col1 DIV col1 col0 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1775
SELECT - col1 / col1 col0 FROM tab0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1776
SELECT + 3 DIV col1 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1776
SELECT + 3 / col1 AS col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1777
SELECT col2 DIV tab2.col0 AS col1 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-1777
SELECT col2 / tab2.col0 AS col1 FROM tab2
----
0
0
3

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - cor0.col1 - cor0.col1 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT + - col0 * + 83 + col1 + col2 FROM tab2 cor0
----
-523
-6389
-6502

query I rowsort
SELECT ALL col1 + + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT - 42 + - col0 FROM tab0 AS cor0
----
-131
-66
-77

query I rowsort
SELECT ALL tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - + ( col0 ) * - col2 col0 FROM tab1 cor0
----
159
3584
7600

query I rowsort
SELECT ALL + 9 FROM tab0, tab1 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT ALL col0 + 0 * col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1788
SELECT DISTINCT col1 DIV cor0.col1 + col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-1788
SELECT DISTINCT col1 / cor0.col1 + col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT + - col0 * col0 + - col0 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT + col1 - + col2 AS col0 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT col0 * - col2 * col1 + + col2 + col2 FROM tab1 AS cor0
----
-36366
-4104
-99648

query I rowsort
SELECT col1 - + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 83 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT DISTINCT 53 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1795
SELECT col2 * CAST( NULL AS SIGNED ) col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1795
SELECT col2 * CAST ( NULL AS INTEGER ) col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1796
SELECT + col0 * col2 + + 44 + + tab1.col1 DIV 11 AS col0 FROM tab1
----
208
3692
7725

skipif mysql # not compatible
query I rowsort label-1796
SELECT + col0 * col2 + + 44 + + tab1.col1 / 11 AS col0 FROM tab1
----
208
3692
7725

query I rowsort
SELECT ALL col2 - - 41 AS col2 FROM tab1
----
137
95
98

query I rowsort
SELECT col2 + 71 + col0 FROM tab2
----
105
175
188

query I rowsort
SELECT DISTINCT col2 - 35 AS col1 FROM tab1
----
19
22
61

query I rowsort
SELECT DISTINCT 19 * 92 AS col0 FROM tab2, tab2 AS cor0
----
1748

query I rowsort
SELECT + col0 * - col0 + 32 + + col2 * + col2 AS col2 FROM tab1 AS cor0
----
-815
2848
2939

query I rowsort
SELECT DISTINCT - 64 AS col1 FROM tab1, tab0 AS cor0
----
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-1803
SELECT tab2.col1 + ( - ( + tab2.col1 ) ) DIV + col0 + - col1 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-1803
SELECT tab2.col1 + ( - ( + tab2.col1 ) ) / + col0 + - col1 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT + col2 + - 88 FROM tab0
----
-55
-6
-87

query I rowsort
SELECT - col1 + ( col1 ) + col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT 2 AS col0 FROM tab0
----
2
2
2

query I rowsort
SELECT 97 * col0 FROM tab0
----
2328
3395
8633

query I rowsort
SELECT DISTINCT + 80 FROM tab1
----
80

query I rowsort
SELECT ( - col0 ) AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - ( 33 + - tab1.col1 * - col1 ) FROM tab1
----
-133
-202
-709

query I rowsort
SELECT - cor0.col1 * col2 + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1813
SELECT - CAST( col2 AS SIGNED ) FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1813
SELECT - CAST ( col2 AS INTEGER ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) AS col0 FROM tab0, tab2, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col2 * + cor0.col0 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL cor0.col0 + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col1 * - col2 - col2 * col2 FROM tab0 cor0
----
-14186
-3927
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1818
SELECT DISTINCT - - col0 DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-1818
SELECT DISTINCT - - col0 / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL + 87 * col2 + + col1 AS col2 FROM tab1 AS cor0
----
4724
4969
8365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 78 * col0 col1 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT ALL - 74 + - col0 FROM tab1 AS cor0
----
-138
-154
-77

query I rowsort
SELECT - - 98 FROM tab1 AS cor0
----
98
98
98

query I rowsort
SELECT 76 FROM tab0 AS cor0
----
76
76
76

query I rowsort
SELECT + 71 AS col0 FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT DISTINCT 50 * col2 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT ALL + + col0 * + cor0.col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT col0 * 96 FROM tab0
----
2304
3360
8544

query I rowsort
SELECT DISTINCT - - 0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL cor1.col2 + cor0.col2 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2 cor2
----
81 values hashing to 50d4ea6a8bafe08bfab783831de21da1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + 75 * - col2 col0 FROM tab2 AS cor0
----
-1891
-1994
-2833

query I rowsort
SELECT DISTINCT + - 37 FROM tab2 AS cor0
----
-37

query I rowsort
SELECT DISTINCT - - col1 * col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - - 66 * col2 AS col1 FROM tab2 AS cor0
----
1716
1782
2508

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1834
SELECT - CAST( - 79 AS SIGNED ) FROM tab1 cor0
----
79
79
79

skipif mysql # not compatible
query I rowsort label-1834
SELECT - CAST ( - 79 AS INTEGER ) FROM tab1 cor0
----
79
79
79

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + 64 AS col2 FROM tab1, tab0 cor0
----
64

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 6dfb18fb846f922ba9ea60ce42b86fb0

query I rowsort
SELECT + - 22 FROM tab1 AS cor0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT col0 * - ( - col1 ) + col2 * - cor0.col2 FROM tab2 AS cor0
----
-101
-512
3926

query I rowsort
SELECT ALL - + col0 + + col1 AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 AS col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT + 73 * col0 + + col0 + - col2 AS col1 FROM tab0 AS cor0
----
1743
2589
6504

query I rowsort
SELECT ALL - 71 FROM tab2 AS cor0
----
-71
-71
-71

query I rowsort
SELECT - col1 + + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT 21 * + col1 FROM tab0 AS cor0
----
1806
1911
2037

query I rowsort
SELECT DISTINCT col1 * col2 + ( + col1 ) AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - ( cor0.col0 ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - 29 * col1 AS col2 FROM tab0
----
-2494
-2639
-2813

onlyif mysql # use DIV operator for integer division
query I rowsort label-1849
SELECT 1 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1849
SELECT 1 / + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 * - 9 FROM tab2
----
234
243
342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + ( col2 ) + - ( col2 ) ) col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) * tab0.col2 * ( tab0.col0 ) col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT 11 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT DISTINCT - col1 * + 41 - + col2 * + 81 FROM tab0
----
-10373
-4058
-6199

query I rowsort
SELECT ALL + col0 + - col0 * col1 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - 18 + + col0 col0 FROM tab1 AS cor0
----
1216
1520
57

query I rowsort
SELECT col2 + + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - + col2 AS col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT cor0.col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT col0 + + cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT + cor0.col2 + + col1 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT cor0.col1 * 42 AS col1 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT col1 * 69 AS col1 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT ALL col2 + - col2 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * 17 col0 FROM tab2 AS cor0
----
-1003
-289
-527

query I rowsort
SELECT ALL + col2 + col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT - col0 * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col2 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col2 + + 54 AS col1 FROM tab0 AS cor0
----
136
55
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + col0 col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + col2 * - col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL 65 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT + 71 FROM tab0
----
71
71
71

query I rowsort
SELECT ALL - col1 * tab0.col0 * + 68 FROM tab0
----
-140352
-230860
-550732

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab2 AS cor0, tab1 AS cor1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

onlyif mysql # use DIV operator for integer division
query I rowsort label-1876
SELECT ALL - col0 DIV - 72 AS col1 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1876
SELECT ALL - col0 / - 72 AS col1 FROM tab2
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1877
SELECT col1 * - col1 DIV col1 + + col2 AS col0 FROM tab1
----
28
47
83

skipif mysql # not compatible
query I rowsort label-1877
SELECT col1 * - col1 / col1 + + col2 AS col0 FROM tab1
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1878
SELECT + col2 DIV + col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1878
SELECT + col2 / + col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - - col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + cor0.col1 + col1 * 61 FROM tab1 AS cor0
----
1612
620
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-1881
SELECT + col1 DIV col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-1881
SELECT + col1 / col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT cor0.col2 * + 54 * col1 FROM tab2 AS cor0
----
34884
45198
82836

onlyif mysql # use DIV operator for integer division
query I rowsort label-1883
SELECT tab2.col2 + + 76 DIV col1 FROM tab2
----
27
29
42

skipif mysql # not compatible
query I rowsort label-1883
SELECT tab2.col2 + + 76 / col1 FROM tab2
----
27
29
42

query I rowsort
SELECT col1 + 70 AS col1 FROM tab1 AS cor0
----
80
83
96

query I rowsort
SELECT DISTINCT + 8 FROM tab0, tab1 AS cor0
----
8

query I rowsort
SELECT col1 * + 60 AS col0 FROM tab0
----
5160
5460
5820

query I rowsort
SELECT ALL + col1 * col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT 73 FROM tab2, tab1 AS cor0
----
73

query I rowsort
SELECT - tab2.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL 77 FROM tab0
----
77
77
77

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT + - col1 * - col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT 58 AS col1 FROM tab0 AS cor0
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 13 col1 FROM tab2 AS cor0
----
-13

query I rowsort
SELECT DISTINCT + ( col0 ) * col2 + 36 * col0 AS col0 FROM tab1 AS cor0
----
10560
270
5952

query I rowsort
SELECT ALL - col0 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-1898
SELECT DISTINCT 73 DIV + cor0.col2 AS col2 FROM tab0 AS cor0
----
0
2
73

skipif mysql # not compatible
query I rowsort label-1898
SELECT DISTINCT 73 / + cor0.col2 AS col2 FROM tab0 AS cor0
----
0
2
73

query I rowsort
SELECT ALL col2 + - 85 * col0 AS col2 FROM tab1 AS cor0
----
-201
-5383
-6704

query I rowsort
SELECT DISTINCT + + ( col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col2 FROM tab2 AS cor0
----
19
19
19

query I rowsort
SELECT tab0.col1 * + col1 + 11 AS col0 FROM tab0
----
7407
8292
9420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col2 + + 12 col2 FROM tab0
----
47
7310
804

query I rowsort
SELECT DISTINCT col0 - - col2 * - col1 FROM tab0 cor0
----
-2814
-62
-7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 91 - + col0 col1 FROM tab2 AS cor0
----
12
13
84

query I rowsort
SELECT ALL col0 * col1 * col2 + + 5 + - col0 * - ( col2 * col0 + - col1 * + 37 ) AS col2 FROM tab0 cor0
----
-120990
1013982
10757

query I rowsort
SELECT - cor0.col0 - col1 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + 44 - - col0 * col1 FROM tab1 AS cor0
----
1084
122
684

query I rowsort
SELECT - - 94 + - col2 AS col0 FROM tab0 AS cor0
----
12
61
93

query I rowsort
SELECT ALL col1 * + col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-1911
SELECT - col2 * - col2 + - col1 DIV col0 FROM tab2 AS cor0
----
1444
676
725

skipif mysql # not compatible
query I rowsort label-1911
SELECT - col2 * - col2 + - col1 / col0 FROM tab2 AS cor0
----
1444
676
725

query I rowsort
SELECT ALL - col0 + - col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT - col2 * + col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) * col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1915
SELECT ALL col2 + - cor0.col0 DIV + col0 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1915
SELECT ALL col2 + - cor0.col0 / + col0 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL + col1 * col2 + - 85 FROM tab2 AS cor0
----
1449
561
752

query I rowsort
SELECT ALL + col1 + + cor0.col2 * ( + 99 ) AS col1 FROM tab1 AS cor0
----
5372
5653
9517

query I rowsort
SELECT ALL - + col2 + - col2 - 58 FROM tab1 AS cor0
----
-166
-172
-250

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col0 * col2 + - col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT - + col1 + col0 - cor0.col0 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1922
SELECT ALL - + col0 - + CAST( + col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-1922
SELECT ALL - + col0 - + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1923
SELECT ALL col0 * + CAST( NULL AS SIGNED ) - col1 * col2 * + ( + cor0.col0 ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1923
SELECT ALL col0 * + CAST ( NULL AS INTEGER ) - col1 * col2 * + ( + cor0.col0 ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 59 FROM tab0, tab1 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

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-1926
SELECT - - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1926
SELECT - - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 cor1, tab2 cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT + col0 + 62 AS col2 FROM tab0 AS cor0
----
151
86
97

query I rowsort
SELECT + 62 FROM tab2, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT - col2 * 66 AS col2 FROM tab2
----
-1716
-1782
-2508

query I rowsort
SELECT - ( tab2.col1 ) AS col0 FROM tab2
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1932
SELECT 53 DIV + col0 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1932
SELECT 53 / + col0 FROM tab0
----
0
1
2

query I rowsort
SELECT tab0.col2 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT + 42 FROM tab0
----
42

query I rowsort
SELECT ALL col2 + - col0 * 22 FROM tab2 AS cor0
----
-127
-1690
-1700

query I rowsort
SELECT DISTINCT + + col2 * - col2 * + col1 + - col2 + + col0 * col0 FROM tab1 AS cor0
----
-113504
-28451
-75861

query I rowsort
SELECT - 13 AS col0 FROM tab2 AS cor0
----
-13
-13
-13

query I rowsort
SELECT ALL + cor0.col1 * col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col1 * - col1 - col1 * 58 AS col2 FROM tab0 cor0
----
-12384
-13559
-15035

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 93 ) col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

query I rowsort
SELECT - ( - col1 ) * + col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT 11 FROM tab0, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 * col1 col2 FROM tab0 cor0
----
344
364
388

query I rowsort
SELECT - col1 * cor0.col1 + 63 + - 57 FROM tab1 AS cor0
----
-163
-670
-94

query I rowsort
SELECT - ( + col1 ) FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col1 FROM tab0 cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1947
SELECT - - cor0.col2 * col1 DIV col2 + - 74 col1 FROM tab0 cor0
----
12
17
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1947
SELECT - - cor0.col2 * col1 / col2 + - 74 col1 FROM tab0 cor0
----
12
17
23

query I rowsort
SELECT col2 + col0 * col0 + + col2 FROM tab1 cor0
----
117
4210
6592

query I rowsort
SELECT - 80 + col1 FROM tab2 AS cor0
----
-21
-49
-63

query I rowsort
SELECT + col0 + - col2 + - 75 AS col2 FROM tab2 AS cor0
----
-23
-34
-95

query I rowsort
SELECT col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT col0 * + ( col2 ) + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + col2 * - ( + ( col2 ) ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + 45 AS col2 FROM tab2 cor0
----
45
45
45

query I rowsort
SELECT + col1 * 16 FROM tab2 AS cor0
----
272
496
944

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 6726a15019c52908f1f1d0df0cd4c1b8

query I rowsort
SELECT + col0 + - col0 * col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT 88 FROM tab2 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT + ( - col1 ) + - cor0.col0 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1960
SELECT - CAST( ( + col0 ) AS SIGNED ) DIV 11 FROM tab1 AS cor0
----
-5
-7
0

skipif mysql # not compatible
query I rowsort label-1960
SELECT - CAST ( ( + col0 ) AS INTEGER ) / 11 FROM tab1 AS cor0
----
-5
-7
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - 16 AS REAL ) AS col1 FROM tab1 AS cor0
----
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 * col1 * col1 col2 FROM tab0 cor0
----
-680432
-761852
-865628

query I rowsort
SELECT ALL 26 AS col0 FROM tab0
----
26
26
26

query I rowsort
SELECT 19 + col2 FROM tab0
----
101
20
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col1 + col0 * col0 col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL 49 + 85 FROM tab0 AS cor0
----
134
134
134

query I rowsort
SELECT - 24 * - col0 AS col0 FROM tab1 AS cor0
----
1536
1920
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * col1 col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT 19 * + ( + col1 ) FROM tab0 AS cor0
----
1634
1729
1843

query I rowsort
SELECT ALL - - 93 FROM tab1 AS cor0
----
93
93
93

query I rowsort
SELECT DISTINCT - col0 * + 0 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1972
SELECT + - cor0.col1 DIV 87 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1972
SELECT + - cor0.col1 / 87 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1973
SELECT - ( col2 ) + + col0 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1973
SELECT - ( col2 ) + + col0 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - + col1 + col2 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - - ( - cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col1 * col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - 29 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT + col0 * col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT 39 * - col2 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT + col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col1 * - col1 + + col0 FROM tab1 AS cor0
----
-36
-673
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1983
SELECT ALL + col0 DIV - cor0.col2 + ( cor0.col0 ) FROM tab0 AS cor0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-1983
SELECT ALL + col0 / - cor0.col2 + ( cor0.col0 ) FROM tab0 AS cor0
----
0
24
88

query I rowsort
SELECT ALL + col0 * - cor0.col2 + col0 - 93 * col1 AS col1 FROM tab2 AS cor0
----
-3065
-4504
-7437

query I rowsort
SELECT ALL cor0.col0 * col1 + - col1 + + col2 FROM tab1 AS cor0
----
106
1123
687

query I rowsort
SELECT DISTINCT ( + 95 ) AS col2 FROM tab1
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 70 col1 FROM tab1
----
134
150
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-1988
SELECT + + col2 DIV 94 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1988
SELECT + + col2 / 94 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT cor0.col0 + + ( + col1 ) * col2 + + col2 FROM tab2 AS cor0
----
1638
763
871

query I rowsort
SELECT ALL + col2 + col1 * + 82 * col2 AS col2 FROM tab1 cor0
----
102432
115182
46797

query I rowsort
SELECT - - 80 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

onlyif mysql # use DIV operator for integer division
query I rowsort label-1992
SELECT ALL col0 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1992
SELECT ALL col0 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 40 FROM tab2
----
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-1994
SELECT DISTINCT + col0 DIV - ( - col1 ) + - col1 * col0 AS col0 FROM tab2
----
-1339
-217
-4601

skipif mysql # not compatible
query I rowsort label-1994
SELECT DISTINCT + col0 / - ( - col1 ) + - col1 * col0 AS col0 FROM tab2
----
-1339
-217
-4601

query I rowsort
SELECT - col2 * tab2.col0 - + col0 AS col1 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT - col1 - col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-1999
SELECT DISTINCT + col1 DIV - 17 FROM tab0 AS cor0
----
-5

skipif mysql # not compatible
query I rowsort label-1999
SELECT DISTINCT + col1 / - 17 FROM tab0 AS cor0
----
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2000
SELECT + col0 + CAST( NULL AS SIGNED ) / ( + col1 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2000
SELECT + col0 + CAST ( NULL AS INTEGER ) / ( + col1 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + col1 * + ( tab0.col0 ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - tab0.col1 * tab0.col1 + + 69 * + col2 * ( - col0 ) AS col2 FROM tab0
----
-11824
-511843
-62044

onlyif mysql # use DIV operator for integer division
query I rowsort label-2004
SELECT - col1 + col0 * col2 DIV col2 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-2004
SELECT - col1 + col0 * col2 / col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL + cor0.col2 + + tab1.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to b8b62762005dc0d7237145d0538edb34

query I rowsort
SELECT + 91 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT - 36 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

query I rowsort
SELECT - cor0.col1 + 58 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to cac0f34161158318726ea53f3972dfc2

query I rowsort
SELECT ALL - 32 + col1 AS col0 FROM tab1 AS cor0
----
-19
-22
-6

query I rowsort
SELECT DISTINCT + - col0 + col1 + - col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT col2 * col2 + col1 * - col2 AS col0 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT ALL - + col0 + + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - - col0 * cor0.col0 + col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT ALL + - col2 + + col1 * + col1 FROM tab2 cor0
----
251
3455
934

query I rowsort
SELECT + + 92 FROM tab2 AS cor0
----
92
92
92

query I rowsort
SELECT DISTINCT + - cor0.col0 + col1 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + 2 col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT - cor0.col2 * + 53 AS col0 FROM tab0 AS cor0
----
-1749
-4346
-53

query I rowsort
SELECT + 62 FROM tab0, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT col0 * 55 FROM tab2 AS cor0
----
385
4290
4345

query I rowsort
SELECT ALL - col0 + ( + col2 ) FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2022
SELECT + + cor0.col2 DIV cor0.col2 col0 FROM tab1 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2022
SELECT + + cor0.col2 / cor0.col2 col0 FROM tab1 cor0
----
1
1
1

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab2 cor1, tab2, tab1 AS cor2
----
3645 values hashing to c0625992cd48bef51317edf43a55d9e4

query I rowsort
SELECT ALL col1 + - col1 * + col0 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT + col1 + + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2026
SELECT col2 DIV 60 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2026
SELECT col2 / 60 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2027
SELECT - 33 + + col0 DIV col2 AS col2 FROM tab1
----
-32
-33
-33

skipif mysql # not compatible
query I rowsort label-2027
SELECT - 33 + + col0 / col2 AS col2 FROM tab1
----
-32
-33
-33

query I rowsort
SELECT col0 * + col0 + col1 + + ( + col1 ) * + col2 FROM tab2
----
6904
7677
917

query I rowsort
SELECT ALL + + ( - 33 ) AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT ALL col0 + + col1 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * - 87 col0 FROM tab1
----
-261
-5568
-6960

query I rowsort
SELECT 78 FROM tab1, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT - col1 + col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT 8 * + col1 AS col2 FROM tab0
----
688
728
776

query I rowsort
SELECT + 26 + 79 * tab2.col0 AS col2 FROM tab2
----
579
6188
6267

onlyif mysql # use DIV operator for integer division
query I rowsort label-2036
SELECT + + 85 * 79 DIV col0 - cor0.col0 FROM tab1 AS cor0
----
2235
3
40

skipif mysql # not compatible
query I rowsort label-2036
SELECT + + 85 * 79 / col0 - cor0.col0 FROM tab1 AS cor0
----
2235
3
40

query I rowsort
SELECT DISTINCT + col1 - + col0 * - col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - 5 - 83 AS col1 FROM tab2 AS cor0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT + col2 - 78 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1974
-723
-918

query I rowsort
SELECT 51 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to c9771396949659773ab2fa2a1ac228de

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 3a31dab513390ca6bd05c71a3d9c50f0

query I rowsort
SELECT DISTINCT - col2 * - 53 AS col1 FROM tab1 AS cor0
----
2862
3021
5088

query I rowsort
SELECT + col1 + + 28 AS col2 FROM tab1 AS cor0
----
38
41
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-2044
SELECT ALL - + 76 DIV + 70 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2044
SELECT ALL - + 76 / + 70 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2045
SELECT ALL - + cor0.col2 * + col0 + col1 DIV + 90 + + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif mysql # not compatible
query I rowsort label-2045
SELECT ALL - + cor0.col2 * + col0 + col1 / + 90 + + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + 75 + col2 FROM tab2 AS cor0
----
101
102
113

query I rowsort
SELECT DISTINCT - 48 + col0 FROM tab2 AS cor0
----
-41
30
31

query I rowsort
SELECT ALL col0 * + cor0.col1 - col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT + 51 + col1 FROM tab1 cor0
----
61
64
77

query I rowsort
SELECT ALL + + col0 + - col1 - col0 * col0 FROM tab1 AS cor0
----
-32
-4042
-6333

query I rowsort
SELECT + col2 + + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab0 AS cor0
----
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2053
SELECT DISTINCT - col2 DIV + col2 + col1 DIV - ( cor0.col1 + CAST( + 14 AS SIGNED ) * - col0 ) FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2053
SELECT DISTINCT - col2 / + col2 + col1 / - ( cor0.col1 + CAST ( + 14 AS INTEGER ) * - col0 ) FROM tab1 AS cor0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2054
SELECT ALL - col0 * col2 * - CAST( - 10 AS SIGNED ) AS col0 FROM tab1 cor0
----
-1620
-36480
-76800

skipif mysql # not compatible
query I rowsort label-2054
SELECT ALL - col0 * col2 * - CAST ( - 10 AS INTEGER ) AS col0 FROM tab1 cor0
----
-1620
-36480
-76800

query I rowsort
SELECT ALL - 83 * - col2 + + col1 AS col0 FROM tab2 AS cor0
----
2217
2272
3171

query I rowsort
SELECT - cor0.col1 + col2 AS col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT DISTINCT col0 * cor0.col0 + + 84 FROM tab2 AS cor0
----
133
6168
6325

query I rowsort
SELECT ALL ( - col1 ) + col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col1 - - col1 * ( col0 ) FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT 18 - - col0 FROM tab1
----
21
82
98

query I rowsort
SELECT DISTINCT + col2 + 8 FROM tab0
----
41
9
90

query I rowsort
SELECT - ( col2 * col0 ) + col1 * 68 * - tab0.col0 FROM tab0
----
-141144
-230895
-558030

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2063
SELECT + CAST( NULL AS SIGNED ) * + 0 + tab1.col2 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2063
SELECT + CAST ( NULL AS INTEGER ) * + 0 + tab1.col2 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ( - col1 ) + col2 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT + cor0.col1 + col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2066
SELECT + cor0.col0 * - cor0.col1 + + col2 + - col0 DIV col0 col1 FROM tab2 AS cor0
----
-1306
-191
-4577

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2066
SELECT + cor0.col0 * - cor0.col1 + + col2 + - col0 / col0 col1 FROM tab2 AS cor0
----
-1306
-191
-4577

query I rowsort
SELECT - 61 FROM tab0 AS cor0
----
-61
-61
-61

query I rowsort
SELECT col2 * col0 + ( - col1 ) AS col1 FROM tab1
----
136
3638
7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + col2 * - col2 col0 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 67 col0 FROM tab1
----
67

query I rowsort
SELECT ALL tab2.col2 FROM tab2, tab0 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col2 col0 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2073
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 79 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-2073
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 79 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT - + 42 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-11
-25
17

query I rowsort
SELECT + - 44 + ( col2 ) AS col1 FROM tab0 AS cor0
----
-11
-43
38

query I rowsort
SELECT + - col0 + + 44 AS col1 FROM tab1 cor0
----
-20
-36
41

query I rowsort
SELECT + ( + 87 ) FROM tab2, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT + - col2 - 32 FROM tab2 AS cor0
----
-58
-59
-70

query I rowsort
SELECT - 68 + - cor0.col1 + - col0 FROM tab0 cor0
----
-178
-200
-248

query I rowsort
SELECT ALL + col2 * col0 * col1 AS col0 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-2081
SELECT + tab2.col0 DIV - tab2.col0 + 36 FROM tab2
----
35
35
35

skipif mysql # not compatible
query I rowsort label-2081
SELECT + tab2.col0 / - tab2.col0 + 36 FROM tab2
----
35
35
35

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
58

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

query I rowsort
SELECT 80 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col1 FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
7
78
79

query I rowsort
SELECT DISTINCT + - cor0.col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + 92 AS col0 FROM tab2 AS cor0
----
92
92
92

query I rowsort
SELECT col0 + - 93 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
-57
1020
6720

query I rowsort
SELECT col2 * col0 - + col1 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL + col2 * col2 * col2 FROM tab0 AS cor0
----
1
35937
551368

query I rowsort
SELECT col0 + + col0 * col2 AS col1 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2092
SELECT - cor0.col2 + + cor0.col1 + + col1 * + CAST( ( + col0 ) AS SIGNED ) FROM tab0 AS cor0
----
2117
3491
8108

skipif mysql # not compatible
query I rowsort label-2092
SELECT - cor0.col2 + + cor0.col1 + + col1 * + CAST ( ( + col0 ) AS INTEGER ) FROM tab0 AS cor0
----
2117
3491
8108

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2093
SELECT DISTINCT + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2093
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + ( col0 ) * + cor0.col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + 11 AS col0 FROM tab0 cor0
----
11
11
11

query I rowsort
SELECT DISTINCT - - col2 * + cor0.col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL + + col0 + - ( col0 + col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - + col0 + 9 AS col1 FROM tab2 AS cor0
----
-69
-70
2

query I rowsort
SELECT - col2 + ( - col2 ) * col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL - tab1.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT ALL col0 * + col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - 90 FROM tab2, tab1 cor0
----
-90

query I rowsort
SELECT ALL 69 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to dfada1ee7a4e3e5c74a063a1282769f9

query I rowsort
SELECT + col0 + - col2 * ( col2 + col2 ) * col0 AS col2 FROM tab2 AS cor0
----
-10199
-105378
-228073

query I rowsort
SELECT + col2 * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + col2 * - col1 * col1 AS col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( tab1.col2 ) col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2108
SELECT - col2 + + CAST( - col1 * + col1 AS SIGNED ) FROM tab1
----
-157
-265
-730

skipif mysql # not compatible
query I rowsort label-2108
SELECT - col2 + + CAST ( - col1 * + col1 AS INTEGER ) FROM tab1
----
-157
-265
-730

query I rowsort
SELECT + - col1 * - ( + col1 ) AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT 57 AS col1 FROM tab1
----
57
57
57

query I rowsort
SELECT DISTINCT 82 AS col2 FROM tab2, tab2 AS cor0
----
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 col2 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2113
SELECT - + CAST( col2 AS SIGNED ) + col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2113
SELECT - + CAST ( col2 AS INTEGER ) + col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2114
SELECT - CAST( 39 AS SIGNED ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
15
18
57

skipif mysql # not compatible
query I rowsort label-2114
SELECT - CAST ( 39 AS INTEGER ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
15
18
57

query I rowsort
SELECT DISTINCT + - col2 * col0 + - col1 * col1 FROM tab2 AS cor0
----
-1150
-3291
-5509

query I rowsort
SELECT ALL 93 + 77 AS col1 FROM tab2 cor0
----
170
170
170

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 col0 FROM tab2
----
95

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab0, tab0 AS cor0, tab1, tab2 AS cor1 WHERE ( NULL ) = NULL
----

query I rowsort
SELECT - col0 * + col2 AS col2 FROM tab2
----
-189
-2028
-3002

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab0 AS cor0, tab0
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

query I rowsort
SELECT DISTINCT + 97 FROM tab0
----
97

query I rowsort
SELECT DISTINCT - 97 FROM tab0
----
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 30 col0 FROM tab1
----
30
30
30

query I rowsort
SELECT - ( + tab1.col1 ) + col1 * col2 AS col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT - 45 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT - col0 + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + 26 + col0 AS col0 FROM tab1 AS cor0
----
106
29
90

query I rowsort
SELECT ALL col1 * col1 + col2 * col0 + col0 AS col0 FROM tab0 cor0
----
15668
8212
9479

query I rowsort
SELECT DISTINCT - col0 - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT 54 FROM tab1 AS cor0
----
54
54
54

query I rowsort
SELECT DISTINCT col2 + - ( col1 ) AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - col1 * - cor0.col0 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + cor0.col0 * 1 + - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT col2 * col1 * + cor0.col2 FROM tab2 AS cor0
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 96 col1 FROM tab1 AS cor0
----
5184
5472
9216

query I rowsort
SELECT DISTINCT col1 * + cor0.col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - 9 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 3dfe689e16ce3a87877d40f349e6c7b5

query I rowsort
SELECT ALL + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + col1 + + ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + 28 + 59 * col1 + - col2 AS col0 FROM tab2 AS cor0
----
1830
3483
993

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2143
SELECT - CAST( NULL AS SIGNED ) * - col2 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2143
SELECT - CAST ( NULL AS INTEGER ) * - col2 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 49 - + col0 * - col0 AS col1 FROM tab0 AS cor0
----
1176
527
7872

query I rowsort
SELECT ALL + cor0.col1 * - col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2146
SELECT DISTINCT - CAST( - 61 AS SIGNED ) FROM tab0 AS cor0
----
61

skipif mysql # not compatible
query I rowsort label-2146
SELECT DISTINCT - CAST ( - 61 AS INTEGER ) FROM tab0 AS cor0
----
61

query I rowsort
SELECT col1 - col0 AS col2 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2148
SELECT + col1 - - col0 DIV - col0 col0 FROM tab2 AS cor0
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2148
SELECT + col1 - - col0 / - col0 col0 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT ALL 27 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2214
-27
-891

query I rowsort
SELECT DISTINCT - 52 AS col1 FROM tab0 AS cor0
----
-52

query I rowsort
SELECT - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - + 77 * cor0.col1 + + 35 AS col2 FROM tab1 AS cor0
----
-1967
-735
-966

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 46 * - col1 col1 FROM tab0 AS cor0
----
-3956
-4186
-4462

query I rowsort
SELECT ALL + tab0.col1 * + ( col0 ) AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 38 * col1 AS col0 FROM tab1
----
380
494
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-2156
SELECT col1 DIV + col1 + col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-2156
SELECT col1 / + col1 + col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT ALL - - col2 * col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + 84 * col2 + col0 AS col2 FROM tab1 AS cor0
----
4539
4852
8144

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - col2 + + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + 80 AS col2 FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT - - col0 * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - tab0.col0 * col1 - - col0 FROM tab0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-2165
SELECT + ( + col0 ) * col2 - tab2.col1 DIV - col1 AS col0 FROM tab2
----
190
2029
3003

skipif mysql # not compatible
query I rowsort label-2165
SELECT + ( + col0 ) * col2 - tab2.col1 / - col1 AS col0 FROM tab2
----
190
2029
3003

query I rowsort
SELECT DISTINCT - ( + 10 ) * - col1 * + col2 - tab2.col2 * - col0 AS col1 FROM tab2
----
17368
8559
9462

query I rowsort
SELECT ALL + col1 * 12 + + col1 AS col0 FROM tab1
----
130
169
338

query I rowsort
SELECT ALL col1 + + 11 FROM tab2 cor0
----
28
42
70

query I rowsort
SELECT DISTINCT - + col2 * - cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - 46 AS col2 FROM tab2 AS cor0
----
-46
-46
-46

query I rowsort
SELECT DISTINCT col1 * cor0.col1 + - col0 AS col2 FROM tab1 AS cor0
----
36
673
89

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT 15 FROM tab0, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT ALL 95 AS col1 FROM tab0
----
95
95
95

query I rowsort
SELECT ALL - ( - tab2.col2 + - col0 ) * col1 * col2 FROM tab2
----
159536
28458
75582

onlyif mysql # use DIV operator for integer division
query I rowsort label-2176
SELECT DISTINCT CAST( col1 + col0 AS SIGNED ) DIV col1 FROM tab2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-2176
SELECT DISTINCT CAST ( col1 + col0 AS INTEGER ) / col1 FROM tab2
----
1
2
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2177
SELECT ALL + 44 DIV tab2.col1 AS col0 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2177
SELECT ALL + 44 / tab2.col1 AS col0 FROM tab2
----
0
1
2

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0
----
24
35
89

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT ALL - ( col0 ) AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT tab2.col0 + + 63 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to eb138bbc5115aeab4f3271c776315bc7

query I rowsort
SELECT ALL - + 71 * col0 FROM tab0 AS cor0
----
-1704
-2485
-6319

query I rowsort
SELECT DISTINCT + 35 AS col1 FROM tab1 AS cor0
----
35

query I rowsort
SELECT ALL + 69 * + col2 AS col0 FROM tab2 cor0
----
1794
1863
2622

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab0 AS cor0, tab1 AS cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT 36 * col1 + - 91 * + col0 + col2 * col1 AS col2 FROM tab2
----
-3440
-5931
1316

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 12 + + col1 col2 FROM tab0
----
103
109
98

query I rowsort
SELECT - col2 + - col0 AS col1 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT 71 - col0 FROM tab2
----
-7
-8
64

query I rowsort
SELECT ALL - col1 * col0 * 58 - col2 FROM tab2
----
-12613
-266942
-77932

query I rowsort
SELECT + + col2 + - col1 * 6 FROM tab1 cor0
----
-102
-3
18

query I rowsort
SELECT - col1 + + col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2194
SELECT ALL col2 DIV + cor0.col2 + + 85 AS col2 FROM tab1 AS cor0
----
86
86
86

skipif mysql # not compatible
query I rowsort label-2194
SELECT ALL col2 / + cor0.col2 + + 85 AS col2 FROM tab1 AS cor0
----
86
86
86

query I rowsort
SELECT 74 AS col0 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT - col2 * tab0.col1 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2197
SELECT - col2 DIV col2 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2197
SELECT - col2 / col2 AS col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT col2 + col2 * ( 39 ) + - col2 FROM tab1
----
2106
2223
3744

query I rowsort
SELECT - col1 * ( + col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2200
SELECT ALL + + col1 + - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2200
SELECT ALL + + col1 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + 5 * col2 FROM tab1 AS cor0
----
324
342
576

query I rowsort
SELECT - - col0 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2203
SELECT DISTINCT + col0 DIV - 67 - + cor0.col2 FROM tab2 AS cor0
----
-27
-39

skipif mysql # not compatible
query I rowsort label-2203
SELECT DISTINCT + col0 / - 67 - + cor0.col2 FROM tab2 AS cor0
----
-27
-39

query I rowsort
SELECT ALL - cor0.col1 + 55 AS col2 FROM tab2 AS cor0
----
-4
24
38

query I rowsort
SELECT ALL + cor0.col1 * 19 FROM tab0 AS cor0
----
1634
1729
1843

query I rowsort
SELECT - col0 - col2 * 58 FROM tab2 AS cor0
----
-1573
-1586
-2283

query I rowsort
SELECT DISTINCT col1 + + 96 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT DISTINCT + + col1 * 43 - col1 FROM tab1 AS cor0
----
1092
420
546

query I rowsort
SELECT + col0 + - 84 FROM tab2 AS cor0
----
-5
-6
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2210
SELECT tab1.col0 * CAST( NULL AS DECIMAL ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2210
SELECT tab1.col0 * CAST ( NULL AS REAL ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * col1 + 86 AS col0 FROM tab2 cor0
----
-1448
-560
-751

query I rowsort
SELECT DISTINCT + + col0 * + col1 - + 1 AS col1 FROM tab2 AS cor0
----
1342
216
4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-2213
SELECT ALL - + 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-2213
SELECT ALL - + col1 / col2 col0 FROM tab0 AS cor0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2214
SELECT DISTINCT col2 DIV + col1 + 86 FROM tab2 AS cor0
----
86
88

skipif mysql # not compatible
query I rowsort label-2214
SELECT DISTINCT col2 / + col1 + 86 FROM tab2 AS cor0
----
86
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 16 + - col0 col0 FROM tab1 cor0
----
1456
848
861

query I rowsort
SELECT DISTINCT - - col1 + + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 + + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL col2 * + col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col0 - tab0.col0 FROM tab0
----
0

query I rowsort
SELECT ALL + col2 * col1 - + col1 AS col2 FROM tab1
----
1235
1378
560

query I rowsort
SELECT DISTINCT + - col2 + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT ALL + col1 + - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - col1 + - col2 * 60 AS col2 FROM tab2 cor0
----
-1619
-1651
-2297

query I rowsort
SELECT - cor0.col0 + + 81 AS col2 FROM tab1 cor0
----
1
17
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col1 + - 32 + - 82 * col0 FROM tab1 AS cor0
----
-252
-5270
-6579

onlyif mysql # use DIV operator for integer division
query I rowsort label-2227
SELECT - - col2 - + 6 DIV 8 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2227
SELECT - - col2 - + 6 / 8 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2228
SELECT DISTINCT + CAST( - 83 AS SIGNED ) FROM tab0, tab1 AS cor0
----
-83

skipif mysql # not compatible
query I rowsort label-2228
SELECT DISTINCT + CAST ( - 83 AS INTEGER ) FROM tab0, tab1 AS cor0
----
-83

query I rowsort
SELECT tab1.col0 * 28 FROM tab1
----
1792
2240
84

query I rowsort
SELECT - 35 + + cor1.col0 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 82609e53ac5d97790ef64a5ce88b23da

onlyif mysql # use DIV operator for integer division
query I rowsort label-2231
SELECT - tab1.col2 * col0 DIV - ( tab1.col0 ) + 66 FROM tab1
----
120
123
162

skipif mysql # not compatible
query I rowsort label-2231
SELECT - tab1.col2 * col0 / - ( tab1.col0 ) + 66 FROM tab1
----
120
123
162

query I rowsort
SELECT ALL cor0.col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT + col1 * + col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col1 - + 52 AS col2 FROM tab1 cor0
----
-26
-39
-42

query I rowsort
SELECT - col0 - col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - col1 + + 26 FROM tab0 AS cor0
----
-60
-65
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-2237
SELECT ALL cor0.col1 DIV col0 FROM tab1 cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2237
SELECT ALL cor0.col1 / col0 FROM tab1 cor0
----
0
0
8

query I rowsort
SELECT 13 * cor0.col2 + col2 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT + - ( 30 ) FROM tab0 AS cor0
----
-30
-30
-30

query I rowsort
SELECT + + 5 * col1 AS col1 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT col0 * + ( + col2 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT col2 * col1 * + tab0.col2 + col2 + + 56 * - col1 AS col2 FROM tab0
----
-5334
606870
88871

query I rowsort
SELECT DISTINCT 80 * 62 AS col2 FROM tab2, tab0 AS cor0
----
4960

query I rowsort
SELECT - col1 * 34 AS col2 FROM tab0
----
-2924
-3094
-3298

onlyif mysql # use DIV operator for integer division
query I rowsort label-2245
SELECT 17 DIV + 23 FROM tab2, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2245
SELECT 17 / + 23 FROM tab2, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-2246
SELECT - col0 * 68 DIV + col1 + col2 DIV 90 AS col2 FROM tab1 AS cor0
----
-417
-435
-7

skipif mysql # not compatible
query I rowsort label-2246
SELECT - col0 * 68 / + col1 + col2 / 90 AS col2 FROM tab1 AS cor0
----
-417
-435
-7

query I rowsort
SELECT DISTINCT col0 + col2 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2248
SELECT cor0.col2 + col2 DIV + ( - col0 ) FROM tab0 cor0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-2248
SELECT cor0.col2 + col2 / + ( - col0 ) FROM tab0 cor0
----
1
32
82

query I rowsort
SELECT ALL + - 60 FROM tab2 AS cor0
----
-60
-60
-60

query I rowsort
SELECT + 64 FROM tab2 AS cor0
----
64
64
64

query I rowsort
SELECT DISTINCT - col2 + + col0 + col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col2 * col1 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 + col0 * - 54 FROM tab0 AS cor0
----
-1263
-1889
-4724

query I rowsort
SELECT + + 59 + - col2 * + col0 AS col2 FROM tab1 AS cor0
----
-103
-3589
-7621

query I rowsort
SELECT ALL col2 * + col2 * + col0 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

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 ALL - 16 * col2 AS col0 FROM tab0 AS cor0
----
-1312
-16
-528

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2258
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2258
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL

query I rowsort
SELECT - cor0.col0 * - col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - + ( + cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col1 + - col0 * col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + - col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT 77 FROM tab0
----
77
77
77

query I rowsort
SELECT ALL - 68 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 + + col1 col1 FROM tab0
----
2
62

query I rowsort
SELECT ALL tab2.col2 + + col2 AS col0 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT - col0 + - col1 AS col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT - 4 * col1 FROM tab2
----
-124
-236
-68

query I rowsort
SELECT + 60 + - tab2.col1 AS col1 FROM tab2
----
1
29
43

query I rowsort
SELECT ( + col0 * 61 ) - - ( col2 ) FROM tab2
----
454
4784
4857

query I rowsort
SELECT + col0 + - col1 AS col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - - 44 * + col0 AS col2 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT 81 AS col0 FROM tab2, tab1 cor0, tab2 cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

query I rowsort
SELECT - col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2276
SELECT - ( cor0.col2 ) + 0 DIV 78 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2276
SELECT - ( cor0.col2 ) + 0 / 78 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + - col1 * + col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col1 * + col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2279
SELECT ALL + col1 - CAST( col1 + - col2 AS SIGNED ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2279
SELECT ALL + col1 - CAST ( col1 + - col2 AS INTEGER ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + col0 * col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col2 * 80 FROM tab2 AS cor0
----
2080
2160
3040

query I rowsort
SELECT DISTINCT + col1 * - ( col0 ) + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - - col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT col1 + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2285
SELECT DISTINCT + col0 DIV + ( col0 ) - cor0.col1 AS col2 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2285
SELECT DISTINCT + col0 / + ( col0 ) - cor0.col1 AS col2 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT - 63 * col0 FROM tab1
----
-189
-4032
-5040

query I rowsort
SELECT DISTINCT col1 * + tab2.col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT 13 AS col1 FROM tab0
----
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 * - col1 col0 FROM tab1 AS cor0
----
-1794
-690
-897

query I rowsort
SELECT col1 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2291
SELECT - col0 DIV - 14 + + col0 - 88 FROM tab1 AS cor0
----
-20
-3
-85

skipif mysql # not compatible
query I rowsort label-2291
SELECT - col0 / - 14 + + col0 - 88 FROM tab1 AS cor0
----
-20
-3
-85

query I rowsort
SELECT - col0 + + col1 + col0 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2293
SELECT DISTINCT col1 + col2 DIV col1 FROM tab2
----
19
31
59

skipif mysql # not compatible
query I rowsort label-2293
SELECT DISTINCT col1 + col2 / col1 FROM tab2
----
19
31
59

query I rowsort
SELECT col0 * + tab0.col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col2 + + col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - ( + col2 ) AS REAL ) - cor0.col2 col1 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT ALL - col2 * - col0 AS col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2298
SELECT + col2 DIV tab1.col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2298
SELECT + col2 / tab1.col1 AS col2 FROM tab1
----
2
5
7

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ALL cor0.col0 FROM tab1 cor0
----
3
64
80

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0 CROSS JOIN tab1, tab0, tab0 AS cor1
----
3645 values hashing to 78077727601c056ad0d4f4c11c8daffb

onlyif mysql # use DIV operator for integer division
query I rowsort label-2302
SELECT DISTINCT + + cor0.col0 + - col1 DIV - col1 + + cor0.col1 FROM tab0 AS cor0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-2302
SELECT DISTINCT + + cor0.col0 + - col1 / - col1 + + cor0.col1 FROM tab0 AS cor0
----
111
133
181

query I rowsort
SELECT + col1 * - col0 - col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL ( tab2.col1 ) FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT - col2 + + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 48 * - col2 + ( + 41 ) - - col0 FROM tab1 AS cor0
----
2636
2841
4729

query I rowsort
SELECT + col1 + col1 * - col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - + col2 + + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 87 * - col0 * 87 FROM tab2 AS cor0
----
52983
590382
597951

onlyif mysql # use DIV operator for integer division
query I rowsort label-2310
SELECT + ( col0 ) DIV - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2310
SELECT + ( col0 ) / - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2311
SELECT - col1 DIV - col1 + - col1 DIV - col0 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
58
63
97

skipif mysql # not compatible
query I rowsort label-2311
SELECT - col1 / - col1 + - col1 / - col0 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
58
63
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT col0 + col2 * + col0 + + 38 AS col1 FROM tab0
----
108
7425
854

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2314
SELECT ALL - CAST( NULL AS SIGNED ) - col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2314
SELECT ALL - CAST ( NULL AS INTEGER ) - col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * col0 + - 58 + col0 AS col0 FROM tab1
----
-217
-3642
-7658

query I rowsort
SELECT 85 + - tab2.col1 + + 7 FROM tab2
----
33
61
75

query I rowsort
SELECT DISTINCT + 62 + col0 FROM tab1 AS cor0
----
126
142
65

query I rowsort
SELECT - col0 + - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2319
SELECT - + cor0.col0 * - col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2319
SELECT - + cor0.col0 * - col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * col0 * cor0.col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT col2 * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + + 16 * - col1 AS col1 FROM tab1 AS cor0
----
-160
-208
-416

query I rowsort
SELECT ALL - 1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 58 * - col1 FROM tab1 AS cor0
----
-1508
-580
-754

query I rowsort
SELECT + + ( col2 ) + - 36 * - col1 FROM tab1 cor0
----
417
564
990

query I rowsort
SELECT ALL + col0 + + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL - cor0.col1 * + col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - 12 + col1 AS col1 FROM tab1 AS cor0
----
-2
1
14

query I rowsort
SELECT - + col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + + cor0.col1 * col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col2 * + 63 - col1 * - col2 FROM tab1
----
-1998
-3021
-4800

query I rowsort
SELECT col2 * col0 - + col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT cor0.col0 + col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - + 19 + 70 AS col1 FROM tab2 AS cor0
----
51
51
51

query I rowsort
SELECT col0 + 12 FROM tab0 AS cor0
----
101
36
47

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + col1 AS REAL ) + col0 + 44 AS col0 FROM tab2 AS cor0
----
140
181
82

query I rowsort
SELECT DISTINCT 61 AS col0 FROM tab0, tab2 AS cor0
----
61

query I rowsort
SELECT DISTINCT col0 * + col1 + col2 AS col1 FROM tab2
----
1381
244
4628

query I rowsort
SELECT + col1 + - 81 AS col1 FROM tab2 AS cor0
----
-22
-50
-64

query I rowsort
SELECT DISTINCT - 27 * - 99 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-237897
-64152
-93555

query I rowsort
SELECT DISTINCT + ( 6 ) + + col1 * 24 FROM tab2 cor0
----
1422
414
750

query I rowsort
SELECT ALL ( + col2 ) + + col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2343
SELECT ALL - col1 * col0 DIV col0 + + 56 DIV - col0 + + col0 FROM tab2 AS cor0
----
-32
19
62

skipif mysql # not compatible
query I rowsort label-2343
SELECT ALL - col1 * col0 / col0 + + 56 / - col0 + + col0 FROM tab2 AS cor0
----
-32
19
62

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 3eea7cef970c8ff51d71b8a23ee129bf

query I rowsort
SELECT ALL col1 + col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT ALL - - cor0.col2 * - 12 + - col2 FROM tab2 AS cor0
----
-338
-351
-494

query I rowsort
SELECT + + ( col0 ) * col1 FROM tab0 cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + 33 col0 FROM tab0 AS cor0
----
-2838
-3003
-3201

query I rowsort
SELECT + + col0 + - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - col2 + ( col1 ) FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2351
SELECT ALL - col0 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2351
SELECT ALL - col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * col1 + col0 * - col2 + + col2 FROM tab2 cor0
----
-2675
1479
799

query I rowsort
SELECT col0 - ( col0 ) AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT cor0.col2 - - col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + col0 * 23 AS col0 FROM tab1 AS cor0
----
1472
1840
69

query I rowsort
SELECT col2 + 44 FROM tab0 AS cor0
----
126
45
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2357
SELECT - cor0.col2 * CAST( + col0 AS SIGNED ) - + cor0.col0 FROM tab1 AS cor0
----
-165
-3712
-7760

skipif mysql # not compatible
query I rowsort label-2357
SELECT - cor0.col2 * CAST ( + col0 AS INTEGER ) - + cor0.col0 FROM tab1 AS cor0
----
-165
-3712
-7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + ( col2 ) - col1 col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - ( - col2 ) * + col1 + 15 AS col0 FROM tab1 AS cor0
----
1263
1419
585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 col2 FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT ALL + col1 + + tab0.col2 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + 53 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to fede6033dee346dbd272085c05724fda

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 cor1
----
243 values hashing to 4fe4780e49e612b93957f575d9b3e89f

query I rowsort
SELECT ALL - col2 * + col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 39 col2 FROM tab0 AS cor0
----
39

query I rowsort
SELECT DISTINCT - + col2 + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 cor0
----
-7
-78
-79

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) NOT IN ( - tab2.col2 )
----

query I rowsort
SELECT ALL - col0 + + col2 * - col1 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT - col1 * - col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 WHERE ( NULL ) >= NULL
----

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col0 ) NOT IN ( col1 )
----

query I rowsort
SELECT ALL - col1 * - col0 + + col0 AS col0 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2374
SELECT col1 DIV tab1.col2 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2374
SELECT col1 / tab1.col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col2 * + col1 FROM tab0 WHERE NOT NULL NOT IN ( - col0 )
----

query I rowsort
SELECT DISTINCT - col2 * col2 + + col1 AS col0 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT col1 + + col1 * col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT - 57 + col2 + 84 * + col2 FROM tab1
----
4533
4788
8103

query I rowsort
SELECT ALL col0 * + col0 AS col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT + col1 * - col2 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2381
SELECT DISTINCT + col0 DIV col2 AS col1 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-2381
SELECT DISTINCT + col0 / col2 AS col1 FROM tab1
----
0
1

query I rowsort
SELECT ALL + 46 - + col2 AS col0 FROM tab0
----
-36
13
45

query I rowsort
SELECT ALL col1 - + tab2.col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL col0 - col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL - col1 * col2 * - ( - ( col0 ) ) - 7 AS col0 FROM tab1
----
-36487
-4219
-99847

query I rowsort
SELECT ALL - - 8 AS col2 FROM tab0 AS cor0
----
8
8
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2387
SELECT ALL + col1 * col1 DIV col2 FROM tab1 AS cor0
----
1
1
12

skipif mysql # not compatible
query I rowsort label-2387
SELECT ALL + col1 * col1 / col2 FROM tab1 AS cor0
----
1
1
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT col2 + - col0 * 11 AS col1 FROM tab2
----
-50
-831
-832

onlyif mysql # use DIV operator for integer division
query I rowsort label-2390
SELECT DISTINCT + col1 DIV + col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-2390
SELECT DISTINCT + col1 / + col1 FROM tab1
----
1

query I rowsort
SELECT DISTINCT + col2 * tab2.col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL + col0 * - col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 col1 FROM tab0
----
92
92
92

query I rowsort
SELECT + 26 * - 40 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 1145dbd4e94bc92c0a653958a3815eb8

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1, tab0 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 72 FROM tab0, tab2 cor0, tab1 AS cor1
----
72

query I rowsort
SELECT 73 FROM tab0, tab0 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT DISTINCT - col0 * - 23 AS col2 FROM tab2
----
161
1794
1817

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 * col1 col1 FROM tab1
----
1000
17576
2197

query I rowsort
SELECT ( - tab0.col1 * tab0.col2 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 86c8e75d83d283b29460c020ab5988af

onlyif mysql # use DIV operator for integer division
query I rowsort label-2402
SELECT col2 DIV col2 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2402
SELECT col2 / col2 AS col1 FROM tab0 AS cor0
----
1
1
1

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 25b043ae64f25e8f205735b09d2d3d6a

query I rowsort
SELECT col0 * - col0 * + tab1.col1 AS col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT 71 AS col0 FROM tab2
----
71
71
71

query I rowsort
SELECT + 78 AS col0 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to f0487ba81d377516702723e098c02ba1

query I rowsort
SELECT ALL - ( col2 * col0 ) AS col0 FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2408
SELECT CAST( col2 AS SIGNED ) + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-2408
SELECT CAST ( col2 AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - - col2 * col2 + - col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT ALL 4 * col0 FROM tab0
----
140
356
96

query I rowsort
SELECT 99 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( - 24 ) * + col1 * + 96 col2 FROM tab1 AS cor0
----
-23040
-29952
-59904

query I rowsort
SELECT + + col2 + col1 * col1 + col0 * - col2 AS col0 FROM tab0 AS cor0
----
1065
6637
9375

query I rowsort
SELECT + + col1 + + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - 51 AS col0 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT - - cor0.col1 * + col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + 38 AS col1 FROM tab0 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 + - cor0.col2 col2 FROM tab2 AS cor0
----
-10
-11
-22

query I rowsort
SELECT 57 * col1 FROM tab2 cor0
----
1767
3363
969

onlyif mysql # use DIV operator for integer division
query I rowsort label-2420
SELECT - - 19 * col1 DIV ( col1 ) AS col0 FROM tab1 AS cor0
----
19
19
19

skipif mysql # not compatible
query I rowsort label-2420
SELECT - - 19 * col1 / ( col1 ) AS col0 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT col2 + + col0 * tab2.col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT col2 * cor0.col1 * col0 + + col2 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT + col0 * - ( + ( - col1 ) ) FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT + col0 * ( + col2 ) + + col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
15397
2856
3430

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab1 cor1, tab0 cor2
----
972 values hashing to 43f0c51511c8642d19190fd4dfcf905a

query I rowsort
SELECT - - col1 - cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - tab0.col0 * - col2 + col1 FROM tab0
----
132
7389
878

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + - col0 * col1 - col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT + 81 + - col2 FROM tab1 AS cor0
----
-15
24
27

query I rowsort
SELECT - col0 * cor0.col0 AS col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT + + col1 + + 41 FROM tab1 AS cor0
----
51
54
67

query I rowsort
SELECT + ( 66 ) FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT DISTINCT - 73 * col1 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1224
-2232
-4248

query I rowsort
SELECT DISTINCT col0 + 63 FROM tab1 AS cor0
----
127
143
66

query I rowsort
SELECT - col0 * col0 + col1 AS col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL - ( - col2 ) + + col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2439
SELECT DISTINCT + col1 DIV + cor0.col1 - col2 * + col1 FROM tab0 cor0
----
-2837
-7461
-96

skipif mysql # not compatible
query I rowsort label-2439
SELECT DISTINCT + col1 / + cor0.col1 - col2 * + col1 FROM tab0 cor0
----
-2837
-7461
-96

query I rowsort
SELECT - col0 * col0 + + cor0.col0 * + col0 * + 31 AS col2 FROM tab2 AS cor0
----
1470
182520
187230

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2441
SELECT + CAST( col0 AS SIGNED ) + + col0 AS col0 FROM tab2 cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-2441
SELECT + CAST ( col0 AS INTEGER ) + + col0 AS col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT ALL + 27 + 97 + - col1 AS col1 FROM tab1 AS cor0
----
111
114
98

query I rowsort
SELECT DISTINCT + - 7 - - col1 * col0 AS col2 FROM tab2 AS cor0
----
1336
210
4595

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2444
SELECT ALL + - CAST( - cor0.col1 AS SIGNED ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2444
SELECT ALL + - CAST ( - cor0.col1 AS INTEGER ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT cor0.col2 * - 61 + + cor0.col1 FROM tab0 cor0
----
-1927
-4911
36

query I rowsort
SELECT ALL + - 93 FROM tab2 AS cor0
----
-93
-93
-93

query I rowsort
SELECT - - ( + col0 ) * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + + col2 * + col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2449
SELECT 24 DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2449
SELECT 24 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - 77 * - col2 AS col1 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT - 92 FROM tab1
----
-92
-92
-92

query I rowsort
SELECT 13 * - cor0.col2 FROM tab1 cor0
----
-1248
-702
-741

query I rowsort
SELECT + + cor0.col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - cor0.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-2455
SELECT DISTINCT + col0 + CAST( + 26 AS SIGNED ) FROM tab0 cor0
----
115
50
61

skipif mysql # not compatible
query I rowsort label-2455
SELECT DISTINCT + col0 + CAST ( + 26 AS INTEGER ) FROM tab0 cor0
----
115
50
61

query I rowsort
SELECT col2 - + col0 AS col0 FROM tab2 cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 69 col2 FROM tab1 AS cor0
----
-207
-4416
-5520

query I rowsort
SELECT DISTINCT + col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2459
SELECT + cor0.col1 * cor0.col0 + cor0.col0 DIV col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2459
SELECT + cor0.col1 * cor0.col0 + cor0.col0 / col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - ( + ( cor0.col2 ) ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT DISTINCT - col0 + + ( 75 ) AS col0 FROM tab2 AS cor0
----
-3
-4
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-2462
SELECT col1 DIV + cor0.col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2462
SELECT col1 / + cor0.col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT ALL + col0 * col1 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + - cor0.col2 * ( + col0 ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col2 * + col2 AS col1 FROM tab0 cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2466
SELECT + col1 DIV col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2466
SELECT + col1 / col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - col0 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - col1 * 40 AS col0 FROM tab2 cor0
----
-1240
-2360
-680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2469
SELECT ALL col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2469
SELECT ALL col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col0 - col2 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2471
SELECT DISTINCT + col2 DIV col0 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2471
SELECT DISTINCT + col2 / col0 AS col1 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT col2 + 12 + + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-12
-571
-932

query I rowsort
SELECT DISTINCT col2 * + col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + col2 + + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col0 * - ( + col0 ) + cor0.col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT ALL + col1 * col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2477
SELECT ALL + col0 * CAST( - 78 AS SIGNED ) col1 FROM tab1 cor0
----
-234
-4992
-6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2477
SELECT ALL + col0 * CAST ( - 78 AS INTEGER ) col1 FROM tab1 cor0
----
-234
-4992
-6240

query I rowsort
SELECT col0 * - 6 FROM tab0 AS cor0
----
-144
-210
-534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2479
SELECT + + col2 * CAST( - col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2479
SELECT + + col2 * CAST ( - col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL cor0.col1 * col0 FROM tab2 cor0
----
1343
217
4602

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 cor1
----
243 values hashing to 9ed1a6a444254225f040123c46b7f70c

query I rowsort
SELECT ALL col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + 38 FROM tab1 AS cor0
----
38

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2485
SELECT col1 * 77 - col0 DIV + col0 FROM tab2 AS cor0
----
1308
2386
4542

skipif mysql # not compatible
query I rowsort label-2485
SELECT col1 * 77 - col0 / + col0 FROM tab2 AS cor0
----
1308
2386
4542

query I rowsort
SELECT DISTINCT tab1.col1 - - ( - col2 ) AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col2 * - ( - tab1.col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 31 * tab0.col1 FROM tab0, tab2 cor0
----
9 values hashing to aaf4bf26f5af8eaf7707f1be8a94e375

query I rowsort
SELECT DISTINCT - + cor1.col2 * ( - cor1.col1 ) AS col0 FROM tab1 cor0 CROSS JOIN tab0, tab1 AS cor1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + + 57 AS col2 FROM tab2 AS cor0
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ( + col0 ) * - col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - 1 AS col0 FROM tab2 AS cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2494
SELECT DISTINCT + cor0.col1 + + col0 * CAST( NULL AS DECIMAL ) AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2494
SELECT DISTINCT + cor0.col1 + + col0 * CAST ( NULL AS REAL ) AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL + 4 * col0 + col0 AS col0 FROM tab0 AS cor0
----
120
175
445

query I rowsort
SELECT 5 * - col1 AS col1 FROM tab2 AS cor0
----
-155
-295
-85

query I rowsort
SELECT + 20 * - col2 + col1 FROM tab1
----
-1054
-1130
-1907

query I rowsort
SELECT ALL - 65 FROM tab2
----
-65
-65
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-2499
SELECT ALL col2 DIV + col0 AS col1 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2499
SELECT ALL col2 / + col0 AS col1 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col1 ) col0 FROM tab2 cor0
----
17
31
59

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 ALL + 94 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT + 7 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT - ( + col2 ) FROM tab2 AS cor0
----
-26
-27
-38

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 0c9c9a26da1b45580001288543ac8dbe

query I rowsort
SELECT ( - col1 ) * - cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ( 34 ) + - col0 AS col2 FROM tab1
----
-30
-46
31

query I rowsort
SELECT DISTINCT - col0 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL + - col2 - - col1 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT 74 AS col1 FROM tab2 AS cor0
----
74
74
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2511
SELECT ALL CAST( 22 AS SIGNED ) * col1 + - 27 + - 89 * col0 FROM tab1 cor0
----
-5503
-6861
278

skipif mysql # not compatible
query I rowsort label-2511
SELECT ALL CAST ( 22 AS INTEGER ) * col1 + - 27 + - 89 * col0 FROM tab1 cor0
----
-5503
-6861
278

query I rowsort
SELECT + 41 FROM tab0 AS cor0
----
41
41
41

query I rowsort
SELECT DISTINCT col1 + col2 * col1 * + 28 FROM tab1 AS cor0
----
15970
34957
39338

query I rowsort
SELECT DISTINCT - - 86 AS col2 FROM tab1 AS cor0
----
86

query I rowsort
SELECT ALL + 24 FROM tab0 cor0
----
24
24
24

query I rowsort
SELECT + cor0.col0 * - col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - ( ( - col0 ) ) AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort
SELECT + - ( cor0.col2 ) - - CAST ( col2 AS REAL ) * col2 * - col1 AS col0 FROM tab1 AS cor0
----
-119904
-32547
-75870

query I rowsort
SELECT - + col2 * + col1 - + 19 * ( - col0 ) FROM tab2 AS cor0
----
-52
-704
855

query I rowsort
SELECT + cor0.col1 * + col2 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL col1 + - col0 AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL - + col2 + + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - 59 AS col0 FROM tab2
----
-59
-59
-59

query I rowsort
SELECT + - cor0.col2 FROM tab1, tab1 cor0, tab0, tab0 AS cor1
----
81 values hashing to 2df272448a67587d4635afedff278dcc

query I rowsort
SELECT 25 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT - col1 - col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT - - col1 * - col1 + + 62 FROM tab1 AS cor0
----
-107
-38
-614

onlyif mysql # use DIV operator for integer division
query I rowsort label-2530
SELECT DISTINCT - col1 * col2 DIV - 98 FROM tab1 AS cor0
----
12
14
5

skipif mysql # not compatible
query I rowsort label-2530
SELECT DISTINCT - col1 * col2 / - 98 FROM tab1 AS cor0
----
12
14
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2531
SELECT + col2 * col2 DIV - col1 AS col0 FROM tab1 AS cor0
----
-112
-324
-708

skipif mysql # not compatible
query I rowsort label-2531
SELECT + col2 * col2 / - col1 AS col0 FROM tab1 AS cor0
----
-112
-324
-708

query I rowsort
SELECT ALL + + col0 * + ( ( - col2 ) ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col1 * - col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - - col2 * col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - ( col0 * - 11 ) + col2 * tab2.col2 * col1 AS col0 FROM tab2
----
22676
25417
40742

onlyif mysql # use DIV operator for integer division
query I rowsort label-2536
SELECT - col0 DIV - ( col1 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2536
SELECT - col0 / - ( col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 * ( - col1 ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2538
SELECT DISTINCT - + col0 DIV ( + col2 ) FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2538
SELECT DISTINCT - + col0 / ( + col2 ) FROM tab0 cor0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2539
SELECT col1 + 10 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2539
SELECT col1 + 10 / cor0.col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - - col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + col0 - 51 FROM tab0 AS cor0
----
-16
-27
38

query I rowsort
SELECT 30 AS col1 FROM tab0 cor0
----
30
30
30

query I rowsort
SELECT + 18 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT + 95 FROM tab0, tab0 AS cor0
----
95

query I rowsort
SELECT ALL + col1 * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab2 AS cor0, tab2 cor1
----
972 values hashing to 617c9545df26d6d983e3967864e8e9e4

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab1 cor0, tab2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

query I rowsort
SELECT ALL 93 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT - + ( + col0 ) * col0 * + col1 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2550
SELECT CAST( NULL AS SIGNED ) * 63 * cor0.col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2550
SELECT CAST ( NULL AS INTEGER ) * 63 * cor0.col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + + cor0.col2 * col1 * col0 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT + col0 * - ( ( - col2 ) ) FROM tab0
----
35
7298
792

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab1, tab2 AS cor1
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT ALL + ( 25 ) * + tab0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ddbbad196d6cb93f9b5d0c5d288ae538

query I rowsort
SELECT + 83 AS col0 FROM tab0
----
83
83
83

query I rowsort
SELECT ALL + 16 * - col1 * - col2 AS col0 FROM tab2
----
10336
13392
24544

query I rowsort
SELECT ALL 96 FROM tab2, tab1 cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2558
SELECT CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2558
SELECT CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( - 30 ) * col2 * + col2 FROM tab1
----
-276480
-87480
-97470

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col2 col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT ALL + 52 FROM tab1, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2562
SELECT DISTINCT CAST( col2 + col2 AS SIGNED ) FROM tab1
----
108
114
192

skipif mysql # not compatible
query I rowsort label-2562
SELECT DISTINCT CAST ( col2 + col2 AS INTEGER ) FROM tab1
----
108
114
192

query I rowsort
SELECT tab0.col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col0 + tab2.col2 * - col1 AS col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT - 25 AS col1 FROM tab2
----
-25
-25
-25

query I rowsort
SELECT DISTINCT 26 + + col1 * 76 AS col2 FROM tab0
----
6562
6942
7398

query I rowsort
SELECT DISTINCT - col0 * tab1.col0 + ( + 44 ) FROM tab1
----
-4052
-6356
35

query I rowsort
SELECT DISTINCT + col2 + - col1 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT + 37 + col1 FROM tab2 AS cor0
----
54
68
96

query I rowsort
SELECT ALL + col0 + - col1 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2571
SELECT DISTINCT col0 DIV col2 + col1 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-2571
SELECT DISTINCT col0 / col2 + col1 FROM tab1
----
11
13
26

query I rowsort
SELECT - 74 AS col1 FROM tab1
----
-74
-74
-74

query I rowsort
SELECT ALL - col2 * - col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + col1 * 91 * col1 + col0 * col0 AS col1 FROM tab2 AS cor0
----
322855
32540
87500

query I rowsort
SELECT col1 + + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + col1 * col1 + col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT - col0 * + col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 * + col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT cor0.col2 * - col0 + - ( col2 ) AS col0 FROM tab0 AS cor0
----
-36
-7380
-825

skipif mysql # not compatible
query I rowsort
SELECT - col2 * - CAST ( col0 AS REAL ) + col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - + col2 + ( - 27 ) * + cor0.col0 AS col2 FROM tab0 AS cor0
----
-2485
-681
-946

query I rowsort
SELECT ALL cor0.col1 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col1 + 94 FROM tab2 cor0
----
111
125
153

query I rowsort
SELECT ALL - 69 + col1 FROM tab1 AS cor0
----
-43
-56
-59

query I rowsort
SELECT ALL col2 + cor0.col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + + 39 AS col2 FROM tab2 AS cor0
----
39
39
39

query I rowsort
SELECT - 38 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e8c064543bf0f2e57329db1bb0a411e3

query I rowsort
SELECT DISTINCT col2 + + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - 30 + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-192
-3678
-7710

query I rowsort
SELECT DISTINCT ( - col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + col0 + + col0 + - ( - col2 ) * col0 AS col2 FROM tab0 AS cor0
----
105
7476
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2592
SELECT - col2 DIV + col1 - col1 DIV col0 col1 FROM tab2 AS cor0
----
-2
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2592
SELECT - col2 / + col1 - col1 / col0 col1 FROM tab2 AS cor0
----
-2
-4
0

query I rowsort
SELECT col0 + col2 * col0 * col1 AS col1 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT ALL - 6 AS col2 FROM tab2
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col2 - tab1.col0 * col0 col2 FROM tab1
----
-4089
-60
-6416

onlyif mysql # use DIV operator for integer division
query I rowsort label-2596
SELECT - tab0.col0 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2596
SELECT - tab0.col0 / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT 16 - - cor0.col2 AS col1 FROM tab1 AS cor0
----
112
70
73

query I rowsort
SELECT - 44 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2600
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2600
SELECT ALL CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2601
SELECT DISTINCT + col0 DIV + col0 + + col2 AS col0 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-2601
SELECT DISTINCT + col0 / + col0 + + col2 AS col0 FROM tab1
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2602
SELECT cor0.col1 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2602
SELECT cor0.col1 / cor0.col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT col1 * col0 + col1 + + col0 * + col0 FROM tab2 cor0
----
10745
297
7601

query I rowsort
SELECT DISTINCT - ( 26 + + tab2.col0 ) AS col0 FROM tab2, tab2 AS cor0
----
-104
-105
-33

query I rowsort
SELECT DISTINCT + tab1.col2 + - col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT + col0 * + col2 - col0 * - col0 AS col1 FROM tab0
----
1260
1368
15219

query I rowsort
SELECT + col1 * - 4 FROM tab0
----
-344
-364
-388

onlyif mysql # use DIV operator for integer division
query I rowsort label-2608
SELECT - ( 6 ) + - cor0.col2 * 21 DIV + 91 FROM tab1 AS cor0
----
-18
-19
-28

skipif mysql # not compatible
query I rowsort label-2608
SELECT - ( 6 ) + - cor0.col2 * 21 / + 91 FROM tab1 AS cor0
----
-18
-19
-28

query I rowsort
SELECT - + ( + col2 ) * col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2610
SELECT 6 DIV + col2 + col1 AS col1 FROM tab0
----
103
86
91

skipif mysql # not compatible
query I rowsort label-2610
SELECT 6 / + col2 + col1 AS col1 FROM tab0
----
103
86
91

query I rowsort
SELECT - 87 FROM tab1
----
-87
-87
-87

query I rowsort
SELECT + col2 - - 30 FROM tab2
----
56
57
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - 12 col0 FROM tab1 AS cor0
----
42
45
84

query I rowsort
SELECT DISTINCT + - col1 + 28 * + col2 AS col1 FROM tab1 AS cor0
----
1486
1586
2675

query I rowsort
SELECT col2 * + 70 FROM tab0 AS cor0
----
2310
5740
70

query I rowsort
SELECT DISTINCT + col2 + + ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL 96 * cor0.col2 FROM tab0 AS cor0
----
3168
7872
96

query I rowsort
SELECT + 45 FROM tab1 AS cor0
----
45
45
45

query I rowsort
SELECT ALL ( tab2.col0 ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT col2 * + 66 FROM tab1 AS cor0
----
3564
3762
6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-2621
SELECT DISTINCT - col0 DIV - 78 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2621
SELECT DISTINCT - col0 / - 78 FROM tab0 AS cor0
----
0
1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab0 cor1, tab0, tab0 AS cor2
----
3645 values hashing to 2270901c73a658a63f841c68db8155ba

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2, tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 + 19 * - col1 col2 FROM tab2 AS cor0
----
-1043
-244
-582

query I rowsort
SELECT DISTINCT + 37 - - 93 FROM tab0 AS cor0
----
130

query I rowsort
SELECT DISTINCT + - cor0.col1 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col2 * - col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col1 + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col1 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT 51 + + col0 * col0 FROM tab0 AS cor0
----
1276
627
7972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 - + cor0.col0 col2 FROM tab0 cor0
----
-7420
-8370
-9444

query I rowsort
SELECT - - 86 AS col0 FROM tab0 AS cor0
----
86
86
86

query I rowsort
SELECT 42 + - col2 * ( cor0.col0 ) * col2 FROM tab0 AS cor0
----
-26094
-598394
7

query I rowsort
SELECT DISTINCT - + cor0.col2 + - col2 * + col0 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL - col0 * + col2 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col2 * - col1 + col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT 1 AS col0 FROM tab1
----
1

query I rowsort
SELECT - ( tab0.col2 * col0 ) - - tab0.col2 * - col1 AS col0 FROM tab0
----
-132
-14760
-3630

query I rowsort
SELECT - col2 * - col2 + + col1 * + col0 AS col2 FROM tab2
----
2787
5278
946

query I rowsort
SELECT col2 * + cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL - 62 * - cor0.col1 + col2 FROM tab1 AS cor0
----
1666
677
902

query I rowsort
SELECT DISTINCT col1 * + col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col2 + - cor0.col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2646
SELECT DISTINCT 17 DIV col0 + - col2 * - 46 FROM tab2 AS cor0
----
1196
1244
1748

skipif mysql # not compatible
query I rowsort label-2646
SELECT DISTINCT 17 / col0 + - col2 * - 46 FROM tab2 AS cor0
----
1196
1244
1748

query I rowsort
SELECT ALL + + 61 - - col1 FROM tab0 cor0
----
147
152
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2648
SELECT ALL cor0.col1 * - CAST( NULL AS SIGNED ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2648
SELECT ALL cor0.col1 * - CAST ( NULL AS INTEGER ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - cor0.col2 * 30 * - col1 FROM tab1 AS cor0
----
-17100
-37440
-42120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2650
SELECT ALL + - cor0.col1 DIV col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2650
SELECT ALL + - cor0.col1 / col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + + col0 * + 64 + col1 AS col0 FROM tab2 cor0
----
479
5051
5073

query I rowsort
SELECT + cor0.col0 + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - + col2 * + 87 AS col1 FROM tab2 AS cor0
----
-2262
-2349
-3306

onlyif mysql # use DIV operator for integer division
query I rowsort label-2654
SELECT - col2 * ( tab1.col0 ) DIV - tab1.col0 + 95 FROM tab1
----
149
152
191

skipif mysql # not compatible
query I rowsort label-2654
SELECT - col2 * ( tab1.col0 ) / - tab1.col0 + 95 FROM tab1
----
149
152
191

query I rowsort
SELECT ALL col1 * + col1 + + col1 * col1 AS col2 FROM tab0
----
14792
16562
18818

query I rowsort
SELECT + col1 + 85 FROM tab2 AS cor0
----
102
116
144

query I rowsort
SELECT - col1 + col1 + cor0.col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + - col2 + col2 * col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL - cor0.col1 + + col0 * 84 FROM tab2 AS cor0
----
557
6493
6619

skipif mysql # not compatible
query I rowsort
SELECT - col0 + + CAST ( + col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 - 65 FROM tab2 AS cor0
----
-27
-38
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-2662
SELECT DISTINCT - + col1 DIV 44 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2662
SELECT DISTINCT - + col1 / 44 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT col2 + + col1 + - col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL col2 * - 98 * - col1 FROM tab2 AS cor0
----
150332
63308
82026

query I rowsort
SELECT DISTINCT - - col2 * - col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2666
SELECT - - col2 * 25 + col1 DIV col1 + + col2 FROM tab2 AS cor0
----
677
703
989

skipif mysql # not compatible
query I rowsort label-2666
SELECT - - col2 * 25 + col1 / col1 + + col2 FROM tab2 AS cor0
----
677
703
989

query I rowsort
SELECT ALL - - col1 AS col1 FROM tab1 AS cor0
----
10
13
26

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab2 cor2
----
972 values hashing to 82def1c3361e635dd4cf447edc22edb9

query I rowsort
SELECT DISTINCT + col0 + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col1 + ( - col0 ) FROM tab2
----
-137
-38
-96

query I rowsort
SELECT cor0.col2 * - col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + ( 27 ) * col0 FROM tab0 cor0
----
2403
648
945

query I rowsort
SELECT ALL 74 + - col2 AS col2 FROM tab2 AS cor0
----
36
47
48

query I rowsort
SELECT ALL + col0 * 30 + + cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
1085
1512
9968

query I rowsort
SELECT ALL + tab2.col2 + col0 * - col2 AS col1 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT ALL col0 * - 94 + 2 FROM tab2
----
-656
-7330
-7424

query I rowsort
SELECT - col0 + tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 25 + col0 AS col0 FROM tab2
----
103
104
32

query I rowsort
SELECT col2 * + col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col0 * + 37 AS col1 FROM tab1 cor0
----
111
2368
2960

query I rowsort
SELECT + col2 * ( 10 ) FROM tab0 AS cor0
----
10
330
820

query I rowsort
SELECT DISTINCT + 82 * col2 AS col0 FROM tab1
----
4428
4674
7872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 + cor0.col1 col0 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 40ab1683067aa5ee46f24935184fb5ad

query I rowsort
SELECT + 27 AS col0 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT + col0 * + col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT + 99 FROM tab2
----
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2687
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2687
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT - + col0 * 12 AS col1 FROM tab2 cor0
----
-84
-936
-948

query I rowsort
SELECT + col0 * - 37 FROM tab1 AS cor0
----
-111
-2368
-2960

query I rowsort
SELECT ALL - - col2 AS col1 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - - col0 * - col2 + + col1 + - col2 * col0 FROM tab1 AS cor0
----
-15347
-298
-7286

query I rowsort
SELECT DISTINCT cor0.col1 * 58 FROM tab1 AS cor0
----
1508
580
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-2693
SELECT DISTINCT col1 * ( col2 ) + cor0.col0 DIV col0 AS col0 FROM tab0 AS cor0
----
2839
7463
98

skipif mysql # not compatible
query I rowsort label-2693
SELECT DISTINCT col1 * ( col2 ) + cor0.col0 / col0 AS col0 FROM tab0 AS cor0
----
2839
7463
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL - - 93 - + 9 AS col0 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT DISTINCT + col0 * - col2 + col2 * col0 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2698
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + - 90 * + col2 + 79 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2698
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + - 90 * + col2 + 79 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 61 + + col2 AS col1 FROM tab2 AS cor0
----
87
88
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2700
SELECT ALL + CAST( - col2 AS SIGNED ) col0 FROM tab0 cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2700
SELECT ALL + CAST ( - col2 AS INTEGER ) col0 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2701
SELECT DISTINCT + col0 + - col1 * col0 DIV + ( col1 ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2701
SELECT DISTINCT + col0 + - col1 * col0 / + ( col1 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL ( col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - 3 * col0 + cor0.col1 FROM tab0 AS cor0
----
158
202
358

query I rowsort
SELECT DISTINCT col2 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col0 * - col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 + + col1 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + - ( + col0 ) + col0 * - ( + ( - col2 ) ) * col1 + col2 AS col1 FROM tab1 AS cor0
----
36473
4263
99856

query I rowsort
SELECT ALL ( col1 ) * - col2 - - col2 * - col2 AS col0 FROM tab2 AS cor0
----
-1566
-2090
-2210

query I rowsort
SELECT - cor0.col1 * col1 AS col0 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL 58 + + col2 AS col1 FROM tab0 AS cor0
----
140
59
91

query I rowsort
SELECT DISTINCT + 43 * cor0.col1 FROM tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT - ( col0 ) + - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2713
SELECT DISTINCT - cor0.col2 DIV col0 + + cor0.col0 FROM tab1 AS cor0
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-2713
SELECT DISTINCT - cor0.col2 / col0 + + cor0.col0 FROM tab1 AS cor0
----
-15
64
79

query I rowsort
SELECT ALL + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT col2 + + cor0.col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + 66 FROM tab0
----
66
66
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-2717
SELECT ALL cor0.col0 DIV col0 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-2717
SELECT ALL cor0.col0 / col0 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT + + col0 + col2 * col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT 2 * + col0 - + tab2.col2 AS col0 FROM tab2
----
-13
120
130

query I rowsort
SELECT - 33 * - col0 * - col2 FROM tab1
----
-120384
-253440
-5346

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT col2 * col0 + ( col1 ) FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT + + col1 * - col2 + + 35 AS col0 FROM tab1 cor0
----
-1213
-1369
-535

onlyif mysql # use DIV operator for integer division
query I rowsort label-2724
SELECT col2 DIV col1 + ( col2 * col2 ) + - col2 FROM tab2 AS cor0
----
1408
650
702

skipif mysql # not compatible
query I rowsort label-2724
SELECT col2 / col1 + ( col2 * col2 ) + - col2 FROM tab2 AS cor0
----
1408
650
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-2725
SELECT ALL col2 DIV - ( col0 ) + + col2 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-2725
SELECT ALL col2 / - ( col0 ) + + col2 FROM tab1 AS cor0
----
36
57
95

query I rowsort
SELECT 31 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT ALL + 91 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT + cor0.col1 * - 24 AS col2 FROM tab0 AS cor0
----
-2064
-2184
-2328

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2729
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-2729
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT - 96 AS col2 FROM tab1 AS cor0
----
-96
-96
-96

query I rowsort
SELECT - + 81 * - 47 * col2 AS col0 FROM tab2 AS cor0
----
102789
144666
98982

query I rowsort
SELECT col2 * - 9 - - col1 AS col1 FROM tab0 AS cor0
----
-211
-647
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2733
SELECT - + col2 DIV + col0 + - col2 FROM tab0 AS cor0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-2733
SELECT - + col2 / + col0 + - col2 FROM tab0 AS cor0
----
-1
-34
-82

query I rowsort
SELECT + + ( - col2 ) + col1 * ( + col1 ) FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-2735
SELECT DISTINCT tab2.col0 * ( col0 ) DIV + col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2735
SELECT DISTINCT tab2.col0 * ( col0 ) / + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT col1 * 64 AS col1 FROM tab2 AS cor0
----
1088
1984
3776

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 95cc5fe1844e2fb00b447bbee94ccc5e

query I rowsort
SELECT ALL 0 * - 56 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 79 ) col2 FROM tab2
----
-79

query I rowsort
SELECT + col1 * col0 - ( col1 ) AS col2 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-2741
SELECT 65 DIV - 26 + - col1 * + tab1.col1 FROM tab1
----
-102
-171
-678

skipif mysql # not compatible
query I rowsort label-2741
SELECT 65 / - 26 + - col1 * + tab1.col1 FROM tab1
----
-102
-171
-678

query I rowsort
SELECT DISTINCT - 8 FROM tab0, tab2 AS cor0
----
-8

query I rowsort
SELECT ALL 4 * - col2 * col0 AS col2 FROM tab0
----
-140
-29192
-3168

onlyif mysql # use DIV operator for integer division
query I rowsort label-2744
SELECT col0 DIV - tab2.col1 AS col0 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-2744
SELECT col0 / - tab2.col1 AS col0 FROM tab2
----
-1
-4
0

query I rowsort
SELECT 98 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + 22 col0 FROM tab1 AS cor0
----
102
25
86

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - col0 * + col1 * - col2 AS col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT - 72 * + col1 FROM tab0
----
-6192
-6552
-6984

query I rowsort
SELECT DISTINCT - 70 AS col2 FROM tab2
----
-70

query I rowsort
SELECT ALL - 67 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 95c9eba643f6489e03be4d5e83f1ef99

query I rowsort
SELECT ( + ( + col2 ) ) FROM tab0
----
1
33
82

query I rowsort
SELECT col1 * - col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + 74 AS col1 FROM tab1
----
74
74
74

query I rowsort
SELECT DISTINCT 90 * + col1 * - col0 FROM tab0
----
-185760
-305550
-728910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 col0 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT col1 + col1 * col0 * col0 FROM tab2 AS cor0
----
106114
1550
359015

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 WHERE NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT + - col0 * + col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col1 * + col1 AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1, tab2, tab0 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col2 * col1 * + col2 FROM tab1
----
-119808
-32490
-75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col1 col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2765
SELECT - col0 DIV + cor0.col0 + + col0 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-2765
SELECT - col0 / + cor0.col0 + + col0 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT ALL - col2 * col1 - col1 FROM tab2 AS cor0
----
-1593
-663
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT col1 * col1 * + col0 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT - col1 - + col0 AS col2 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT - col0 * col1 - + col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + 43 + - cor0.col0 * col1 FROM tab1 AS cor0
----
-35
-597
-997

onlyif mysql # use DIV operator for integer division
query I rowsort label-2772
SELECT ALL - 68 DIV col0 col1 FROM tab1 AS cor0
----
-1
-22
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2772
SELECT ALL - 68 / col0 col1 FROM tab1 AS cor0
----
-1
-22
0

query I rowsort
SELECT ALL + 1 * tab2.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT - + ( col1 ) * + col2 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL + 64 * - col0 FROM tab0 AS cor0
----
-1536
-2240
-5696

query I rowsort
SELECT - 64 * col2 FROM tab1 AS cor0
----
-3456
-3648
-6144

query I rowsort
SELECT tab0.col2 * + 67 FROM tab0
----
2211
5494
67

query I rowsort
SELECT ALL - ( col1 ) AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ( + col1 + + col2 ) FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - tab0.col0 * col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + col0 * + cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - col2 + col1 * - col1 FROM tab0 cor0
----
-7429
-8363
-9410

query I rowsort
SELECT - col2 + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT + - 42 * col2 FROM tab1 cor0
----
-2268
-2394
-4032

query I rowsort
SELECT ALL - col0 * col2 * col0 AS col0 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT - col2 + + col0 * + col1 - tab0.col1 FROM tab0
----
1945
3297
7926

query I rowsort
SELECT ALL col0 * - col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL + col0 * col0 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col2 col1 FROM tab2
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL + col0 * col0 * + col2 FROM tab2
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2792
SELECT + col2 DIV - col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2792
SELECT + col2 / - col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 - - col2 FROM tab1
----
109
67
80

query I rowsort
SELECT col1 + + col0 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT col2 * - col1 AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - col0 * + col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col1 + - col1 + + col1 * cor0.col2 FROM tab0 AS cor0
----
-97
2666
7280

query I rowsort
SELECT col1 + tab0.col1 - + col1 * tab0.col1 * + col1 FROM tab0
----
-635884
-753389
-912479

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( NULL ) IN ( - col0 )
----

query I rowsort
SELECT ALL + col0 * - col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col0 * + col1 * col2 + tab0.col0 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT ALL + col1 FROM tab1 WHERE NULL > ( - col0 )
----

query I rowsort
SELECT ALL - col1 * tab1.col2 - - col2 AS col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT - col1 - col1 * - tab0.col2 AS col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 WHERE ( col1 ) IN ( col2 )
----

query I rowsort
SELECT DISTINCT tab1.col1 - col0 FROM tab1
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col1 FROM tab0
----
24
35
89

query I rowsort
SELECT col0 * - col2 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 * + col1 - - col0 col0 FROM tab1
----
13600
2031
6464

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( NULL ) IN ( - tab0.col0 )
----

query I rowsort
SELECT col1 * tab1.col1 FROM tab1
----
100
169
676

query I rowsort
SELECT + col0 * + col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT col1 + tab1.col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT col2 - - tab1.col2 AS col0 FROM tab1 WHERE NOT col1 / col2 NOT BETWEEN ( col0 ) AND - col0 * col1 + - col0 * col0 / + col0
----

query I rowsort
SELECT - col0 / - col0 AS col0 FROM tab1 WHERE NULL < + col2
----

query I rowsort
SELECT ALL - col2 FROM tab2 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT col2 * col2 + + col1 FROM tab2
----
1461
735
760

query III rowsort
SELECT * FROM tab1 WHERE NOT + col2 * - col2 * + col2 IN ( col2 + col2 / - col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT - col0 + - tab2.col0 AS col2 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT ALL + tab1.col1 * col2 + col2 * col1 * col2 AS col0 FROM tab1
----
121056
33060
77220

query I rowsort
SELECT - col2 - + tab2.col2 * tab2.col2 FROM tab2
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT + col1 + + col1 AS col0 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * cor0.col2 col0 FROM tab2 cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-2824
SELECT col0 DIV col1 + col0 * + col0 FROM tab2
----
49
6085
6245

skipif mysql # not compatible
query I rowsort label-2824
SELECT col0 / col1 + col0 * + col0 FROM tab2
----
49
6085
6245

query I rowsort
SELECT ALL col2 + col2 AS col1 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL + col1 + + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - cor0.col0 * - cor0.col0 - + col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT cor0.col1 + col1 AS col0 FROM tab2 cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2829
SELECT ALL + cor0.col0 DIV col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-2829
SELECT ALL + cor0.col0 / col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT col1 * cor0.col1 - - col1 AS col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT col1 * col2 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * + col0 col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + cor0.col0 - col2 * col1 * + col0 FROM tab2 AS cor0
----
-119574
-50955
-5852

query I rowsort
SELECT + - col2 - col0 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2835
SELECT - col2 * - col1 + col0 DIV col0 FROM tab2 AS cor0
----
1535
647
838

skipif mysql # not compatible
query I rowsort label-2835
SELECT - col2 * - col1 + col0 / col0 FROM tab2 AS cor0
----
1535
647
838

query I rowsort
SELECT - cor0.col1 * + col1 + - col1 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT - col2 * col1 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + col2 - col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col2 * + col1 + cor0.col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL col2 * col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + cor0.col1 + - col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL - col0 - + col2 * cor0.col2 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT col0 + col2 * col2 FROM tab2
----
1523
736
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - col0 col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT col1 - + col1 * col1 AS col2 FROM tab0
----
-7310
-8190
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-2848
SELECT DISTINCT - col1 * - col1 DIV - col1 - col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

skipif mysql # not compatible
query I rowsort label-2848
SELECT DISTINCT - col1 * - col1 / - col1 - col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT col0 + - col2 / - cor0.col2 AS col1 FROM tab1 AS cor0 WHERE - col0 * cor0.col1 + + col1 * col0 * - col0 BETWEEN ( NULL ) AND + col1 * col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2850
SELECT - cor0.col1 DIV col1 + - col2 AS col0 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-2850
SELECT - cor0.col1 / col1 + - col2 AS col0 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT ( + col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - 26 FROM tab2 AS cor0
----
-26

query I rowsort
SELECT + + col0 * + col2 * cor0.col1 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2854
SELECT DISTINCT + + 90 DIV ( - col1 ) AS col1 FROM tab1 AS cor0
----
-3
-6
-9

skipif mysql # not compatible
query I rowsort label-2854
SELECT DISTINCT + + 90 / ( - col1 ) AS col1 FROM tab1 AS cor0
----
-3
-6
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 90 col1 FROM tab1 AS cor0
----
-90
-90
-90

query I rowsort
SELECT col0 * - 98 FROM tab2 cor0
----
-686
-7644
-7742

query I rowsort
SELECT DISTINCT - 0 * + col2 * + col2 AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2858
SELECT - col1 * col1 + + col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
-101
-170
-677

skipif mysql # not compatible
query I rowsort label-2858
SELECT - col1 * col1 + + col1 / - col1 AS col2 FROM tab1 AS cor0
----
-101
-170
-677

query I rowsort
SELECT + col0 * col1 * 36 + + col2 + ( + ( tab1.col2 ) * - col2 ) FROM tab1
----
-54
19848
28320

query I rowsort
SELECT + 78 FROM tab2, tab0 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT + + 24 * col1 + col0 * - 10 FROM tab0 AS cor0
----
1294
1824
1978

query I rowsort
SELECT - ( cor0.col0 ) FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT col0 - col1 AS col2 FROM tab0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 col0 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2865
SELECT tab1.col1 DIV + cor0.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2865
SELECT tab1.col1 / + cor0.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT ALL col2 * 94 FROM tab0
----
3102
7708
94

query I rowsort
SELECT ALL col1 * + col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - + ( - 92 ) + - col0 * ( col1 ) FROM tab2 AS cor0
----
-125
-1251
-4510

query I rowsort
SELECT col0 + + 69 * col2 AS col1 FROM tab1 AS cor0
----
3729
3997
6704

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2871
SELECT ALL - CAST( + ( col2 ) AS SIGNED ) * + col2 - col2 * col2 FROM tab2 AS cor0
----
-1352
-1458
-2888

skipif mysql # not compatible
query I rowsort label-2871
SELECT ALL - CAST ( + ( col2 ) AS INTEGER ) * + col2 - col2 * col2 FROM tab2 AS cor0
----
-1352
-1458
-2888

query I rowsort
SELECT + 95 AS col0 FROM tab1 AS cor0
----
95
95
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2873
SELECT DISTINCT - col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2873
SELECT DISTINCT - col0 / + col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL + + ( col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - + ( col1 ) * cor0.col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT 23 * col2 AS col1 FROM tab2 cor0
----
598
621
874

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2877
SELECT + CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2877
SELECT + CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( tab0.col2 ) * - col1 FROM tab0
----
2838
7462
97

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0 CROSS JOIN tab1
----
243 values hashing to 89e3b35a4a4f02d7b83645addb9dcdc3

query I rowsort
SELECT ( - col0 + col1 ) * + col1 * + 77 FROM tab2
----
-81158
-86317
57288

query I rowsort
SELECT col0 + - col2 - col1 AS col0 FROM tab1 cor0
----
-29
-3
-77

query I rowsort
SELECT DISTINCT + ( col2 * col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2885
SELECT DISTINCT tab2.col2 DIV + 22 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-2885
SELECT DISTINCT tab2.col2 / + 22 FROM tab2
----
1

query I rowsort
SELECT DISTINCT cor0.col2 + 78 FROM tab1 AS cor0
----
132
135
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + ( col1 ) * - col1 col0 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT ALL 55 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL - col2 * - ( col2 ) AS col1 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-2890
SELECT - + cor0.col2 * - col1 + col1 * col0 DIV cor0.col1 FROM tab2 AS cor0
----
1612
725
844

skipif mysql # not compatible
query I rowsort label-2890
SELECT - + cor0.col2 * - col1 + col1 * col0 / cor0.col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-2891
SELECT DISTINCT + 81 DIV cor0.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
1
27

skipif mysql # not compatible
query I rowsort label-2891
SELECT DISTINCT + 81 / cor0.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
1
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - col2 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 72 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # use DIV operator for integer division
query I rowsort label-2894
SELECT ALL + + col1 * - cor0.col2 + 77 DIV col0 FROM tab0 AS cor0
----
-2835
-7462
-95

skipif mysql # not compatible
query I rowsort label-2894
SELECT ALL + + col1 * - cor0.col2 + 77 / col0 FROM tab0 AS cor0
----
-2835
-7462
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2895
SELECT ALL - col2 + + CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2895
SELECT ALL - col2 + + CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * - col1 - + 38 * - col0 FROM tab1 AS cor0
----
192
3072
4080

query I rowsort
SELECT col1 + 83 * col0 AS col0 FROM tab0 AS cor0
----
2078
3002
7478

query I rowsort
SELECT + + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col2 * ( + 74 ) AS col1 FROM tab2
----
1924
1998
2812

query I rowsort
SELECT ALL - col2 + - col1 - - col0 * col1 FROM tab1 AS cor0
----
-2
573
931

query I rowsort
SELECT + + col1 + 83 AS col0 FROM tab0 AS cor0
----
169
174
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - col1 col2 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT - - col2 + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col0 * 8 + - col1 * col2 * - col1 AS col1 FROM tab0 AS cor0
----
244260
679754
9689

query I rowsort
SELECT col0 * - col0 + col2 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT col0 + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - + 44 FROM tab2 AS cor0
----
-44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2909
SELECT ALL col0 + + col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2909
SELECT ALL col0 + + col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col0 + - col1 AS col2 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT 83 FROM tab0 AS cor0
----
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 97 col2 FROM tab2
----
97

query I rowsort
SELECT ( col1 + + ( + col0 ) ) AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT - + 29 AS col1 FROM tab2 AS cor0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - ( 44 ) FROM tab2, tab1 cor0, tab2 cor1
----
-44

query I rowsort
SELECT ( cor0.col1 ) * + 46 FROM tab2 AS cor0
----
1426
2714
782

query I rowsort
SELECT col1 * col0 * col1 FROM tab1 cor0
----
13520
2028
6400

query I rowsort
SELECT cor0.col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 + - 47 * 10 FROM tab2 cor0
----
-411
-439
-453

query I rowsort
SELECT + col1 + 72 FROM tab0 AS cor0
----
158
163
169

query I rowsort
SELECT cor0.col0 * + col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - ( tab0.col2 + col2 ) FROM tab0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT 26 * col0 + col0 + - tab2.col1 FROM tab2
----
158
2047
2116

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 25 col1 FROM tab0 cor0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT 4 FROM tab0 AS cor0
----
4

query I rowsort
SELECT DISTINCT - - col0 * + col0 + cor0.col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL cor0.col0 * - col1 - - cor0.col2 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT + + col1 * col2 + + 97 FROM tab1 AS cor0
----
1345
1501
667

onlyif mysql # use DIV operator for integer division
query I rowsort label-2929
SELECT DISTINCT ( col2 ) DIV col1 + + col1 * + cor0.col0 AS col2 FROM tab2 cor0
----
1345
217
4602

skipif mysql # not compatible
query I rowsort label-2929
SELECT DISTINCT ( col2 ) / col1 + + col1 * + cor0.col0 AS col2 FROM tab2 cor0
----
1345
217
4602

query I rowsort
SELECT + - cor0.col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT cor0.col1 + - col0 * 33 FROM tab0 AS cor0
----
-1058
-2846
-706

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2932
SELECT 24 + col1 * + CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
102
1064
664

skipif mysql # not compatible
query I rowsort label-2932
SELECT 24 + col1 * + CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
102
1064
664

query I rowsort
SELECT - - col0 * + col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col0 + col1 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - col1 * 50 AS col1 FROM tab0 AS cor0
----
-4300
-4550
-4850

query I rowsort
SELECT ALL 28 FROM tab1, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT DISTINCT 81 FROM tab1, tab1 AS cor0
----
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2938
SELECT ALL - col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2938
SELECT ALL - col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + - ( - 3 * - cor0.col0 ) col1 FROM tab2 AS cor0
----
-260
-275
-48

query I rowsort
SELECT - col2 + col0 AS col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT + - cor0.col0 * col0 - col2 AS col0 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT ALL col2 + + tab0.col0 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL - 67 AS col2 FROM tab0 AS cor0
----
-67
-67
-67

query I rowsort
SELECT ALL - - cor0.col2 * - ( + col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 92 * + 54 FROM tab0 AS cor0
----
4968
4968
4968

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 04d825fa29899c3ee2704c26a542267d

query I rowsort
SELECT + - col1 + col1 * + col2 AS col0 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT 8 FROM tab0 AS cor0
----
8

query I rowsort
SELECT col2 * col1 - cor0.col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-2951
SELECT + ( + col1 ) DIV col2 + col0 FROM tab0 cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-2951
SELECT + ( + col1 ) / col2 + col0 FROM tab0 cor0
----
132
26
90

query I rowsort
SELECT ALL - col0 + - cor0.col0 + col1 AS col2 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT DISTINCT col1 * col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab0, tab1 AS cor0
----
-1

query I rowsort
SELECT ( col1 ) AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ( col2 ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + 41 AS col2 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT + col1 * cor0.col2 + - 79 * 65 FROM tab0 AS cor0
----
-2297
-5038
2327

query I rowsort
SELECT DISTINCT col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 44 + + col0 + + col2 * cor0.col0 FROM tab2 AS cor0
----
152
2062
3037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( + col1 ) + - 95 col2 FROM tab0 AS cor0
----
-181
-186
-192

query I rowsort
SELECT + col2 + + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL col0 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT 44 + - col0 FROM tab2
----
-34
-35
37

query I rowsort
SELECT ALL ( + col2 ) * col2 - - 41 * 70 AS col0 FROM tab0
----
2871
3959
9594

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2966
SELECT ALL + CAST( + col1 AS SIGNED ) - - col2 * - col1 AS col1 FROM tab1
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort label-2966
SELECT ALL + CAST ( + col1 AS INTEGER ) - - col2 * - col1 AS col1 FROM tab1
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 + + col1 col1 FROM tab1
----
30
33
46

query I rowsort
SELECT 5 + - col2 FROM tab2
----
-21
-22
-33

query I rowsort
SELECT DISTINCT 7 FROM tab1, tab1 AS cor0
----
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2970
SELECT ALL - CAST( col2 AS SIGNED ) * + tab2.col1 FROM tab2
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-2970
SELECT ALL - CAST ( col2 AS INTEGER ) * + tab2.col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL - col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + - 93 AS col0 FROM tab2 AS cor0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT col0 * col2 - col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ( - cor0.col1 ) FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2975
SELECT DISTINCT - + cor0.col1 + cor0.col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2975
SELECT DISTINCT - + cor0.col1 + cor0.col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col2 + + col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 * col0 + ( 71 ) col2 FROM tab2
----
1394
158255
237229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT col1 - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + tab0.col1 + - col2 FROM tab0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2981
SELECT - - col2 / CAST( NULL AS DECIMAL ) + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2981
SELECT - - col2 / CAST ( NULL AS REAL ) + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + + col0 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT + col2 - - col1 * - 96 AS col1 FROM tab0 AS cor0
----
-8223
-8654
-9311

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 + - col1 * col0 col1 FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT - col2 * col1 + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + cor0.col2 * cor0.col0 * col1 + col2 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT tab1.col1 + - col1 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2988
SELECT ALL col2 DIV + 27 AS col0 FROM tab1 AS cor0
----
2
2
3

skipif mysql # not compatible
query I rowsort label-2988
SELECT ALL col2 / + 27 AS col0 FROM tab1 AS cor0
----
2
2
3

query I rowsort
SELECT ALL 61 AS col2 FROM tab2 AS cor0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL ( 59 ) AS col2 FROM tab2 cor0
----
59
59
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2992
SELECT DISTINCT - - CAST( + col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2992
SELECT DISTINCT - - CAST ( + col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2993
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + 29 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2993
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + 29 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT 88 AS col2 FROM tab2 AS cor0
----
88
88
88

query I rowsort
SELECT ALL - col2 + + col0 * + col0 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT - - col2 + 54 FROM tab1 AS cor0
----
108
111
150

query I rowsort
SELECT ALL cor1.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2998
SELECT + col0 DIV + col2 - col2 AS col0 FROM tab0 AS cor0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-2998
SELECT + col0 / + col2 - col2 AS col0 FROM tab0 AS cor0
----
-33
-81
34

query I rowsort
SELECT - ( - col2 ) * col1 * + col0 + col1 * col2 FROM tab0
----
3492
671580
70950

query I rowsort
SELECT ALL + 74 + - cor0.col0 AS col1 FROM tab1 AS cor0
----
-6
10
71

query I rowsort
SELECT - + 25 + - col0 AS col1 FROM tab2 AS cor0
----
-103
-104
-32

query I rowsort
SELECT ALL + col2 * - 30 FROM tab2 AS cor0
----
-1140
-780
-810

query I rowsort
SELECT DISTINCT + col1 * + col2 * col0 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT 83 + + col1 * + col1 AS col0 FROM tab2 cor0
----
1044
3564
372

query I rowsort
SELECT DISTINCT - - 68 FROM tab2 AS cor0
----
68

query I rowsort
SELECT DISTINCT + - cor0.col2 + col0 * + col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT ALL - col0 * col2 * col1 AS col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL + ( + col0 ) * - col2 * col0 AS col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT 55 * col0 AS col2 FROM tab2 AS cor0
----
385
4290
4345

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3010
SELECT DISTINCT + - CAST( 88 AS SIGNED ) FROM tab1 AS cor0
----
-88

skipif mysql # not compatible
query I rowsort label-3010
SELECT DISTINCT + - CAST ( 88 AS INTEGER ) FROM tab1 AS cor0
----
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3011
SELECT + CAST( 52 AS SIGNED ) + + col1 FROM tab0 AS cor0
----
138
143
149

skipif mysql # not compatible
query I rowsort label-3011
SELECT + CAST ( 52 AS INTEGER ) + + col1 FROM tab0 AS cor0
----
138
143
149

query I rowsort
SELECT ALL + col2 + - col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - 64 AS col2 FROM tab0 AS cor0
----
-64
-64
-64

query I rowsort
SELECT ALL 97 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT DISTINCT + col0 * col1 + + col2 AS col0 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT + col1 * + 70 FROM tab0
----
6020
6370
6790

query I rowsort
SELECT col1 + + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3018
SELECT - cor0.col2 * + CAST( NULL AS SIGNED ) + + col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3018
SELECT - cor0.col2 * + CAST ( NULL AS INTEGER ) + + col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3020
SELECT DISTINCT - col0 DIV - 48 + col2 * col1 FROM tab2 cor0
----
1535
647
837

skipif mysql # not compatible
query I rowsort label-3020
SELECT DISTINCT - col0 / - 48 + col2 * col1 FROM tab2 cor0
----
1535
647
837

query I rowsort
SELECT + + col0 + col1 * col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + ( - 57 ) FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT 9 + + col2 FROM tab1 AS cor0
----
105
63
66

query I rowsort
SELECT col2 + + col0 * + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT 55 AS col2 FROM tab2 AS cor0
----
55
55
55

query I rowsort
SELECT + + col2 * 2 + col2 FROM tab1 cor0
----
162
171
288

query I rowsort
SELECT + 92 * - cor0.col2 FROM tab1 AS cor0
----
-4968
-5244
-8832

query I rowsort
SELECT + col1 * 0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + tab2.col2 * col2 AS col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT + + cor0.col1 + + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - + 39 * - col0 + - col0 FROM tab0 AS cor0
----
1330
3382
912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT ALL col0 * col1 + CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
2031
3394
8017

skipif mysql # not compatible
query I rowsort label-3032
SELECT ALL col0 * col1 + CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 75 + col2 * - ( - cor0.col1 ) col1 FROM tab2 cor0
----
1459
571
762

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 84 * col2 + col1 * col2 * - col2 - col0 col1 FROM tab2 AS cor0
----
-20338
-21435
-37778

query I rowsort
SELECT + + col0 * col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + 22 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT ALL - ( col1 ) * + col2 * col1 + + col2 * + 11 + col2 FROM tab0 AS cor0
----
-243672
-678058
-9397

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - 48 * col1 AS col2 FROM tab2 AS cor0
----
-1488
-2832
-816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 ) - + 2 col1 FROM tab0 AS cor0
----
-26
-37
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-3041
SELECT - tab0.col0 DIV col1 + col2 * - tab0.col1 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-3041
SELECT - tab0.col0 / col1 + col2 * - tab0.col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT 63 FROM tab2, tab1 AS cor0
----
63

query I rowsort
SELECT + col0 * cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3044
SELECT - 9 * col2 * CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
60516
9
9801

skipif mysql # not compatible
query I rowsort label-3044
SELECT - 9 * col2 * CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
60516
9
9801

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3045
SELECT ALL - 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-3045
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3047
SELECT + + col1 - cor0.col1 DIV col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-3047
SELECT + + col1 - cor0.col1 / col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT DISTINCT ( - 45 ) * - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
3870
4095
4365

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3049
SELECT - + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3049
SELECT - + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * col1 * - 17 FROM tab1 AS cor0
----
-11492
-1700
-2873

query I rowsort
SELECT col2 + + ( + cor0.col2 ) * - cor0.col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 AS col2 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT 86 + + 52 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to ed8ffc6ac9c9556014292382cdcbab4e

query I rowsort
SELECT ALL ( + col2 ) * tab2.col0 * - col2 AS col0 FROM tab2
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-3055
SELECT ALL - 8 DIV tab2.col0 FROM tab2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3055
SELECT ALL - 8 / tab2.col0 FROM tab2
----
-1
0
0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab2 cor2
----
3645 values hashing to d6a6e32c6adcc8525ed3eb7827781237

query I rowsort
SELECT ALL tab0.col0 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 cor1
----
243 values hashing to 60bd71ee2159222231bb3b5819bc5dca

query I rowsort
SELECT 79 FROM tab0, tab0 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT + col2 + 34 AS col2 FROM tab2
----
60
61
72

query I rowsort
SELECT 46 FROM tab1, tab2 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT - col0 - 87 FROM tab2
----
-165
-166
-94

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 76de18c5bf2cf2620e1f411d7bde86e7

query I rowsort
SELECT DISTINCT - 49 FROM tab0, tab1 cor0
----
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col1 col2 FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 71 * - cor0.col2 col2 FROM tab1 AS cor0
----
-3834
-4047
-6816

query I rowsort
SELECT ALL col1 + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - + ( 82 ) FROM tab1 AS cor0
----
-82
-82
-82

query I rowsort
SELECT col2 * tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - cor0.col2 + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 77d5402d9a44ec3df4c59b12a5c1c789

onlyif mysql # use DIV operator for integer division
query I rowsort label-3072
SELECT - col1 DIV + col1 + col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3072
SELECT - col1 / + col1 + col1 FROM tab0
----
85
90
96

query I rowsort
SELECT - cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 71 FROM tab1
----
71
71
71

query I rowsort
SELECT - 56 AS col1 FROM tab2 AS cor0
----
-56
-56
-56

query I rowsort
SELECT ALL + col0 * 64 AS col1 FROM tab1
----
192
4096
5120

query I rowsort
SELECT DISTINCT + col2 - - tab1.col2 * - col2 AS col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT 36 FROM tab2, tab2 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT DISTINCT ( col1 ) * col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3080
SELECT - - col2 DIV - cor0.col0 col2 FROM tab0 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3080
SELECT - - col2 / - cor0.col0 col2 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3081
SELECT - - CAST( - col0 AS SIGNED ) DIV col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3081
SELECT - - CAST ( - col0 AS INTEGER ) / col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col1 * col0 + col0 - - tab0.col0 FROM tab0
----
2112
3465
8277

query I rowsort
SELECT - col2 + col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT ( col1 ) + col2 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT - col1 * col2 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - col2 - - col0 FROM tab1
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3087
SELECT DISTINCT - col2 + + col2 * col1 + 73 DIV + tab0.col2 FROM tab0
----
169
2807
7380

skipif mysql # not compatible
query I rowsort label-3087
SELECT DISTINCT - col2 + + col2 * col1 + 73 / + tab0.col2 FROM tab0
----
169
2807
7380

query I rowsort
SELECT DISTINCT ( 99 ) + - col0 AS col2 FROM tab0
----
10
64
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3089
SELECT ALL tab1.col1 * tab1.col2 + + col2 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3089
SELECT ALL tab1.col1 * tab1.col2 + + col2 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * 60 FROM tab2
----
1560
1620
2280

query I rowsort
SELECT DISTINCT + + col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - 64 AS col0 FROM tab1 AS cor0
----
-64
-64
-64

query I rowsort
SELECT + 87 + col0 AS col1 FROM tab1 AS cor0
----
151
167
90

query I rowsort
SELECT ALL - 28 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
1652
476
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3095
SELECT DISTINCT + cor1.col1 * + CAST( NULL AS DECIMAL ) AS col0 FROM tab1, tab0 cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3095
SELECT DISTINCT + cor1.col1 * + CAST ( NULL AS REAL ) AS col0 FROM tab1, tab0 cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + - col1 * + cor0.col1 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3097
SELECT ALL - - CAST( + col0 AS SIGNED ) + col2 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-3097
SELECT ALL - - CAST ( + col0 AS INTEGER ) + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - + 39 * col1 + col2 FROM tab1 AS cor0
----
-333
-411
-960

query I rowsort
SELECT ALL ( - col0 ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL + 81 AS col1 FROM tab2
----
81
81
81

query I rowsort
SELECT - - 22 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT - ( - col2 ) + 12 AS col1 FROM tab0 AS cor0
----
13
45
94

query I rowsort
SELECT DISTINCT + 23 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
23

query I rowsort
SELECT ( - col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + col2 + 2 * 71 FROM tab2 AS cor0
----
168
169
180

query I rowsort
SELECT DISTINCT + col2 * 18 + col2 FROM tab1 AS cor0
----
1026
1083
1824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3107
SELECT DISTINCT - col2 + + CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-3107
SELECT DISTINCT - col2 + + CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL col2 + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-3109
SELECT + col0 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3109
SELECT + col0 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3110
SELECT + col2 * + CAST( NULL AS SIGNED ) - 33 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3110
SELECT + col2 * + CAST ( NULL AS INTEGER ) - 33 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # use DIV operator for integer division
query I rowsort label-3112
SELECT col2 * - col0 DIV - ( - col0 ) AS col1 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3112
SELECT col2 * - col0 / - ( - col0 ) AS col1 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3113
SELECT DISTINCT + col2 DIV + col1 + cor0.col0 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-3113
SELECT DISTINCT + col2 / + col1 + cor0.col0 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT ALL - cor0.col2 * - col1 * 79 + col2 * col0 FROM tab0 cor0
----
224994
596796
7698

onlyif mysql # use DIV operator for integer division
query I rowsort label-3115
SELECT ALL col2 - + cor0.col2 DIV col1 FROM tab2 cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-3115
SELECT ALL col2 - + cor0.col2 / col1 FROM tab2 cor0
----
26
27
36

query I rowsort
SELECT DISTINCT col0 + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - col2 - col1 AS col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - - col2 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - - col2 * + 93 FROM tab1 AS cor0
----
5022
5301
8928

query I rowsort
SELECT ALL col1 + col2 + 52 * - col2 AS col0 FROM tab0 AS cor0
----
-1597
-4091
46

query I rowsort
SELECT DISTINCT col1 + col1 * col1 AS col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT + 89 FROM tab2, tab1 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

onlyif mysql # use DIV operator for integer division
query I rowsort label-3123
SELECT col2 + - tab2.col0 DIV - col1 AS col2 FROM tab2
----
27
27
42

skipif mysql # not compatible
query I rowsort label-3123
SELECT col2 + - tab2.col0 / - col1 AS col2 FROM tab2
----
27
27
42

query I rowsort
SELECT + col1 * 23 + + col1 + + tab0.col1 AS col2 FROM tab0
----
2150
2275
2425

onlyif mysql # use DIV operator for integer division
query I rowsort label-3125
SELECT + col0 * tab0.col1 DIV tab0.col1 AS col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3125
SELECT + col0 * tab0.col1 / tab0.col1 AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT - col0 * 97 AS col1 FROM tab2
----
-679
-7566
-7663

onlyif mysql # use DIV operator for integer division
query I rowsort label-3127
SELECT ALL + col2 DIV 30 + col1 FROM tab1
----
11
16
27

skipif mysql # not compatible
query I rowsort label-3127
SELECT ALL + col2 / 30 + col1 FROM tab1
----
11
16
27

query I rowsort
SELECT ALL cor0.col0 + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + 99 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT - cor0.col1 - + col0 FROM tab2 AS cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * col1 + col0 col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + 66 - - 95 AS col2 FROM tab0, tab1 AS cor0
----
161

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + cor0.col0 col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT - + col1 * - 68 AS col2 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT ALL + + col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + - col2 * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - 91 - col1 FROM tab1 AS cor0
----
-101
-104
-117

query I rowsort
SELECT + - col1 - - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col1 * col0 - col0 * - ( 88 ) * - tab0.col0 col2 FROM tab0
----
-1152
11025
23763

query I rowsort
SELECT + col2 + cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + col2 + 93 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-3036
-7544
-92

query I rowsort
SELECT ALL - + col0 + + col0 * + col2 AS col0 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + col1 AS col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col0 + - col2 + col1 * ( col2 ) AS col2 FROM tab2 AS cor0
----
1586
687
817

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3145
SELECT + + CAST( NULL AS DECIMAL ) * + ( + col1 ) * + col1 - cor0.col1 * - col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3145
SELECT + + CAST ( NULL AS REAL ) * + ( + col1 ) * + col1 - cor0.col1 * - col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col0 + col1 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - ( ( cor0.col1 ) ) * ( col1 ) + - col1 AS col2 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT DISTINCT 55 + - col2 FROM tab0 AS cor0
----
-27
22
54

query I rowsort
SELECT + col0 + ( 63 ) FROM tab2
----
141
142
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3150
SELECT ALL - col1 - - CAST( col2 * col1 AS SIGNED ) AS col1 FROM tab0
----
0
2752
7371

skipif mysql # not compatible
query I rowsort label-3150
SELECT ALL - col1 - - CAST ( col2 * col1 AS INTEGER ) AS col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT ALL col2 * - 48 - + col0 AS col0 FROM tab0
----
-1608
-4025
-83

query I rowsort
SELECT DISTINCT - 97 FROM tab2, tab2 AS cor0
----
-97

query I rowsort
SELECT DISTINCT - - 33 + col0 * ( - col0 ) FROM tab0 cor0
----
-1192
-543
-7888

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + + col2 + - col0 AS col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT + 98 AS col2 FROM tab2 AS cor0
----
98
98
98

query I rowsort
SELECT ALL - col2 * + col2 * + col1 AS col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3158
SELECT ALL + + col2 + - col1 * CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
-24
-583
-944

skipif mysql # not compatible
query I rowsort label-3158
SELECT ALL + + col2 + - col1 * CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + 59 FROM tab2 cor0
----
59
59
59

query I rowsort
SELECT ALL - cor0.col0 * - col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL ( + col0 ) + - col2 AS col0 FROM tab2
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3162
SELECT CAST( NULL AS SIGNED ) + + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3162
SELECT CAST ( NULL AS INTEGER ) + + col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT + + ( col2 ) FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT 99 AS col2 FROM tab2 cor0
----
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3166
SELECT + - col0 DIV cor0.col1 FROM tab1 cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-3166
SELECT + - col0 / cor0.col1 FROM tab1 cor0
----
-6
-6
0

query I rowsort
SELECT ALL - tab0.col2 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT 93 FROM tab1
----
93
93
93

query I rowsort
SELECT ( col0 ) - tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
10
13
26

query I rowsort
SELECT + + 18 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT + + 54 * + cor0.col0 FROM tab2 AS cor0
----
378
4212
4266

onlyif mysql # use DIV operator for integer division
query I rowsort label-3173
SELECT DISTINCT - col2 + col2 + + 94 * 61 DIV cor0.col1 FROM tab1 cor0
----
220
441
573

skipif mysql # not compatible
query I rowsort label-3173
SELECT DISTINCT - col2 + col2 + + 94 * 61 / cor0.col1 FROM tab1 cor0
----
220
441
573

query I rowsort
SELECT + ( - cor0.col2 ) + - cor0.col0 * col1 AS col1 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL - - 40 AS col2 FROM tab2 AS cor0
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 59 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1e6537c922fa953e0fd2f59430803703

query I rowsort
SELECT DISTINCT 2 + - 86 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-84

query I rowsort
SELECT ALL + 84 AS col0 FROM tab2
----
84
84
84

query I rowsort
SELECT ALL ( + ( + col1 ) ) * + 68 * - col1 FROM tab1
----
-11492
-45968
-6800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 67 col0 FROM tab1, tab2, tab0 AS cor0
----
-67

query I rowsort
SELECT - cor2.col1 FROM tab2, tab0 AS cor0, tab1 cor1, tab2 AS cor2
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT ALL + 49 * cor0.col1 FROM tab1 AS cor0
----
1274
490
637

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to f0b9665afa0b835e4e5097af17c51766

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab1 AS cor1, tab0, tab0 cor2
----
3645 values hashing to 8db0cc6df185b737ff75d2626a6d198b

query I rowsort
SELECT ALL col0 * - 31 FROM tab1 AS cor0
----
-1984
-2480
-93

query I rowsort
SELECT col1 * + col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 94 ) col1 FROM tab0
----
-94

query I rowsort
SELECT ( - tab1.col2 * col2 ) FROM tab1
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3189
SELECT + cor0.col1 * col0 - CAST( - col2 AS SIGNED ) * col2 FROM tab1 cor0
----
10256
2994
3889

skipif mysql # not compatible
query I rowsort label-3189
SELECT + cor0.col1 * col0 - CAST ( - col2 AS INTEGER ) * col2 FROM tab1 cor0
----
10256
2994
3889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 + - col2 + col2 col1 FROM tab1 AS cor0
----
92
92
92

query I rowsort
SELECT ALL + + 59 FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT + col1 + col1 + ( + col1 + col0 ) FROM tab1 AS cor0
----
119
81
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3193
SELECT + - cor0.col2 * - col2 + - CAST( NULL AS SIGNED ) - cor0.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-3193
SELECT + - cor0.col2 * - col2 + - CAST ( NULL AS INTEGER ) - cor0.col2 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + - 64 * + col0 FROM tab1 cor0
----
-192
-4096
-5120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 * - col2 col1 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT 74 - - col0 AS col0 FROM tab1 AS cor0
----
138
154
77

query I rowsort
SELECT ALL - col1 * - 55 + - col1 * col2 FROM tab0 AS cor0
----
-2457
1892
5238

query I rowsort
SELECT DISTINCT - col2 + - cor0.col2 * col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT + col2 * ( col0 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + col0 - + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( + 41 ) * tab1.col2 FROM tab1, tab0 AS cor0
----
-2214
-2337
-3936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3204
SELECT col2 * CAST( col0 AS SIGNED ) AS col2 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-3204
SELECT col2 * CAST ( col0 AS INTEGER ) AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col1 * + col0 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3206
SELECT - - col2 + col2 DIV cor0.col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-3206
SELECT - - col2 + col2 / cor0.col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT - col1 + ( col2 ) * - col2 AS col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-3208
SELECT ALL - col2 * cor0.col1 + 87 DIV + col2 col1 FROM tab0 AS cor0
----
-10
-2836
-7461

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3208
SELECT ALL - col2 * cor0.col1 + 87 / + col2 col1 FROM tab0 AS cor0
----
-10
-2836
-7461

query I rowsort
SELECT DISTINCT + col0 - - col2 * col1 AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT col1 * ( - col0 + col0 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * - col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - 64 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

query I rowsort
SELECT - + ( col2 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - 70 * col0 AS col1 FROM tab2 AS cor0
----
-490
-5460
-5530

query I rowsort
SELECT DISTINCT - - col2 + 61 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1075
1918
3625

query I rowsort
SELECT ALL - col1 + + 95 FROM tab0 AS cor0
----
-2
4
9

query I rowsort
SELECT + - 51 FROM tab2 AS cor0
----
-51
-51
-51

query I rowsort
SELECT + cor0.col2 * - cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to f7e57a354e4e5925116b9650d1011609

query I rowsort
SELECT DISTINCT + col0 * - ( - 84 * - col0 ) FROM tab1
----
-344064
-537600
-756

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 cor2
----
972 values hashing to 958533d1a7bf61199ed7c03eadf37f9a

query I rowsort
SELECT ALL - col1 * + tab0.col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT - 69 + + col1 AS col0 FROM tab0 AS cor0
----
17
22
28

query I rowsort
SELECT - 10 FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT + - col1 * col0 + - cor0.col2 AS col1 FROM tab1 cor0
----
-1136
-132
-697

query I rowsort
SELECT + 39 * col0 * - col1 FROM tab2 AS cor0
----
-179478
-52377
-8463

query I rowsort
SELECT + - ( col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - 88 * col2 AS col1 FROM tab2 AS cor0
----
-2288
-2376
-3344

query I rowsort
SELECT + col1 * 78 AS col1 FROM tab1 AS cor0
----
1014
2028
780

query I rowsort
SELECT + col1 * - 39 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-3440
-3640
-3880

query I rowsort
SELECT ALL col1 * ( col0 ) AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - ( col0 ) * + col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT 11 * - cor0.col1 AS col0 FROM tab0 cor0
----
-1001
-1067
-946

query I rowsort
SELECT ( - col0 ) * + cor0.col1 + 96 * - col1 FROM tab0 cor0
----
-10320
-12707
-16835

onlyif mysql # use DIV operator for integer division
query I rowsort label-3234
SELECT ( + col0 ) * col2 DIV 67 AS col0 FROM tab0 AS cor0
----
0
108
11

skipif mysql # not compatible
query I rowsort label-3234
SELECT ( + col0 ) * col2 / 67 AS col0 FROM tab0 AS cor0
----
0
108
11

query I rowsort
SELECT DISTINCT + - 81 - col1 FROM tab2 AS cor0
----
-112
-140
-98

query I rowsort
SELECT - + col2 * - col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 44 * + col0 AS col0 FROM tab1 AS cor0
----
132
2816
3520

query I rowsort
SELECT ALL ( + col1 ) + col0 + 82 FROM tab1 AS cor0
----
111
156
175

query I rowsort
SELECT DISTINCT 15 * + col2 + ( + cor0.col2 ) AS col1 FROM tab0 cor0
----
1312
16
528

onlyif mysql # use DIV operator for integer division
query I rowsort label-3240
SELECT ALL + + col0 DIV + col2 + + col2 + + col1 AS col0 FROM tab0 AS cor0
----
119
133
174

skipif mysql # not compatible
query I rowsort label-3240
SELECT ALL + + col0 / + col2 + + col2 + + col1 AS col0 FROM tab0 AS cor0
----
119
133
174

query I rowsort
SELECT ALL - col0 * col0 + col2 AS col1 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL 52 AS col0 FROM tab2, tab2 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 7b4a664e9c62b46b517569587d5a621d

query I rowsort
SELECT + 8 + - cor0.col1 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 55d5095749018f0d23567c1211b97c22

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2, tab1 cor1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

query I rowsort
SELECT + 36 + + cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 46eff12260500631f7c310d7b61c09ff

query I rowsort
SELECT - col1 + + 64 + 3 * + col2 FROM tab1 AS cor0
----
200
225
339

query I rowsort
SELECT + - 66 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to a408108d423d7784b7d610cb779e515a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3248
SELECT ALL tab2.col2 * CAST( 77 AS SIGNED ) AS col2 FROM tab2
----
2002
2079
2926

skipif mysql # not compatible
query I rowsort label-3248
SELECT ALL tab2.col2 * CAST ( 77 AS INTEGER ) AS col2 FROM tab2
----
2002
2079
2926

query I rowsort
SELECT DISTINCT ( 98 ) FROM tab1, tab2 AS cor0
----
98

query I rowsort
SELECT ALL + tab2.col1 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - col1 * + ( + col2 ) + cor0.col2 + - 34 FROM tab0 AS cor0
----
-130
-2839
-7414

query I rowsort
SELECT + cor0.col2 + - 39 * + col2 AS col1 FROM tab1 AS cor0
----
-2052
-2166
-3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + cor0.col1 - + col2 col0 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT ALL 96 * - col2 + + cor0.col0 FROM tab0 AS cor0
----
-3144
-61
-7783

query I rowsort
SELECT DISTINCT col1 - - col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL 23 * + col0 + + col2 FROM tab2 cor0
----
1820
1855
188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - col0 * col0 col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + - 25 AS col1 FROM tab1 cor0
----
-25
-25
-25

query I rowsort
SELECT col2 + + cor0.col2 * + col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + + ( - col2 ) + + col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3261
SELECT ALL + col2 DIV - col0 AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3261
SELECT ALL + col2 / - col0 AS col0 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3262
SELECT DISTINCT col2 DIV - cor0.col2 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3262
SELECT DISTINCT col2 / - cor0.col2 FROM tab1 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3263
SELECT DISTINCT + col1 DIV + col0 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-3263
SELECT DISTINCT + col1 / + col0 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-18

query I rowsort
SELECT DISTINCT + col1 * col0 * + col2 + col0 AS col1 FROM tab0 cor0
----
3430
664207
68136

query I rowsort
SELECT + ( - col2 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3266
SELECT ALL + col1 * + col2 + - col1 DIV col0 AS col2 FROM tab0 AS cor0
----
2835
7461
95

skipif mysql # not compatible
query I rowsort label-3266
SELECT ALL + col1 * + col2 + - col1 / col0 AS col2 FROM tab0 AS cor0
----
2835
7461
95

query I rowsort
SELECT DISTINCT + col2 * ( tab2.col2 ) AS col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT + 1 AS col1 FROM tab2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col2 col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ( col0 ) - + tab1.col1 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT col1 * col1 + + col0 * col1 FROM tab0
----
12804
16380
9460

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + col1 col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - + col2 * col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - cor0.col2 * + col1 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + + 41 * col2 + - col1 AS col1 FROM tab1 cor0
----
2188
2327
3923

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + + cor0.col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT 79 - + tab0.col2 AS col0 FROM tab0
----
-3
46
78

query I rowsort
SELECT - col0 * tab2.col0 + col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT + col0 * tab2.col0 * + tab2.col0 - + col2 * + col2 FROM tab2
----
-386
473876
491595

query I rowsort
SELECT ALL - + col1 * col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 * + col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT col2 * col2 * col2 - tab0.col2 * tab0.col0 FROM tab0
----
-34
35145
544070

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col2 col0 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3285
SELECT col2 DIV col0 + + col0 + - col0 DIV + col1 col2 FROM tab0
----
25
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3285
SELECT col2 / col0 + + col0 + - col0 / + col1 col2 FROM tab0
----
25
35
89

query I rowsort
SELECT DISTINCT - - 98 * col1 AS col0 FROM tab0 AS cor0
----
8428
8918
9506

query I rowsort
SELECT DISTINCT col0 * + 12 * 82 AS col2 FROM tab0
----
23616
34440
87576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 66 col2 FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT DISTINCT - - ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL 32 + + ( col1 ) * col1 AS col1 FROM tab2 AS cor0
----
321
3513
993

query I rowsort
SELECT 17 AS col2 FROM tab0 AS cor0
----
17
17
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-3292
SELECT + col1 DIV - col2 - col0 AS col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3292
SELECT + col1 / - col2 - col0 AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL - tab2.col1 + - col2 FROM tab2
----
-55
-58
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3294
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3294
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3295
SELECT + CAST( NULL AS SIGNED ) * col1 + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3295
SELECT + CAST ( NULL AS INTEGER ) * col1 + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 40 ) * + col2 + col0 col2 FROM tab0
----
-1296
-3191
-5

query I rowsort
SELECT 48 FROM tab1
----
48
48
48

query I rowsort
SELECT - 33 FROM tab0 AS cor0
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + + col1 * 89 FROM tab2 AS cor0
----
1513
2759
5251

query I rowsort
SELECT ALL 68 FROM tab2 AS cor0
----
68
68
68

query I rowsort
SELECT + - col1 * col0 + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + - col0 * + col1 * + col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-3304
SELECT + col1 DIV tab2.col1 + col1 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-3304
SELECT + col1 / tab2.col1 + col1 FROM tab2
----
18
32
60

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 + col1 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL col1 + col0 * - col2 * col0 - col2 * cor0.col0 FROM tab2 AS cor0
----
-1481
-160153
-240143

query I rowsort
SELECT DISTINCT - col1 * + col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + - col1 + - col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 + - col1 AS col0 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT ALL - + col1 + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + - cor0.col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + tab2.col2 + tab2.col1 * + tab2.col0 + + tab2.col0 * col0 AS col1 FROM tab2 WHERE NOT ( NULL ) IN ( col2 + col1 )
----

query I rowsort
SELECT + tab2.col1 FROM tab2 WHERE NOT NULL BETWEEN - col1 + col1 AND NULL
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT - cor0.col2 * col0 - col2 NOT IN ( + col1 )
----

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3316
SELECT col0 DIV + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3316
SELECT col0 / + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3317
SELECT DISTINCT + col0 DIV col0 AS col2 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3317
SELECT DISTINCT + col0 / col0 AS col2 FROM tab2 AS cor0
----
1

query I rowsort
SELECT col1 + - col2 * col0 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL tab1.col0 + + col2 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN + cor0.col0 * col2 * + col0 + + col0 + col1 AND NULL
----

query I rowsort
SELECT tab2.col1 * + col2 * - col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT + col2 + + tab2.col1 FROM tab2
----
55
58
85

query I rowsort
SELECT col1 + - cor0.col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT col1 + tab2.col0 AS col0 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + col2 * col0 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT col2 + col2 * col0 AS col2 FROM tab2
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3329
SELECT - - col2 + col0 DIV col0 FROM tab2 cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-3329
SELECT - - col2 + col0 / col0 FROM tab2 cor0
----
27
28
39

query I rowsort
SELECT DISTINCT + - cor0.col2 * col1 - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT + col2 + + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3332
SELECT DISTINCT - col0 DIV - cor0.col0 - col2 * col0 AS col2 FROM tab1 AS cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-3332
SELECT DISTINCT - col0 / - cor0.col0 - col2 * col0 AS col2 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT - col0 + col0 * cor0.col1 FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * - col1 + col1 col2 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT + - col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL col0 * + col0 FROM tab2 AS cor0 WHERE ( NULL ) > ( NULL ) OR NOT NULL = ( - col1 )
----

query I rowsort
SELECT col2 + - col0 * - col0 + col0 FROM tab2 AS cor0
----
6188
6358
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 col1 FROM tab0 cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col2 col1 FROM tab2 cor0
----
0

query I rowsort
SELECT ALL + - cor0.col1 + + col2 + - col2 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - col0 * - col2 - tab1.col0 * + col0 AS col2 FROM tab1
----
-448
1280
153

query I rowsort
SELECT tab0.col1 + + col0 + col2 AS col2 FROM tab0
----
133
143
262

query I rowsort
SELECT - col0 - col1 * + col1 AS col0 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT tab0.col2 * col0 + + col1 AS col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT ALL + col2 + col1 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col1 col0 FROM tab2
----
137
38
96

query I rowsort
SELECT col1 * + col0 AS col1 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3349
SELECT DISTINCT + col2 DIV col0 + col2 FROM tab0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-3349
SELECT DISTINCT + col2 / col0 + col2 FROM tab0
----
1
34
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col2 + cor0.col0 col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - col0 * - col0 + col0 FROM tab1
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-3352
SELECT DISTINCT col2 + col2 DIV tab0.col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-3352
SELECT DISTINCT col2 + col2 / tab0.col2 FROM tab0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - cor0.col2 * - ( + cor1.col1 ) FROM tab1, tab2 AS cor0, tab1 cor1, tab1 AS cor2
----
9 values hashing to 3fe7ddc736abb4b8aaa99f6b5ddeca84

query I rowsort
SELECT + col1 + col1 * col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - ( - tab1.col1 ) * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 4 AS col0 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT DISTINCT + col2 + + 42 * + tab0.col0 FROM tab0
----
1041
1471
3820

query I rowsort
SELECT 95 * + ( + tab2.col0 + - 39 * col0 ) FROM tab2
----
-25270
-281580
-285190

query I rowsort
SELECT ALL - ( + col2 ) + col0 * + col2 + - col1 FROM tab1
----
3581
7571
82

query I rowsort
SELECT - cor1.col1 + 94 AS col1 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 863d7730a0905189d913528fc7dc6278

query I rowsort
SELECT tab0.col0 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT col1 + col0 * col1 + 74 * - 33 AS col2 FROM tab0
----
-292
1050
5748

query I rowsort
SELECT DISTINCT ( tab1.col2 ) + + col2 * - 67 FROM tab1
----
-3564
-3762
-6336

query I rowsort
SELECT DISTINCT - col1 + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - 29 * ( + col1 ) + col1 FROM tab0 cor0
----
-2408
-2548
-2716

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3369
SELECT + CAST( NULL AS SIGNED ) * + 21 * - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3369
SELECT + CAST ( NULL AS INTEGER ) * + 21 * - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT tab2.col2 * col1 AS col0 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3371
SELECT ALL col2 DIV col0 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3371
SELECT ALL col2 / col0 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT DISTINCT + col0 * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + 33 * + col2 + + col0 * 72 AS col2 FROM tab1 AS cor0
----
1998
6489
8928

query I rowsort
SELECT - col0 * tab2.col0 AS col2 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT + 55 * + col2 AS col2 FROM tab1
----
2970
3135
5280

query I rowsort
SELECT DISTINCT - col2 * + col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - col0 + - col1 * col2 + col2 FROM tab0 AS cor0
----
-131
-2829
-7469

query I rowsort
SELECT + col0 + - col2 AS col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - - col2 * col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT col2 * + col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT cor0.col0 * - cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 * tab2.col1 AS col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT col2 - + col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + ( + col1 ) - col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + 96 + + col1 FROM tab2
----
113
127
155

query I rowsort
SELECT ALL col0 + + col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT + - 81 * + tab2.col0 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 369651a69862f696d671a0c9cbcf97c1

query I rowsort
SELECT + - 70 * - col1 * 62 + cor0.col2 AS col0 FROM tab1 AS cor0
----
112894
43457
56516

query I rowsort
SELECT DISTINCT - col0 + - col2 * tab0.col1 AS col0 FROM tab0
----
-132
-2862
-7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3390
SELECT col2 * CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3390
SELECT col2 * CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col1 + 81 * col0 FROM tab1 cor0
----
217
5174
6467

query I rowsort
SELECT - cor0.col0 + + ( - col2 ) * - col0 AS col1 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL + + col1 + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + - col0 * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3395
SELECT + col0 * 65 + + 31 DIV col2 FROM tab0 cor0
----
1560
2306
5785

skipif mysql # not compatible
query I rowsort label-3395
SELECT + col0 * 65 + + 31 / col2 FROM tab0 cor0
----
1560
2306
5785

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3396
SELECT ALL - col0 + CAST( + col1 AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
1456
567
830

skipif mysql # not compatible
query I rowsort label-3396
SELECT ALL - col0 + CAST ( + col1 AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-3397
SELECT col0 + 49 DIV col2 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3397
SELECT col0 + 49 / col2 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 + cor0.col0 col2 FROM tab2 AS cor0
----
-210
-3403
-954

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3399
SELECT DISTINCT - + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3399
SELECT DISTINCT - + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT - - cor0.col1 + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT col2 + + 13 AS col2 FROM tab0 AS cor0
----
14
46
95

query I rowsort
SELECT ALL - col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - - col0 * col2 * 70 AS col2 FROM tab2 AS cor0
----
13230
141960
210140

query I rowsort
SELECT - - col2 * 1 + - col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT col0 * 54 FROM tab1 cor0
----
162
3456
4320

query I rowsort
SELECT ALL - col2 * + col0 + - 30 * - col2 * col2 FROM tab2 AS cor0
----
18252
21681
40318

query I rowsort
SELECT col2 * + col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col0 * + col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col0 * 9 + col2 AS col0 FROM tab2 AS cor0
----
-36
-673
-676

query I rowsort
SELECT - - 27 FROM tab1 AS cor0
----
27
27
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3411
SELECT + + CAST( - col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3411
SELECT + + CAST ( - col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT col2 * 54 FROM tab2
----
1404
1458
2052

query I rowsort
SELECT - 79 AS col2 FROM tab1 cor0
----
-79
-79
-79

query I rowsort
SELECT - col2 * 45 FROM tab1 AS cor0
----
-2430
-2565
-4320

query I rowsort
SELECT + - col1 * col2 + col1 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + + 2 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT - col1 * - 3 AS col1 FROM tab2 cor0
----
177
51
93

query I rowsort
SELECT col1 - col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3419
SELECT DISTINCT + cor0.col2 + - col0 DIV - cor0.col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-3419
SELECT DISTINCT + cor0.col2 + - col0 / - cor0.col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT ALL - 12 FROM tab1, tab1 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3421
SELECT - - ( + col1 ) DIV + col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3421
SELECT - - ( + col1 ) / + col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT 53 FROM tab0, tab0 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT + 80 * col2 FROM tab1 AS cor0
----
4320
4560
7680

query I rowsort
SELECT - + 19 FROM tab2 AS cor0
----
-19
-19
-19

query I rowsort
SELECT - + 41 + col1 AS col2 FROM tab0 AS cor0
----
45
50
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-3426
SELECT ALL - ( - col2 ) DIV + col1 + + col2 * col0 * col1 FROM tab0 AS cor0
----
3395
664118
68112

skipif mysql # not compatible
query I rowsort label-3426
SELECT ALL - ( - col2 ) / + col1 + + col2 * col0 * col1 FROM tab0 AS cor0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 + col1 col2 FROM tab1
----
39
42
55

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab0
----
68

query I rowsort
SELECT 78 * + col2 AS col2 FROM tab1 AS cor0
----
4212
4446
7488

query I rowsort
SELECT DISTINCT col1 + - 34 AS col0 FROM tab0 AS cor0
----
52
57
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + 39 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT DISTINCT - + cor0.col0 * + ( - cor0.col2 ) FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3434
SELECT DISTINCT + 43 DIV cor0.col1 + col2 + - col2 AS col1 FROM tab1 AS cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-3434
SELECT DISTINCT + 43 / cor0.col1 + col2 + - col2 AS col1 FROM tab1 AS cor0
----
1
3
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3435
SELECT CAST( NULL AS SIGNED ) * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3435
SELECT CAST ( NULL AS INTEGER ) * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 98 * - col1 AS col2 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT DISTINCT ( - col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + - col1 + col2 * col0 AS col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT + col0 + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3440
SELECT ALL col2 * - ( col1 ) * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3440
SELECT ALL col2 * - ( col1 ) * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 59 AS col1 FROM tab0 AS cor0
----
-59
-59
-59

query I rowsort
SELECT + 25 AS col1 FROM tab0 AS cor0
----
25
25
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3443
SELECT DISTINCT - cor0.col0 + col1 + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3443
SELECT DISTINCT - cor0.col0 + col1 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - 54 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to f06dd6157f7bd618232d2ea2147f8e19

query I rowsort
SELECT ALL - + col1 + cor0.col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - 93 * col1 AS col2 FROM tab1 AS cor0
----
-1209
-2418
-930

query I rowsort
SELECT ALL + ( - col1 ) + 1 * col1 * col2 + col0 * + 85 FROM tab1 AS cor0
----
1633
6000
8035

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab0 cor1, tab2 cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3449
SELECT ALL + ( col2 ) * CAST( 28 AS SIGNED ) + + col2 FROM tab2 cor0
----
1102
754
783

skipif mysql # not compatible
query I rowsort label-3449
SELECT ALL + ( col2 ) * CAST ( 28 AS INTEGER ) + + col2 FROM tab2 cor0
----
1102
754
783

query I rowsort
SELECT DISTINCT + + col2 * - col1 + 33 AS col2 FROM tab0 AS cor0
----
-2805
-64
-7429

query I rowsort
SELECT DISTINCT - + col1 + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL col2 * col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - + col0 * - ( col2 ) * col0 FROM tab2 AS cor0
----
1323
158184
237158

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 col0 + col2 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT col1 + + ( - 59 ) * col1 AS col0 FROM tab2 AS cor0
----
-1798
-3422
-986

query I rowsort
SELECT ALL + col1 + 14 FROM tab0 AS cor0
----
100
105
111

query I rowsort
SELECT DISTINCT - col0 * + 3 * 0 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT tab0.col0 + 55 FROM tab0, tab2 cor0
----
9 values hashing to d309cb2aed666e56dd43938f99e86252

query I rowsort
SELECT DISTINCT + 29 FROM tab0, tab2 AS cor0
----
29

query I rowsort
SELECT ALL - 65 + + col2 AS col2 FROM tab0 AS cor0
----
-32
-64
17

query I rowsort
SELECT + col2 + - 0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT tab1.col0 * col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT col0 - + ( col1 ) FROM tab2
----
-24
19
62

query I rowsort
SELECT - col1 * col2 + col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT 78 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT + col2 * ( - col1 ) AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - - ( col0 ) * - col0 * col2 FROM tab1 cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT + 60 FROM tab2 AS cor0
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 col2 FROM tab0 AS cor0
----
-76
-76
-76

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT col1 * ( + 63 + col1 ) AS col0 FROM tab1
----
2314
730
988

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
17
31
59

query I rowsort
SELECT ALL + col2 * + 3 FROM tab0
----
246
3
99

query I rowsort
SELECT + ( - 21 ) + + col1 AS col0 FROM tab0
----
65
70
76

query I rowsort
SELECT + 99 + + 10 AS col0 FROM tab2 AS cor0
----
109
109
109

query I rowsort
SELECT 48 * - col2 AS col0 FROM tab1 AS cor0
----
-2592
-2736
-4608

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) * + col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT ( 24 ) * + col2 AS col1 FROM tab0 AS cor0
----
1968
24
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3480
SELECT DISTINCT ( 11 ) DIV col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3480
SELECT DISTINCT ( 11 ) / col0 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL - - col1 + col1 * cor0.col0 FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT - col1 * col0 * col1 AS col2 FROM tab2 AS cor0
----
-22831
-271518
-6727

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3483
SELECT ALL + CAST( - 79 AS SIGNED ) * + col2 + col1 AS col2 FROM tab0 AS cor0
----
-2521
-6387
18

skipif mysql # not compatible
query I rowsort label-3483
SELECT ALL + CAST ( - 79 AS INTEGER ) * + col2 + col1 AS col2 FROM tab0 AS cor0
----
-2521
-6387
18

query I rowsort
SELECT - 69 FROM tab1, tab0 AS cor0
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

query I rowsort
SELECT DISTINCT + col2 * - col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col0 - + col0 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col2 - col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL col2 + cor0.col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - col2 + + cor0.col2 * - col1 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2904
-7626
-99

query I rowsort
SELECT col1 + col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL + - col1 * + col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + tab0.col2 * - col2 * 18 + col1 FROM tab0
----
-120941
-19516
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3493
SELECT + col2 DIV col0 AS col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3493
SELECT + col2 / col0 AS col0 FROM tab1
----
0
1
18

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to db9b93cf4fdd5de4106f0487a66ce0a5

query I rowsort
SELECT tab2.col2 * + col0 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - col1 * + 99 + - col1 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
-1560
-2535
-3978

query I rowsort
SELECT ALL + - col1 + + col2 + col2 FROM tab2 AS cor0
----
-7
23
59

query I rowsort
SELECT ALL col1 * + 14 AS col1 FROM tab2 AS cor0
----
238
434
826

query I rowsort
SELECT + col0 * + col1 + + col0 + col0 * cor0.col0 FROM tab1 cor0
----
4800
7520
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3500
SELECT col2 + CAST( - 24 + col1 AS SIGNED ) * + col0 AS col2 FROM tab2 AS cor0
----
-515
2756
76

skipif mysql # not compatible
query I rowsort label-3500
SELECT col2 + CAST ( - 24 + col1 AS INTEGER ) * + col0 AS col2 FROM tab2 AS cor0
----
-515
2756
76

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab2, tab0 AS cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

onlyif mysql # use DIV operator for integer division
query I rowsort label-3502
SELECT + + col1 DIV 81 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3502
SELECT + + col1 / 81 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + - ( 10 ) * + col2 AS col0 FROM tab1 AS cor0
----
-1040
-543
-634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3504
SELECT + col0 * + CAST( col2 AS SIGNED ) FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-3504
SELECT + col0 * + CAST ( col2 AS INTEGER ) FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL + col2 * - 6 AS col2 FROM tab2 AS cor0
----
-156
-162
-228

query I rowsort
SELECT + col2 - + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3507
SELECT ALL - col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3507
SELECT ALL - col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 - col0 * + tab1.col2 AS col1 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT - + col2 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col1 + + col1 AS col2 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT ALL - col2 + + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - col0 * - col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col0 + + col2 * - col0 + - cor0.col1 FROM tab1 AS cor0
----
-110
-3018
-6653

query I rowsort
SELECT - - cor0.col2 + + col2 * - col1 AS col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT + - cor0.col2 + col1 + 68 FROM tab2 AS cor0
----
101
47
72

query I rowsort
SELECT DISTINCT + col0 + 22 FROM tab2 AS cor0
----
100
101
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-3517
SELECT + + col2 * col0 + - ( - 77 ) * col0 DIV 13 FROM tab0 AS cor0
----
242
7825
934

skipif mysql # not compatible
query I rowsort label-3517
SELECT + + col2 * col0 + - ( - 77 ) * col0 / 13 FROM tab0 AS cor0
----
242
7825
934

query I rowsort
SELECT DISTINCT - col1 + col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + col1 + + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col2 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col1 * col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL col2 FROM tab1 WHERE NOT NULL NOT IN ( tab1.col2 )
----

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( - col1 + + col0 + tab2.col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col0 FROM tab0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col0 col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT + + col2 + ( col0 ) AS col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - 41 * + col1 FROM tab2
----
-1271
-2419
-697

query I rowsort
SELECT ALL - col1 * col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT 78 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

onlyif mysql # use DIV operator for integer division
query I rowsort label-3531
SELECT col1 DIV + col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3531
SELECT col1 / + col1 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3532
SELECT ALL col1 DIV tab1.col2 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3532
SELECT ALL col1 / tab1.col2 col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3533
SELECT ALL tab0.col1 DIV + col1 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3533
SELECT ALL tab0.col1 / + col1 AS col0 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3534
SELECT DISTINCT col2 DIV col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3534
SELECT DISTINCT col2 / col1 AS col0 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT DISTINCT col1 * col0 DIV col0 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3535
SELECT DISTINCT col1 * col0 / col0 AS col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3536
SELECT ALL col0 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3536
SELECT ALL col0 / col1 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3537
SELECT ALL - col0 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3537
SELECT ALL - col0 / - col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3538
SELECT DISTINCT - col1 DIV - col2 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3538
SELECT DISTINCT - col1 / - col2 AS col1 FROM tab1
----
0

query I rowsort
SELECT + col1 * - col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + col0 - + tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT col1 + col0 * - col2 * col1 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT - col1 * - col2 * + col2 FROM tab0 WHERE NOT NULL = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3543
SELECT ALL col0 DIV tab0.col2 AS col1 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3543
SELECT ALL col0 / tab0.col2 AS col1 FROM tab0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3544
SELECT col0 DIV - col1 + col2 FROM tab1
----
51
54
90

skipif mysql # not compatible
query I rowsort label-3544
SELECT col0 / - col1 + col2 FROM tab1
----
51
54
90

query I rowsort
SELECT ALL - col2 + - col0 - col2 AS col0 FROM tab2
----
-130
-155
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 * col1 col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT - col1 * col1 + + col0 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT ALL col0 + + col2 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT col1 * - tab0.col0 * - col2 AS col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT + col0 * tab0.col2 * col0 FROM tab0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 * tab2.col0 col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col0 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT col1 * tab0.col2 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - col2 * - col2 * - col0 + - col1 AS col1 FROM tab2
----
-114093
-5134
-52787

query I rowsort
SELECT tab1.col2 + tab1.col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL col1 * col1 + tab1.col0 - - tab1.col2 FROM tab1
----
221
345
733

query I rowsort
SELECT + col1 * + col2 * + col2 AS col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT DISTINCT col0 - col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT tab2.col0 + col2 AS col2 FROM tab2
----
104
117
34

query III rowsort
SELECT ALL * FROM tab2 WHERE ( - col0 * col0 * - tab2.col0 ) IN ( - tab2.col2 + col0 - - col1 * + col1 )
----

query I rowsort
SELECT col1 * - col2 - - col1 * col0 FROM tab1
----
-1326
-208
70

query I rowsort
SELECT DISTINCT col2 + + tab2.col1 AS col1 FROM tab2
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3563
SELECT CAST( col1 AS SIGNED ) * - col0 AS col1 FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-3563
SELECT CAST ( col1 AS INTEGER ) * - col0 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + ( tab1.col0 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-3565
SELECT + ( - ( + col1 ) ) DIV CAST( - col0 AS SIGNED ) FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-3565
SELECT + ( - ( + col1 ) ) / CAST ( - col0 AS INTEGER ) FROM tab1
----
0
0
8

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + 52 AS col1 FROM tab2 AS cor0
----
52

query I rowsort
SELECT + 75 - col1 FROM tab2 AS cor0
----
16
44
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 20 col2 FROM tab1
----
-20

query I rowsort
SELECT ALL 56 AS col1 FROM tab2
----
56
56
56

query I rowsort
SELECT - col0 - col0 AS col0 FROM tab0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 40 * col2 col2 FROM tab2
----
1040
1080
1520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3573
SELECT + CAST( + col1 AS SIGNED ) * tab2.col1 AS col1 FROM tab2
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-3573
SELECT + CAST ( + col1 AS INTEGER ) * tab2.col1 AS col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT + + col0 * cor0.col0 + col2 FROM tab0 cor0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col2 * + tab0.col2 col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - col1 + + col0 * + col1 * ( col1 ) + col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT - col0 + - col1 - 25 FROM tab1 AS cor0
----
-118
-54
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3578
SELECT - col0 DIV col0 + 46 AS col0 FROM tab1 AS cor0
----
45
45
45

skipif mysql # not compatible
query I rowsort label-3578
SELECT - col0 / col0 + 46 AS col0 FROM tab1 AS cor0
----
45
45
45

query I rowsort
SELECT DISTINCT col2 + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + 17 AS col2 FROM tab0, tab2 AS cor0
----
17

query I rowsort
SELECT + + cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3582
SELECT - ( 83 ) DIV col0 FROM tab2 AS cor0
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-3582
SELECT - ( 83 ) / col0 FROM tab2 AS cor0
----
-1
-1
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 84 col1 FROM tab0, tab0 AS cor0
----
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3584
SELECT 21 DIV 4 AS col0 FROM tab1 AS cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-3584
SELECT 21 / 4 AS col0 FROM tab1 AS cor0
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3585
SELECT - + CAST( + col2 AS SIGNED ) DIV col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3585
SELECT - + CAST ( + col2 AS INTEGER ) / col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL - 86 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to f655b6f4c5b9ff73813030f2822ea1fd

query I rowsort
SELECT DISTINCT 40 + col2 AS col0 FROM tab0 AS cor0
----
122
41
73

query I rowsort
SELECT cor0.col0 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab2 cor2
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT DISTINCT col0 + - col1 FROM tab0
----
-2
-62

query I rowsort
SELECT DISTINCT + tab1.col0 * col1 + - 44 AS col2 FROM tab1
----
34
596
996

query I rowsort
SELECT + col2 + + col0 * - 89 FROM tab2
----
-596
-6916
-6993

query I rowsort
SELECT col2 + cor0.col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL col1 * 51 AS col0 FROM tab1 AS cor0
----
1326
510
663

query I rowsort
SELECT ALL + tab0.col1 + col0 * + ( col2 ) FROM tab0
----
132
7389
878

query I rowsort
SELECT DISTINCT + col1 * col0 + col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT + col2 + - tab0.col2 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3598
SELECT 80 / - cor0.col1 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3598
SELECT 80 / - cor0.col1 + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3599
SELECT DISTINCT cor0.col2 DIV - col0 + col2 * + 6 AS col1 FROM tab1 AS cor0
----
306
342
575

skipif mysql # not compatible
query I rowsort label-3599
SELECT DISTINCT cor0.col2 / - col0 + col2 * + 6 AS col1 FROM tab1 AS cor0
----
306
342
575

query I rowsort
SELECT DISTINCT + ( col0 ) + + 95 * 22 FROM tab1
----
2093
2154
2170

query I rowsort
SELECT DISTINCT - col1 + + col2 + + tab2.col2 FROM tab2
----
-7
23
59

query I rowsort
SELECT DISTINCT + col1 * + col0 + tab2.col2 AS col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT tab1.col1 * + col1 FROM tab1
----
100
169
676

query I rowsort
SELECT + ( tab0.col2 ) * 53 AS col0 FROM tab0
----
1749
4346
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT + col2 * + 48 FROM tab0 AS cor0
----
1584
3936
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - 71 col2 FROM tab2 AS cor0
----
1207
2201
4189

query I rowsort
SELECT DISTINCT - col2 * ( col2 ) FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col1 + - col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT col2 * 35 FROM tab1 AS cor0
----
1890
1995
3360

query I rowsort
SELECT + + col0 * ( cor0.col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - - col0 * + 51 + - ( - cor0.col2 ) FROM tab0 cor0
----
1257
1786
4621

query I rowsort
SELECT ALL - col0 + ( col2 ) FROM tab1 cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3614
SELECT - cor0.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-3614
SELECT - cor0.col2 * + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - col1 * + 2 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT col2 + - col2 AS col0 FROM tab2 AS cor0
----
0
0
0

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-3619
SELECT DISTINCT col0 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3619
SELECT DISTINCT col0 / cor0.col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT col1 + + 95 FROM tab1 AS cor0
----
105
108
121

query I rowsort
SELECT col1 * + cor0.col2 * - col2 AS col0 FROM tab0 AS cor0
----
-611884
-93654
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3622
SELECT DISTINCT ( - col1 ) + col0 + CAST( NULL AS SIGNED ) * - 38 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3622
SELECT DISTINCT ( - col1 ) + col0 + CAST ( NULL AS INTEGER ) * - 38 FROM tab2
----
NULL

query I rowsort
SELECT col1 * col1 + + col1 * - col0 AS col1 FROM tab2 cor0
----
-1054
-1121
744

query I rowsort
SELECT DISTINCT - - col1 + + col2 * - col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - 75 AS col2 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT ALL col0 + - 66 FROM tab0 AS cor0
----
-31
-42
23

query I rowsort
SELECT ALL - - ( - ( col1 ) ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - ( + col1 ) * col0 - col1 AS col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL + 2 + - col1 FROM tab2 AS cor0
----
-15
-29
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3630
SELECT + CAST( col2 AS SIGNED ) + - col1 * col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif mysql # not compatible
query I rowsort label-3630
SELECT + CAST ( col2 AS INTEGER ) + - col1 * col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT - - col0 AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL + ( + col0 ) + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT cor0.col2 + col1 FROM tab2 AS cor0
----
55
58
85

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 93ed44f621cc970f32b0cc9543b45262

query I rowsort
SELECT ALL - - col2 * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + - 48 + col0 * col1 AS col2 FROM tab0 AS cor0
----
2016
3347
8051

query I rowsort
SELECT DISTINCT 13 AS col1 FROM tab2 AS cor0
----
13

query I rowsort
SELECT + cor0.col1 + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL 14 * col2 FROM tab0 cor0
----
1148
14
462

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3640
SELECT - ( col0 ) * - CAST( NULL AS DECIMAL ) + - ( col0 ) * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3640
SELECT - ( col0 ) * - CAST ( NULL AS REAL ) + - ( col0 ) * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - cor0.col2 * col0 + + col1 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col0 + col1 * col0 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col1 col1 FROM tab1 cor0
----
1248
1404
570

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 CROSS JOIN tab2, tab1, tab0 AS cor1
----
3645 values hashing to 9d746e15fdb5adcb43a7518cd9743eb3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ( 82 ) + col0 FROM tab1
----
146
162
85

query I rowsort
SELECT ALL + - col0 + col2 + - 38 * 47 * + col0 AS col0 FROM tab0 AS cor0
----
-158961
-42855
-62544

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 CROSS JOIN tab1
----
243 values hashing to 89e3b35a4a4f02d7b83645addb9dcdc3

query I rowsort
SELECT - + 90 FROM tab0, tab0 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 28 + + col2 col2 FROM tab1 cor0
----
26
29
68

query I rowsort
SELECT ALL + col2 + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + - cor0.col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - ( col1 ) * col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - col1 + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - - col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - col2 * col2 + 82 AS col1 FROM tab1 AS cor0
----
-2834
-3167
-9134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 * - col2 col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL + + 38 + - col0 AS col0 FROM tab1 AS cor0
----
-26
-42
35

query I rowsort
SELECT DISTINCT - - 99 + col2 * - 8 AS col1 FROM tab1 cor0
----
-333
-357
-669

query I rowsort
SELECT - tab0.col2 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL + 60 + - col0 * - 16 FROM tab2 AS cor0
----
1308
1324
172

query I rowsort
SELECT DISTINCT - cor0.col1 * + col0 * ( - col0 ) FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT + 13 * cor0.col1 FROM tab2 AS cor0
----
221
403
767

query I rowsort
SELECT - col2 - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL + ( col1 * tab0.col2 ) - 30 * + tab0.col0 AS col2 FROM tab0
----
-953
2118
4792

query I rowsort
SELECT DISTINCT + - 32 * col2 + + 9 - - col0 FROM tab2 AS cor0
----
-1128
-745
-848

onlyif mysql # use DIV operator for integer division
query I rowsort label-3667
SELECT col0 + - col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
1
59
73

skipif mysql # not compatible
query I rowsort label-3667
SELECT col0 + - col2 / + col1 AS col0 FROM tab1 AS cor0
----
1
59
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3668
SELECT ALL - col2 DIV col0 AS col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-3668
SELECT ALL - col2 / col0 AS col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT - col2 - - col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + - col0 * col2 + - col0 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT - col2 * + cor0.col0 * cor0.col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3672
SELECT + - col1 + - cor0.col1 * - CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
156
650
90

skipif mysql # not compatible
query I rowsort label-3672
SELECT + - col1 + - cor0.col1 * - CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
156
650
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col0 + + col2 * - cor0.col2 * - ( col1 ) col0 FROM tab2 AS cor0
----
22382
23205
35282

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col2 col1 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3675
SELECT + col1 DIV - 63 col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3675
SELECT + col1 / - 63 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + 19 + col0 AS col1 FROM tab0
----
108
43
54

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT ALL + ( - cor0.col2 ) + - col1 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT 10 AS col2 FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT 40 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT ALL + 49 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT ALL col0 * - 83 AS col2 FROM tab0 AS cor0
----
-1992
-2905
-7387

query I rowsort
SELECT - col2 * 59 * col2 AS col1 FROM tab2 cor0
----
-39884
-43011
-85196

query I rowsort
SELECT ALL - + col2 * + col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + cor0.col2 col2 FROM tab0 AS cor0
----
164
2
66

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to d2c0c94b38e721d8cf9f7df226475a2f

query I rowsort
SELECT ALL - 91 * - col1 - col0 FROM tab1 cor0
----
1103
2363
846

query I rowsort
SELECT DISTINCT tab1.col2 * - 11 AS col2 FROM tab1, tab1 cor0
----
-1056
-594
-627

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 95920403df268a272c4e933cd0bbe0be

query I rowsort
SELECT - col1 + ( + col1 ) * - col1 FROM tab1
----
-110
-182
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-3692
SELECT ALL + col1 DIV - col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-3692
SELECT ALL + col1 / - col0 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col0 col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + 40 FROM tab1, tab2 AS cor0
----
40

query I rowsort
SELECT cor0.col0 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3696
SELECT ALL - ( - tab2.col0 ) + - col1 DIV + col0 col2 FROM tab2
----
3
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3696
SELECT ALL - ( - tab2.col0 ) + - col1 / + col0 col2 FROM tab2
----
3
78
79

query I rowsort
SELECT DISTINCT - ( col1 ) + col2 * + ( col1 ) * col1 FROM tab2
----
10965
25916
90447

query I rowsort
SELECT DISTINCT 43 + - col1 * - col0 FROM tab0
----
2107
3438
8142

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab0 cor1
----
243 values hashing to 021da207cdc2a046fb0a79bf7cfc38ae

query I rowsort
SELECT - ( - ( col1 ) ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - CAST ( - 73 AS REAL ) * - col0 AS col1 FROM tab2 AS cor0
----
511
5694
5767

query I rowsort
SELECT ALL - + cor0.col1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT cor2.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2 cor2
----
26
27
38

query I rowsort
SELECT 89 AS col0 FROM tab2
----
89
89
89

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 40e4acd618698dd2305f1f7b8b547f7a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3707
SELECT ALL - col0 * + CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3707
SELECT ALL - col0 * + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - ( - cor0.col1 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * ( col1 ) - + col0 * col0 col1 FROM tab2 AS cor0
----
-1010
-6530
-9565

query I rowsort
SELECT + cor0.col2 + + 86 FROM tab0 AS cor0
----
119
168
87

query I rowsort
SELECT col1 * col0 * col1 AS col0 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT col1 + - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 59 + col0 * col0 + + col1 AS col0 FROM tab0 AS cor0
----
1381
721
8071

query I rowsort
SELECT + ( - 98 ) + + col2 AS col0 FROM tab2 AS cor0
----
-60
-71
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-3716
SELECT ALL col1 DIV col2 + - col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3716
SELECT ALL col1 / col2 + - col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + cor0.col1 * + col1 * col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
205438
29822
4930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3718
SELECT - col1 + + 11 + col2 DIV col1 FROM tab0 AS cor0
----
-75
-80
-86

skipif mysql # not compatible
query I rowsort label-3718
SELECT - col1 + + 11 + col2 / col1 FROM tab0 AS cor0
----
-75
-80
-86

query I rowsort
SELECT DISTINCT 37 + + col0 * col0 + - col2 * col1 FROM tab0 AS cor0
----
-2225
1165
496

query I rowsort
SELECT + cor0.col1 - - col1 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT + 11 FROM tab2, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

onlyif mysql # use DIV operator for integer division
query I rowsort label-3722
SELECT 36 DIV 96 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif mysql # not compatible
query I rowsort label-3722
SELECT 36 / 96 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

onlyif mysql # use DIV operator for integer division
query I rowsort label-3723
SELECT - - 26 DIV col2 + - col0 DIV col0 - col2 FROM tab0 cor0
----
-34
-83
24

skipif mysql # not compatible
query I rowsort label-3723
SELECT - - 26 / col2 + - col0 / col0 - col2 FROM tab0 cor0
----
-34
-83
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-3724
SELECT + - ( col2 ) DIV - col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3724
SELECT + - ( col2 ) / - col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT + 23 FROM tab0, tab2 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT DISTINCT col1 * col0 * 24 FROM tab2 AS cor0
----
110448
32232
5208

query I rowsort
SELECT - - 4 FROM tab0 AS cor0
----
4
4
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3728
SELECT DISTINCT - 51 DIV col0 FROM tab1
----
-17
0

skipif mysql # not compatible
query I rowsort label-3728
SELECT DISTINCT - 51 / col0 FROM tab1
----
-17
0

query I rowsort
SELECT + - 66 AS col2 FROM tab1 AS cor0
----
-66
-66
-66

query I rowsort
SELECT - + ( col1 ) FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT + col1 + - col2 * col1 * - col0 AS col1 FROM tab0 AS cor0
----
3492
664209
68198

onlyif mysql # use DIV operator for integer division
query I rowsort label-3732
SELECT - + col0 DIV cor0.col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3732
SELECT - + col0 / cor0.col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - + cor0.col1 + 62 FROM tab2 AS cor0
----
3
31
45

query I rowsort
SELECT + col2 + - col1 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT ( + col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT tab2.col1 FROM tab2, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + 27 AS col1 FROM tab2
----
27
27
27

query I rowsort
SELECT ALL - + col2 AS col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT col1 * 83 FROM tab1 AS cor0
----
1079
2158
830

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * cor0.col0 + 51 + + col1 col2 FROM tab2 AS cor0
----
-1275
-135
-4492

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 + + 17 FROM tab1 AS cor0
----
126
84
97

query I rowsort
SELECT ALL - - col2 + - col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to ca91d1f523a87017f672304548e91a77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * tab1.col0 col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - ( - 36 ) AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT DISTINCT - col0 + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - 86 * - cor0.col0 + col0 FROM tab2 cor0
----
609
6786
6873

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-3751
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + ( cor0.col1 + CAST( + col1 AS SIGNED ) ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3751
SELECT DISTINCT + CAST ( NULL AS REAL ) + ( cor0.col1 + CAST ( + col1 AS INTEGER ) ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 - col0 * col2 AS col1 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT ALL + + ( cor0.col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + + col0 * + 38 AS col1 FROM tab1 AS cor0
----
114
2432
3040

query I rowsort
SELECT DISTINCT - col2 + + col1 * cor0.col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT + col1 - + 5 FROM tab2
----
12
26
54

query I rowsort
SELECT col1 + ( - col1 + + col0 ) * + 25 AS col0 FROM tab1
----
-549
1360
1688

onlyif mysql # use DIV operator for integer division
query I rowsort label-3758
SELECT - col2 DIV tab0.col1 - + col0 AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3758
SELECT - col2 / tab0.col1 - + col0 AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + tab1.col0 - col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + 53 FROM tab0 AS cor0
----
53

query I rowsort
SELECT - - ( - col1 ) + - col1 * + col0 FROM tab1 AS cor0
----
-104
-1053
-650

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-3763
SELECT + + col0 DIV + cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3763
SELECT + + col0 / + cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT ALL - col2 * col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + 3 FROM tab2, tab0 AS cor0
----
3

query I rowsort
SELECT DISTINCT - col0 * ( + tab2.col2 ) FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + 72 + - col2 AS col2 FROM tab0 AS cor0
----
-10
39
71

query I rowsort
SELECT DISTINCT col2 - col1 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3770
SELECT ALL - col2 DIV - col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3770
SELECT ALL - col2 / - col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - + col1 * + cor0.col0 * + 50 - + 39 * col2 FROM tab0 AS cor0
----
-104487
-169789
-408148

query I rowsort
SELECT ALL + - tab2.col1 * - 99 AS col0 FROM tab2, tab0, tab0 cor0
----
27 values hashing to bcd60d28479500be67fb7f800619901d

query I rowsort
SELECT DISTINCT - 84 FROM tab1, tab0 cor0
----
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3774
SELECT - CAST( NULL AS SIGNED ) * - 16 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3774
SELECT - CAST ( NULL AS INTEGER ) * - 16 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab0, tab1 AS cor1
----
972 values hashing to 7942394eb7766dfb9ea95b7805ff595d

query I rowsort
SELECT - cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT + + col0 * + col0 + 46 AS col1 FROM tab1 AS cor0
----
4142
55
6446

query I rowsort
SELECT 64 * - col1 FROM tab1 AS cor0
----
-1664
-640
-832

query I rowsort
SELECT col0 * col2 + + 95 AS col1 FROM tab0 AS cor0
----
130
7393
887

query I rowsort
SELECT + cor0.col1 * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + 34 + + cor0.col1 FROM tab0 AS cor0
----
120
125
131

onlyif mysql # use DIV operator for integer division
query I rowsort label-3782
SELECT - col1 + cor0.col1 DIV + col0 AS col0 FROM tab1 AS cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-3782
SELECT - col1 + cor0.col1 / + col0 AS col0 FROM tab1 AS cor0
----
-10
-13
-18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3783
SELECT ALL + CAST( col0 AS SIGNED ) AS col0 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3783
SELECT ALL + CAST ( col0 AS INTEGER ) AS col0 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3784
SELECT + cor0.col1 + - 81 DIV - col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3784
SELECT + cor0.col1 + - 81 / - col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL - 35 * col1 FROM tab0 AS cor0
----
-3010
-3185
-3395

query I rowsort
SELECT DISTINCT + + col0 * + col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - + col0 + + cor0.col2 + col2 FROM tab1 AS cor0
----
105
112
50

query I rowsort
SELECT - 30 FROM tab1 AS cor0
----
-30
-30
-30

query I rowsort
SELECT ALL 80 + + cor0.col2 + + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1306
689
8083

query I rowsort
SELECT + - ( col2 ) + col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - col1 + ( - col0 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - + 76 + - col0 FROM tab0 AS cor0
----
-100
-111
-165

query I rowsort
SELECT DISTINCT + ( 86 ) * cor0.col1 FROM tab2 cor0
----
1462
2666
5074

query I rowsort
SELECT + col0 * 18 + cor0.col1 AS col0 FROM tab0 AS cor0
----
1693
518
727

query I rowsort
SELECT + + ( ( col0 ) ) * 40 + - cor0.col1 * col1 FROM tab0 cor0
----
-4721
-6436
-8009

query I rowsort
SELECT DISTINCT + col1 + - 5 FROM tab1 AS cor0
----
21
5
8

query I rowsort
SELECT ALL col0 * - col1 + - 84 + + col1 AS col0 FROM tab2
----
-1410
-270
-4627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col2 - - col1 col0 FROM tab0
----
133
143
262

query I rowsort
SELECT ALL col0 - - col1 AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT - - col1 + + col0 * + cor0.col1 + col1 AS col0 FROM tab0 AS cor0
----
2236
3589
8281

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3802
SELECT DISTINCT ( - 24 ) DIV col1 AS col1 FROM tab1 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3802
SELECT DISTINCT ( - 24 ) / col1 AS col1 FROM tab1 AS cor0
----
-1
-2
0

query I rowsort
SELECT ALL - 58 FROM tab1 cor0
----
-58
-58
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-3804
SELECT col2 * + cor0.col0 * col2 + 5 DIV + col2 + col1 FROM tab1 AS cor0
----
207946
737293
8774

skipif mysql # not compatible
query I rowsort label-3804
SELECT col2 * + cor0.col0 * col2 + 5 / + col2 + col1 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT DISTINCT - col0 + - col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT + col2 * - col0 * col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL + cor0.col0 * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + 67 FROM tab1
----
67
67
67

query I rowsort
SELECT DISTINCT - 62 * 21 FROM tab0 AS cor0
----
-1302

query I rowsort
SELECT + col2 + + 83 * + cor0.col1 + 31 AS col0 FROM tab1 AS cor0
----
1206
2243
918

query I rowsort
SELECT DISTINCT + 39 FROM tab0
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - tab0.col0 ) col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT 42 AS col2 FROM tab2 cor0
----
42
42
42

query I rowsort
SELECT - 48 - col0 FROM tab2
----
-126
-127
-55

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 + col1 + - col1 * col1 + col0 FROM tab0 cor0
----
-7286
-8101
-9277

query I rowsort
SELECT DISTINCT + col1 * 18 FROM tab2 cor0
----
1062
306
558

query I rowsort
SELECT DISTINCT + col1 + - 0 FROM tab0
----
86
91
97

query I rowsort
SELECT + - col0 - + ( - col1 + col1 ) * 10 AS col2 FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3820
SELECT DISTINCT - col1 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3820
SELECT DISTINCT - col1 * - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col0 col2 FROM tab0 AS cor0
----
2
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3822
SELECT cor0.col1 + CAST( 55 AS SIGNED ) + + col2 DIV + 6 col2 FROM tab1 AS cor0
----
74
84
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3822
SELECT cor0.col1 + CAST ( 55 AS INTEGER ) + + col2 / + 6 col2 FROM tab1 AS cor0
----
74
84
90

query I rowsort
SELECT ALL - col1 * cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col0 * col1 - - 39 FROM tab0 AS cor0
----
2103
3434
8138

query I rowsort
SELECT ALL + col0 + col1 * col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT ALL + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 * + 94 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 4287df40d60b2aed91ec792328a6579c

query I rowsort
SELECT + cor0.col1 - 54 * col1 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT ALL 79 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col2 col1 FROM tab2
----
52
54
76

query I rowsort
SELECT ALL + cor0.col1 * + 34 + 10 FROM tab2 AS cor0
----
1064
2016
588

query I rowsort
SELECT DISTINCT col0 * - col0 - + col1 FROM tab1 cor0
----
-35
-4106
-6413

query I rowsort
SELECT cor0.col0 + col2 * col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT + col1 * - 8 - - col2 FROM tab2 AS cor0
----
-221
-446
-98

query I rowsort
SELECT ALL col0 * 44 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT ALL + cor0.col2 + col2 * - col2 * + col2 + cor0.col1 FROM tab2 AS cor0
----
-17491
-19625
-54817

query I rowsort
SELECT ALL + col2 + - 57 AS col2 FROM tab1 AS cor0
----
-3
0
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 * - col2 + + col1 col0 FROM tab0 AS cor0
----
-1128
-18922
-649431

query I rowsort
SELECT DISTINCT - - cor0.col0 * - 44 AS col1 FROM tab0 AS cor0
----
-1056
-1540
-3916

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3840
SELECT DISTINCT col2 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3840
SELECT DISTINCT col2 * - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL

query I rowsort
SELECT - col0 + cor0.col1 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL col1 * col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - col1 + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT cor0.col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT 15 * + col2 + - col2 * 86 - + col0 AS col0 FROM tab1 AS cor0
----
-3837
-4111
-6896

query I rowsort
SELECT - + 37 + - col0 + col0 * col1 FROM tab2 AS cor0
----
1227
173
4487

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - cor0.col0 col1 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT + 8 + + ( - cor0.col2 ) * 96 FROM tab0 AS cor0
----
-3160
-7864
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3851
SELECT - col2 + + 75 DIV - col1 - - col1 FROM tab2 AS cor0
----
-25
2
32

skipif mysql # not compatible
query I rowsort label-3851
SELECT - col2 + + 75 / - col1 - - col1 FROM tab2 AS cor0
----
-25
2
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3852
SELECT DISTINCT CAST( - 15 AS DECIMAL ) + col2 * + CAST( NULL AS SIGNED ) * cor0.col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3852
SELECT DISTINCT CAST ( - 15 AS REAL ) + col2 * + CAST ( NULL AS INTEGER ) * cor0.col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3853
SELECT ALL + cor0.col1 DIV - cor0.col1 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3853
SELECT ALL + cor0.col1 / - cor0.col1 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 17 FROM tab0 AS cor0
----
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT col0 + + cor0.col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT + 91 AS col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT tab1.col2 + + 63 FROM tab1
----
117
120
159

onlyif mysql # use DIV operator for integer division
query I rowsort label-3859
SELECT DISTINCT - + col1 DIV - col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3859
SELECT DISTINCT - + col1 / - col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT - 21 * col0 FROM tab2 AS cor0
----
-147
-1638
-1659

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col0 ) col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - cor0.col1 + - cor1.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to bd9416ceffe3b4d31d3a70d7225328c8

query I rowsort
SELECT DISTINCT - 2 FROM tab0
----
-2

query I rowsort
SELECT DISTINCT 41 * + 4 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
164

query I rowsort
SELECT tab1.col1 + col0 * 4 FROM tab1
----
266
333
38

query I rowsort
SELECT 94 FROM tab2
----
94
94
94

query I rowsort
SELECT ALL + 81 AS col2 FROM tab1
----
81
81
81

query I rowsort
SELECT ALL + tab1.col2 - tab1.col0 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to cd9042ce7b6d5be41db6200432d27198

query I rowsort
SELECT + cor1.col0 - + 10 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 5e40846c37ecd5d9e49445a20b3440ce

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab1, tab0 AS cor1
----
3645 values hashing to 2e3240e8d3c0c7c6ff427f9572ba362d

query I rowsort
SELECT ALL + cor0.col2 + + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a451dbe509e87d1600234f39388c7bd3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3872
SELECT CAST( 28 + col0 AS SIGNED ) FROM tab1
----
108
31
92

skipif mysql # not compatible
query I rowsort label-3872
SELECT CAST ( 28 + col0 AS INTEGER ) FROM tab1
----
108
31
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-3873
SELECT DISTINCT - tab2.col0 DIV - col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3873
SELECT DISTINCT - tab2.col0 / - col1 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col2 col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT - col2 * tab0.col1 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT tab0.col2 + + 26 FROM tab0, tab1 AS cor0
----
9 values hashing to 09861500a2ad13e2972bbb3a961e6dba

query I rowsort
SELECT + col0 * - col2 + + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3878
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3878
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3879
SELECT ALL tab2.col2 DIV col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3879
SELECT ALL tab2.col2 / col1 FROM tab2
----
0
0
2

query I rowsort
SELECT col2 + 68 AS col2 FROM tab0
----
101
150
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 col1 FROM tab2
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3883
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3883
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0
----
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT ALL - tab0.col0 AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + - col2 + col0 + col1 AS col0 FROM tab2 AS cor0
----
11
111
58

query I rowsort
SELECT ALL - 74 FROM tab1, tab0 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

onlyif mysql # use DIV operator for integer division
query I rowsort label-3888
SELECT col1 DIV ( - col1 ) FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3888
SELECT col1 / ( - col1 ) FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 50 + col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
2788
47
7412

query I rowsort
SELECT - + 8 AS col1 FROM tab0 AS cor0
----
-8
-8
-8

query I rowsort
SELECT + 81 FROM tab0 AS cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3892
SELECT - ( 77 ) DIV - col0 AS col2 FROM tab2 AS cor0
----
0
0
11

skipif mysql # not compatible
query I rowsort label-3892
SELECT - ( 77 ) / - col0 AS col2 FROM tab2 AS cor0
----
0
0
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3893
SELECT CAST( - col2 AS SIGNED ) + + col2 * CAST( + 21 + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1452
55
8938

skipif mysql # not compatible
query I rowsort label-3893
SELECT CAST ( - col2 AS INTEGER ) + + col2 * CAST ( + 21 + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1452
55
8938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3894
SELECT CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3894
SELECT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col0 col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL cor0.col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - + 2 + col0 * 93 + + col2 AS col0 FROM tab2 cor0
----
676
7278
7383

query I rowsort
SELECT ALL + col2 * + col2 * 68 + + 70 FROM tab0 AS cor0
----
138
457302
74122

query I rowsort
SELECT ALL 59 + col2 AS col1 FROM tab1 cor0
----
113
116
155

query I rowsort
SELECT DISTINCT + - ( col2 ) * 27 AS col0 FROM tab0 AS cor0
----
-2214
-27
-891

query I rowsort
SELECT DISTINCT - 96 * - col0 FROM tab2 AS cor0
----
672
7488
7584

query I rowsort
SELECT col1 + - col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - cor0.col1 * - col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col2 * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 5 AS col0 FROM tab0 AS cor0
----
-5

query I rowsort
SELECT DISTINCT - + ( col0 ) + - col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT 34 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT DISTINCT + 95 FROM tab0
----
95

query I rowsort
SELECT 76 AS col1 FROM tab2 AS cor0
----
76
76
76

query I rowsort
SELECT DISTINCT - - col0 + + col2 + col1 * 44 AS col1 FROM tab1 cor0
----
1201
561
748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3912
SELECT DISTINCT - + col2 DIV col1 col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3912
SELECT DISTINCT - + col2 / col1 col0 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3913
SELECT - col2 - - CAST( + col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-3913
SELECT - col2 - - CAST ( + col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - - cor0.col0 * - col1 + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + + cor0.col1 * - 77 FROM tab2 AS cor0
----
-1309
-2387
-4543

query I rowsort
SELECT ( col2 ) * col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT 73 * col1 * col1 AS col0 FROM tab0
----
539908
604513
686857

query I rowsort
SELECT DISTINCT + col0 * - col1 AS col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - + col2 + - ( 92 ) AS col1 FROM tab0 AS cor0
----
-125
-174
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3920
SELECT ALL col2 DIV col0 AS col1 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3920
SELECT ALL col2 / col0 AS col1 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT + - col0 + col1 + + col1 * - col0 FROM tab1 AS cor0
----
-1107
-55
-694

query I rowsort
SELECT ALL + tab2.col2 * col0 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col2 + tab0.col1 + 36 AS col2 FROM tab0
----
132
45
89

query I rowsort
SELECT col1 + - 85 + col2 FROM tab1 AS cor0
----
-18
-5
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-3925
SELECT + col0 DIV + CAST( col1 AS SIGNED ) + col1 - col2 AS col1 FROM tab2
----
-17
34
4

skipif mysql # not compatible
query I rowsort label-3925
SELECT + col0 / + CAST ( col1 AS INTEGER ) + col1 - col2 AS col1 FROM tab2
----
-17
34
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3926
SELECT DISTINCT + col0 * + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3926
SELECT DISTINCT + col0 * + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab0 cor0
----
NULL

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-3928
SELECT ALL + col2 + - 56 DIV + ( + col0 * 84 ) + col0 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-3928
SELECT ALL + col2 + - 56 / + ( + col0 * 84 ) + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col2 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + 57 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT ALL - tab0.col2 * + 70 + col1 * col0 * + col1 AS col0 FROM tab0
----
175194
329245
731269

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3932
SELECT ALL - col2 + + CAST( NULL AS DECIMAL ) + + 80 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3932
SELECT ALL - col2 + + CAST ( NULL AS REAL ) + + 80 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 - - col2 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + col0 * - col1 + col2 AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3936
SELECT DISTINCT - col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3936
SELECT DISTINCT - col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - - col2 + + ( - 67 ) * - col2 FROM tab0 AS cor0
----
2244
5576
68

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 617c9545df26d6d983e3967864e8e9e4

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * CAST ( + 35 AS REAL ) + col0 AS col1 FROM tab0 cor0
----
1260
3204
864

query I rowsort
SELECT ALL + - col0 + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3941
SELECT ALL cor0.col2 + + CAST( 23 AS SIGNED ) * col0 FROM tab0 AS cor0
----
2129
585
806

skipif mysql # not compatible
query I rowsort label-3941
SELECT ALL cor0.col2 + + CAST ( 23 AS INTEGER ) * col0 FROM tab0 AS cor0
----
2129
585
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-3942
SELECT - col1 + + 50 DIV col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3942
SELECT - col1 + + 50 / col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + col2 * + 98 + col0 FROM tab0 AS cor0
----
133
3258
8125

query I rowsort
SELECT - + col0 + cor0.col0 - + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - 7 * + col1 AS col2 FROM tab0 AS cor0
----
-602
-637
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3946
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * 35 + cor0.col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3946
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * 35 + cor0.col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT 59 * col2 + col2 AS col0 FROM tab0 AS cor0
----
1980
4920
60

query I rowsort
SELECT ALL + - cor0.col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 - - col1 * col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL + col0 + 67 * + col1 - + ( 27 ) FROM tab0 AS cor0
----
5759
6159
6507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3951
SELECT - CAST( NULL AS DECIMAL ) + ( + col0 + + CAST( NULL AS SIGNED ) ) * col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3951
SELECT - CAST ( NULL AS REAL ) + ( + col0 + + CAST ( NULL AS INTEGER ) ) * col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 82 + - col2 AS col0 FROM tab1 AS cor0
----
-14
25
28

query I rowsort
SELECT DISTINCT - cor0.col1 * + col2 + col1 * - col2 FROM tab0 AS cor0
----
-14924
-194
-5676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3954
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3954
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 + - col2 * col2 * + col2 + + col2 FROM tab2
----
-17628
-19663
-54913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col1 * col0 col2 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT + col0 + - col2 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT ( - col1 ) * - col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + 51 FROM tab2 AS cor0
----
51

query I rowsort
SELECT DISTINCT + col2 + - col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + col0 - - col0 * col1 * 92 FROM tab1 AS cor0
----
58944
7179
95760

query I rowsort
SELECT + - ( col0 ) * col1 * + col1 AS col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT col0 * - cor0.col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - cor0.col0 * + col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 41 AS col0 FROM tab2 AS cor0
----
-41
-41
-41

query I rowsort
SELECT + 36 AS col0 FROM tab1 AS cor0
----
36
36
36

query I rowsort
SELECT ALL + - 87 * col0 FROM tab0 AS cor0
----
-2088
-3045
-7743

query I rowsort
SELECT ALL col1 + tab2.col1 AS col0 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT + ( 10 ) + - col1 FROM tab0
----
-76
-81
-87

query I rowsort
SELECT 17 + - col1 FROM tab2
----
-14
-42
0

query I rowsort
SELECT DISTINCT 96 + col1 FROM tab2 AS cor0
----
113
127
155

query I rowsort
SELECT DISTINCT - ( + col0 ) - + col1 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT ALL - + col0 + - col0 FROM tab0 AS cor0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 * col1 col2 FROM tab2 AS cor0
----
1241
2263
4307

query I rowsort
SELECT DISTINCT + - col1 - col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + - col2 AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT 61 * - col1 AS col2 FROM tab1 AS cor0
----
-1586
-610
-793

query I rowsort
SELECT ALL - 62 * - col1 AS col1 FROM tab2 AS cor0
----
1054
1922
3658

query I rowsort
SELECT - 87 FROM tab0 AS cor0
----
-87
-87
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-3981
SELECT ALL + col2 + + cor0.col0 DIV + 65 FROM tab2 AS cor0
----
27
27
39

skipif mysql # not compatible
query I rowsort label-3981
SELECT ALL + col2 + + cor0.col0 / + 65 FROM tab2 AS cor0
----
27
27
39

query I rowsort
SELECT ALL 35 FROM tab2
----
35
35
35

query I rowsort
SELECT - + col2 * - 86 AS col1 FROM tab0 AS cor0
----
2838
7052
86

query I rowsort
SELECT + col0 + col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT - col2 + + col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT col0 * + col1 AS col1 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3987
SELECT + - cor0.col2 * + ( col1 ) DIV - col1 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3987
SELECT + - cor0.col2 * + ( col1 ) / - col1 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3988
SELECT - col1 DIV 99 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3988
SELECT - col1 / 99 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col2 * col2 col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-3990
SELECT ALL - col1 DIV col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3990
SELECT ALL - col1 / col1 FROM tab0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3991
SELECT col2 + col1 DIV col0 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-3991
SELECT col2 + col1 / col0 FROM tab2
----
26
31
38

query I rowsort
SELECT ALL 69 * 87 FROM tab2, tab1 AS cor0
----
9 values hashing to 150db6a2bac4d3896ae72d184bd75c07

query I rowsort
SELECT + col1 * + col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - cor0.col0 + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT ALL - - col1 * col1 - col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT - - col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL - ( + cor0.col1 ) + + cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + + col1 * + 80 FROM tab0 AS cor0
----
6880
7280
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL col2 + 72 AS col2 FROM tab0 cor0
----
105
154
73

query I rowsort
SELECT - col0 * + col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 + - col2 col0 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT DISTINCT + col0 + 29 + - col1 AS col2 FROM tab1 AS cor0
----
6
83
96

query I rowsort
SELECT + ( cor0.col2 ) * col0 + cor0.col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

query I rowsort
SELECT ALL + 46 * 47 AS col0 FROM tab1
----
2162
2162
2162

query I rowsort
SELECT DISTINCT - - 2 AS col0 FROM tab1 AS cor0
----
2

query I rowsort
SELECT - - ( + col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + + col1 * col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + col1 col0 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4012
SELECT ALL + - col0 DIV col0 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4012
SELECT ALL + - col0 / col0 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT + + col0 * cor0.col1 * + col0 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
118826
50625
727535

query I rowsort
SELECT ( col1 * col0 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
41

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-4018
SELECT col1 DIV - col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4018
SELECT col1 / - col0 FROM tab2 AS cor0
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 55 + 89 col2 FROM tab0
----
34

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
3645 values hashing to a5677c50b23f70287df35c2388a1c9bf

query I rowsort
SELECT - tab0.col1 * col0 FROM tab0
----
-2064
-3395
-8099

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col1 NOT IN ( - col1 + col0 )
----

query I rowsort
SELECT DISTINCT - col2 + - col0 AS col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT - tab2.col0 + col0 AS col1 FROM tab2
----
0
0
0

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL BETWEEN NULL AND col0 * - col0
----

query I rowsort
SELECT DISTINCT + tab0.col2 * + tab0.col2 + - col0 * col1 * tab0.col0 FROM tab0
----
-118824
-48447
-714087

query I rowsort
SELECT - col2 - - col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4028
SELECT col1 DIV + col2 AS col0 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4028
SELECT col1 / + col2 AS col0 FROM tab0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4029
SELECT DISTINCT + col0 - col1 DIV col0 FROM tab1
----
-5
64
80

skipif mysql # not compatible
query I rowsort label-4029
SELECT DISTINCT + col0 - col1 / col0 FROM tab1
----
-5
64
80

query I rowsort
SELECT + col0 + + col0 AS col0 FROM tab2 WHERE NOT + col2 = col2
----

query I rowsort
SELECT + col1 - + col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - col1 * col0 - + col2 AS col1 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT - col0 * col0 * col1 + + col0 AS col1 FROM tab1
----
-231
-40896
-83120

query III rowsort
SELECT * FROM tab2 WHERE NOT col0 <> col1 + col2 + - col2
----

query I rowsort
SELECT col0 * col0 + + col2 * col2 + + col1 AS col2 FROM tab1
----
15629
2951
7355

query I rowsort
SELECT col1 * - col2 * + col1 + col1 FROM tab0
----
-243982
-678951
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + + col2 col2 FROM tab1
----
0
0
0

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE NULL <> + col2
----

query I rowsort
SELECT + col1 + + col1 AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL - col1 + + col0 AS col0 FROM tab0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - col1 col2 FROM tab1
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 col2 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4044
SELECT ALL 8 * col0 + - col1 * + col2 DIV col2 FROM tab0 AS cor0
----
106
183
621

skipif mysql # not compatible
query I rowsort label-4044
SELECT ALL 8 * col0 + - col1 * + col2 / col2 FROM tab0 AS cor0
----
106
183
621

query I rowsort
SELECT DISTINCT + col1 + col0 + + 92 AS col1 FROM tab0 AS cor0
----
202
224
272

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to d24b34b0673c90715a7101e7e630fa94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4047
SELECT ALL + col2 - + cor0.col1 * - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4047
SELECT ALL + col2 - + cor0.col1 * - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 col1 FROM tab1
----
10
13
26

query I rowsort
SELECT + col1 + tab0.col2 * - col2 FROM tab0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4050
SELECT tab0.col2 DIV + col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4050
SELECT tab0.col2 / + col2 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL col0 - - col0 FROM tab1
----
128
160
6

query I rowsort
SELECT col1 * col1 + col0 AS col0 FROM tab0 WHERE NOT + col1 = NULL
----

query I rowsort
SELECT DISTINCT - col0 FROM tab1 WHERE ( NULL ) <= NULL
----

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT cor0.col1 + cor0.col1 * + col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL col2 * + col0 AS col2 FROM tab0 WHERE NOT + col1 + col0 * col0 * - col0 = col0 + - col0
----
35
7298
792

query III rowsort
SELECT * FROM tab0 WHERE NOT - col0 <= ( col0 )
----

query I rowsort
SELECT - col2 FROM tab1 WHERE col0 >= col2 * + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4059
SELECT DISTINCT col2 - + tab0.col2 DIV - col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4059
SELECT DISTINCT col2 - + tab0.col2 / - col1 FROM tab0
----
1
33
82

query I rowsort
SELECT col1 + col0 AS col0 FROM tab0
----
110
132
180

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL BETWEEN col2 AND ( NULL )
----

query I rowsort
SELECT col1 * col2 + + col1 AS col2 FROM tab0
----
194
2924
7553

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col1 BETWEEN NULL AND col2
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col1 * col1 * - col2 AS col2 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + cor0.col2 + - col2 * + cor0.col2 * + cor0.col1 FROM tab0 AS cor0
----
-611802
-93621
-96

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT ( - col2 ) = - col2
----

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0 cor2
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query I rowsort
SELECT DISTINCT - - 6 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-198
-492
-6

query I rowsort
SELECT DISTINCT + 41 * - col0 FROM tab1 AS cor0
----
-123
-2624
-3280

query I rowsort
SELECT - 1 FROM tab1, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT 63 * col1 AS col1 FROM tab2
----
1071
1953
3717

query I rowsort
SELECT 5 * 74 + col0 * - col1 AS col0 FROM tab2
----
-4232
-973
153

query I rowsort
SELECT + 31 * 27 + col0 AS col2 FROM tab1 AS cor0
----
840
901
917

query I rowsort
SELECT 2 FROM tab2, tab0 cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - col2 AS REAL ) + - col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT + col0 + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT col0 * ( + col1 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - cor0.col2 + 67 * col2 AS col0 FROM tab1 AS cor0
----
3564
3762
6336

query I rowsort
SELECT ALL - 36 * col1 FROM tab1 AS cor0
----
-360
-468
-936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col2 * + col2 * - cor0.col0 col1 FROM tab2 AS cor0
----
-113997
-5096
-52650

query I rowsort
SELECT col2 * + cor0.col1 * col2 AS col1 FROM tab2 AS cor0
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4083
SELECT DISTINCT - CAST( NULL AS SIGNED ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4083
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col2 * col1 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + + col1 * col1 * col1 AS col2 FROM tab1 AS cor0
----
1000
17576
2197

query I rowsort
SELECT DISTINCT - + col1 AS col1 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4087
SELECT ALL - 96 DIV tab0.col0 col2 FROM tab0
----
-1
-2
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4087
SELECT ALL - 96 / tab0.col0 col2 FROM tab0
----
-1
-2
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4089
SELECT col0 DIV - col0 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4089
SELECT col0 / - col0 AS col2 FROM tab1
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4090
SELECT DISTINCT - col2 DIV col0 - - 40 * col1 FROM tab1
----
1022
400
519

skipif mysql # not compatible
query I rowsort label-4090
SELECT DISTINCT - col2 / col0 - - 40 * col1 FROM tab1
----
1022
400
519

query I rowsort
SELECT + 71 * col2 + col0 + col2 AS col0 FROM tab0
----
107
2400
5993

query I rowsort
SELECT DISTINCT + 4 - tab2.col0 FROM tab2
----
-3
-74
-75

query I rowsort
SELECT - - ( - cor0.col1 ) AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT cor1.col1 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + col2 + - ( col2 ) AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * - col0 AS col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4097
SELECT ALL col0 * - CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-4097
SELECT ALL col0 * - CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4098
SELECT - col1 + col2 + + col2 DIV + col2 FROM tab0 AS cor0
----
-52
-8
-95

skipif mysql # not compatible
query I rowsort label-4098
SELECT - col1 + col2 + + col2 / + col2 FROM tab0 AS cor0
----
-52
-8
-95

query I rowsort
SELECT ALL + col0 * + 76 AS col1 FROM tab2 AS cor0
----
532
5928
6004

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - 26 * + col1 col0 FROM tab0 cor0
----
-2150
-2275
-2425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col2 col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4102
SELECT ALL cor0.col2 DIV 36 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4102
SELECT ALL cor0.col2 / 36 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4103
SELECT - - col2 + - CAST( NULL AS SIGNED ) * + 28 * col1 + col1 * 99 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4103
SELECT - - col2 + - CAST ( NULL AS INTEGER ) * + 28 * col1 + col1 * 99 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * ( + 7 + - col1 * + 78 ) AS col1 FROM tab1 AS cor0
----
-13091
-52546
-7730

query I rowsort
SELECT + + col0 * col0 + + col2 AS col2 FROM tab0 AS cor0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-4106
SELECT col0 DIV - tab0.col0 AS col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4106
SELECT col0 / - tab0.col0 AS col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT - col1 * col0 FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 30 col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL col0 * col1 + - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4110
SELECT ALL - col1 + + CAST( NULL AS SIGNED ) * col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4110
SELECT ALL - col1 + + CAST ( NULL AS INTEGER ) * col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + 45 AS col1 FROM tab1 cor0
----
-19
-35
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4112
SELECT ALL + + col1 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4112
SELECT ALL + + col1 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * + tab2.col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL + 55 * - col0 AS col2 FROM tab2
----
-385
-4290
-4345

query I rowsort
SELECT col0 + 64 FROM tab1
----
128
144
67

query I rowsort
SELECT ALL + 12 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT ALL + col1 * - 18 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT DISTINCT + ( col2 ) + col2 FROM tab0 AS cor0
----
164
2
66

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 90e25bbdedfdeba1119139dab203aeea

query I rowsort
SELECT + cor1.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ( + col1 ) FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL + ( col2 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + - 99 AS col2 FROM tab0 AS cor0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 91 * + col2 AS col2 FROM tab0 AS cor0
----
3003
7462
91

query I rowsort
SELECT DISTINCT + col0 * + cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col1 + + cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * - 54 * + 11 col1 FROM tab2 AS cor0
----
-4158
-46332
-46926

onlyif mysql # use DIV operator for integer division
query I rowsort label-4128
SELECT DISTINCT - 0 DIV cor0.col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4128
SELECT DISTINCT - 0 / cor0.col1 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4129
SELECT ALL + 67 DIV col1 + + col2 AS col2 FROM tab2 AS cor0
----
27
29
41

skipif mysql # not compatible
query I rowsort label-4129
SELECT ALL + 67 / col1 + + col2 AS col2 FROM tab2 AS cor0
----
27
29
41

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT + col0 + + 20 * - col2 AS col2 FROM tab0
----
-1551
-636
15

query I rowsort
SELECT 23 + 32 * col1 AS col2 FROM tab2
----
1015
1911
567

query I rowsort
SELECT 12 - + col0 * col1 AS col0 FROM tab1
----
-1028
-628
-66

query I rowsort
SELECT 35 FROM tab1
----
35
35
35

query I rowsort
SELECT col1 - - col1 FROM tab0
----
172
182
194

query I rowsort
SELECT + col0 * - col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 5 + col1 FROM tab1 AS cor0
----
21
5
8

query I rowsort
SELECT DISTINCT col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 5 * - col0 AS col0 FROM tab1 AS cor0
----
15
320
400

query I rowsort
SELECT ALL + col2 + + 9 AS col1 FROM tab2 AS cor0
----
35
36
47

query I rowsort
SELECT DISTINCT - col2 + col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT + 31 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT 32 FROM tab1, tab0 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT ALL + - cor0.col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col2 * col1 col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - - cor0.col0 + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - col1 - + ( + col2 * - col0 ) FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - col0 * - col0 + + col1 AS col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT - - col2 + - 82 AS col1 FROM tab0 AS cor0
----
-49
-81
0

query I rowsort
SELECT ALL + col2 + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col0 + col2 FROM tab0 cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 * ( col2 * cor0.col2 ) + col1 FROM tab2 AS cor0
----
-114059
-5072
-52669

onlyif mysql # use DIV operator for integer division
query I rowsort label-4155
SELECT DISTINCT cor0.col0 DIV ( 61 ) - - col1 FROM tab2 AS cor0
----
18
31
60

skipif mysql # not compatible
query I rowsort label-4155
SELECT DISTINCT cor0.col0 / ( 61 ) - - col1 FROM tab2 AS cor0
----
18
31
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-4156
SELECT + col2 DIV + cor0.col0 + 62 AS col2 FROM tab1 AS cor0
----
62
63
80

skipif mysql # not compatible
query I rowsort label-4156
SELECT + col2 / + cor0.col0 + 62 AS col2 FROM tab1 AS cor0
----
62
63
80

query I rowsort
SELECT ALL + col0 + 61 AS col1 FROM tab2 AS cor0
----
139
140
68

query I rowsort
SELECT - col2 * cor0.col2 * 74 + col1 * 88 * - col0 FROM tab1 AS cor0
----
-222648
-296746
-773504

query I rowsort
SELECT DISTINCT + col1 + + 85 * 33 AS col1 FROM tab2 AS cor0
----
2822
2836
2864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4160
SELECT DISTINCT + - col0 * 53 + col1 + + col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4160
SELECT DISTINCT + - col0 * 53 + col1 + + col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 04d825fa29899c3ee2704c26a542267d

query I rowsort
SELECT DISTINCT col1 * 23 + + 31 * - col1 AS col0 FROM tab0
----
-688
-728
-776

query I rowsort
SELECT - col1 * + ( + col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col0 + + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + 67 FROM tab0 AS cor0
----
67

query I rowsort
SELECT ( + 91 ) * col0 AS col2 FROM tab0 AS cor0
----
2184
3185
8099

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + + 38 AS col2 FROM tab2 AS cor0
----
38

query I rowsort
SELECT ALL + - 87 AS col0 FROM tab1 cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to c0011cd00aa3e86f06bebc13678997f9

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab1, tab0 AS cor1
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT DISTINCT - col0 * col1 + + 5 FROM tab2
----
-1338
-212
-4597

query I rowsort
SELECT ALL col2 + 25 AS col0 FROM tab0
----
107
26
58

query I rowsort
SELECT 46 * + col0 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT + 60 AS col2 FROM tab1 AS cor0
----
60
60
60

query I rowsort
SELECT ALL - col1 * - 26 FROM tab2 AS cor0
----
1534
442
806

query I rowsort
SELECT - + col0 + 5 FROM tab1 AS cor0
----
-59
-75
2

query I rowsort
SELECT + 95 AS col1 FROM tab2 AS cor0
----
95
95
95

query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4179
SELECT DISTINCT - CAST( + col0 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-4179
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + cor0.col2 * + 33 + - col0 AS col2 FROM tab1 AS cor0
----
1779
1817
3088

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4181
SELECT + CAST( col1 AS SIGNED ) * col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-4181
SELECT + CAST ( col1 AS INTEGER ) * col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL - col1 * col0 + tab1.col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col0 + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT col1 + 41 * - col2 * col1 FROM tab0
----
-116272
-305851
-3880

onlyif mysql # use DIV operator for integer division
query I rowsort label-4185
SELECT - col0 DIV col0 + tab1.col2 + col1 AS col1 FROM tab1
----
108
66
79

skipif mysql # not compatible
query I rowsort label-4185
SELECT - col0 / col0 + tab1.col2 + col1 AS col1 FROM tab1
----
108
66
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4186
SELECT col1 + ( + col2 ) DIV + col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4186
SELECT col1 + ( + col2 ) / + col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT col2 + col1 * col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4188
SELECT - CAST( + col2 AS SIGNED ) + + col2 * col0 FROM tab1 AS cor0
----
108
3591
7584

skipif mysql # not compatible
query I rowsort label-4188
SELECT - CAST ( + col2 AS INTEGER ) + + col2 * col0 FROM tab1 AS cor0
----
108
3591
7584

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab2 cor1
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT 67 AS col1 FROM tab1
----
67
67
67

query I rowsort
SELECT ALL + - ( 58 ) * col2 AS col1 FROM tab1 AS cor0
----
-3132
-3306
-5568

query I rowsort
SELECT 8 FROM tab2 AS cor0
----
8
8
8

query I rowsort
SELECT ALL 59 AS col0 FROM tab1 AS cor0
----
59
59
59

query I rowsort
SELECT DISTINCT + ( - ( col0 ) ) * + 33 + - col2 AS col1 FROM tab1 AS cor0
----
-153
-2169
-2736

query I rowsort
SELECT DISTINCT ( + col1 + + col1 * col1 ) AS col1 FROM tab1
----
110
182
702

query I rowsort
SELECT ALL + ( - 5 ) AS col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 4f346dd2f65047c836c6957f80f0ef9e

query I rowsort
SELECT DISTINCT - cor1.col1 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT 12 FROM tab0
----
12
12
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-4199
SELECT ALL + tab2.col2 * + tab2.col0 DIV - col0 + + col2 * col1 * col0 FROM tab2
----
119626
50996
5832

skipif mysql # not compatible
query I rowsort label-4199
SELECT ALL + tab2.col2 * + tab2.col0 / - col0 + + col2 * col1 * col0 FROM tab2
----
119626
50996
5832

query I rowsort
SELECT + col1 + - col1 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4201
SELECT ALL + + CAST( NULL AS DECIMAL ) col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4201
SELECT ALL + + CAST ( NULL AS REAL ) col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4202
SELECT DISTINCT + 54 * - col2 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-4202
SELECT DISTINCT + 54 * - col2 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL

query I rowsort
SELECT + col2 * col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - 18 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

query I rowsort
SELECT DISTINCT - 48 AS col1 FROM tab0, tab1 AS cor0
----
-48

query I rowsort
SELECT tab1.col0 * col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col1 * + col2 + col1 + col1 AS col2 FROM tab1 AS cor0
----
1274
1456
590

query I rowsort
SELECT + cor0.col1 + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + col2 * + col1 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + cor0.col2 + col0 + - 46 * col0 AS col1 FROM tab0 AS cor0
----
-1047
-1574
-3923

query I rowsort
SELECT ALL - col2 + col1 * col0 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL cor2.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT ALL 14 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT ALL - col0 + tab1.col1 + + tab1.col0 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * col1 * - col0 col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT - - col0 * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 82 * - cor0.col0 FROM tab2 AS cor0
----
-574
-6396
-6478

query I rowsort
SELECT + - col1 * col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query IIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 WHERE NULL <= ( NULL )
----

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT ALL col0 + ( + col2 ) * col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT cor0.col2 + + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 col2 FROM tab1
----
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-4225
SELECT col2 + col1 DIV col2 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-4225
SELECT col2 + col1 / col2 FROM tab0 AS cor0
----
35
83
98

query I rowsort
SELECT 5 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6035628694bdea36f584f3649088551d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 30 * col0 - - col1 col1 FROM tab1 AS cor0
----
-1910
-2387
-64

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 7942394eb7766dfb9ea95b7805ff595d

onlyif mysql # use DIV operator for integer division
query I rowsort label-4229
SELECT + col1 - col2 DIV - col1 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-4229
SELECT + col1 - col2 / - col1 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT + col0 * - 91 + col2 FROM tab2 AS cor0
----
-610
-7072
-7151

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 283f1c907a0999dbd972d3bd45746c06

query I rowsort
SELECT + col0 + + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - ( - col1 ) AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL - 79 AS col1 FROM tab2
----
-79
-79
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4235
SELECT - col2 * cor0.col1 - - CAST( 0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-4235
SELECT - col2 * cor0.col1 - - CAST ( 0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col1 + - col1 * col2 AS col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT - 91 * + col1 FROM tab2
----
-1547
-2821
-5369

query I rowsort
SELECT 97 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT ALL + + cor0.col2 * + col1 + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + col0 * + 18 AS col2 FROM tab0
----
1602
432
630

query I rowsort
SELECT + 32 * + col1 FROM tab1
----
320
416
832

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL - - col2 - col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT 40 - col0 FROM tab1 AS cor0
----
-24
-40
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4245
SELECT DISTINCT + col0 * + col0 - + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4245
SELECT DISTINCT + col0 * + col0 - + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 65 * col0 AS col0 FROM tab1 AS cor0
----
-195
-4160
-5200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4247
SELECT col0 * - col0 - CAST( + col0 * - col1 + cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
1464
2135
89

skipif mysql # not compatible
query I rowsort label-4247
SELECT col0 * - col0 - CAST ( + col0 * - col1 + cor0.col0 AS INTEGER ) FROM tab0 AS cor0
----
1464
2135
89

query I rowsort
SELECT ALL - - cor0.col1 FROM tab2 cor0
----
17
31
59

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

query I rowsort
SELECT DISTINCT 18 * + col1 FROM tab2 AS cor0
----
1062
306
558

query I rowsort
SELECT DISTINCT col0 + + col2 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL 47 + - tab2.col0 FROM tab2
----
-31
-32
40

query I rowsort
SELECT ALL - col0 + col0 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT + - ( - col1 ) + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab0 cor1, tab0, tab1 AS cor2
----
3645 values hashing to 5d64bf87effa587b137e9591cd2c54bf

query I rowsort
SELECT DISTINCT 50 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
50

query I rowsort
SELECT ALL + + 62 * - col2 FROM tab2 AS cor0
----
-1612
-1674
-2356

query I rowsort
SELECT - 30 + - col1 - + col1 FROM tab1
----
-50
-56
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4259
SELECT ALL - 25 DIV + tab1.col0 + ( - col2 ) FROM tab1
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-4259
SELECT ALL - 25 / + tab1.col0 + ( - col2 ) FROM tab1
----
-57
-62
-96

query I rowsort
SELECT ALL + ( - cor1.col0 ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT + 42 - col0 FROM tab2 AS cor0
----
-36
-37
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT DISTINCT col1 + - col1 DIV col1 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-4262
SELECT DISTINCT col1 + - col1 / col1 FROM tab2
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 col0 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL - - tab0.col1 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-4265
SELECT ALL + col1 * + col1 DIV - col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4265
SELECT ALL + col1 * + col1 / - col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + 96 FROM tab2, tab0 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT - col1 - + col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT - + col0 + + 54 AS col2 FROM tab2 AS cor0
----
-24
-25
47

query I rowsort
SELECT DISTINCT - - cor0.col1 FROM tab2, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col2 + + col1 FROM tab2
----
55
58
85

query I rowsort
SELECT col0 * + col0 * col0 + tab0.col2 * + col0 AS col1 FROM tab0
----
14616
42910
712267

onlyif mysql # use DIV operator for integer division
query I rowsort label-4272
SELECT DISTINCT col1 * 57 DIV - col0 FROM tab0
----
-157
-204
-58

skipif mysql # not compatible
query I rowsort label-4272
SELECT DISTINCT col1 * 57 / - col0 FROM tab0
----
-157
-204
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - + col2 * + ( - col1 ) col2 FROM tab0
----
132
2862
7551

query I rowsort
SELECT DISTINCT - 29 AS col1 FROM tab2
----
-29

query I rowsort
SELECT - 28 * + col2 FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT + - 78 * - col0 * - cor0.col0 FROM tab0 AS cor0
----
-44928
-617838
-95550

query I rowsort
SELECT - ( - col1 ) * cor0.col1 * col1 FROM tab2 AS cor0
----
205379
29791
4913

query I rowsort
SELECT ALL col2 * 95 FROM tab1 AS cor0
----
5130
5415
9120

query I rowsort
SELECT - - col2 * - col2 FROM tab2 cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4280
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4280
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 23 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT ALL col0 + cor0.col2 * - col2 FROM tab0 cor0
----
-1065
-6635
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 25 col0 FROM tab2 AS cor0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col1 ) col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL 65 + col2 FROM tab1 AS cor0
----
119
122
161

query I rowsort
SELECT - - col0 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + + col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + + cor0.col0 * ( col1 ) * 1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + 10 AS col0 FROM tab0 AS cor0
----
10

query I rowsort
SELECT ALL + - 24 FROM tab2 AS cor0
----
-24
-24
-24

query I rowsort
SELECT + 54 - - col1 AS col0 FROM tab1
----
64
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4292
SELECT - col1 * CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-4292
SELECT - col1 * CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 64 col2 FROM tab1, tab0 cor0
----
-64

query I rowsort
SELECT + 97 FROM tab0, tab0 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT DISTINCT + col0 * - col0 FROM tab1
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 14 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT ALL - + col0 + + col2 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4298
SELECT CAST( cor0.col1 AS SIGNED ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

skipif mysql # not compatible
query I rowsort label-4298
SELECT CAST ( cor0.col1 AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-4299
SELECT ALL - - col0 DIV + ( col1 * col0 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4299
SELECT ALL - - col0 / + ( col1 * col0 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + ( 47 ) FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT DISTINCT - - cor0.col1 * 45 - ( cor0.col0 ) FROM tab2 AS cor0
----
1388
2577
686

query I rowsort
SELECT DISTINCT - col0 * col0 * col0 AS col2 FROM tab2 cor0
----
-343
-474552
-493039

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4303
SELECT ALL CAST( NULL AS DECIMAL ) / col2 + - col0 * + 39 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4303
SELECT ALL CAST ( NULL AS REAL ) / col2 + - col0 * + 39 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 col1 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 59 ) + - col0 col1 FROM tab2
----
-19
-20
52

query I rowsort
SELECT DISTINCT col1 - 64 FROM tab0
----
22
27
33

query I rowsort
SELECT + col0 * col1 + cor0.col0 - ( - cor0.col2 + col0 ) FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL - + 64 * + col2 FROM tab2 cor0
----
-1664
-1728
-2432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT DISTINCT - + 30 * ( - col0 ) FROM tab1 AS cor0
----
1920
2400
90

query I rowsort
SELECT + - col0 + - cor0.col1 + + col2 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT + col2 + - 30 + + col2 AS col1 FROM tab1 AS cor0
----
162
78
84

query I rowsort
SELECT cor0.col0 * cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to bc669a3cc969c7619ebcffb5400ba0ba

query I rowsort
SELECT DISTINCT - 81 FROM tab0 AS cor0
----
-81

query I rowsort
SELECT DISTINCT - 29 + + col2 * col0 AS col0 FROM tab0
----
6
7269
763

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 col2 FROM tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4317
SELECT DISTINCT - col1 DIV col0 + col1 * 53 + + col1 * tab2.col1 FROM tab2
----
1190
2600
6608

skipif mysql # not compatible
query I rowsort label-4317
SELECT DISTINCT - col1 / col0 + col1 * 53 + + col1 * tab2.col1 FROM tab2
----
1190
2600
6608

query I rowsort
SELECT ( - tab1.col2 ) * - col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 56 * ( tab0.col0 ) + - col0 * + col1 FROM tab0
----
-1435
-3115
-720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4320
SELECT - + 84 DIV + col0 col2 FROM tab2 AS cor0
----
-1
-1
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4320
SELECT - + 84 / + col0 col2 FROM tab2 AS cor0
----
-1
-1
-12

query I rowsort
SELECT + 47 FROM tab2 AS cor0
----
47
47
47

query I rowsort
SELECT DISTINCT + - col1 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL + 6 * cor0.col2 + 23 * + col2 - col0 AS col0 FROM tab1 AS cor0
----
1563
1589
2704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 * - col2 + - col1 col0 FROM tab0 AS cor0
----
-17
2554
6469

query I rowsort
SELECT DISTINCT - + col0 AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - - 15 FROM tab2 AS cor0
----
15

query I rowsort
SELECT + col2 + col0 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL 78 FROM tab2 AS cor0
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4329
SELECT + - cor0.col0 * col1 + col2 + 23 DIV col1 AS col0 FROM tab2 AS cor0
----
-1304
-190
-4576

skipif mysql # not compatible
query I rowsort label-4329
SELECT + - cor0.col0 * col1 + col2 + 23 / col1 AS col0 FROM tab2 AS cor0
----
-1304
-190
-4576

query I rowsort
SELECT ALL + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - - col0 * + col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + - cor0.col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - col1 + col2 * - 43 - + ( col2 * - ( col0 ) ) FROM tab2 AS cor0
----
-1003
1351
851

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 + 66 * col2 FROM tab2
----
1716
1782
2508

onlyif mysql # use DIV operator for integer division
query I rowsort label-4336
SELECT + 6 * col0 DIV - 55 FROM tab2
----
-8
-8
0

skipif mysql # not compatible
query I rowsort label-4336
SELECT + 6 * col0 / - 55 FROM tab2
----
-8
-8
0

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0, tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + col2 * - col0 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * col2 col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col0 + + col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT - col2 - cor0.col0 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * - cor0.col1 + - col1 col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - col2 + col2 * + col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT + col2 + + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - col1 + - 41 * col2 FROM tab2 AS cor0
----
-1125
-1138
-1575

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 69 + - 69 col2 FROM tab2 AS cor0
----
1104
2070
4002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4347
SELECT col0 * - CAST( NULL AS SIGNED ) + - col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4347
SELECT col0 * - CAST ( NULL AS INTEGER ) + - col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 53 + col1 FROM tab1
----
-27
-40
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 * - col0 col0 FROM tab1
----
-102
-2176
-2720

query I rowsort
SELECT - + col1 * + col2 + col2 * + col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4351
SELECT col0 DIV + col2 AS col1 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4351
SELECT col0 / + col2 AS col1 FROM tab1 cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4352
SELECT + CAST( 71 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
71
71
71

skipif mysql # not compatible
query I rowsort label-4352
SELECT + CAST ( 71 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL ( + col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col1 + + col1 + col1 * - 95 FROM tab1 cor0
----
-1209
-2418
-930

query I rowsort
SELECT col0 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + ( ( - col2 ) ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4358
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4358
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 * - ( 5 ) AS col0 FROM tab2
----
-155
-295
-85

query I rowsort
SELECT - col1 + - col2 FROM tab0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4361
SELECT col0 DIV 70 + + col1 AS col2 FROM tab0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-4361
SELECT col0 / 70 + + col1 AS col2 FROM tab0
----
86
92
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT 65 AS col0 FROM tab0
----
65
65
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4364
SELECT - CAST( NULL AS DECIMAL ) + 97 + + col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4364
SELECT - CAST ( NULL AS REAL ) + 97 + + col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + cor0.col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - 76 FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab0 cor1
----
81 values hashing to 30b3ee36c95bb84d1f6a640c4d41cf15

query I rowsort
SELECT DISTINCT 96 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
96

query I rowsort
SELECT DISTINCT + 80 FROM tab2
----
80

query I rowsort
SELECT - ( 50 ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4370
SELECT + col0 DIV - tab2.col1 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4370
SELECT + col0 / - tab2.col1 FROM tab2
----
-1
-4
0

query I rowsort
SELECT DISTINCT - 40 * col1 * col2 AS col1 FROM tab2 AS cor0
----
-25840
-33480
-61360

query I rowsort
SELECT - + ( - col0 ) * cor0.col1 * + col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL + - cor0.col2 + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + ( - 32 ) FROM tab1 AS cor0
----
-32

query I rowsort
SELECT - + cor0.col0 - - cor0.col1 * - col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - - 8 FROM tab2 cor0
----
8
8
8

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ALL col1 - col1 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - col1 * - col2 + ( tab0.col2 ) * - col2 + col2 FROM tab0
----
1782
820
97

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - 91 AS col0 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

onlyif mysql # use DIV operator for integer division
query I rowsort label-4382
SELECT + col0 DIV col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4382
SELECT + col0 / col0 FROM tab0
----
1
1
1

query I rowsort
SELECT - 18 - - col0 AS col2 FROM tab0
----
17
6
71

query I rowsort
SELECT DISTINCT col0 + - col0 + col2 FROM tab2
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4385
SELECT CAST( 42 AS SIGNED ) FROM tab0 AS cor0
----
42
42
42

skipif mysql # not compatible
query I rowsort label-4385
SELECT CAST ( 42 AS INTEGER ) FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT DISTINCT tab2.col2 AS col1 FROM tab2, tab0 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4387
SELECT CAST( cor0.col0 AS SIGNED ) + col2 * 88 AS col1 FROM tab2 AS cor0
----
2366
2383
3423

skipif mysql # not compatible
query I rowsort label-4387
SELECT CAST ( cor0.col0 AS INTEGER ) + col2 * 88 AS col1 FROM tab2 AS cor0
----
2366
2383
3423

query I rowsort
SELECT - col1 * + col2 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - 11 AS col2 FROM tab0 AS cor0
----
-11

query I rowsort
SELECT - ( col2 ) * col2 * - 70 AS col1 FROM tab2 AS cor0
----
101080
47320
51030

query I rowsort
SELECT DISTINCT 48 * 13 AS col1 FROM tab2 AS cor0
----
624

query I rowsort
SELECT + ( - 80 ) FROM tab0 AS cor0
----
-80
-80
-80

query I rowsort
SELECT 50 FROM tab1
----
50
50
50

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT 93 * - col2 FROM tab1 cor0
----
-5022
-5301
-8928

query I rowsort
SELECT ALL - 73 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

query I rowsort
SELECT - col2 + 26 * + col0 AS col2 FROM tab1 cor0
----
1607
1984
24

query I rowsort
SELECT - - cor0.col1 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + - col1 * - col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - cor1.col0 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT col2 + col1 AS col0 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT col2 * + 94 AS col1 FROM tab1 AS cor0
----
5076
5358
9024

onlyif mysql # use DIV operator for integer division
query I rowsort label-4403
SELECT - cor0.col0 DIV col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4403
SELECT - cor0.col0 / col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 * col2 * - col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - col1 * col0 + - 79 AS col0 FROM tab1 AS cor0
----
-1119
-157
-719

query I rowsort
SELECT DISTINCT + col1 + 97 AS col0 FROM tab0 AS cor0
----
183
188
194

query I rowsort
SELECT ALL + col1 * 27 + 83 - col1 AS col1 FROM tab2 AS cor0
----
1617
525
889

onlyif mysql # use DIV operator for integer division
query I rowsort label-4408
SELECT ALL - col1 + 60 DIV + col0 FROM tab1 AS cor0
----
-10
-13
-6

skipif mysql # not compatible
query I rowsort label-4408
SELECT ALL - col1 + 60 / + col0 FROM tab1 AS cor0
----
-10
-13
-6

query I rowsort
SELECT DISTINCT + - col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - - col1 AS col2 FROM tab0 cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4411
SELECT ALL - col0 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4411
SELECT ALL - col0 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - ( - col0 ) col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col1 + col1 * - col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT DISTINCT + - col0 + col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col2 + + 67 * - col0 FROM tab0 AS cor0
----
-1575
-2344
-5881

onlyif mysql # use DIV operator for integer division
query I rowsort label-4416
SELECT ALL col0 DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-4416
SELECT ALL col0 / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL + col2 + + col0 * cor0.col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4418
SELECT DISTINCT col1 * CAST( col2 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
611884
93654
97

skipif mysql # not compatible
query I rowsort label-4418
SELECT DISTINCT col1 * CAST ( col2 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT ALL - col1 + col2 * - col2 AS col2 FROM tab2 cor0
----
-1461
-735
-760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4420
SELECT cor0.col2 DIV cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-4420
SELECT cor0.col2 / cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL col1 + - 12 AS col1 FROM tab1 AS cor0
----
-2
1
14

query I rowsort
SELECT DISTINCT + - ( - col2 ) * + cor0.col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4423
SELECT ALL - CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4423
SELECT ALL - CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4424
SELECT - col2 + 66 * col0 * CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
270279
422304
540

skipif mysql # not compatible
query I rowsort label-4424
SELECT - col2 + 66 * col0 * CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
270279
422304
540

onlyif mysql # use DIV operator for integer division
query I rowsort label-4425
SELECT DISTINCT - col1 DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-4425
SELECT DISTINCT - col1 / col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT ALL col1 + - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL - + col2 + 44 FROM tab1 AS cor0
----
-10
-13
-52

query I rowsort
SELECT + col2 * + col0 * col1 - col1 FROM tab0 cor0
----
3298
664027
68026

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to f0b9665afa0b835e4e5097af17c51766

query I rowsort
SELECT - - ( + col0 ) * - 89 FROM tab0 cor0
----
-2136
-3115
-7921

query I rowsort
SELECT DISTINCT 57 * cor0.col0 AS col1 FROM tab2 AS cor0
----
399
4446
4503

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 * + 58 col2 FROM tab0 AS cor0
----
1306
1933
5071

query I rowsort
SELECT - ( col1 ) * + 30 FROM tab2 AS cor0
----
-1770
-510
-930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4434
SELECT DISTINCT ( col2 ) * CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4434
SELECT DISTINCT ( col2 ) * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4435
SELECT ALL col2 DIV col2 + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4435
SELECT ALL col2 / col2 + col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL - 43 AS col0 FROM tab0 AS cor0
----
-43
-43
-43

query I rowsort
SELECT + col2 - - col2 AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT + col0 + + col0 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 + + col1 * col0 col2 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT + - col0 * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab1, tab1 cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT col1 * + col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 68 + col1 AS col2 FROM tab2
----
127
85
99

query I rowsort
SELECT 60 * - col1 * col1 FROM tab0
----
-443760
-496860
-564540

query I rowsort
SELECT - 20 AS col2 FROM tab1
----
-20
-20
-20

query I rowsort
SELECT - 26 * - col2 + 95 * + col1 AS col1 FROM tab2
----
2603
3647
6281

query I rowsort
SELECT DISTINCT 54 FROM tab1 AS cor0
----
54

query I rowsort
SELECT DISTINCT + + 34 * col2 - cor0.col0 * col1 FROM tab0 AS cor0
----
-3361
-5311
-942

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 6156c969b7e054b8a333fdb86aee82f2

query I rowsort
SELECT DISTINCT - 80 AS col0 FROM tab2 AS cor0
----
-80

query I rowsort
SELECT + col1 * ( + col1 ) + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT 18 FROM tab0 AS cor0
----
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 53 col2 FROM tab1
----
107
110
149

query I rowsort
SELECT DISTINCT col0 * 98 + col0 AS col0 FROM tab0
----
2376
3465
8811

query I rowsort
SELECT DISTINCT tab1.col0 * - tab1.col2 + - col1 * tab1.col1 * + col1 FROM tab1
----
-17738
-4648
-9877

query I rowsort
SELECT DISTINCT - 25 * - 64 + cor0.col1 AS col0 FROM tab1 cor0
----
1610
1613
1626

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 85 * + col2 - - col2 col2 FROM tab0 AS cor0
----
2838
7052
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 + - col1 * col1 * col2 col1 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT ALL - tab1.col0 + + ( tab1.col1 ) AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT 92 + + col0 * + col0 * col0 FROM tab2
----
435
474644
493131

query I rowsort
SELECT DISTINCT - col2 * col1 + - col1 * col1 AS col1 FROM tab1
----
-1417
-2080
-670

onlyif mysql # use DIV operator for integer division
query I rowsort label-4462
SELECT - col1 DIV - col1 + + col1 DIV col0 col2 FROM tab2 AS cor0
----
1
1
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4462
SELECT - col1 / - col1 + + col1 / col0 col2 FROM tab2 AS cor0
----
1
1
5

query I rowsort
SELECT + col2 + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - ( - ( - col0 ) ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT - 70 * tab2.col2 + col2 FROM tab2
----
-1794
-1863
-2622

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4466
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4466
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col2 AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - col1 * + 9 AS col0 FROM tab0
----
-774
-819
-873

query I rowsort
SELECT ALL col0 + col1 * - col2 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL cor0.col0 - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - col0 * - col1 + col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT - col0 * col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col1 * + col1 + - col0 * - col0 AS col2 FROM tab0
----
10634
16202
7972

query I rowsort
SELECT DISTINCT ( tab1.col1 ) * + 16 AS col1 FROM tab1
----
160
208
416

query I rowsort
SELECT - 60 + - col1 AS col1 FROM tab0
----
-146
-151
-157

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col0 col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL col2 + 3 * + 98 * col0 FROM tab2 AS cor0
----
2085
22958
23264

onlyif mysql # use DIV operator for integer division
query I rowsort label-4479
SELECT col0 * ( + col2 ) DIV col1 col0 FROM tab2 AS cor0
----
176
34
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4479
SELECT col0 * ( + col2 ) / col1 col0 FROM tab2 AS cor0
----
176
34
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4480
SELECT + cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4480
SELECT + cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * + 21 FROM tab2 AS cor0
----
546
567
798

query I rowsort
SELECT + + col1 * 22 AS col0 FROM tab1 AS cor0
----
220
286
572

query I rowsort
SELECT ALL 7 AS col2 FROM tab1
----
7
7
7

query I rowsort
SELECT + tab1.col2 * + col2 + col1 * tab1.col2 AS col2 FROM tab1
----
10464
3819
4320

query I rowsort
SELECT - cor0.col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab2
----
58

query I rowsort
SELECT ALL - tab0.col2 * - col1 AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + 56 * + col0 + - 10 AS col1 FROM tab1
----
158
3574
4470

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

query I rowsort
SELECT col0 * ( col1 ) AS col0 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4491
SELECT DISTINCT + col1 + - col0 DIV - col1 AS col0 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-4491
SELECT DISTINCT + col1 + - col0 / - col1 AS col0 FROM tab2
----
21
31
60

query I rowsort
SELECT col0 + col1 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT + col0 * 8 * - 62 + - col0 FROM tab2
----
-3479
-38766
-39263

query I rowsort
SELECT ALL - col0 + + 72 * col1 FROM tab0 AS cor0
----
6168
6463
6949

query I rowsort
SELECT - cor0.col1 * + 91 + - 44 FROM tab2 AS cor0
----
-1591
-2865
-5413

query I rowsort
SELECT DISTINCT col1 * 76 AS col1 FROM tab2 cor0
----
1292
2356
4484

query I rowsort
SELECT + cor0.col1 * col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4498
SELECT DISTINCT - - cor0.col1 * + CAST( 17 AS SIGNED ) + - col2 FROM tab2 cor0
----
251
500
977

skipif mysql # not compatible
query I rowsort label-4498
SELECT DISTINCT - - cor0.col1 * + CAST ( 17 AS INTEGER ) + - col2 FROM tab2 cor0
----
251
500
977

onlyif mysql # use DIV operator for integer division
query I rowsort label-4499
SELECT ALL - cor0.col0 + col1 DIV - col1 AS col0 FROM tab2 AS cor0
----
-79
-8
-80

skipif mysql # not compatible
query I rowsort label-4499
SELECT ALL - cor0.col0 + col1 / - col1 AS col0 FROM tab2 AS cor0
----
-79
-8
-80

query I rowsort
SELECT + - col2 * - 28 - col2 * + col2 FROM tab2 AS cor0
----
-380
27
52

query I rowsort
SELECT ALL - col0 + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 - - col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + col1 + + 88 * ( col1 ) AS col2 FROM tab2 AS cor0
----
1513
2759
5251

query I rowsort
SELECT cor0.col0 + cor0.col0 * - col1 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL + - col2 * + col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + col2 * col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL col1 * + col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL col1 * + col0 + - col0 * + col0 FROM tab1
----
-3456
-5360
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4510
SELECT ALL - col2 DIV + col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4510
SELECT ALL - col2 / + col2 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT - - col1 * + col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4512
SELECT DISTINCT + col1 DIV col1 AS col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-4512
SELECT DISTINCT + col1 / col1 AS col0 FROM tab2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col0 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT + + col2 + col1 + col2 AS col0 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT - col1 * + col0 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT - - col0 + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - + col1 + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT col1 + col0 * + col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + + col2 * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col2 * col1 * - col1 AS col1 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT + tab1.col0 * + col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col2 * - cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + col2 * + col1 - - col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4524
SELECT ALL col0 * cor0.col2 DIV + col0 AS col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4524
SELECT ALL col0 * cor0.col2 / + col0 AS col0 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4525
SELECT + col2 DIV - col1 + col1 * - col1 + - cor0.col1 AS col0 FROM tab1 cor0
----
-115
-189
-704

skipif mysql # not compatible
query I rowsort label-4525
SELECT + col2 / - col1 + col1 * - col1 + - cor0.col1 AS col0 FROM tab1 cor0
----
-115
-189
-704

query I rowsort
SELECT + col0 - col2 AS col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT col2 * + col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + - col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - col2 * col1 - col0 FROM tab1 cor0
----
-1328
-1407
-634

query I rowsort
SELECT col1 + col0 AS col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 * col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + + 35 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
105
2240
2800

query I rowsort
SELECT + col0 + + col2 + col0 AS col0 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT ALL 29 + + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-260
-3452
-932

query I rowsort
SELECT ALL - - cor0.col2 * col0 * col0 + - col0 + - col0 FROM tab1 AS cor0
----
233344
480
614240

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col1 + - col2 AS col0 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4539
SELECT DISTINCT - col2 + col1 DIV col2 AS col1 FROM tab0 AS cor0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-4539
SELECT DISTINCT - col2 + col1 / col2 AS col1 FROM tab0 AS cor0
----
-31
-81
96

query I rowsort
SELECT ALL cor0.col2 * col0 AS col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4541
SELECT DISTINCT - cor0.col1 DIV + col0 + + col0 * col1 FROM tab1 AS cor0
----
1040
640
70

skipif mysql # not compatible
query I rowsort label-4541
SELECT DISTINCT - cor0.col1 / + col0 + + col0 * col1 FROM tab1 AS cor0
----
1040
640
70

query I rowsort
SELECT cor0.col1 * - col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + + col1 + - col0 + - col2 AS col1 FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT DISTINCT col2 * col0 * col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + cor1.col0 * cor0.col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 21856088ba874ad1439062daed37ef79

query I rowsort
SELECT + col2 + col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL col2 * + col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT cor0.col0 + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 + col1 col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT + + col1 - - col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + ( col0 ) + 10 AS col2 FROM tab2 AS cor0
----
17
88
89

query I rowsort
SELECT DISTINCT col0 + - col2 * + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + 15 * col2 AS col1 FROM tab0 cor0
----
1230
15
495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 49 * col2 col1 FROM tab1
----
2646
2793
4704

query I rowsort
SELECT - 91 AS col0 FROM tab2
----
-91
-91
-91

query I rowsort
SELECT DISTINCT - ( + col0 ) * col2 * + col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-119593
-51017
-5828

query I rowsort
SELECT ALL ( + col2 ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 24 - col2 AS col1 FROM tab2
----
-14
-2
-3

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2 cor1
----
54 values hashing to d8165ceb99ded93f34ad83c310a80ea7

query I rowsort
SELECT + - col1 * col2 * col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - + 55 AS col1 FROM tab1 AS cor0
----
-55
-55
-55

query I rowsort
SELECT - ( cor0.col2 ) * + ( 9 ) FROM tab1 AS cor0
----
-486
-513
-864

query I rowsort
SELECT + col2 - tab0.col1 * + 24 FROM tab0
----
-2031
-2102
-2327

query I rowsort
SELECT ALL col1 * - col0 AS col1 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4566
SELECT 10 DIV + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4566
SELECT 10 / + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4567
SELECT DISTINCT CAST( NULL AS DECIMAL ) + + cor0.col2 FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4567
SELECT DISTINCT CAST ( NULL AS REAL ) + + cor0.col2 FROM tab2, tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 85 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT + col1 * - ( + col0 ) * - cor0.col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - col1 + 22 FROM tab1 AS cor0
----
-4
12
9

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4572
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab0 cor0 CROSS JOIN tab1, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4572
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab0 cor0 CROSS JOIN tab1, tab0 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT col1 * + 9 FROM tab1
----
117
234
90

query I rowsort
SELECT ( - col1 * - col1 ) - + col1 AS col0 FROM tab2
----
272
3422
930

query I rowsort
SELECT DISTINCT + col2 * 54 AS col1 FROM tab0
----
1782
4428
54

query I rowsort
SELECT ( col2 ) * col1 * + col2 AS col1 FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT + ( ( - col1 ) ) * ( + cor0.col2 ) * + cor0.col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL + ( ( col0 ) ) + - col0 + + ( col0 ) FROM tab0
----
24
35
89

query I rowsort
SELECT ALL + + cor0.col0 + - 9 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 12889dce14550663178710e321e23a28

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab0 cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4581
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col0 + - col1 + - ( + ( col0 ) + col0 ) * col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-4581
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col0 + - col1 + - ( + ( col0 ) + col0 ) * col1 FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4582
SELECT ( + ( - col2 ) + CAST( col0 AS SIGNED ) * - tab2.col0 ) col0 FROM tab2
----
-6110
-6279
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4582
SELECT ( + ( - col2 ) + CAST ( col0 AS INTEGER ) * - tab2.col0 ) col0 FROM tab2
----
-6110
-6279
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4583
SELECT col1 DIV 96 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4583
SELECT col1 / 96 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( - col2 ) AS col1 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + 11 * col0 col0 FROM tab1 AS cor0
----
-21
647
784

query I rowsort
SELECT DISTINCT col1 * - col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - ( + col2 ) + - col1 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - col0 + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4589
SELECT DISTINCT CAST( NULL AS DECIMAL ) * + col1 + col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4589
SELECT DISTINCT CAST ( NULL AS REAL ) * + col1 + col0 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - 80 + ( - col0 ) * - col2 AS col0 FROM tab0 AS cor0
----
-45
712
7218

query I rowsort
SELECT 19 + col0 AS col0 FROM tab2 AS cor0
----
26
97
98

query I rowsort
SELECT DISTINCT col0 * + col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 25 col0 FROM tab0 cor0
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to eac00a95d734c7071360ed392c3f39bc

query I rowsort
SELECT ALL - ( cor0.col2 ) FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 col1 FROM tab1
----
48
48
48

query I rowsort
SELECT - - col2 * - col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + col1 + 62 AS col1 FROM tab0 AS cor0
----
148
153
159

query I rowsort
SELECT + cor0.col2 - col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT col1 * - col2 + 96 AS col0 FROM tab0
----
-1
-2742
-7366

onlyif mysql # use DIV operator for integer division
query I rowsort label-4601
SELECT - col1 + ( cor0.col2 ) DIV col1 AS col0 FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-4601
SELECT - col1 + ( cor0.col2 ) / col1 AS col0 FROM tab1 AS cor0
----
-24
-5
-6

query I rowsort
SELECT col0 * col2 + + col1 AS col1 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-4603
SELECT DISTINCT cor0.col1 DIV 2 col0 FROM tab2 AS cor0
----
15
29
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4603
SELECT DISTINCT cor0.col1 / 2 col0 FROM tab2 AS cor0
----
15
29
8

query I rowsort
SELECT + col1 + - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL - cor0.col0 + - col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - - col1 * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col1 - + col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT cor0.col1 * col2 + - col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + col1 + col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - col0 * col0 + - 34 FROM tab0 AS cor0
----
-1259
-610
-7955

query I rowsort
SELECT DISTINCT + 60 + col0 * - col1 FROM tab1 AS cor0
----
-18
-580
-980

onlyif mysql # use DIV operator for integer division
query I rowsort label-4612
SELECT ALL - - ( - 15 ) DIV + col1 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4612
SELECT ALL - - ( - 15 ) / + col1 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT - - ( 48 ) * col2 + + ( 41 ) AS col0 FROM tab1 AS cor0
----
2633
2777
4649

query I rowsort
SELECT + + 8 * col0 FROM tab1 cor0
----
24
512
640

query I rowsort
SELECT col0 * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 59 * col1 AS col0 FROM tab0 cor0
----
-5074
-5369
-5723

query I rowsort
SELECT + col0 * + col2 + - col2 FROM tab1 cor0
----
108
3591
7584

query I rowsort
SELECT ALL - 59 * - col2 AS col1 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT col0 * col1 * + 16 AS col2 FROM tab0
----
129584
33024
54320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4620
SELECT - col2 * - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4620
SELECT - col2 * - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 + 76 AS col0 FROM tab1 AS cor0
----
-20
19
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 77 col1 FROM tab2 AS cor0
----
-539
-6006
-6083

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col0 + col0 * + col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col2 ) * cor0.col0 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col2 * - 37 + - col0 AS col2 FROM tab0 AS cor0
----
-1245
-3123
-72

query I rowsort
SELECT DISTINCT - + col0 - 27 AS col1 FROM tab1 AS cor0
----
-107
-30
-91

query I rowsort
SELECT ( + ( col0 ) ) * ( col2 * - col2 ) + col2 FROM tab0 AS cor0
----
-26103
-34
-598354

query I rowsort
SELECT + 89 + - 1 * col1 AS col0 FROM tab0 AS cor0
----
-2
-8
3

query I rowsort
SELECT DISTINCT - + col2 + 14 AS col1 FROM tab1 AS cor0
----
-40
-43
-82

query I rowsort
SELECT DISTINCT col1 + + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL + col1 + + 97 FROM tab0
----
183
188
194

query I rowsort
SELECT - tab0.col0 * col1 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col2 + + 6 FROM tab1
----
102
60
63

query I rowsort
SELECT DISTINCT - tab0.col1 * col0 * - col2 + + col0 FROM tab0
----
3430
664207
68136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 35 col2 FROM tab1, tab2 cor0
----
35

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1, tab0 cor1
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT ALL - col2 * cor0.col2 * - col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ALL + col0 + - ( + 79 ) * - col1 FROM tab2 AS cor0
----
1422
2456
4739

query I rowsort
SELECT ALL + col1 * col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col0 * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + - col1 + 34 AS col2 FROM tab1 AS cor0
----
21
24
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4643
SELECT + - col2 DIV - cor0.col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-4643
SELECT + - col2 / - cor0.col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT DISTINCT - col1 * ( - ( + cor0.col1 ) ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - 45 col2 FROM tab1 AS cor0
----
-102
-141
-99

query I rowsort
SELECT DISTINCT - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - + cor0.col0 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * 18 FROM tab0 AS cor0
----
-1602
-432
-630

query I rowsort
SELECT ALL col0 * - 59 AS col0 FROM tab2 AS cor0
----
-413
-4602
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-4650
SELECT + 13 + col0 DIV + col0 + + col1 AS col2 FROM tab0 cor0
----
100
105
111

skipif mysql # not compatible
query I rowsort label-4650
SELECT + 13 + col0 / + col0 + + col1 AS col2 FROM tab0 cor0
----
100
105
111

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT 76 - col0 AS col0 FROM tab0 cor0
----
-13
41
52

query I rowsort
SELECT - 55 AS col1 FROM tab0 AS cor0
----
-55
-55
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-4655
SELECT DISTINCT 60 * - col1 DIV + col1 FROM tab0 AS cor0
----
-60

skipif mysql # not compatible
query I rowsort label-4655
SELECT DISTINCT 60 * - col1 / + col1 FROM tab0 AS cor0
----
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 56 col1 FROM tab2 AS cor0
----
56
56
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-4657
SELECT + col0 DIV col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4657
SELECT + col0 / col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + col2 AS col0 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + col1 + - 41 FROM tab1
----
-15
-28
-31

query I rowsort
SELECT DISTINCT + - col0 + + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - col1 * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL 27 AS col1 FROM tab2 AS cor0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + 59 FROM tab0
----
59

query I rowsort
SELECT + 43 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4666
SELECT - col1 * - col0 * CAST( NULL AS SIGNED ) + col1 / + col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4666
SELECT - col1 * - col0 * CAST ( NULL AS INTEGER ) + col1 / + col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * col2 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4668
SELECT DISTINCT + ( col2 ) DIV + col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4668
SELECT DISTINCT + ( col2 ) / + col1 FROM tab1
----
2
5
7

query I rowsort
SELECT DISTINCT 90 FROM tab2, tab0, tab2 AS cor0
----
90

query I rowsort
SELECT + col0 + - cor0.col0 * - 42 FROM tab0 cor0
----
1032
1505
3827

query I rowsort
SELECT ALL + 56 * - col0 FROM tab0 AS cor0
----
-1344
-1960
-4984

query I rowsort
SELECT DISTINCT ( + 41 * col0 ) + - 54 AS col1 FROM tab0
----
1381
3595
930

query I rowsort
SELECT 38 AS col1 FROM tab2
----
38
38
38

query I rowsort
SELECT 49 * tab0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 760be3f29a9dd5baaac57a8231f74d90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4675
SELECT CAST( col0 AS SIGNED ) * col1 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4675
SELECT CAST ( col0 AS INTEGER ) * col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + 30 * - 79 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 7c7d310d1f998c173d044e21fd7fbbe0

query I rowsort
SELECT ( col2 ) * 76 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT ALL col0 * + 28 + col2 * ( col0 ) FROM tab2
----
385
4212
5214

query I rowsort
SELECT ALL 67 + 97 FROM tab1
----
164
164
164

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT col0 * col1 * col0 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT - col1 + + 77 AS col1 FROM tab2 AS cor0
----
18
46
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col0 FROM tab1
----
21
21
21

query I rowsort
SELECT 58 AS col1 FROM tab0
----
58
58
58

query I rowsort
SELECT - 74 * 49 FROM tab1
----
-3626
-3626
-3626

query I rowsort
SELECT 18 * - col0 FROM tab2
----
-126
-1404
-1422

query I rowsort
SELECT col1 + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col1 * col0 + col1 FROM tab2 cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-4689
SELECT + - cor0.col1 * col2 + col0 DIV + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-4689
SELECT + - cor0.col1 * col2 + col0 / + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + 42 * + col2 + col2 FROM tab2 AS cor0
----
1118
1161
1634

onlyif mysql # use DIV operator for integer division
query I rowsort label-4691
SELECT - cor0.col2 DIV - col2 + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4691
SELECT - cor0.col2 / - col2 + col0 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4692
SELECT DISTINCT - 96 DIV - cor0.col1 col0 FROM tab0 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4692
SELECT DISTINCT - 96 / - cor0.col1 col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT + + col1 + + col1 * - 99 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT DISTINCT 35 AS col0 FROM tab2
----
35

query I rowsort
SELECT cor0.col0 * + col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + ( col2 ) + - col1 * 83 AS col2 FROM tab1 cor0
----
-2104
-773
-983

query I rowsort
SELECT DISTINCT - - cor0.col1 + - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + + 46 AS col1 FROM tab2 AS cor0
----
46
46
46

query I rowsort
SELECT ALL 20 AS col1 FROM tab1, tab1 cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 8550664862df5be7a3d3f6037537d2d8

query I rowsort
SELECT DISTINCT - 68 * col2 + col1 * cor0.col2 FROM tab0 cor0
----
1886
29
594

onlyif mysql # use DIV operator for integer division
query I rowsort label-4701
SELECT ALL col0 DIV - cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4701
SELECT ALL col0 / - cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL 22 FROM tab1 cor0
----
22
22
22

query I rowsort
SELECT DISTINCT + + col0 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4705
SELECT DISTINCT - cor0.col0 DIV + col1 col2 FROM tab2 AS cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4705
SELECT DISTINCT - cor0.col0 / + col1 col2 FROM tab2 AS cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 col1 FROM tab2 AS cor0
----
7
7
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4707
SELECT col1 DIV + col0 AS col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4707
SELECT col1 / + col0 AS col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT ALL - 73 FROM tab1 AS cor0
----
-73
-73
-73

query I rowsort
SELECT - 85 + col0 * - col2 AS col2 FROM tab2 cor0
----
-2113
-274
-3087

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL cor0.col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 col0 FROM tab0, tab0 cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ALL 76 * - col0 FROM tab2
----
-532
-5928
-6004

query I rowsort
SELECT DISTINCT 23 AS col2 FROM tab0
----
23

query I rowsort
SELECT + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + 4 FROM tab2
----
4
4
4

query I rowsort
SELECT ALL - tab1.col0 AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL - col0 * - 12 AS col1 FROM tab2
----
84
936
948

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * + col1 + - col2 * - col1 col2 FROM tab1 AS cor0
----
1140
2496
2808

query I rowsort
SELECT + col2 + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + col1 + + ( col1 ) FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4722
SELECT + col1 + + ( col0 ) DIV col1 AS col2 FROM tab2 AS cor0
----
21
31
60

skipif mysql # not compatible
query I rowsort label-4722
SELECT + col1 + + ( col0 ) / col1 AS col2 FROM tab2 AS cor0
----
21
31
60

query I rowsort
SELECT DISTINCT 78 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
78

query I rowsort
SELECT DISTINCT - ( + col1 + + 27 ) FROM tab2
----
-44
-58
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-4725
SELECT 84 DIV col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4725
SELECT 84 / col1 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT ALL - col1 + - 93 DIV + col1 FROM tab2 AS cor0
----
-22
-34
-60

skipif mysql # not compatible
query I rowsort label-4726
SELECT ALL - col1 + - 93 / + col1 FROM tab2 AS cor0
----
-22
-34
-60

query I rowsort
SELECT DISTINCT + col1 + ( - ( col2 ) ) AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL + col0 * 91 * - col2 AS col1 FROM tab0 AS cor0
----
-3185
-664118
-72072

query I rowsort
SELECT col1 * ( + col1 * col1 ) + 38 FROM tab1 AS cor0
----
1038
17614
2235

onlyif mysql # use DIV operator for integer division
query I rowsort label-4730
SELECT col0 * + ( + col0 ) DIV col0 + col1 FROM tab0 cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-4730
SELECT col0 * + ( + col0 ) / col0 + col1 FROM tab0 cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4731
SELECT CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4731
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + col0 + - 75 FROM tab1
----
-11
-72
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4733
SELECT - col2 DIV 2 + ( col0 ) * + col2 DIV + col2 - col0 FROM tab1
----
-27
-28
-48

skipif mysql # not compatible
query I rowsort label-4733
SELECT - col2 / 2 + ( col0 ) * + col2 / + col2 - col0 FROM tab1
----
-27
-28
-48

query I rowsort
SELECT DISTINCT + 40 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
40

query I rowsort
SELECT - cor0.col2 + 15 AS col1 FROM tab1 AS cor0
----
-39
-42
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + ( + 9 ) col1 FROM tab0
----
774
819
873

query I rowsort
SELECT DISTINCT 1 + col2 FROM tab2 AS cor0
----
27
28
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4738
SELECT + CAST( col2 AS SIGNED ) + col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
253
37
90

skipif mysql # not compatible
query I rowsort label-4738
SELECT + CAST ( col2 AS INTEGER ) + col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
253
37
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4739
SELECT - - CAST( NULL AS SIGNED ) * + col2 + + cor0.col0 * ( + col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4739
SELECT - - CAST ( NULL AS INTEGER ) * + col2 + + cor0.col0 * ( + col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 89 AS col2 FROM tab1 AS cor0
----
89

query I rowsort
SELECT DISTINCT + + 72 * 42 FROM tab0 AS cor0
----
3024

query I rowsort
SELECT DISTINCT + col2 * tab0.col0 - col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT col2 + col2 AS col0 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT + ( + 97 ) AS col0 FROM tab2 AS cor0
----
97

query I rowsort
SELECT DISTINCT col2 + + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL ( + col2 ) * col0 * col1 + + col2 FROM tab0 AS cor0
----
3396
664200
68145

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( cor0.col1 ) col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT 28 FROM tab0 AS cor0
----
28

query I rowsort
SELECT 13 + col0 * col1 FROM tab0 AS cor0
----
2077
3408
8112

query I rowsort
SELECT ALL - col2 + - col0 * col0 AS col1 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT DISTINCT col2 * cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - ( cor0.col0 ) AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT - - col1 * - 81 + col0 AS col0 FROM tab1 AS cor0
----
-2103
-746
-973

query I rowsort
SELECT ALL + col0 * cor0.col1 * - col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col1 * - col2 col0 FROM tab0
----
2805
7380
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - + ( 24 + col1 ) col1 FROM tab2
----
-109
-79
-82

query I rowsort
SELECT - col2 + - col1 - - 67 * - col1 FROM tab0
----
-5881
-6270
-6597

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4758
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4758
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4759
SELECT ALL + col0 + + CAST( + col0 AS SIGNED ) DIV + col0 AS col2 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-4759
SELECT ALL + col0 + + CAST ( + col0 AS INTEGER ) / + col0 AS col2 FROM tab2
----
79
8
80

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT + cor0.col0 + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ( col2 ) + col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT + cor0.col2 * 51 AS col1 FROM tab1 AS cor0
----
2754
2907
4896

onlyif mysql # use DIV operator for integer division
query I rowsort label-4764
SELECT ALL col1 * + cor0.col2 - col2 DIV + 58 FROM tab1 AS cor0
----
1247
1404
570

skipif mysql # not compatible
query I rowsort label-4764
SELECT ALL col1 * + cor0.col2 - col2 / + 58 FROM tab1 AS cor0
----
1247
1404
570

query I rowsort
SELECT + ( - col0 ) + + col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ( - col1 ) * + col0 + + col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL col2 + - col2 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 col0 FROM tab0, tab1 cor0
----
86
91
97

query I rowsort
SELECT ALL tab0.col2 FROM tab0, tab0 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT DISTINCT - 90 FROM tab2, tab1 AS cor0, tab1 cor1
----
-90

query I rowsort
SELECT 91 FROM tab2 AS cor0
----
91
91
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4772
SELECT 59 DIV col1 AS col2 FROM tab1 AS cor0
----
2
4
5

skipif mysql # not compatible
query I rowsort label-4772
SELECT 59 / col1 AS col2 FROM tab1 AS cor0
----
2
4
5

query I rowsort
SELECT + col2 * ( + col1 ) + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT col2 - col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL - col2 + + cor0.col0 * col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT - - col2 + col1 + 58 FROM tab2 AS cor0
----
113
116
143

query I rowsort
SELECT col1 * + col2 - 9 * col0 FROM tab2 AS cor0
----
-65
774
832

query I rowsort
SELECT ALL + cor0.col0 * + col2 + - 44 FROM tab0 AS cor0
----
-9
7254
748

query I rowsort
SELECT DISTINCT col0 + ( 53 ) + - col0 FROM tab1
----
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-4780
SELECT col1 * + 63 - - ( - cor0.col0 ) DIV ( - col2 ) AS col2 FROM tab0 AS cor0
----
5418
5734
6146

skipif mysql # not compatible
query I rowsort label-4780
SELECT col1 * + 63 - - ( - cor0.col0 ) / ( - col2 ) AS col2 FROM tab0 AS cor0
----
5418
5734
6146

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4781
SELECT DISTINCT col0 * CAST( + 12 AS SIGNED ) + col1 AS col2 FROM tab1 AS cor0
----
62
778
973

skipif mysql # not compatible
query I rowsort label-4781
SELECT DISTINCT col0 * CAST ( + 12 AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
62
778
973

query I rowsort
SELECT ALL col2 + + 93 * - 53 FROM tab0 AS cor0
----
-4847
-4896
-4928

query I rowsort
SELECT + col0 + - 35 * + col1 AS col0 FROM tab2 AS cor0
----
-1078
-1987
-516

query I rowsort
SELECT ALL - + col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 col1 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + ( - col0 ) * + col1 col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT - + col0 + col1 FROM tab2 cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 - - 32 * col0 col1 FROM tab2 AS cor0
----
413
4524
5530

query I rowsort
SELECT cor2.col2 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4790
SELECT DISTINCT + col1 + CAST( + cor0.col1 AS SIGNED ) * - cor0.col0 FROM tab1 AS cor0
----
-1027
-52
-630

skipif mysql # not compatible
query I rowsort label-4790
SELECT DISTINCT + col1 + CAST ( + cor0.col1 AS INTEGER ) * - cor0.col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL + cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL 54 FROM tab0
----
54
54
54

query I rowsort
SELECT ALL 99 * tab0.col1 AS col1 FROM tab0
----
8514
9009
9603

onlyif mysql # use DIV operator for integer division
query I rowsort label-4794
SELECT col1 * col2 + col2 * 44 DIV col0 FROM tab1
----
1300
2196
609

skipif mysql # not compatible
query I rowsort label-4794
SELECT col1 * col2 + col2 * 44 / col0 FROM tab1
----
1300
2196
609

query I rowsort
SELECT DISTINCT 78 FROM tab1
----
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4796
SELECT - tab2.col0 + ( col0 + CAST( NULL AS SIGNED ) ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4796
SELECT - tab2.col0 + ( col0 + CAST ( NULL AS INTEGER ) ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + ( + col2 ) FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT + - ( + 73 ) * col2 + col2 AS col1 FROM tab0 cor0
----
-2376
-5904
-72

query I rowsort
SELECT ALL - col2 * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - 90 + 79 * cor0.col1 * col2 FROM tab1 AS cor0
----
110826
44940
98502

query I rowsort
SELECT ALL col0 * + col2 + col2 * col2 FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT DISTINCT + col0 * - col2 + + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL - - col2 + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - ( + tab1.col2 ) AS col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ( - col2 ) * + 93 AS col2 FROM tab1 cor0
----
-5022
-5301
-8928

query I rowsort
SELECT - 12 * - col2 FROM tab0 AS cor0
----
12
396
984

query I rowsort
SELECT ALL + col0 * - col1 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT cor1.col1 * 85 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to afe41043ca9af5e0cd03d3d29f67906f

query I rowsort
SELECT DISTINCT + + 33 * col0 + + col0 AS col2 FROM tab2 AS cor0
----
238
2652
2686

query I rowsort
SELECT + + 26 AS col0 FROM tab2 AS cor0
----
26
26
26

query I rowsort
SELECT DISTINCT + - col0 * + 89 AS col2 FROM tab1 AS cor0
----
-267
-5696
-7120

query I rowsort
SELECT + - col2 + cor0.col1 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab2
----
26
27
38

query I rowsort
SELECT - col0 + 36 AS col0 FROM tab1
----
-28
-44
33

query I rowsort
SELECT col0 + - col2 * 62 AS col2 FROM tab2
----
-1534
-1667
-2277

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4817
SELECT ALL - col1 + 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-4817
SELECT ALL - col1 + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * 54 * col1 AS col1 FROM tab0 AS cor0
----
-111456
-183330
-437346

query I rowsort
SELECT col2 * + ( col2 ) + + col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - cor0.col1 * ( + col1 * cor0.col0 ) FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - - col1 * - col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4822
SELECT + + col2 DIV ( - col0 ) + + col1 * + 0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4822
SELECT + + col2 / ( - col0 ) + + col1 * + 0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL 99 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT ALL - + cor0.col2 + 90 * 53 FROM tab1 AS cor0
----
4674
4713
4716

query I rowsort
SELECT ALL - + col0 * - col1 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + + col0 + + col0 * - col1 * - col1 col0 FROM tab2 AS cor0
----
22927
271655
6765

query I rowsort
SELECT + col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ( 83 ) * col1 + cor0.col1 FROM tab0 AS cor0
----
7224
7644
8148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 55 col1 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT ALL - col1 * + col2 + cor0.col0 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 96 col2 FROM tab1 cor0
----
96

query I rowsort
SELECT ALL - 20 * + col1 * col1 AS col2 FROM tab0 AS cor0
----
-147920
-165620
-188180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4833
SELECT DISTINCT + cor0.col2 DIV + 8 FROM tab1 AS cor0
----
12
6
7

skipif mysql # not compatible
query I rowsort label-4833
SELECT DISTINCT + cor0.col2 / + 8 FROM tab1 AS cor0
----
12
6
7

query I rowsort
SELECT ALL + ( - col0 ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT cor0.col1 * col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + 46 FROM tab0 cor0
----
46
46
46

query I rowsort
SELECT ALL - 4 AS col2 FROM tab0 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL - 1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4839
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4839
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 + - tab2.col0 + - col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT col0 + col0 AS col2 FROM tab1
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4842
SELECT DISTINCT tab2.col0 + CAST( - col2 AS SIGNED ) + tab2.col2 * + tab2.col2 * col0 AS col2 FROM tab2
----
114117
5083
52780

skipif mysql # not compatible
query I rowsort label-4842
SELECT DISTINCT tab2.col0 + CAST ( - col2 AS INTEGER ) + tab2.col2 * + tab2.col2 * col0 AS col2 FROM tab2
----
114117
5083
52780

query I rowsort
SELECT ALL col2 + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT - 59 * - cor0.col0 + 8 * 92 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 24c069f2bb61563e21d2e05fb31f596c

query I rowsort
SELECT + cor0.col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + 44 + + col1 AS col0 FROM tab1 AS cor0
----
54
57
70

query I rowsort
SELECT - + col1 + + 88 * col0 * ( + 16 + col2 ) AS col0 FROM tab1 AS cor0
----
18454
411126
788467

query I rowsort
SELECT DISTINCT col2 - + col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - 76 FROM tab2, tab2 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT + - ( + cor0.col1 ) * - col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + - ( - 54 ) FROM tab0 cor0
----
54
54
54

query I rowsort
SELECT + 47 AS col0 FROM tab0 AS cor0
----
47
47
47

query I rowsort
SELECT - ( 98 + col0 ) AS col1 FROM tab0
----
-122
-133
-187

query I rowsort
SELECT 44 FROM tab1
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col2 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL ( col0 ) * - col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + 49 + col1 FROM tab0 AS cor0
----
135
140
146

query I rowsort
SELECT ( - 99 ) * col2 * - col2 AS col2 FROM tab2
----
142956
66924
72171

query I rowsort
SELECT ALL + 37 FROM tab0
----
37
37
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-4860
SELECT DISTINCT - col0 DIV col1 AS col1 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4860
SELECT DISTINCT - col0 / col1 AS col1 FROM tab2
----
-1
-4
0

query I rowsort
SELECT 17 * col1 * col2 AS col0 FROM tab1
----
21216
23868
9690

onlyif mysql # use DIV operator for integer division
query I rowsort label-4862
SELECT + - col0 * col2 + - col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-4862
SELECT + - col0 * col2 + - col1 / - col1 AS col2 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT - col1 - - col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT col1 * col0 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4865
SELECT + col2 DIV + col1 - - col2 * col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-4865
SELECT + col2 / + col1 - - col2 * col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4866
SELECT - col0 DIV col0 - 4 * col2 * ( - col0 ) AS col1 FROM tab2 AS cor0
----
12007
755
8111

skipif mysql # not compatible
query I rowsort label-4866
SELECT - col0 / col0 - 4 * col2 * ( - col0 ) AS col1 FROM tab2 AS cor0
----
12007
755
8111

query I rowsort
SELECT + cor0.col2 * + ( + col2 ) - - col1 AS col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL col1 + + tab2.col1 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL - col0 + col0 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT 82 + col2 * + tab1.col2 FROM tab1
----
2998
3331
9298

onlyif mysql # use DIV operator for integer division
query I rowsort label-4871
SELECT tab0.col2 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-4871
SELECT tab0.col2 / col1 col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4872
SELECT ALL ( col0 ) DIV col1 + col2 * - col0 AS col0 FROM tab2
----
-189
-2027
-2998

skipif mysql # not compatible
query I rowsort label-4872
SELECT ALL ( col0 ) / col1 + col2 * - col0 AS col0 FROM tab2
----
-189
-2027
-2998

query I rowsort
SELECT ALL + col1 * col1 + - 86 AS col1 FROM tab0 AS cor0
----
7310
8195
9323

query I rowsort
SELECT col2 + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4875
SELECT DISTINCT + - col1 DIV - 81 + - cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-4875
SELECT DISTINCT + - col1 / - 81 + - cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT DISTINCT + col2 * - 20 + + col2 FROM tab2 AS cor0
----
-494
-513
-722

query I rowsort
SELECT ALL col1 - ( col2 ) AS col0 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT + + cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + col0 * col0 AS col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL + col1 + - col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) col2 FROM tab2
----
7
78
79

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab0 cor0, tab0 AS cor1
----
972 values hashing to d522b52b67b20888d3544d25cb98f232

query I rowsort
SELECT ALL - col1 * col1 AS col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - col0 * + col2 + + col2 + 33 * col1 FROM tab2 AS cor0
----
-2403
-55
861

query I rowsort
SELECT ALL + tab1.col1 + - col1 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 90 AS col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT ALL + + 58 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT - col1 * 71 AS col2 FROM tab0 AS cor0
----
-6106
-6461
-6887

query I rowsort
SELECT DISTINCT + col2 + + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + cor0.col2 - col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + - cor0.col1 * cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9b23e5e74ef3405a4dbf05cceb18c8a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4892
SELECT - col0 DIV 98 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4892
SELECT - col0 / 98 AS col1 FROM tab0 cor0
----
0
0
0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 cor1
----
243 values hashing to 5ac29bd6e3a9e69ed9c73ca7a34114f7

query I rowsort
SELECT DISTINCT - cor0.col0 * ( - cor0.col1 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col0 * + cor0.col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col2 * - col0 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT 13 * col2 AS col2 FROM tab2
----
338
351
494

query I rowsort
SELECT ALL 28 FROM tab1
----
28
28
28

query I rowsort
SELECT DISTINCT + col2 + 55 * - col2 FROM tab2 AS cor0
----
-1404
-1458
-2052

query I rowsort
SELECT + col2 + - cor0.col0 * - col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL col2 * 66 * col0 FROM tab2 cor0
----
12474
133848
198132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col1 * - col2 * + 81 FROM tab2 AS cor0
----
-124254
-52326
-67797

onlyif mysql # use DIV operator for integer division
query I rowsort label-4904
SELECT DISTINCT cor0.col1 DIV - cor0.col1 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4904
SELECT DISTINCT cor0.col1 / - cor0.col1 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ( - col0 ) + cor0.col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - + 60 AS col2 FROM tab1 AS cor0
----
-60
-60
-60

query I rowsort
SELECT - - 86 * - col2 FROM tab1 cor0
----
-4644
-4902
-8256

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4908
SELECT - CAST( - col2 AS SIGNED ) + - cor0.col0 * - 39 + + cor0.col2 FROM tab1 AS cor0
----
225
2610
3312

skipif mysql # not compatible
query I rowsort label-4908
SELECT - CAST ( - col2 AS INTEGER ) + - cor0.col0 * - 39 + + cor0.col2 FROM tab1 AS cor0
----
225
2610
3312

query I rowsort
SELECT col0 * tab1.col0 AS col0 FROM tab1
----
4096
6400
9

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT 51 + 59 - col0 FROM tab1
----
107
30
46

query I rowsort
SELECT - ( + cor0.col1 ) * cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4913
SELECT + + CAST( NULL AS SIGNED ) * + col2 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4913
SELECT + + CAST ( NULL AS INTEGER ) * + col2 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 58 * + col2 * col0 + col0 + cor0.col1 FROM tab2 AS cor0
----
11000
117761
174212

query I rowsort
SELECT + - ( ( + col0 ) ) + col0 * col1 AS col0 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4916
SELECT CAST( NULL AS SIGNED ) col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4916
SELECT CAST ( NULL AS INTEGER ) col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * - col2 col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL + + col0 * + col0 + ( - 71 ) FROM tab2 AS cor0
----
-22
6013
6170

onlyif mysql # use DIV operator for integer division
query I rowsort label-4919
SELECT DISTINCT + cor0.col1 DIV col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4919
SELECT DISTINCT + cor0.col1 / col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT - - col2 * - cor0.col0 + - 1 FROM tab2 AS cor0
----
-190
-2029
-3003

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col1 col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4923
SELECT + cor0.col1 * - col2 * CAST( NULL AS SIGNED ) + + cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4923
SELECT + cor0.col1 * - col2 * CAST ( NULL AS INTEGER ) + + cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 6 * - col0 + + col0 AS col0 FROM tab2 AS cor0
----
-35
-390
-395

query I rowsort
SELECT DISTINCT - 39 FROM tab0 AS cor0
----
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4926
SELECT - + col0 * + col1 * CAST( col1 AS SIGNED ) + + col0 FROM tab1 cor0
----
-13440
-2025
-6336

skipif mysql # not compatible
query I rowsort label-4926
SELECT - + col0 * + col1 * CAST ( col1 AS INTEGER ) + + col0 FROM tab1 cor0
----
-13440
-2025
-6336

query I rowsort
SELECT ALL + 43 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT + 93 + - col2 * - col0 AS col2 FROM tab2 AS cor0
----
2121
282
3095

onlyif mysql # use DIV operator for integer division
query I rowsort label-4929
SELECT + - col1 - - col1 DIV cor0.col1 col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4929
SELECT + - col1 - - col1 / cor0.col1 col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT DISTINCT 13 * + col0 - 59 AS col0 FROM tab1 AS cor0
----
-20
773
981

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col0 FROM tab1 cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4932
SELECT ALL - col0 DIV + cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4932
SELECT ALL - col0 / + cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * col2 - col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4934
SELECT DISTINCT ( cor0.col0 ) + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4934
SELECT DISTINCT ( cor0.col0 ) + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 + + col2 + + col0 * col1 FROM tab2 AS cor0
----
1364
213
4569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 - - col1 col1 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT - tab0.col2 + - col2 AS col0 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT - + 87 + + 26 AS col2 FROM tab2, tab0, tab0 AS cor0
----
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-4940
SELECT col2 DIV - col2 - col0 * + col0 AS col2 FROM tab0
----
-1226
-577
-7922

skipif mysql # not compatible
query I rowsort label-4940
SELECT col2 / - col2 - col0 * + col0 AS col2 FROM tab0
----
-1226
-577
-7922

onlyif mysql # use DIV operator for integer division
query I rowsort label-4941
SELECT DISTINCT - col2 * + col0 DIV col0 + + ( col1 ) + + col0 AS col1 FROM tab2 cor0
----
11
111
58

skipif mysql # not compatible
query I rowsort label-4941
SELECT DISTINCT - col2 * + col0 / col0 + + ( col1 ) + + col0 AS col1 FROM tab2 cor0
----
11
111
58

query I rowsort
SELECT + col0 - - col2 * ( cor0.col0 ) AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - 27 + col1 FROM tab0 AS cor0
----
59
64
70

query I rowsort
SELECT ALL + col1 - - col2 * 96 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-119795
-134758
-54710

query I rowsort
SELECT ALL + col0 * - col1 + + 95 * col2 AS col1 FROM tab2 cor0
----
-2132
2267
2348

query I rowsort
SELECT ALL - 55 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

onlyif mysql # use DIV operator for integer division
query I rowsort label-4947
SELECT DISTINCT col1 DIV + col0 + + ( + 80 ) * + col2 FROM tab1
----
4328
4560
7680

skipif mysql # not compatible
query I rowsort label-4947
SELECT DISTINCT col1 / + col0 + + ( + 80 ) * + col2 FROM tab1
----
4328
4560
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col0 col0 FROM tab0
----
0

query I rowsort
SELECT ALL - col1 + + cor0.col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT - - col0 * ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col1 + + 7 * - col1 FROM tab0 AS cor0
----
-516
-546
-582

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 cor1, tab1 AS cor2
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

query I rowsort
SELECT ALL 9 * ( + col0 + ( + 81 ) * - col2 ) AS col1 FROM tab2 AS cor0
----
-18252
-19620
-26991

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab0 AS cor0
----
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4955
SELECT - CAST( NULL AS SIGNED ) * + 40 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4955
SELECT - CAST ( NULL AS INTEGER ) * + 40 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 8 * + 4 FROM tab2 AS cor0
----
-32

query I rowsort
SELECT ALL col1 * - col2 AS col1 FROM tab0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 50 col2 FROM tab1
----
150
3200
4000

query I rowsort
SELECT - col2 + + col2 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * + col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - - ( - 99 ) FROM tab0 AS cor0
----
-99
-99
-99

query I rowsort
SELECT ALL 78 + col1 FROM tab2 AS cor0
----
109
137
95

query I rowsort
SELECT ALL col1 * + 87 * cor0.col2 + 25 FROM tab0 AS cor0
----
246931
649219
8464

query I rowsort
SELECT - 23 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + - 31 + + col1 + - col2 FROM tab0 AS cor0
----
-22
22
65

query I rowsort
SELECT ALL col0 + + 72 FROM tab2 AS cor0
----
150
151
79

query I rowsort
SELECT cor0.col2 * col0 + + 33 AS col1 FROM tab0 cor0
----
68
7331
825

query I rowsort
SELECT ALL - col2 + + tab2.col0 * ( + col1 ) FROM tab2
----
1305
190
4576

query I rowsort
SELECT DISTINCT col0 * + col0 + 99 FROM tab2
----
148
6183
6340

query I rowsort
SELECT + 24 + + col2 FROM tab0
----
106
25
57

query I rowsort
SELECT - 27 + col1 FROM tab1
----
-1
-14
-17

query I rowsort
SELECT 11 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4974
SELECT ALL + col0 * + CAST( col1 AS SIGNED ) + col2 * cor0.col0 + cor0.col0 FROM tab2 AS cor0
----
413
4424
6708

skipif mysql # not compatible
query I rowsort label-4974
SELECT ALL + col0 * + CAST ( col1 AS INTEGER ) + col2 * cor0.col0 + cor0.col0 FROM tab2 AS cor0
----
413
4424
6708

query I rowsort
SELECT ALL - col2 + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * - col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col2 * - 47 + col0 AS col1 FROM tab0 AS cor0
----
-12
-1527
-3765

query I rowsort
SELECT DISTINCT 8 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4979
SELECT DISTINCT col2 DIV + col0 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-4979
SELECT DISTINCT col2 / + col0 FROM tab2
----
0
3

query I rowsort
SELECT ( - col1 * col0 ) AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL col1 * tab1.col2 + + col1 AS col0 FROM tab1
----
1261
1430
580

query I rowsort
SELECT ALL tab1.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT + tab2.col1 * 89 + + tab2.col0 FROM tab2
----
1592
2766
5329

query I rowsort
SELECT + 26 + + col0 * col0 AS col2 FROM tab0
----
1251
602
7947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4985
SELECT DISTINCT + col0 * col1 / col2 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4985
SELECT DISTINCT + col0 * col1 / col2 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT - 24 FROM tab0
----
-24

query I rowsort
SELECT + col2 + cor0.col1 + ( col1 * col0 ) AS col0 FROM tab0 AS cor0
----
2183
3493
8272

query I rowsort
SELECT DISTINCT - + 32 FROM tab1 AS cor0
----
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 34 col0 FROM tab2
----
-34

query I rowsort
SELECT - - cor0.col2 * col1 + - col2 AS col0 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4991
SELECT ( cor0.col0 ) * CAST( NULL AS DECIMAL ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4991
SELECT ( cor0.col0 ) * CAST ( NULL AS REAL ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( col2 ) + + col1 + + 1 * col0 AS col1 FROM tab1 AS cor0
----
131
189
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4993
SELECT ALL + - cor0.col0 * - col0 / CAST( NULL AS DECIMAL ) - col0 * 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-4993
SELECT ALL + - cor0.col0 * - col0 / CAST ( NULL AS REAL ) - col0 * col1 col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL ( col1 ) * - col2 * col2 AS col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT + col2 + cor0.col0 + cor0.col0 * col0 FROM tab2 AS cor0
----
6188
6358
83

query I rowsort
SELECT + col2 * col1 + col2 * col0 FROM tab1 AS cor0
----
1566
4218
8928

query I rowsort
SELECT - col2 * - col0 + col2 + col2 AS col0 FROM tab2 AS cor0
----
2080
243
3078

query I rowsort
SELECT + cor0.col2 * - col1 - col0 AS col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT tab2.col0 AS col0 FROM tab2, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 82 * col2 AS col0 FROM tab0
----
-2706
-6724
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5002
SELECT - col1 DIV - cor0.col1 col0 FROM tab1 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5002
SELECT - col1 / - cor0.col1 col0 FROM tab1 cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5003
SELECT + col0 + - col1 + + col0 DIV cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-27
-62

skipif mysql # not compatible
query I rowsort label-5003
SELECT + col0 + - col1 + + col0 / cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-27
-62

query I rowsort
SELECT ALL col1 * col0 + col1 AS col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT ALL + col2 + col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + col0 * col1 - col1 * - col1 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT DISTINCT + cor0.col0 + + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + col2 + + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - - col2 + - col0 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5012
SELECT DISTINCT CAST( col2 AS SIGNED ) * cor0.col0 + col2 col0 FROM tab2 AS cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5012
SELECT DISTINCT CAST ( col2 AS INTEGER ) * cor0.col0 + col2 col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - + 76 FROM tab2 AS cor0
----
-76
-76
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5014
SELECT DISTINCT col0 DIV col0 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-5014
SELECT DISTINCT col0 / col0 FROM tab1
----
1

query I rowsort
SELECT DISTINCT + col0 * col1 AS col2 FROM tab1
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5016
SELECT + CAST( + 14 AS SIGNED ) AS col0 FROM tab0
----
14
14
14

skipif mysql # not compatible
query I rowsort label-5016
SELECT + CAST ( + 14 AS INTEGER ) AS col0 FROM tab0
----
14
14
14

query I rowsort
SELECT ( tab2.col1 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL - ( 80 * col1 + + col0 ) FROM tab2
----
-1439
-2487
-4798

query I rowsort
SELECT - ( - col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 52 AS col0 FROM tab1 AS cor0
----
52
52
52

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + col2 - + col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - col1 * + col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col1 - + col1 * col2 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - + col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 68 * col0 AS col1 FROM tab0 AS cor0
----
1632
2380
6052

onlyif mysql # use DIV operator for integer division
query I rowsort label-5027
SELECT + cor0.col0 + + col1 DIV col0 + col1 AS col1 FROM tab0 AS cor0
----
113
134
181

skipif mysql # not compatible
query I rowsort label-5027
SELECT + cor0.col0 + + col1 / col0 + col1 AS col1 FROM tab0 AS cor0
----
113
134
181

query I rowsort
SELECT col2 * + col1 * col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + col2 * col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5030
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5030
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ( col1 ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - tab2.col1 * + col2 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + + cor0.col2 + tab2.col0 AS col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 8217d522e32ec5cc4f9826fb5b492e52

query I rowsort
SELECT ALL - ( + col2 ) AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - cor0.col2 * + col2 - + col0 AS col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT + col1 - col2 * cor0.col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2, tab0 cor0, tab1 AS cor1
----
-86
-91
-97

query I rowsort
SELECT ALL + - col2 - col2 FROM tab0 cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5040
SELECT ALL - col2 DIV col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5040
SELECT ALL - col2 / col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col1 * col0 col0 FROM tab2 AS cor0
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - col2 col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + - cor0.col2 * - col2 + - cor0.col0 FROM tab1 AS cor0
----
2913
3185
9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-5044
SELECT DISTINCT - col0 DIV 1 - - col2 DIV col0 FROM tab1 AS cor0
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-5044
SELECT DISTINCT - col0 / 1 - - col2 / col0 FROM tab1 AS cor0
----
-64
-79
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5045
SELECT + col0 + - col1 * - cor0.col0 / + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5045
SELECT + col0 + - col1 * - cor0.col0 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 47 + - 49 * - col0 AS col2 FROM tab1 AS cor0
----
194
3183
3967

query I rowsort
SELECT DISTINCT col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

query I rowsort
SELECT ALL - col1 + - ( col1 ) FROM tab0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT + col0 + + ( col0 ) AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT 10 AS col0 FROM tab0
----
10

query I rowsort
SELECT ALL col1 * - ( tab1.col2 ) + 59 AS col0 FROM tab1
----
-1189
-1345
-511

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5054
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5054
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL col1 + ( - tab2.col0 ) * col2 AS col1 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ALL + col1 + - col2 * col1 AS col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT - 75 + col1 AS col2 FROM tab2 cor0
----
-16
-44
-58

query I rowsort
SELECT ALL col1 * - 98 + col0 * + col0 FROM tab1 AS cor0
----
-2539
3116
5126

query I rowsort
SELECT ALL - ( - col2 ) + + col2 * 49 * - col1 + - col0 FROM tab2
----
-31695
-40993
-75218

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5060
SELECT + ( + col1 + CAST( 28 AS SIGNED ) ) FROM tab1
----
38
41
54

skipif mysql # not compatible
query I rowsort label-5060
SELECT + ( + col1 + CAST ( 28 AS INTEGER ) ) FROM tab1
----
38
41
54

query I rowsort
SELECT ALL - cor0.col1 * - ( - cor0.col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col0 AS col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT - tab1.col1 * tab1.col2 - + 81 AS col1 FROM tab1
----
-1329
-1485
-651

query I rowsort
SELECT 91 * tab0.col1 - - tab0.col0 * col2 AS col0 FROM tab0
----
15579
8618
8862

query I rowsort
SELECT - col0 * - ( - 71 ) FROM tab0 AS cor0
----
-1704
-2485
-6319

query I rowsort
SELECT ALL cor0.col2 + col1 - col0 * + col0 FROM tab2 AS cor0
----
-5999
-6186
9

query I rowsort
SELECT DISTINCT - col1 * + col0 - + col2 FROM tab1 cor0
----
-1136
-132
-697

query I rowsort
SELECT ALL + + col0 * - 70 - + ( - col0 ) * 11 FROM tab2 AS cor0
----
-413
-4602
-4661

query I rowsort
SELECT ALL + col1 * + 77 + + col2 AS col2 FROM tab0 AS cor0
----
6655
7089
7470

query I rowsort
SELECT ALL - - col2 + + 46 * + col0 * - col0 FROM tab1 AS cor0
----
-188359
-294304
-360

query I rowsort
SELECT + - col2 + 97 FROM tab2 cor0
----
59
70
71

query I rowsort
SELECT ALL - - col0 + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT col1 + - cor0.col1 FROM tab1 AS cor0
----
0

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab1 cor1
----
243 values hashing to 4fe4780e49e612b93957f575d9b3e89f

query I rowsort
SELECT + col1 + + tab0.col0 FROM tab0
----
110
132
180

query I rowsort
SELECT col2 * col0 + + col2 AS col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT col1 + + col2 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5078
SELECT DISTINCT - col2 DIV col1 AS col0 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5078
SELECT DISTINCT - col2 / col1 AS col0 FROM tab1
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 col2 FROM tab1, tab2, tab2 AS cor0
----
3
64
80

query I rowsort
SELECT - + cor0.col1 AS col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - - 79 AS col0 FROM tab0 cor0
----
79
79
79

query I rowsort
SELECT ALL - - col1 * - col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col2 + - col1 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 7 col0 FROM tab0 AS cor0
----
7
7
7

query I rowsort
SELECT DISTINCT - 88 AS col0 FROM tab1 AS cor0
----
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5086
SELECT + CAST( + col1 AS SIGNED ) * col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-5086
SELECT + CAST ( + col1 AS INTEGER ) * col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5087
SELECT ALL - ( - col2 ) + col1 DIV - col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-5087
SELECT ALL - ( - col2 ) + col1 / - col1 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT + 94 * 50 FROM tab0 AS cor0
----
4700
4700
4700

query I rowsort
SELECT DISTINCT + 96 * + col1 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT + col0 - + 5 AS col1 FROM tab1
----
-2
59
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + tab2.col1 * col2 col1 FROM tab2
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab1
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5093
SELECT + col0 - - CAST( NULL AS SIGNED ) col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5093
SELECT + col0 - - CAST ( NULL AS INTEGER ) col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - ( + col1 ) * col1 + 88 FROM tab0 AS cor0
----
-7308
-8193
-9321

query I rowsort
SELECT 83 * - 44 FROM tab1 AS cor0
----
-3652
-3652
-3652

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT 29 * 4 - + col1 * - CAST ( col2 AS REAL ) AS col0 FROM tab0 AS cor0
----
213
2954
7578

query I rowsort
SELECT - col0 * col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT col0 + 72 AS col1 FROM tab0 cor0
----
107
161
96

query I rowsort
SELECT DISTINCT - 56 + col1 FROM tab2 AS cor0
----
-25
-39
3

query I rowsort
SELECT DISTINCT - col2 * col0 + - 62 FROM tab1 AS cor0
----
-224
-3710
-7742

query I rowsort
SELECT ALL 34 AS col2 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT ALL + 60 - - cor0.col0 FROM tab1 AS cor0
----
124
140
63

query I rowsort
SELECT - + col2 * - col2 AS col0 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - col0 + col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col0 - - 34 FROM tab0, tab0 AS cor0
----
9 values hashing to 661d72d5ba2e99bddf766076e396d5cd

query I rowsort
SELECT col0 + col2 AS col1 FROM tab2
----
104
117
34

query I rowsort
SELECT + + col0 + - col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL - col0 * + col1 + + col0 AS col0 FROM tab1 cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-5110
SELECT - 77 DIV + col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-5110
SELECT - 77 / + col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * + col1 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + + col1 + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 78 ) * + col0 col0 FROM tab2
----
546
6084
6162

query I rowsort
SELECT DISTINCT + + col1 + + cor0.col0 * + ( - col0 ) + - col0 AS col2 FROM tab1 AS cor0
----
-4150
-6467
14

query I rowsort
SELECT - cor0.col2 + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + - col1 + + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT ALL + - col0 * - col0 + - col2 AS col1 FROM tab1 cor0
----
-45
4039
6304

query I rowsort
SELECT - cor0.col2 + col1 + ( + col1 ) * + col2 AS col0 FROM tab2 AS cor0
----
1567
625
841

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + - col1 * - col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - - 32 FROM tab2 AS cor0
----
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - col2 ) * col2 col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 29 * cor0.col2 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 25e2007fd6d2c738fac5945a35641d88

query I rowsort
SELECT ALL col2 + - 75 * 6 AS col1 FROM tab0 AS cor0
----
-368
-417
-449

query I rowsort
SELECT DISTINCT - col1 * col2 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5127
SELECT + col1 DIV col0 + - col0 DIV - col1 AS col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-5127
SELECT + col1 / col0 + - col0 / - col1 AS col0 FROM tab0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5128
SELECT DISTINCT 27 DIV - col1 + 20 FROM tab1
----
18
19

skipif mysql # not compatible
query I rowsort label-5128
SELECT DISTINCT 27 / - col1 + 20 FROM tab1
----
18
19

query I rowsort
SELECT col1 - col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor1.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT - col0 * col2 + col0 AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + 72 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT ALL + cor0.col2 * col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - col1 + col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-5135
SELECT ALL 75 + + col0 DIV - 61 FROM tab1 AS cor0
----
74
74
75

skipif mysql # not compatible
query I rowsort label-5135
SELECT ALL 75 + + col0 / - 61 FROM tab1 AS cor0
----
74
74
75

query I rowsort
SELECT + 89 * + col0 + + 32 * - col1 - - col0 FROM tab2 AS cor0
----
-362
5132
6566

query I rowsort
SELECT ALL - - 82 * + col1 FROM tab1 AS cor0
----
1066
2132
820

query I rowsort
SELECT - cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col0 - col1 * cor0.col1 col2 FROM tab2 cor0
----
-912
2603
5952

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab1, tab2 cor1
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT + 36 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 35 * ( col0 ) + - col2 col1 FROM tab2 cor0
----
1688
212914
218397

query I rowsort
SELECT + col0 * - tab2.col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT + col0 * col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT 50 * col2 + - col2 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT ALL - 8 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 7dc47101491db34faf0db8325a6ac276

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5147
SELECT DISTINCT CAST( NULL AS SIGNED ) + col0 * - col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5147
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col0 * - col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col0 + + col2 * col0 * + col2 FROM tab1 AS cor0
----
208000
737360
8751

query I rowsort
SELECT ALL + col0 + - col0 * col1 - - col0 FROM tab1 AS cor0
----
-512
-72
-880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 14 col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab0 AS cor2
----
81 values hashing to a58fbac92f43bc63036f08d7bd355007

query I rowsort
SELECT - + 88 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT DISTINCT col0 + - col2 * col0 AS col0 FROM tab0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5153
SELECT ALL ( + 21 ) DIV col0 + - col2 * + tab1.col0 FROM tab1
----
-155
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5153
SELECT ALL ( + 21 ) / col0 + - col2 * + tab1.col0 FROM tab1
----
-155
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5154
SELECT ALL - + CAST( 45 AS SIGNED ) FROM tab1 AS cor0
----
-45
-45
-45

skipif mysql # not compatible
query I rowsort label-5154
SELECT ALL - + CAST ( 45 AS INTEGER ) FROM tab1 AS cor0
----
-45
-45
-45

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab2 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 1713adaf687595322d888d4eeefdbbc8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( cor0.col2 ) + + col0 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col1 * 48 + cor0.col2 FROM tab1 AS cor0
----
-1194
-423
-528

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

query I rowsort
SELECT col1 * col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - cor0.col0 + - 50 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 86cc7764f4a7c5e78e31076710f7026f

query I rowsort
SELECT DISTINCT 15 + col2 FROM tab0
----
16
48
97

query I rowsort
SELECT DISTINCT + ( col1 ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + 74 AS col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-5164
SELECT DISTINCT - col2 * 69 DIV - col0 col0 FROM tab2
----
23
266
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5164
SELECT DISTINCT - col2 * 69 / - col0 col0 FROM tab2
----
23
266
33

query I rowsort
SELECT - + 90 * + col0 * col2 AS col0 FROM tab0 AS cor0
----
-3150
-656820
-71280

query I rowsort
SELECT ALL 91 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT ALL + 23 * col1 FROM tab0 AS cor0
----
1978
2093
2231

query I rowsort
SELECT + 10 FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT + tab0.col1 * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col1 - + col2 AS col2 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT - col0 * - tab1.col2 * - tab1.col2 - ( tab1.col1 ) AS col1 FROM tab1
----
-207946
-737293
-8774

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5172
SELECT - - col2 + col1 * + CAST( + cor0.col1 AS SIGNED ) FROM tab0 AS cor0
----
7429
8363
9410

skipif mysql # not compatible
query I rowsort label-5172
SELECT - - col2 + col1 * + CAST ( + cor0.col1 AS INTEGER ) FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - 63 + col2 FROM tab1 AS cor0
----
-6
-9
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 - col0 col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL tab0.col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col0 * + ( col2 ) + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL + tab0.col1 * - col2 * col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT col1 * 3 AS col0 FROM tab0 AS cor0
----
258
273
291

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5179
SELECT + col0 + CAST( + col0 AS SIGNED ) * + col1 AS col2 FROM tab0 cor0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-5179
SELECT + col0 + CAST ( + col0 AS INTEGER ) * + col1 AS col2 FROM tab0 cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + col0 * + 25 * col0 col1 FROM tab2 cor0
----
1194
152041
156008

query I rowsort
SELECT ALL 36 FROM tab1, tab1 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5182
SELECT + - CAST( + 24 AS SIGNED ) * + col1 FROM tab0 AS cor0
----
-2064
-2184
-2328

skipif mysql # not compatible
query I rowsort label-5182
SELECT + - CAST ( + 24 AS INTEGER ) * + col1 FROM tab0 AS cor0
----
-2064
-2184
-2328

query I rowsort
SELECT - 59 * col0 * col1 AS col1 FROM tab2 AS cor0
----
-12803
-271518
-79237

query I rowsort
SELECT tab2.col1 * 7 AS col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to bd4bc079090fb6f8203684b8907cf223

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) * col2 col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + 91 * col0 AS col1 FROM tab2 AS cor0
----
637
7098
7189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * ( 19 ) col0 FROM tab0
----
1634
1729
1843

query I rowsort
SELECT DISTINCT + col0 * 61 FROM tab1
----
183
3904
4880

query I rowsort
SELECT col0 * col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + 60 * col2 FROM tab2 AS cor0
----
1560
1620
2280

query I rowsort
SELECT - + col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 * 67 * - col2 FROM tab0 cor0
----
-190146
-499954
-6499

query I rowsort
SELECT ALL - col1 * - cor0.col1 + + col2 + - cor0.col0 FROM tab0 cor0
----
7405
8274
9375

query I rowsort
SELECT ALL col0 * + col0 * col1 FROM tab1 AS cor0 WHERE NULL >= - col0
----

query I rowsort
SELECT ALL - col1 + - col0 AS col2 FROM tab0 cor0
----
-110
-132
-180

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 - col1 IN ( + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT NULL >= ( + col0 * - col2 / col2 + col0 / + col2 + - col1 )
----

query I rowsort
SELECT ALL col0 * - col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL col0 * col0 * cor0.col2 + col1 * - col2 AS col2 FROM tab0 AS cor0
----
1128
16170
642060

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab2 WHERE + col2 * - col1 NOT IN ( + col0 )
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5203
SELECT ALL - col2 DIV + col1 FROM tab0 WHERE NOT ( - col0 ) IN ( col1 )
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5203
SELECT ALL - col2 / + col1 FROM tab0 WHERE NOT ( - col0 ) IN ( col1 )
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 - col1 FROM tab1
----
0

query I rowsort
SELECT DISTINCT col2 - col1 * col2 AS col2 FROM tab2
----
-1508
-608
-810

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( col1 * - col0 * col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL = NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE col1 IN ( - tab0.col0 / col0 - col1 )
----

query I rowsort
SELECT - col1 - col1 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT col0 FROM tab2 WHERE - col2 + - col2 * + col1 - + col0 BETWEEN ( - col2 * col0 ) AND - col1
----
78
79

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL < NULL
----

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 + - col1 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT ALL + + col1 * col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + cor0.col1 * col0 * col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - col0 - - col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - cor0.col1 * - col2 + col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - col0 * col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col0 * col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + col1 + + cor0.col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT - col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col2 * col1 AS col2 FROM tab0
----
2838
7462
97

query III rowsort
SELECT * FROM tab0 WHERE col2 NOT BETWEEN NULL AND + col2 + col1 * - col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT + col0 + col0 * col2 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5226
SELECT ALL + col0 + - col1 + - col0 DIV - col1 FROM tab0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-5226
SELECT ALL + col0 + - col1 + - col0 / - col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL - col0 + tab0.col0 * - 33 * col1 + tab0.col1 FROM tab0
----
-111973
-267265
-68050

query I rowsort
SELECT DISTINCT 19 + col2 * + ( - tab0.col0 ) AS col1 FROM tab0
----
-16
-7279
-773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col1 col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - ( - col2 ) AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * col2 * - ( col2 ) AS col0 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT col1 * col0 * + ( - 52 + col2 ) FROM tab0 cor0
----
-173145
-39216
242970

query I rowsort
SELECT 74 + + col0 FROM tab2 cor0
----
152
153
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5234
SELECT ( col0 ) + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5234
SELECT ( col0 ) + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * col2 + 49 AS col1 FROM tab0
----
-7249
-743
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-5236
SELECT - col2 + - col0 DIV 37 AS col0 FROM tab2
----
-27
-28
-40

skipif mysql # not compatible
query I rowsort label-5236
SELECT - col2 + - col0 / 37 AS col0 FROM tab2
----
-27
-28
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-5237
SELECT col1 DIV col2 + - col2 * + 62 * tab0.col1 FROM tab0
----
-175954
-462643
-5917

skipif mysql # not compatible
query I rowsort label-5237
SELECT col1 / col2 + - col2 * + 62 * tab0.col1 FROM tab0
----
-175954
-462643
-5917

query I rowsort
SELECT tab0.col1 + - col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * + ( col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5240
SELECT ALL + - cor0.col0 + - 98 DIV ( col1 ) AS col1 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-5240
SELECT ALL + - cor0.col0 + - 98 / ( col1 ) AS col1 FROM tab0 AS cor0
----
-25
-36
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5241
SELECT + col0 * CAST( - ( col1 ) AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-5241
SELECT + col0 * CAST ( - ( col1 ) AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5244
SELECT DISTINCT + col2 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5244
SELECT DISTINCT + col2 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5245
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5245
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col2 * col1 + col1 * col2 + col2 AS col0 FROM tab0 AS cor0
----
15006
195
5709

query I rowsort
SELECT ALL - + col2 - col1 * - col1 FROM tab0 AS cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - col2 * col0 + + col0 * + cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 * col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + - cor0.col2 * - col2 + 51 FROM tab1 AS cor0
----
2967
3300
9267

query I rowsort
SELECT DISTINCT - - col2 + - col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5253
SELECT DISTINCT - + col1 DIV col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5253
SELECT DISTINCT - + col1 / col2 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5254
SELECT ALL + col1 * - CAST( NULL AS SIGNED ) / ( col2 * + 39 ) + + 97 col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5254
SELECT ALL + col1 * - CAST ( NULL AS INTEGER ) / ( col2 * + 39 ) + + 97 col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5256
SELECT DISTINCT - col2 + ( + col2 ) DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-5256
SELECT DISTINCT - col2 + ( + col2 ) / col0 AS col1 FROM tab0 AS cor0
----
-1
-32
-82

query I rowsort
SELECT ALL col2 * col1 - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL - - cor0.col1 * cor0.col2 + - cor0.col1 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
1200
1456
2275

query I rowsort
SELECT col1 + - col0 AS col2 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT DISTINCT col2 * 70 - + col2 AS col2 FROM tab2 AS cor0
----
1794
1863
2622

query I rowsort
SELECT - col1 * + col1 * col1 FROM tab2
----
-205379
-29791
-4913

query I rowsort
SELECT ALL col0 + - col1 + col2 * + col2 AS col2 FROM tab0
----
-61
1027
6722

onlyif mysql # use DIV operator for integer division
query I rowsort label-5263
SELECT ALL col2 + + col2 DIV col0 + col0 * + col2 AS col1 FROM tab1
----
234
3705
7777

skipif mysql # not compatible
query I rowsort label-5263
SELECT ALL col2 + + col2 / col0 + col0 * + col2 AS col1 FROM tab1
----
234
3705
7777

query I rowsort
SELECT + col1 * col2 - col2 AS col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + col0 * tab1.col0 * col2 - - col2 FROM tab1
----
233529
540
614496

query I rowsort
SELECT ALL tab0.col0 FROM tab0 WHERE NOT col1 + col1 BETWEEN + col0 * col0 + col0 AND ( NULL )
----
24
35
89

query I rowsort
SELECT DISTINCT col0 * col0 * - col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT col1 + - tab2.col2 - - col1 * + col1 AS col0 FROM tab2
----
268
3514
965

query I rowsort
SELECT + col1 * - col2 - col1 AS col0 FROM tab1
----
-1261
-1430
-580

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col0 + col2 NOT IN ( - col2 + tab0.col0 + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col1 * col0 * tab0.col1 AS col1 FROM tab0
----
177504
329315
737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-5272
SELECT col0 + - col2 DIV col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5272
SELECT col0 + - col2 / col1 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5273
SELECT col1 DIV tab1.col1 + + tab1.col1 * + tab1.col0 FROM tab1
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-5273
SELECT col1 / tab1.col1 + + tab1.col1 * + tab1.col0 FROM tab1
----
1041
641
79

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( - col0 )
----

query I rowsort
SELECT ALL + tab0.col2 * col1 AS col2 FROM tab0
----
2838
7462
97

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL IN ( col2 * col2 )
----

query I rowsort
SELECT DISTINCT + col1 * col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - tab0.col0 + - col0 * tab0.col0 FROM tab0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5280
SELECT + ( + cor0.col0 ) DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5280
SELECT + ( + cor0.col0 ) / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + col1 + col0 * - col2 AS col2 FROM tab2 AS cor0
----
-131
-1943
-2947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 * cor0.col0 col0 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT ALL - ( col2 ) + 77 + cor0.col0 FROM tab2 AS cor0
----
118
129
57

query I rowsort
SELECT DISTINCT + 94 * col0 AS col0 FROM tab1 AS cor0
----
282
6016
7520

query I rowsort
SELECT tab1.col1 + tab1.col0 * col2 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-5286
SELECT - col1 DIV tab2.col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5286
SELECT - col1 / tab2.col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT + col2 * col1 * col0 AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL col0 * - col2 + + col0 + - col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col2 * col2 + col0 AS col2 FROM tab2 WHERE ( NULL ) IN ( col1 )
----

query I rowsort
SELECT DISTINCT col0 * + col1 + - col2 * - tab2.col1 * - col0 + col0 FROM tab2
----
-114972
-49612
-5635

onlyif mysql # use DIV operator for integer division
query I rowsort label-5291
SELECT - col2 DIV + col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5291
SELECT - col2 / + col1 FROM tab1
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5292
SELECT DISTINCT col1 * - col1 DIV col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5292
SELECT DISTINCT col1 * - col1 / col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + col2 + - col1 * + col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-5295
SELECT + col0 DIV 79 + col0 FROM tab2
----
7
78
80

skipif mysql # not compatible
query I rowsort label-5295
SELECT + col0 / 79 + col0 FROM tab2
----
7
78
80

query I rowsort
SELECT + + 27 + - col2 FROM tab0 AS cor0
----
-55
-6
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 1 * + 5 col1 FROM tab0, tab2 cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5298
SELECT ALL + col2 DIV - 59 + col1 FROM tab0
----
86
90
97

skipif mysql # not compatible
query I rowsort label-5298
SELECT ALL + col2 / - 59 + col1 FROM tab0
----
86
90
97

query I rowsort
SELECT ALL col1 + col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT col2 + - col2 AS col2 FROM tab0
----
0

query I rowsort
SELECT ALL tab2.col2 * col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - col2 * 9 + 64 FROM tab2 AS cor0
----
-170
-179
-278

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 97 col1 FROM tab1 AS cor0
----
5238
5529
9312

query I rowsort
SELECT ALL col1 * - ( col2 ) AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - 29 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT - + col1 * col0 - col1 * col0 * - cor0.col1 AS col1 FROM tab1 cor0
----
12480
1950
5760

query I rowsort
SELECT DISTINCT col1 - - col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT col1 + 27 FROM tab2 AS cor0
----
44
58
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col0 * cor0.col1 * - ( col2 ) col2 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT 70 FROM tab1, tab2 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT + col1 * col1 AS col1 FROM tab1 cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 5 * col2 + - col1 col1 FROM tab2 AS cor0
----
104
173
71

query I rowsort
SELECT col1 + col2 * col0 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT - - col2 * + 16 AS col1 FROM tab0 AS cor0
----
1312
16
528

onlyif mysql # use DIV operator for integer division
query I rowsort label-5315
SELECT col1 DIV + col2 + + col1 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-5315
SELECT col1 / + col2 + + col1 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 62 AS REAL ) + cor0.col1 FROM tab1 AS cor0
----
-36
-49
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * col1 + - col2 col0 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT - - col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - col0 + col0 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT col2 + - col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL 44 FROM tab0
----
44
44
44

query I rowsort
SELECT - - cor0.col1 * col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - - col2 * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - 10 + col2 FROM tab1 AS cor0
----
44
47
86

query I rowsort
SELECT ALL - col2 * col2 + - col2 * - col1 FROM tab0 AS cor0
----
1749
738
96

query I rowsort
SELECT ALL + - ( col1 ) + + col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col1 col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + 29 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2494
-2639
-2813

query I rowsort
SELECT ALL 63 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT + col1 + col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5331
SELECT - col2 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5331
SELECT - col2 * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * col2 * + 37 FROM tab1
----
107892
120213
340992

query I rowsort
SELECT + 3 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT + + col1 * - ( col2 ) AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + tab1.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - ( col2 ) col2 FROM tab0 cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort
SELECT - col0 * + CAST ( 46 AS REAL ) FROM tab2 AS cor0
----
-322
-3588
-3634

query I rowsort
SELECT DISTINCT - col1 * - col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 + - 78 FROM tab2 AS cor0
----
-40
-51
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-5340
SELECT DISTINCT + cor0.col0 DIV 53 + col0 AS col0 FROM tab2 AS cor0
----
7
79
80

skipif mysql # not compatible
query I rowsort label-5340
SELECT DISTINCT + cor0.col0 / 53 + col0 AS col0 FROM tab2 AS cor0
----
7
79
80

query I rowsort
SELECT + col0 * + col0 AS col2 FROM tab0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5342
SELECT + col2 / ( 91 * + col2 + + CAST( NULL AS SIGNED ) ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5342
SELECT + col2 / ( 91 * + col2 + + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + - 91 + - col2 FROM tab0 cor0
----
-38
-82
5

query I rowsort
SELECT DISTINCT + + 30 * col2 + col2 AS col1 FROM tab2 AS cor0
----
1178
806
837

query I rowsort
SELECT ALL 65 FROM tab0 AS cor0
----
65
65
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5346
SELECT + CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5346
SELECT + CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor1.col1 * + cor1.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

query I rowsort
SELECT + 32 FROM tab2 AS cor0
----
32
32
32

query I rowsort
SELECT + col0 * + cor0.col1 + + col1 * + 83 * + col0 FROM tab1 AS cor0
----
53760
6552
87360

query I rowsort
SELECT - col0 * - col2 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 34 FROM tab0, tab2 AS cor0
----
34

query I rowsort
SELECT - + col0 + - col2 * - col0 FROM tab2 cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT col2 * 24 FROM tab2
----
624
648
912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + - 11 + col0 * - cor0.col2 FROM tab0 AS cor0
----
-46
-7309
-803

query I rowsort
SELECT - ( - col1 ) FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 56 * col0 AS col0 FROM tab1 AS cor0
----
168
3584
4480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 31 col2 FROM tab2 AS cor0
----
31

query I rowsort
SELECT + ( + col2 ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - col0 * - col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5362
SELECT ALL col1 + - col1 * - CAST( cor0.col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-5362
SELECT ALL col1 + - col1 * - CAST ( cor0.col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL - + 92 + - col0 + ( + col1 + + col2 ) AS col1 FROM tab1 AS cor0
----
-15
-63
-89

query I rowsort
SELECT - col1 + - tab2.col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT DISTINCT col2 * cor0.col1 + - ( cor0.col0 ) * col2 AS col1 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT + - col0 * col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5368
SELECT + col1 DIV + ( - col2 ) FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5368
SELECT + col1 / + ( - col2 ) FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT + col0 * ( 5 ) + + col1 + - col0 FROM tab0 AS cor0
----
182
237
447

query I rowsort
SELECT - col1 + + col0 - + 69 FROM tab1 AS cor0
----
-15
-2
-92

query I rowsort
SELECT ALL - + col1 * 67 AS col2 FROM tab1 AS cor0
----
-1742
-670
-871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 * 87 col1 FROM tab0 AS cor0
----
-2088
-3045
-7743

onlyif mysql # use DIV operator for integer division
query I rowsort label-5373
SELECT DISTINCT col1 + CAST( - 76 AS SIGNED ) DIV + cor0.col0 FROM tab1 cor0
----
1
13
9

skipif mysql # not compatible
query I rowsort label-5373
SELECT DISTINCT col1 + CAST ( - 76 AS INTEGER ) / + cor0.col0 FROM tab1 cor0
----
1
13
9

query I rowsort
SELECT - 14 AS col1 FROM tab2, tab1 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
243 values hashing to 63e1b433786e47d973a9cb1802518d56

query I rowsort
SELECT + col1 + 57 * - col1 AS col2 FROM tab0 cor0
----
-4816
-5096
-5432

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 + 94 FROM tab2 cor0
----
-5990
-6147
45

query I rowsort
SELECT + + col1 - ( ( + col2 ) * cor0.col0 ) FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT cor2.col1 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT - col2 * ( col0 * col1 ) FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + col0 + 11 * + col2 * + col2 FROM tab1 AS cor0
----
101456
32079
35803

query I rowsort
SELECT DISTINCT - ( + col1 ) * - col1 + col1 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-5382
SELECT ( + 18 ) DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5382
SELECT ( + 18 ) / col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5383
SELECT DISTINCT + CAST( - col1 AS SIGNED ) DIV col0 col1 FROM tab0 cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5383
SELECT DISTINCT + CAST ( - col1 AS INTEGER ) / col0 col1 FROM tab0 cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col0 col2 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 col1 FROM tab0 AS cor0
----
83
83
83

query I rowsort
SELECT ALL col0 * - col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - 50 * + col0 AS col1 FROM tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT DISTINCT ( col2 ) FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5389
SELECT + - 3 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5389
SELECT + - 3 / col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 52 * + col1 AS col1 FROM tab1 AS cor0
----
1352
520
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5391
SELECT ALL 57 DIV - col2 AS col1 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-5391
SELECT ALL 57 / - col2 AS col1 FROM tab1 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5392
SELECT col0 + cor0.col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-5392
SELECT col0 + cor0.col1 / + col1 AS col2 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5393
SELECT col0 * CAST( NULL AS SIGNED ) + - col0 + col0 * 63 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5393
SELECT col0 * CAST ( NULL AS INTEGER ) + - col0 + col0 * 63 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5394
SELECT DISTINCT col1 DIV col2 + - col1 + + col0 FROM tab0
----
-1
-60
35

skipif mysql # not compatible
query I rowsort label-5394
SELECT DISTINCT col1 / col2 + - col1 + + col0 FROM tab0
----
-1
-60
35

query I rowsort
SELECT ALL - col0 + 57 FROM tab1
----
-23
-7
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 74 + col1 col1 FROM tab0
----
6450
6825
7275

query I rowsort
SELECT ALL tab0.col1 + ( + tab0.col0 ) AS col2 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5398
SELECT + - CAST( - 31 AS SIGNED ) + col2 DIV col2 FROM tab1 AS cor0
----
32
32
32

skipif mysql # not compatible
query I rowsort label-5398
SELECT + - CAST ( - 31 AS INTEGER ) + col2 / col2 FROM tab1 AS cor0
----
32
32
32

query I rowsort
SELECT ALL + ( - col2 ) + - col2 * - cor0.col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL - ( + 82 ) * - cor0.col2 AS col1 FROM tab2 AS cor0
----
2132
2214
3116

query I rowsort
SELECT 68 + cor1.col2 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to f819edfe7acaca3eb9acbf0b41e7a5e6

query I rowsort
SELECT DISTINCT 54 + col1 AS col0 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT DISTINCT + - col2 * - ( col0 ) AS col1 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 + 52 * cor0.col1 col2 FROM tab2 cor0
----
1711
3167
983

query I rowsort
SELECT ( 88 ) FROM tab1 AS cor0
----
88
88
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5406
SELECT DISTINCT - col1 DIV col1 + col0 col0 FROM tab0 AS cor0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5406
SELECT DISTINCT - col1 / col1 + col0 col0 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT DISTINCT - - col1 * - col0 + - col1 AS col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT col2 * + col2 - col1 FROM tab2
----
1427
617
698

query I rowsort
SELECT + col1 * + col0 + col2 FROM tab1
----
1136
132
697

query I rowsort
SELECT + cor0.col0 * col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col1 + - col1 * col0 AS col0 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL 21 * col2 + - col0 AS col2 FROM tab2
----
468
560
719

onlyif mysql # use DIV operator for integer division
query I rowsort label-5413
SELECT DISTINCT - 33 + - 3 DIV col0 AS col2 FROM tab0
----
-33

skipif mysql # not compatible
query I rowsort label-5413
SELECT DISTINCT - 33 + - 3 / col0 AS col2 FROM tab0
----
-33

query I rowsort
SELECT ALL 82 + - 51 AS col1 FROM tab0
----
31
31
31

query I rowsort
SELECT - - 86 * + col1 AS col2 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT ( col1 ) + col1 * - 94 FROM tab1 cor0
----
-1209
-2418
-930

query I rowsort
SELECT - tab0.col1 * tab0.col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + col2 * + col2 + col0 + + tab0.col2 FROM tab0
----
1146
37
6895

skipif mysql # not compatible
query I rowsort
SELECT tab2.col0 + CAST ( 83 AS REAL ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ad5914783859f845ad379e2d910d7e0d

query I rowsort
SELECT + col1 + - col1 * col1 FROM tab0
----
-7310
-8190
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5421
SELECT ALL + CAST( - 80 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-80
-80
-80

skipif mysql # not compatible
query I rowsort label-5421
SELECT ALL + CAST ( - 80 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-80
-80
-80

query I rowsort
SELECT 11 * + col2 AS col2 FROM tab2
----
286
297
418

query I rowsort
SELECT ALL + 56 AS col2 FROM tab0
----
56
56
56

query I rowsort
SELECT DISTINCT col0 * col2 * col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT - col1 * + col1 * + col0 - + cor0.col2 AS col2 FROM tab2 AS cor0
----
-22869
-271544
-6754

query I rowsort
SELECT ALL + cor0.col1 + 34 * + col2 FROM tab1 AS cor0
----
1862
1948
3277

query I rowsort
SELECT DISTINCT - col0 * col0 - + 73 * col0 FROM tab0 AS cor0
----
-14418
-2328
-3780

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-5429
SELECT DISTINCT + col1 * CAST( NULL AS SIGNED ) - - 70 / col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5429
SELECT DISTINCT + col1 * CAST ( NULL AS INTEGER ) - - 70 / col2 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col1 * ( + col0 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - tab2.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT - ( + col0 ) AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + 16 + - col0 AS col0 FROM tab2
----
-62
-63
9

query I rowsort
SELECT 36 + - col2 FROM tab1
----
-18
-21
-60

query I rowsort
SELECT DISTINCT 32 AS col0 FROM tab0
----
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - ( tab0.col1 + - tab0.col1 ) col1 FROM tab0
----
24
35
89

query I rowsort
SELECT - 23 * 22 FROM tab2, tab1 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 564c267591ec9cd04d9dbce6a7b7518f

query I rowsort
SELECT DISTINCT col0 + + ( + 81 ) AS col0 FROM tab1
----
145
161
84

query I rowsort
SELECT col2 + - 11 FROM tab2
----
15
16
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5440
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5440
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col1 + + col2 * + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + - col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col1 + 30 * + col1 FROM tab2 AS cor0
----
1829
527
961

query I rowsort
SELECT ALL - cor0.col0 + - col0 * - 66 AS col2 FROM tab2 AS cor0
----
455
5070
5135

query I rowsort
SELECT DISTINCT col1 + + 78 FROM tab2 AS cor0
----
109
137
95

query I rowsort
SELECT - col2 - col1 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col2 * + col1 * + col0 + + col0 AS col1 FROM tab2 AS cor0
----
119730
51113
5866

onlyif mysql # use DIV operator for integer division
query I rowsort label-5448
SELECT DISTINCT + col1 DIV col1 AS col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5448
SELECT DISTINCT + col1 / col1 AS col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL - col2 + + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + col0 + - col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5451
SELECT ALL - col2 DIV 89 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5451
SELECT ALL - col2 / 89 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - cor0.col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5453
SELECT ALL + - col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5453
SELECT ALL + - col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 96 * - col1 FROM tab2 AS cor0
----
-1632
-2976
-5664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 96 ) col0 FROM tab1
----
96
96
96

query I rowsort
SELECT 62 + - col2 * col1 FROM tab0
----
-2776
-35
-7400

query I rowsort
SELECT DISTINCT 0 AS col2 FROM tab1, tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + 90 AS col2 FROM tab2
----
90

query I rowsort
SELECT DISTINCT 31 * - col2 AS col1 FROM tab0
----
-1023
-2542
-31

query I rowsort
SELECT + 66 + col0 AS col1 FROM tab0 AS cor0
----
101
155
90

query I rowsort
SELECT - - col1 * col1 AS col2 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL - ( - col1 + col2 * - col1 ) FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT col2 * tab2.col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - 36 AS col0 FROM tab0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT 62 * - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-1488
-2170
-5518

query I rowsort
SELECT + col2 + - col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col0 ) * col0 col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + 35 * + col0 + col1 FROM tab2 AS cor0
----
276
2782
2789

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5470
SELECT ALL cor0.col1 + col2 DIV 5 AS col1 FROM tab2 AS cor0
----
24
36
64

skipif mysql # not compatible
query I rowsort label-5470
SELECT ALL cor0.col1 + col2 / 5 AS col1 FROM tab2 AS cor0
----
24
36
64

query I rowsort
SELECT + col2 + - cor0.col2 FROM tab2 cor0
----
0
0
0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1
----
243 values hashing to 5d85c5683e3ffd6d68920690d7302f7d

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0, tab2 cor1
----
972 values hashing to 42e69ecdafb3c81046bc5cb4c98b1666

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab1, tab0 AS cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ALL col0 * tab0.col0 AS col1 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5476
SELECT col1 + - 51 * col2 DIV + col2 AS col0 FROM tab1
----
-25
-38
-41

skipif mysql # not compatible
query I rowsort label-5476
SELECT col1 + - 51 * col2 / + col2 AS col0 FROM tab1
----
-25
-38
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 16 col0 FROM tab0
----
1312
16
528

query I rowsort
SELECT - - cor0.col0 * + ( cor0.col0 ) + + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL + col1 * col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + col0 * - 33 AS col1 FROM tab1 AS cor0
----
-2112
-2640
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-5481
SELECT + + col0 + col2 DIV col2 AS col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-5481
SELECT + + col0 + col2 / col2 AS col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL - cor0.col2 * 35 + ( col2 ) FROM tab0 cor0
----
-1122
-2788
-34

query I rowsort
SELECT col0 * col0 + - cor0.col1 - col0 * + 29 * col0 FROM tab2 cor0
----
-1403
-170411
-174765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * + col2 col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( col1 ) + col1 col1 FROM tab0 AS cor0
----
7482
8372
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + col1 col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - ( 0 ) + cor0.col1 * - col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - ( - col0 ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - tab1.col2 + tab1.col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col2 + tab1.col0 FROM tab1
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5491
SELECT - ( col2 ) + col1 * - CAST( NULL AS SIGNED ) * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5491
SELECT - ( col2 ) + col1 * - CAST ( NULL AS INTEGER ) * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * + col1 + + col1 FROM tab1
----
110
182
702

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - col1 AS REAL ) - - col1 AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT 36 AS col0 FROM tab0 AS cor0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 col1 FROM tab0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5496
SELECT + col2 DIV - col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5496
SELECT + col2 / - col0 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5497
SELECT - CAST( + col1 AS SIGNED ) + col1 * + col0 FROM tab2 AS cor0
----
1326
186
4543

skipif mysql # not compatible
query I rowsort label-5497
SELECT - CAST ( + col1 AS INTEGER ) + col1 * + col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + 98 * - col1 FROM tab0 AS cor0
----
-8428
-8918
-9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5500
SELECT + + CAST( NULL AS SIGNED ) * + 60 + - cor0.col1 * - 33 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5500
SELECT + + CAST ( NULL AS INTEGER ) * + 60 + - cor0.col1 * - 33 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * cor0.col1 col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + + cor0.col1 + - col0 * - col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT DISTINCT - col2 * - col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - ( col2 ) * - 9 AS col0 FROM tab0 AS cor0
----
297
738
9

query I rowsort
SELECT DISTINCT + 59 * + col2 * 55 AS col2 FROM tab1 AS cor0
----
175230
184965
311520

query I rowsort
SELECT 43 * - col2 FROM tab0
----
-1419
-3526
-43

query I rowsort
SELECT - + col0 - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT - col1 + col2 * + 46 FROM tab1 AS cor0
----
2458
2612
4403

query I rowsort
SELECT - cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT 49 * - cor1.col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58213281e9e2d82ed8ca01c77cbcb0f0

query I rowsort
SELECT tab2.col1 * + col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT 33 FROM tab0, tab0 AS cor0
----
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-5514
SELECT - + col2 DIV + col0 + col0 + col1 AS col1 FROM tab2 AS cor0
----
137
35
96

skipif mysql # not compatible
query I rowsort label-5514
SELECT - + col2 / + col0 + col0 + col1 AS col1 FROM tab2 AS cor0
----
137
35
96

query I rowsort
SELECT - col2 + + 31 AS col2 FROM tab0 AS cor0
----
-2
-51
30

query I rowsort
SELECT 41 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT col2 * + 29 FROM tab1
----
1566
1653
2784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5519
SELECT ALL - tab2.col2 - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5519
SELECT ALL - tab2.col2 - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5520
SELECT + tab2.col1 DIV + 16 FROM tab2
----
1
1
3

skipif mysql # not compatible
query I rowsort label-5520
SELECT + tab2.col1 / + 16 FROM tab2
----
1
1
3

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 8a206af99264e378e55b667df888459e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5522
SELECT col2 * + col1 DIV col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5522
SELECT col2 * + col1 / col1 FROM tab2
----
26
27
38

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + - 26 * + cor0.col2 FROM tab0 AS cor0
----
-2132
-26
-858

query I rowsort
SELECT + - cor0.col0 + + 3 * - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to d501992f9760127d797acbc8bf6f6ef0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col2 col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col2 + + col0 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT col0 * 83 FROM tab1
----
249
5312
6640

query I rowsort
SELECT - col2 + 27 AS col2 FROM tab2 AS cor0
----
-11
0
1

query I rowsort
SELECT + 43 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT + col2 + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT - col2 * + 97 AS col0 FROM tab2
----
-2522
-2619
-3686

query I rowsort
SELECT - col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5534
SELECT DISTINCT - + col0 DIV 17 + - ( - col2 ) - - col2 * col0 FROM tab2 AS cor0
----
2050
216
3036

skipif mysql # not compatible
query I rowsort label-5534
SELECT DISTINCT - + col0 / 17 + - ( - col2 ) - - col2 * col0 FROM tab2 AS cor0
----
2050
216
3036

query I rowsort
SELECT 28 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

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-5537
SELECT ALL + col0 * CAST( + col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-5537
SELECT ALL + col0 * CAST ( + col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - col2 * - ( col2 ) FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT ( col1 ) * col2 - col2 FROM tab2
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-5540
SELECT ALL - 82 DIV + col0 - - col1 FROM tab0
----
83
91
95

skipif mysql # not compatible
query I rowsort label-5540
SELECT ALL - 82 / + col0 - - col1 FROM tab0
----
83
91
95

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab2, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL col0 - col0 * col0 * + col2 FROM tab1
----
-233408
-483
-614320

onlyif mysql # use DIV operator for integer division
query I rowsort label-5543
SELECT 89 DIV 78 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5543
SELECT 89 / 78 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 * - 14 FROM tab2
----
-1092
-1106
-98

query I rowsort
SELECT + 80 * + col1 FROM tab1 cor0
----
1040
2080
800

query I rowsort
SELECT DISTINCT ( col1 ) + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab2, tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + 67 FROM tab2 AS cor0
----
67
67
67

query I rowsort
SELECT - 35 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT + 31 + + col0 + col2 * cor0.col2 FROM tab2 AS cor0
----
1554
767
785

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + ( + col2 ) AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - col2 - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL col0 * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 + col2 * cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
1424
1461
691

onlyif mysql # use DIV operator for integer division
query I rowsort label-5556
SELECT + - col0 + + col0 DIV 77 FROM tab0 AS cor0
----
-24
-35
-88

skipif mysql # not compatible
query I rowsort label-5556
SELECT + - col0 + + col0 / 77 FROM tab0 AS cor0
----
-24
-35
-88

query I rowsort
SELECT + 66 AS col1 FROM tab1 AS cor0
----
66
66
66

query I rowsort
SELECT + - col0 * - col1 + - 23 AS col1 FROM tab1 cor0
----
1017
55
617

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 * col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + col1 * col1 - - col1 AS col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL + col0 * + col2 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL ( col0 * + col0 ) FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL ( cor0.col1 ) + - cor0.col2 * - 19 FROM tab1 AS cor0
----
1052
1093
1837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5565
SELECT DISTINCT - cor0.col2 DIV - col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5565
SELECT DISTINCT - cor0.col2 / - col1 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col2 ) * col2 col1 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-5567
SELECT ALL 97 * col1 + - ( 25 * - col2 ) + cor0.col2 DIV - cor0.col1 FROM tab1 AS cor0
----
2390
3654
3870

skipif mysql # not compatible
query I rowsort label-5567
SELECT ALL 97 * col1 + - ( 25 * - col2 ) + cor0.col2 / - cor0.col1 FROM tab1 AS cor0
----
2390
3654
3870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 + - 14 col1 FROM tab1 cor0
----
-14
-14
-14

onlyif mysql # use DIV operator for integer division
query I rowsort label-5569
SELECT DISTINCT 33 DIV + col0 - + 23 * col1 FROM tab0 AS cor0
----
-1977
-2093
-2231

skipif mysql # not compatible
query I rowsort label-5569
SELECT DISTINCT 33 / + col0 - + 23 * col1 FROM tab0 AS cor0
----
-1977
-2093
-2231

query I rowsort
SELECT ALL 31 AS col2 FROM tab0 AS cor0
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 - col2 col1 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - col0 + - col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL col0 * col0 + ( - col1 ) * col2 AS col1 FROM tab0 AS cor0
----
-2262
1128
459

query I rowsort
SELECT DISTINCT + - 40 + - col2 FROM tab1 AS cor0
----
-136
-94
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - + col0 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 47 * + col1 AS col1 FROM tab2 AS cor0
----
1457
2773
799

query I rowsort
SELECT ( - 16 ) FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 71c8b08964ab47ce12158975c0ee1fd9

query I rowsort
SELECT ALL - 33 FROM tab0 cor0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT - col2 + + col0 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5580
SELECT + col0 + col0 DIV 20 col1 FROM tab0 AS cor0
----
25
36
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5580
SELECT + col0 + col0 / 20 col1 FROM tab0 AS cor0
----
25
36
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5581
SELECT DISTINCT col1 DIV col1 AS col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5581
SELECT DISTINCT col1 / col1 AS col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT + col1 * + cor0.col0 + + 10 * 97 FROM tab0 cor0
----
3034
4365
9069

query I rowsort
SELECT ALL - col2 + col2 * col1 AS col0 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL 93 + + col2 FROM tab2 AS cor0
----
119
120
131

query I rowsort
SELECT - col2 * + 84 AS col2 FROM tab0 AS cor0
----
-2772
-6888
-84

query I rowsort
SELECT col2 + col1 - col2 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col1 - col0 * col1 * col1 FROM tab0 AS cor0
----
-177418
-329218
-736918

query I rowsort
SELECT DISTINCT - cor0.col2 * 73 AS col1 FROM tab0 cor0
----
-2409
-5986
-73

query I rowsort
SELECT 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-5590
SELECT ALL + col1 + - CAST( + col0 AS SIGNED ) * col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-5590
SELECT ALL + 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 DISTINCT col0 * - col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col2 * + col1 + col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL 88 + col2 AS col1 FROM tab2
----
114
115
126

query I rowsort
SELECT + tab0.col2 + - col0 * col0 + ( - col1 + 9 * + col1 ) AS col0 FROM tab0
----
-448
-7111
145

query I rowsort
SELECT ALL col1 + col2 * + tab0.col1 * col0 + tab0.col1 FROM tab0
----
3589
664300
68284

onlyif mysql # use DIV operator for integer division
query I rowsort label-5596
SELECT - 88 DIV + 81 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

skipif mysql # not compatible
query I rowsort label-5596
SELECT - 88 / + 81 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT DISTINCT + col0 * col1 + ( 24 ) AS col0 FROM tab0
----
2088
3419
8123

query I rowsort
SELECT ALL + col1 * - col2 + + 46 + + 64 FROM tab2
----
-1424
-536
-727

onlyif mysql # use DIV operator for integer division
query I rowsort label-5599
SELECT + col0 + tab1.col0 + col1 DIV col2 AS col1 FROM tab1
----
128
160
6

skipif mysql # not compatible
query I rowsort label-5599
SELECT + col0 + tab1.col0 + col1 / col2 AS col1 FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 * + col1 col2 FROM tab2 AS cor0
----
1666
3038
5782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 63 * - col2 + + col0 col2 FROM tab1 AS cor0
----
-3399
-3527
-5968

query I rowsort
SELECT - - 12 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT ALL + col0 - 54 * col0 FROM tab0 cor0
----
-1272
-1855
-4717

query I rowsort
SELECT DISTINCT - - 42 - + col2 * + col1 FROM tab2 AS cor0
----
-1492
-604
-795

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5605
SELECT DISTINCT - CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5605
SELECT DISTINCT - CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + ( + 72 ) AS col2 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT ALL col2 + - col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + 18 * + col1 AS col1 FROM tab1 AS cor0
----
180
234
468

query I rowsort
SELECT - + 30 AS col1 FROM tab0 AS cor0
----
-30
-30
-30

query I rowsort
SELECT ALL 97 AS col0 FROM tab2 AS cor0
----
97
97
97

query I rowsort
SELECT DISTINCT col2 * col1 + col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 * cor0.col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL + cor0.col0 * - col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * - col1 - + col0 col1 FROM tab0 cor0
----
7372
8192
9374

query I rowsort
SELECT - 88 * - col1 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT DISTINCT - 6 AS col2 FROM tab2 AS cor0
----
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 65 col1 FROM tab2 AS cor0
----
-65
-65
-65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5618
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - col0 * col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5618
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - col0 * col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - - col0 + col0 * col2 FROM tab2 cor0
----
196
2106
3081

query I rowsort
SELECT 25 + 88 FROM tab0, tab2 AS cor0
----
9 values hashing to e8b0720b8386c308e7f43eb0f4e6aee1

query I rowsort
SELECT + 79 * - ( - col1 ) FROM tab0 cor0
----
6794
7189
7663

query I rowsort
SELECT + + 92 FROM tab1 AS cor0
----
92
92
92

query I rowsort
SELECT DISTINCT - col2 * 48 - col1 * + ( col0 ) * col2 FROM tab2 cor0
----
-120900
-52858
-7155

query I rowsort
SELECT - col2 + - 1 FROM tab1
----
-55
-58
-97

query I rowsort
SELECT ALL tab2.col1 + col1 * col1 AS col2 FROM tab2
----
306
3540
992

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab2 cor1
----
243 values hashing to 6506b295d3a7bcc5ed65956f5b4e38b0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5628
SELECT 14 * col1 DIV + col1 + col0 FROM tab2
----
21
92
93

skipif mysql # not compatible
query I rowsort label-5628
SELECT 14 * col1 / + col1 + col0 FROM tab2
----
21
92
93

query I rowsort
SELECT DISTINCT - ( 38 + col2 ) AS col1 FROM tab0
----
-120
-39
-71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5630
SELECT - CAST( - 43 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
43
43
43

skipif mysql # not compatible
query I rowsort label-5630
SELECT - CAST ( - 43 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT ALL + - cor0.col2 + 53 * col1 AS col2 FROM tab2 AS cor0
----
1616
3101
863

query I rowsort
SELECT ALL ( - tab1.col0 ) AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + col1 + + col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5634
SELECT CAST( NULL AS SIGNED ) * ( + col2 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5634
SELECT CAST ( NULL AS INTEGER ) * ( + col2 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5635
SELECT + + CAST( col1 AS SIGNED ) * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-5635
SELECT + + CAST ( col1 AS INTEGER ) * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - cor0.col2 * - ( + col1 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 63 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
189
4032
5040

query I rowsort
SELECT - col2 + cor0.col1 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - cor0.col0 col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 col0 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT - + col2 * + col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5642
SELECT - col2 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5642
SELECT - col2 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5643
SELECT CAST( col1 AS SIGNED ) * - col0 FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-5643
SELECT CAST ( col1 AS INTEGER ) * - col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL ( + col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT + 53 FROM tab0
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col2 ) col0 FROM tab2
----
26
27
38

query I rowsort
SELECT ( - col2 * + col0 ) FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col0 AS REAL ) * - col1 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col0 AS REAL ) FROM tab1
----
3
64
80

query I rowsort
SELECT ALL ( tab1.col2 ) * col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - - col0 * - col0 + ( col2 ) AS col0 FROM tab0 cor0
----
-1224
-543
-7839

query I rowsort
SELECT - - col2 + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col0 * cor0.col0 + 99 FROM tab0 cor0
----
1324
675
8020

query I rowsort
SELECT col2 * ( + col2 ) + + cor0.col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT col0 * + 68 - 72 FROM tab2 AS cor0
----
404
5232
5300

query I rowsort
SELECT DISTINCT + 34 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5657
SELECT ALL + 63 DIV col1 + + col0 * + col0 col2 FROM tab2
----
51
6085
6244

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5657
SELECT ALL + 63 / col1 + + col0 * + col0 col2 FROM tab2
----
51
6085
6244

query I rowsort
SELECT 2 + col2 AS col1 FROM tab0
----
3
35
84

query I rowsort
SELECT ALL 85 * col1 * + ( col0 ) + + col0 FROM tab2
----
114234
18452
391248

query I rowsort
SELECT 88 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab1, tab1 AS cor1
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5662
SELECT - CAST( NULL AS DECIMAL ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5662
SELECT - CAST ( NULL AS REAL ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5663
SELECT ALL + cor0.col1 + CAST( - 29 AS SIGNED ) FROM tab2 AS cor0
----
-12
2
30

skipif mysql # not compatible
query I rowsort label-5663
SELECT ALL + cor0.col1 + CAST ( - 29 AS INTEGER ) FROM tab2 AS cor0
----
-12
2
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + - col1 col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - ( - 44 ) col1 FROM tab1 cor0
----
-10
-13
-52

query I rowsort
SELECT DISTINCT col0 * - 61 FROM tab0 AS cor0
----
-1464
-2135
-5429

query I rowsort
SELECT + col1 + - col0 - - 16 AS col0 FROM tab0 AS cor0
----
18
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5668
SELECT - col2 DIV col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5668
SELECT - col2 / col1 AS col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5669
SELECT DISTINCT - + col1 + + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5669
SELECT DISTINCT - + col1 + + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5670
SELECT + col0 DIV 39 FROM tab0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5670
SELECT + col0 / 39 FROM tab0
----
0
0
2

query I rowsort
SELECT col1 * - tab2.col2 FROM tab2
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5672
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * + col1 - + col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5672
SELECT DISTINCT - CAST ( NULL AS REAL ) * + col1 - + col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - + col2 - + col2 * col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL + 26 * + 79 * + cor0.col1 + col0 FROM tab0 AS cor0
----
176668
187003
199273

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 38 + + col0 * - cor0.col2 col2 FROM tab0 AS cor0
----
-73
-7336
-830

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( col0 AS REAL ) + + col2 + - col0 FROM tab2 cor0
----
-120
-130
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-5677
SELECT DISTINCT + tab0.col1 DIV - 46 - + col1 FROM tab0
----
-87
-92
-99

skipif mysql # not compatible
query I rowsort label-5677
SELECT DISTINCT + tab0.col1 / - 46 - + col1 FROM tab0
----
-87
-92
-99

query I rowsort
SELECT + tab0.col2 + - tab0.col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - col2 * 78 FROM tab0
----
-2574
-6396
-78

query I rowsort
SELECT + ( 73 ) * cor0.col2 FROM tab1, tab2 cor0
----
9 values hashing to e4e6820209f8f9e5b5b72fb254c69ab0

query I rowsort
SELECT tab1.col1 FROM tab1, tab0, tab1 AS cor0, tab1 AS cor1
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT + tab2.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + - 84 * - cor0.col1 FROM tab2 AS cor0
----
1428
2604
4956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5684
SELECT - - CAST( NULL AS SIGNED ) + col1 * col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5684
SELECT - - CAST ( NULL AS INTEGER ) + col1 * col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col1 * col0 + col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5686
SELECT CAST( NULL AS SIGNED ) * + ( - col2 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5686
SELECT CAST ( NULL AS INTEGER ) * + ( - col2 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5687
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5687
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5689
SELECT DISTINCT - + CAST( + col2 AS SIGNED ) * - col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-5689
SELECT DISTINCT - + CAST ( + col2 AS INTEGER ) * - col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5690
SELECT DISTINCT + col1 DIV + ( + col1 ) AS col0 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-5690
SELECT DISTINCT + col1 / + ( + col1 ) AS col0 FROM tab0 cor0
----
1

query I rowsort
SELECT + 75 AS col1 FROM tab2 AS cor0
----
75
75
75

query I rowsort
SELECT - ( col1 ) * col1 + - col2 * col1 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT + 42 AS col1 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT + col0 + + 5 FROM tab0 AS cor0
----
29
40
94

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2, tab1 AS cor1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

query I rowsort
SELECT - - 8 * 78 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 9101277cbc8be7269bc5ba59efd97148

query I rowsort
SELECT col2 + col1 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0, tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL + 20 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT - + col0 * 69 FROM tab1 cor0
----
-207
-4416
-5520

query I rowsort
SELECT - col0 - ( - cor0.col1 ) * - col1 AS col2 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT ( - col0 + + 41 ) AS col1 FROM tab1
----
-23
-39
38

query I rowsort
SELECT - col2 * - ( ( col2 ) * + col1 ) FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT ALL - + col0 * col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col1 + col1 * + col0 AS col2 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT - - col2 - cor0.col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - col0 * col2 + - col1 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL col1 + + col1 FROM tab1 cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT DISTINCT - + col0 DIV col0 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5710
SELECT DISTINCT - + col0 / col0 AS col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT col1 + col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + cor0.col0 + col2 * col2 AS col0 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT + + col1 * + col1 + col2 + + col1 FROM tab0 cor0
----
7515
8454
9507

query I rowsort
SELECT - - cor0.col0 + col0 * col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT - - col1 * col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + - cor0.col0 * + col0 + col0 AS col0 FROM tab2 cor0
----
-42
-6006
-6162

query I rowsort
SELECT + cor0.col2 + + col1 * col2 * + col0 AS col0 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT DISTINCT - col0 * + col1 - col2 FROM tab2
----
-1381
-244
-4628

query I rowsort
SELECT col1 * - col0 + - tab1.col1 AS col2 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT + cor0.col1 - - col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL + col0 + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + col2 * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + col1 * - col2 - + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-788
4550
5595

query I rowsort
SELECT - col1 * col1 + col1 * + col2 AS col2 FROM tab0 AS cor0
----
-4558
-819
-9312

query I rowsort
SELECT + col0 * col2 - + col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + col1 FROM tab0 WHERE NOT NULL NOT BETWEEN ( NULL ) AND - col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 col2 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5729
SELECT DISTINCT col2 + - col1 DIV col1 + tab1.col1 FROM tab1
----
108
66
79

skipif mysql # not compatible
query I rowsort label-5729
SELECT DISTINCT col2 + - col1 / col1 + tab1.col1 FROM tab1
----
108
66
79

query I rowsort
SELECT ALL - col1 + + col2 + - col2 AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - col0 + col2 * tab1.col0 + tab1.col0 * col1 FROM tab1
----
237
4224
8640

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 CROSS JOIN tab2
----
243 values hashing to 5d85c5683e3ffd6d68920690d7302f7d

query I rowsort
SELECT DISTINCT col0 + tab1.col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL + col0 * col0 - col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT + - cor0.col2 + + cor0.col2 * - col1 FROM tab2 AS cor0
----
-1560
-684
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 * col1 col1 FROM tab0
----
-3612
-3822
-4074

query I rowsort
SELECT 95 - - col2 * - col1 FROM tab2
----
-1439
-551
-742

query I rowsort
SELECT DISTINCT - 69 * - col1 FROM tab2
----
1173
2139
4071

query I rowsort
SELECT + cor0.col0 * + tab0.col2 AS col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to caa3e6469432624a16bd3084f5c6de58

query I rowsort
SELECT + col2 + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - col2 + - col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT + tab0.col0 - - col2 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + - col1 + - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - col0 - - tab1.col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT col2 - col2 AS col1 FROM tab0
----
0

query I rowsort
SELECT + col0 + col2 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT col1 FROM tab0 WHERE + col0 NOT BETWEEN ( + col0 ) AND NULL
----

query I rowsort
SELECT ALL - col0 * + tab0.col1 * + col2 + + col2 FROM tab0
----
-3394
-664036
-68079

onlyif mysql # use DIV operator for integer division
query I rowsort label-5749
SELECT + col0 + col0 DIV - col2 FROM tab1
----
3
63
80

skipif mysql # not compatible
query I rowsort label-5749
SELECT + col0 + col0 / - col2 FROM tab1
----
3
63
80

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE + col0 NOT BETWEEN ( - col2 - col1 ) AND ( - col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT + col0 + col1 AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT col1 + col2 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL - tab1.col1 + + col1 AS col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5754
SELECT ALL col1 - tab0.col1 DIV - col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5754
SELECT ALL col1 - tab0.col1 / - col1 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT tab1.col0 + col1 * col0 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT col2 + - tab1.col2 * - col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL col0 - col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT col1 + - tab2.col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL col1 * + col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + + col1 * col0 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - ( - col1 ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - 77 FROM tab2 cor0
----
-77

query I rowsort
SELECT ALL + - col0 + cor0.col2 * - ( col0 ) FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT - - 81 AS col2 FROM tab2 AS cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5765
SELECT DISTINCT + ( + col1 ) DIV + ( ( + col1 ) * col1 ) + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5765
SELECT DISTINCT + ( + col1 ) / + ( ( + col1 ) * col1 ) + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - 2 * col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL - col1 / col0 + col0 FROM tab1 WHERE NOT col0 * col2 > ( NULL )
----

query I rowsort
SELECT + col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab2 WHERE NOT ( + col0 * + col2 ) IN ( col2 + - col0 / + col1 + col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT - col1 * tab2.col0 + col1 AS col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT col0 + - col1 AS col1 FROM tab2
----
-24
19
62

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT + col2 + - col1 * col2 < + col0
----

query I rowsort
SELECT DISTINCT col0 * + col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5775
SELECT DISTINCT col1 DIV + cor0.col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-5775
SELECT DISTINCT col1 / + cor0.col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT cor0.col2 + + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5777
SELECT col2 + + col0 DIV - col1 AS col2 FROM tab1 AS cor0
----
51
54
90

skipif mysql # not compatible
query I rowsort label-5777
SELECT col2 + + col0 / - col1 AS col2 FROM tab1 AS cor0
----
51
54
90

query I rowsort
SELECT - col0 * col0 * cor0.col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-5779
SELECT col2 DIV col1 + col1 * col0 AS col2 FROM tab2 AS cor0
----
1345
217
4602

skipif mysql # not compatible
query I rowsort label-5779
SELECT col2 / col1 + col1 * col0 AS col2 FROM tab2 AS cor0
----
1345
217
4602

query I rowsort
SELECT DISTINCT col1 * col2 + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col0 * col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5782
SELECT ALL col0 DIV col1 AS col2 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-5782
SELECT ALL col0 / col1 AS col2 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT col0 + col0 * + col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT col0 * col0 * - tab1.col0 AS col1 FROM tab1
----
-262144
-27
-512000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + tab1.col2 col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL col1 - + col0 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - col0 * - col2 FROM tab2 WHERE NOT NULL < col1 / + col1
----

query I rowsort
SELECT DISTINCT tab1.col0 * col2 + tab1.col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT DISTINCT col2 * - col2 AS col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL tab0.col2 * col2 * col0 AS col1 FROM tab0
----
26136
35
598436

query I rowsort
SELECT + col2 * - col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 WHERE col2 + + col0 IN ( + tab2.col0 + col0 * col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 * col1 NOT IN ( - col1 )
----

query I rowsort
SELECT col1 AS col0 FROM tab1 WHERE + col2 NOT IN ( - col2 * + col0 * col2 )
----
10
13
26

query I rowsort
SELECT ALL col1 * tab1.col1 * col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT col2 - + col0 AS col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col0 * + col0 * + col2 AS col2 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT + col0 * tab2.col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT col2 * col0 * col1 AS col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT 88 * col0 * ( - 67 ) AS col0 FROM tab0
----
-141504
-206360
-524744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 98 * + col0 * col2 col1 FROM tab1
----
15876
357504
752640

query I rowsort
SELECT cor0.col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT tab2.col1 * - col2 * - col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT 94 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT col0 * - col0 AS col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + col2 * - col1 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col2 - + col1 * col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT 24 * col2 + + col2 * col2 - - col0 FROM tab1 AS cor0
----
11600
4215
4681

query I rowsort
SELECT 22 + + col0 + col0 * col0 FROM tab0 cor0
----
1282
622
8032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + cor0.col2 col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5812
SELECT + + col2 DIV - 63 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5812
SELECT + + col2 / - 63 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * + col0 * + col2 + cor0.col0 * + 4 * - col0 FROM tab2 AS cor0
----
-139040
-5299
-77064

query I rowsort
SELECT ALL 2 * tab1.col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT - 74 * - col2 FROM tab0
----
2442
6068
74

query I rowsort
SELECT col2 + col1 * col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + 17 * col1 FROM tab0
----
1462
1547
1649

query I rowsort
SELECT ALL 20 AS col0 FROM tab1
----
20
20
20

query I rowsort
SELECT + col1 * 78 + - 87 + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-113
1863
53

query I rowsort
SELECT - cor0.col0 * + 41 + + 67 FROM tab0 cor0
----
-1368
-3582
-917

query I rowsort
SELECT DISTINCT - ( - col1 * col1 ) + col2 FROM tab2
----
327
3507
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5822
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * + col1 col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5822
SELECT DISTINCT - CAST ( NULL AS REAL ) * + col1 col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - ( 46 ) FROM tab2 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL - - col2 + 11 AS col2 FROM tab0 AS cor0
----
12
44
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5825
SELECT + cor0.col0 * 52 DIV - col2 AS col2 FROM tab0 AS cor0
----
-1820
-37
-56

skipif mysql # not compatible
query I rowsort label-5825
SELECT + cor0.col0 * 52 / - col2 AS col2 FROM tab0 AS cor0
----
-1820
-37
-56

query I rowsort
SELECT ALL + col0 + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-5827
SELECT DISTINCT + col1 DIV + col1 + col2 AS col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-5827
SELECT DISTINCT + col1 / + col1 + col2 AS col1 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5828
SELECT + - CAST( col1 AS SIGNED ) * - col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-5828
SELECT + - CAST ( col1 AS INTEGER ) * - col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + + col0 * 6 FROM tab0 AS cor0
----
144
210
534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5830
SELECT CAST( NULL AS SIGNED ) * + cor0.col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5830
SELECT CAST ( NULL AS INTEGER ) * + cor0.col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - col0 + + col1 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT - col0 * - col0 + col0 * + col0 FROM tab0
----
1152
15842
2450

query I rowsort
SELECT - 13 FROM tab0 AS cor0
----
-13
-13
-13

query I rowsort
SELECT + 94 AS col1 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT + 7 * 95 AS col2 FROM tab1 AS cor0
----
665
665
665

query I rowsort
SELECT - + 94 + - col0 AS col2 FROM tab0 AS cor0
----
-118
-129
-183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - col0 * - col1 + col1 * - col2 AS col0 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT 90 FROM tab0 AS cor0
----
90
90
90

query I rowsort
SELECT ALL - col1 + + col0 * - col0 + + ( + col2 ) FROM tab2 cor0
----
-53
-6117
-6220

query I rowsort
SELECT DISTINCT + col0 + cor0.col2 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + col2 + col2 * col0 + + 52 FROM tab0 AS cor0
----
7432
877
88

query I rowsort
SELECT + 9 AS col1 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT ALL 23 * + col2 * - col0 + col2 * + col1 AS col0 FROM tab2 cor0
----
-3510
-45110
-68400

query I rowsort
SELECT ( - col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT 48 - col2 AS col0 FROM tab2
----
10
21
22

query I rowsort
SELECT - col2 - col2 AS col0 FROM tab1 AS cor0
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 * col0 - - col1 * col1 col0 FROM tab1 AS cor0
----
4260
6649
688

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 DISTINCT + col2 - - col2 AS col1 FROM tab1
----
108
114
192

query I rowsort
SELECT tab1.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - - col0 AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - tab2.col2 * 63 FROM tab2
----
-1638
-1701
-2394

onlyif mysql # use DIV operator for integer division
query I rowsort label-5855
SELECT - col1 + cor0.col2 DIV 48 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5855
SELECT - col1 + cor0.col2 / 48 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT + col1 * - 2 AS col2 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT DISTINCT tab2.col0 * ( 44 * col1 ) FROM tab2
----
202488
59092
9548

query I rowsort
SELECT - 55 FROM tab2, tab0 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT ALL - 22 AS col2 FROM tab0
----
-22
-22
-22

query I rowsort
SELECT ALL 71 FROM tab0
----
71
71
71

query I rowsort
SELECT DISTINCT + 11 FROM tab0
----
11

query I rowsort
SELECT + col0 - + tab2.col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT + col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + col1 + col1 * - col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT + col2 + + 68 * col0 AS col0 FROM tab1 AS cor0
----
258
4409
5536

query I rowsort
SELECT DISTINCT - col2 + col1 * col0 AS col1 FROM tab2 cor0
----
1305
190
4576

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 cor1, tab0 AS cor2
----
972 values hashing to 380241bbc503a31e70494611a87ffd99

query I rowsort
SELECT ALL - col2 + col2 * col0 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL - + cor0.col0 * - ( col0 * + col0 ) FROM tab2 AS cor0
----
343
474552
493039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col1 + - 42 AS col2 FROM tab1 cor0
----
-16
-29
-32

query I rowsort
SELECT DISTINCT - - cor0.col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + col1 + - 92 * + col1 AS col2 FROM tab2 AS cor0
----
-1547
-2821
-5369

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5875
SELECT ALL - col0 * CAST( NULL AS SIGNED ) / - col0 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5875
SELECT ALL - col0 * CAST ( NULL AS INTEGER ) / - col0 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + col1 - ( col1 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 44 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 19a2b9512177749564ba22ea2213fe3f

query I rowsort
SELECT + col0 - col1 * + col0 * col1 AS col0 FROM tab0 AS cor0
----
-177480
-329280
-736920

query I rowsort
SELECT ALL + 55 AS col1 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT + ( col2 ) * - cor0.col0 + col2 + + 19 FROM tab2 AS cor0
----
-143
-1983
-2945

query I rowsort
SELECT DISTINCT + + 95 * - col1 AS col1 FROM tab2 AS cor0
----
-1615
-2945
-5605

query I rowsort
SELECT + col2 - - 96 * - cor0.col2 FROM tab1 AS cor0
----
-5130
-5415
-9120

query I rowsort
SELECT ALL + col1 * col2 AS col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL 17 FROM tab1, tab2 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT tab2.col2 * col0 + - col0 AS col1 FROM tab2
----
182
1950
2923

query I rowsort
SELECT ALL 23 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT + + col1 + - col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + - cor0.col2 * - col2 + + col1 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT 14 * col0 FROM tab2 AS cor0
----
1092
1106
98

query I rowsort
SELECT ALL - 18 FROM tab1 AS cor0
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col1 FROM tab0 cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - - col1 * col0 + - 26 AS col2 FROM tab0 AS cor0
----
2038
3369
8073

query I rowsort
SELECT ALL 36 + - col0 * + col2 FROM tab1
----
-126
-3612
-7644

onlyif mysql # use DIV operator for integer division
query I rowsort label-5895
SELECT DISTINCT - - ( - col0 ) * - ( - col2 * - col0 ) + - cor0.col1 DIV + col2 FROM tab0 AS cor0
----
1128
19006
649521

skipif mysql # not compatible
query I rowsort label-5895
SELECT DISTINCT - - ( - col0 ) * - ( - col2 * - col0 ) + - cor0.col1 / + col2 FROM tab0 AS cor0
----
1128
19006
649521

query I rowsort
SELECT 51 AS col2 FROM tab0 cor0
----
51
51
51

query I rowsort
SELECT ALL + 26 FROM tab2
----
26
26
26

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + col0 + + ( + 73 ) FROM tab0 AS cor0
----
108
162
97

query I rowsort
SELECT DISTINCT - cor0.col2 * ( + cor0.col0 ) * col0 FROM tab0 cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL - tab2.col0 - cor0.col0 * 39 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 696ed171dd56f0ff009f53ec8b0b338e

query I rowsort
SELECT DISTINCT - cor0.col0 * 75 * + 3 AS col2 FROM tab0, tab0 AS cor0
----
-20025
-5400
-7875

query I rowsort
SELECT + 6 FROM tab1
----
6
6
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5904
SELECT 51 + col2 * - CAST( 22 AS SIGNED ) col2 FROM tab0
----
-1753
-675
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5904
SELECT 51 + col2 * - CAST ( 22 AS INTEGER ) col2 FROM tab0
----
-1753
-675
29

query I rowsort
SELECT - tab2.col0 + - col1 * + col1 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT - col2 + + tab0.col2 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 7 AS col0 FROM tab0
----
-7
-7
-7

query I rowsort
SELECT col1 - - col0 * col0 AS col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT DISTINCT - 24 FROM tab0, tab2 AS cor0
----
-24

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + ( col2 * ( col2 ) ) AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab1, tab2 cor0, tab1 AS cor1
----
2

query I rowsort
SELECT 12 FROM tab1, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + - tab1.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 2874e4b5a308db8cb58c103c3df9d308

onlyif mysql # use DIV operator for integer division
query I rowsort label-5915
SELECT ALL col1 DIV ( col1 ) col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5915
SELECT ALL col1 / ( col1 ) col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + col0 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col0 + 22 + + col0 AS col2 FROM tab0 AS cor0
----
200
70
92

query I rowsort
SELECT ALL + 74 + ( + col2 ) AS col1 FROM tab2
----
100
101
112

query I rowsort
SELECT ALL col0 * + col0 + col0 FROM tab2
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-5920
SELECT + col0 DIV col1 col1 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5920
SELECT + col0 / col1 col1 FROM tab2
----
0
1
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5921
SELECT + CAST( + ( col2 ) AS SIGNED ) * CAST( NULL AS DECIMAL ) * + col1 col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5921
SELECT + CAST ( + ( col2 ) AS INTEGER ) * CAST ( NULL AS REAL ) * + col1 col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 53 + - ( col1 ) FROM tab0
----
-33
-38
-44

query I rowsort
SELECT ALL tab1.col1 + col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL 43 FROM tab0, tab2 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT DISTINCT + ( + 8 ) * + col1 - + 81 * - col1 * col1 FROM tab2 AS cor0
----
23545
282433
78089

query I rowsort
SELECT - col0 * col2 + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + col2 - 41 FROM tab1 cor0
----
13
16
55

query I rowsort
SELECT DISTINCT + col2 + - cor0.col2 * col2 AS col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ( cor0.col2 ) * col0 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT 61 * tab2.col1 + - col1 AS col0 FROM tab2
----
1020
1860
3540

query I rowsort
SELECT col0 + - 91 AS col2 FROM tab0
----
-2
-56
-67

query I rowsort
SELECT - col2 + col2 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + cor0.col0 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - + cor0.col0 * - col1 + 87 FROM tab0 AS cor0
----
2151
3482
8186

query I rowsort
SELECT + 12 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT DISTINCT + col1 * col0 + 91 - col0 AS col0 FROM tab1 AS cor0
----
1051
166
667

onlyif mysql # use DIV operator for integer division
query I rowsort label-5937
SELECT DISTINCT - 87 + + col0 * - col0 DIV + col0 AS col2 FROM tab2 AS cor0
----
-165
-166
-94

skipif mysql # not compatible
query I rowsort label-5937
SELECT DISTINCT - 87 + + col0 * - col0 / + col0 AS col2 FROM tab2 AS cor0
----
-165
-166
-94

query I rowsort
SELECT col1 * col1 + cor0.col0 * + col2 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT - - col1 AS col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL col2 + col0 * + col2 AS col0 FROM tab2 cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT - col1 - + col2 * - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL - 70 * col2 * + ( col2 ) FROM tab1 AS cor0
----
-204120
-227430
-645120

query I rowsort
SELECT + - col0 * + col0 + + col0 * + cor0.col1 FROM tab1 AS cor0
----
-3456
-5360
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-5944
SELECT - + cor0.col2 DIV - col1 + col0 * 97 FROM tab2 AS cor0
----
679
7566
7665

skipif mysql # not compatible
query I rowsort label-5944
SELECT - + cor0.col2 / - col1 + col0 * 97 FROM tab2 AS cor0
----
679
7566
7665

query I rowsort
SELECT DISTINCT - col2 * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - - col2 * col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5947
SELECT col1 + + cor0.col1 + CAST( 8 AS SIGNED ) * col1 AS col0 FROM tab0 AS cor0
----
860
910
970

skipif mysql # not compatible
query I rowsort label-5947
SELECT col1 + + cor0.col1 + CAST ( 8 AS INTEGER ) * col1 AS col0 FROM tab0 AS cor0
----
860
910
970

query I rowsort
SELECT DISTINCT + col0 + col2 * - 85 FROM tab2 cor0
----
-2132
-2288
-3151

query I rowsort
SELECT DISTINCT + 3 * col1 AS col1 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT DISTINCT - - col1 + col0 * 76 AS col0 FROM tab1 AS cor0
----
254
4874
6093

query I rowsort
SELECT - 62 AS col0 FROM tab2 AS cor0
----
-62
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5952
SELECT DISTINCT - + col0 + - col2 + - CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-80
29
61

skipif mysql # not compatible
query I rowsort label-5952
SELECT DISTINCT - + col0 + - col2 + - CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT + 92 + col2 + - ( col2 ) AS col2 FROM tab0 cor0
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5954
SELECT ALL + CAST( + col0 AS SIGNED ) DIV - col1 + 40 * - col1 * - col0 AS col1 FROM tab0 AS cor0
----
135800
323960
82560

skipif mysql # not compatible
query I rowsort label-5954
SELECT ALL + CAST ( + col0 AS INTEGER ) / - col1 + 40 * - col1 * - col0 AS col1 FROM tab0 AS cor0
----
135800
323960
82560

query I rowsort
SELECT - cor0.col1 * + col2 * col0 - 81 FROM tab1 AS cor0
----
-36561
-4293
-99921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5956
SELECT ALL - CAST( col1 AS SIGNED ) + col2 + - col0 FROM tab2 cor0
----
-11
-111
-58

skipif mysql # not compatible
query I rowsort label-5956
SELECT ALL - CAST ( col1 AS INTEGER ) + col2 + - col0 FROM tab2 cor0
----
-11
-111
-58

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT + + 27 * - cor0.col1 AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 0ffd37e68a96c8b6827d9c1d6666ede7

query I rowsort
SELECT 2 FROM tab2, tab2 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT 69 FROM tab0, tab1 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5961
SELECT + col1 DIV col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5961
SELECT + col1 / col1 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT + col2 * - 53 - + col0 * col2 AS col2 FROM tab2
----
-1620
-3406
-5016

query I rowsort
SELECT - col2 + + 90 + col2 FROM tab1
----
90
90
90

query I rowsort
SELECT ALL 39 * + 99 AS col0 FROM tab2
----
3861
3861
3861

query I rowsort
SELECT DISTINCT + 67 FROM tab0
----
67

query I rowsort
SELECT 32 AS col1 FROM tab0
----
32
32
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-5967
SELECT - col0 + + cor0.col2 DIV col0 AS col2 FROM tab1 AS cor0
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-5967
SELECT - col0 + + cor0.col2 / col0 AS col2 FROM tab1 AS cor0
----
-64
-79
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-5968
SELECT + - cor0.col2 + + col2 - col1 DIV cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5968
SELECT + - cor0.col2 + + col2 - col1 / cor0.col2 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT - 21 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to cdcb40c9e1bb9a33ce9167a0d2bac0b1

query I rowsort
SELECT ALL - 8 AS col1 FROM tab2
----
-8
-8
-8

query I rowsort
SELECT ALL + ( col0 + + col0 ) * + col2 FROM tab1
----
15360
324
7296

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + cor0.col2 * 12 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 125f2f3fb2d94b0cc3f62e6ce4a3f314

query I rowsort
SELECT DISTINCT + 18 FROM tab0
----
18

query I rowsort
SELECT + - 72 * col2 FROM tab0 AS cor0
----
-2376
-5904
-72

query I rowsort
SELECT ( 27 ) FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + - col1 * - col1 + + ( - 46 * + col0 ) FROM tab2 cor0
----
-107
-3345
639

query I rowsort
SELECT + cor0.col1 * ( col1 ) + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT - cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col1 * 94 AS col0 FROM tab0 AS cor0
----
-8084
-8554
-9118

query I rowsort
SELECT DISTINCT + 28 FROM tab1
----
28

query I rowsort
SELECT + col0 + - ( - col1 ) FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + tab2.col0 * + 62 * - 51 AS col0 FROM tab2
----
-22134
-246636
-249798

query I rowsort
SELECT ALL 87 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT + + col1 + + 79 * + col2 FROM tab0 AS cor0
----
176
2693
6569

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5989
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5989
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - + col0 * - ( col1 ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - col2 * cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + + col0 + cor0.col0 * + col1 * + col1 FROM tab0 AS cor0
----
177528
329350
737098

query I rowsort
SELECT - cor0.col1 * col1 AS col0 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT + col2 + - cor0.col0 * + col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL 52 FROM tab2 cor0
----
52
52
52

query I rowsort
SELECT - ( col2 ) * + col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + ( - 92 ) + - col2 AS col2 FROM tab2 AS cor0
----
-118
-119
-130

query I rowsort
SELECT ALL - - cor0.col1 * col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 57 + - col0 FROM tab2 AS cor0
----
-135
-136
-64

query I rowsort
SELECT DISTINCT 31 * - 65 AS col2 FROM tab2 AS cor0
----
-2015

query I rowsort
SELECT - 88 FROM tab0 AS cor0
----
-88
-88
-88

query I rowsort
SELECT ALL - 56 * - ( col2 ) FROM tab2 AS cor0
----
1456
1512
2128

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6003
SELECT + CAST( NULL AS SIGNED ) * + 60 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6003
SELECT + CAST ( NULL AS INTEGER ) * + 60 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6004
SELECT ALL 33 * + col0 + cor0.col1 DIV - 97 AS col1 FROM tab1 AS cor0
----
2112
2640
99

skipif mysql # not compatible
query I rowsort label-6004
SELECT ALL 33 * + col0 + cor0.col1 / - 97 AS col1 FROM tab1 AS cor0
----
2112
2640
99

query I rowsort
SELECT col2 * - ( col2 ) FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL ( + col0 ) + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT ( 64 ) AS col1 FROM tab0 AS cor0
----
64

query I rowsort
SELECT DISTINCT + col1 - + 29 FROM tab2 AS cor0
----
-12
2
30

query I rowsort
SELECT DISTINCT ( + col0 ) * - cor0.col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 16 FROM tab1 AS cor0
----
16
16
16

query I rowsort
SELECT ALL + 71 * col1 + + col0 * + 0 FROM tab0 AS cor0
----
6106
6461
6887

onlyif mysql # use DIV operator for integer division
query I rowsort label-6012
SELECT ALL + col2 + + ( + col1 + col0 ) * col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
-119
-19
-8

skipif mysql # not compatible
query I rowsort label-6012
SELECT ALL + col2 + + ( + col1 + col0 ) * col2 / - col0 AS col1 FROM tab2 AS cor0
----
-119
-19
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6013
SELECT DISTINCT - ( col2 ) DIV + col2 + - col1 - col2 FROM tab0 AS cor0
----
-120
-174
-99

skipif mysql # not compatible
query I rowsort label-6013
SELECT DISTINCT - ( col2 ) / + col2 + - col1 - col2 FROM tab0 AS cor0
----
-120
-174
-99

query I rowsort
SELECT 42 * ( - col2 ) FROM tab2 AS cor0
----
-1092
-1134
-1596

query I rowsort
SELECT ( + col0 ) * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + cor0.col1 * 94 FROM tab0 AS cor0
----
8084
8554
9118

query I rowsort
SELECT - - 27 AS col2 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT DISTINCT ( - 81 ) FROM tab1 AS cor0
----
-81

query I rowsort
SELECT + cor0.col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT ALL col2 * col1 * col2 AS col0 FROM tab1
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6022
SELECT col1 + + cor0.col2 DIV - 74 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6022
SELECT col1 + + cor0.col2 / - 74 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - cor0.col0 + + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + col0 * col1 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 * col0 col1 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT - - col0 + cor0.col1 * + col0 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT + col0 + cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 49 * 62 AS col1 FROM tab0
----
3038
3038
3038

query I rowsort
SELECT DISTINCT 16 * col2 FROM tab2
----
416
432
608

query I rowsort
SELECT ALL tab2.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT - col0 * + ( col2 ) AS col2 FROM tab0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 81 AS REAL ) * - col1 AS col0 FROM tab0
----
-6966
-7371
-7857

query I rowsort
SELECT DISTINCT - + col1 * col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col0 + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col2 col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6036
SELECT ALL + col1 + col0 DIV 88 AS col0 FROM tab0 AS cor0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-6036
SELECT ALL + col1 + col0 / 88 AS col0 FROM tab0 AS cor0
----
86
92
97

query I rowsort
SELECT DISTINCT - cor0.col2 * + 93 + - cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 7046426dbb44035ec5678c7bc40ff582

query I rowsort
SELECT + col0 * col2 AS col0 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 col0 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-6040
SELECT ALL + - col1 + ( + col0 ) DIV col1 FROM tab1 AS cor0
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-6040
SELECT ALL + - col1 + ( + col0 ) / col1 FROM tab1 AS cor0
----
-26
-4
-7

query I rowsort
SELECT ALL 0 * - col2 * - 85 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + + col1 * - col0 + + 53 * col0 FROM tab2
----
-527
123
2827

query I rowsort
SELECT + 30 + - col2 AS col1 FROM tab1 AS cor0
----
-24
-27
-66

query I rowsort
SELECT 89 - - col1 FROM tab2
----
106
120
148

query I rowsort
SELECT - col2 * - col2 - - col1 AS col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT + ( col1 ) + col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT - 22 AS col2 FROM tab0
----
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 25 col0 FROM tab2, tab1 AS cor0
----
25

query I rowsort
SELECT + 73 + tab2.col0 FROM tab2
----
151
152
80

query I rowsort
SELECT ALL - + col1 * - cor0.col0 + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - 85 - col2 FROM tab0 AS cor0
----
-118
-167
-86

query I rowsort
SELECT ALL - + 22 + - col2 FROM tab0 AS cor0
----
-104
-23
-55

query I rowsort
SELECT DISTINCT - 65 FROM tab1
----
-65

query I rowsort
SELECT 28 FROM tab2
----
28
28
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6055
SELECT ALL - - ( col0 ) * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6055
SELECT ALL - - ( col0 ) * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * col1 + - 20 * - col2 + cor0.col2 * - col1 FROM tab0 AS cor0
----
1640
20
660

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6057
SELECT DISTINCT + 54 * col0 + + CAST( - 91 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1205
1799
4715

skipif mysql # not compatible
query I rowsort label-6057
SELECT DISTINCT + 54 * col0 + + CAST ( - 91 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1205
1799
4715

query I rowsort
SELECT + col2 * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + cor0.col1 + - col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col2 * cor0.col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + 88 * + cor0.col1 FROM tab1 cor0
----
1144
2288
880

query I rowsort
SELECT DISTINCT + 85 * col0 - - cor0.col2 FROM tab0 AS cor0
----
2073
2976
7647

query I rowsort
SELECT ALL + col0 + - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - ( - cor0.col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + - ( + col1 ) + 5 AS col2 FROM tab0 AS cor0
----
-81
-86
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6066
SELECT DISTINCT 59 DIV + col1 + 84 DIV - 89 FROM tab2 AS cor0
----
1
3

skipif mysql # not compatible
query I rowsort label-6066
SELECT DISTINCT 59 / + col1 + 84 / - 89 FROM tab2 AS cor0
----
1
3

query I rowsort
SELECT ALL - col0 - col0 AS col1 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 38 col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
-38

query I rowsort
SELECT DISTINCT 80 FROM tab0, tab0 AS cor0
----
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6071
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) + col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6071
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) + col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT col0 + - tab0.col1 AS col1 FROM tab0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6073
SELECT - tab2.col0 * 77 + + tab2.col1 DIV tab2.col0 AS col2 FROM tab2
----
-535
-6006
-6083

skipif mysql # not compatible
query I rowsort label-6073
SELECT - tab2.col0 * 77 + + tab2.col1 / tab2.col0 AS col2 FROM tab2
----
-535
-6006
-6083

query I rowsort
SELECT ALL - col0 + col1 * + col1 FROM tab1 AS cor0
----
36
673
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + col1 * col1 + col0 col2 FROM tab2 AS cor0
----
1185
1711
8161

query I rowsort
SELECT DISTINCT col1 + 87 AS col1 FROM tab0 AS cor0
----
173
178
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-6077
SELECT - - col0 DIV - 58 + - col2 * col0 FROM tab2 AS cor0
----
-189
-2029
-3003

skipif mysql # not compatible
query I rowsort label-6077
SELECT - - col0 / - 58 + - col2 * col0 FROM tab2 AS cor0
----
-189
-2029
-3003

query I rowsort
SELECT + col1 + ( 85 ) FROM tab0 AS cor0
----
171
176
182

query I rowsort
SELECT + cor0.col1 - - cor0.col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - col2 + col2 + + 54 FROM tab2 AS cor0
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - col1 * 48 FROM tab2 AS cor0
----
-1488
-2832
-816

query I rowsort
SELECT + col2 * col0 * col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT ( - col2 ) * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + ( - 92 ) AS col1 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT + - 21 + + col0 FROM tab0 AS cor0
----
14
3
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + col0 * ( col2 ) AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT 14 FROM tab2 AS cor0
----
14
14
14

query I rowsort
SELECT ALL - 1 + - 59 - col0 AS col2 FROM tab0 AS cor0
----
-149
-84
-95

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT DISTINCT 49 FROM tab0 AS cor0
----
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6093
SELECT ALL ( 85 ) * col0 + + CAST( + col0 AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
12714
12956
644

skipif mysql # not compatible
query I rowsort label-6093
SELECT ALL ( 85 ) * col0 + + CAST ( + col0 AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
12714
12956
644

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

onlyif mysql # use DIV operator for integer division
query I rowsort label-6095
SELECT - - 75 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6095
SELECT - - 75 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + cor0.col2 * - ( + col0 ) FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 37 * col2 col1 FROM tab2 AS cor0
----
-1406
-962
-999

query I rowsort
SELECT DISTINCT ( + 36 ) FROM tab1 AS cor0
----
36

query I rowsort
SELECT - ( col2 ) * + col0 + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * cor0.col0 col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - - cor0.col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + cor0.col1 + - col1 * cor0.col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT 83 FROM tab0 AS cor0
----
83
83
83

query I rowsort
SELECT - col1 + - 1 FROM tab2 AS cor0
----
-18
-32
-60

query I rowsort
SELECT - + 16 * 28 * col0 + cor0.col0 - - 25 * + col2 FROM tab1 AS cor0
----
-27183
-33360
9

query I rowsort
SELECT + cor0.col1 + col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col2 + - col0 * - col2 + 29 FROM tab0 AS cor0
----
65
7409
854

query I rowsort
SELECT - - col0 * - col2 + - cor0.col2 * col2 FROM tab1 AS cor0
----
-16896
-3078
-6897

onlyif mysql # use DIV operator for integer division
query I rowsort label-6109
SELECT - col0 * cor0.col2 DIV col1 AS col0 FROM tab1 AS cor0
----
-364
-590
-6

skipif mysql # not compatible
query I rowsort label-6109
SELECT - col0 * cor0.col2 / col1 AS col0 FROM tab1 AS cor0
----
-364
-590
-6

query I rowsort
SELECT + col0 * + col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT col2 + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - col1 * - 98 AS col2 FROM tab1
----
1274
2548
980

query I rowsort
SELECT + + col1 + - ( - ( col2 ) ) FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6114
SELECT - col2 DIV 9 AS col0 FROM tab2 AS cor0
----
-2
-3
-4

skipif mysql # not compatible
query I rowsort label-6114
SELECT - col2 / 9 AS col0 FROM tab2 AS cor0
----
-2
-3
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6115
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) * col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6115
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) * col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL + 11 FROM tab2, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT + - col1 * + col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

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 - col1 + - 89 * cor0.col2 FROM tab1 cor0
----
-4832
-5083
-8557

onlyif mysql # use DIV operator for integer division
query I rowsort label-6120
SELECT + col1 DIV 45 AS col1 FROM tab2 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6120
SELECT + col1 / 45 AS col1 FROM tab2 cor0
----
0
0
1

query I rowsort
SELECT - - 62 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT ALL col0 + col0 AS col2 FROM tab1
----
128
160
6

query I rowsort
SELECT ALL tab0.col1 + - 66 + col0 AS col1 FROM tab0
----
114
44
66

query I rowsort
SELECT ALL - tab1.col2 + ( + col1 ) FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + col1 + - col1 col1 FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 + + 73 + col1 * col0 col0 FROM tab1
----
1193
154
777

onlyif mysql # use DIV operator for integer division
query I rowsort label-6127
SELECT - col0 DIV - ( + col0 ) + + tab2.col1 + col2 * col2 AS col1 FROM tab2
----
1462
736
761

skipif mysql # not compatible
query I rowsort label-6127
SELECT - col0 / - ( + col0 ) + + tab2.col1 + col2 * col2 AS col1 FROM tab2
----
1462
736
761

query I rowsort
SELECT + - col0 * cor0.col1 * - col0 - - col0 AS col0 FROM tab0 AS cor0
----
118860
49560
720900

query I rowsort
SELECT - + col1 * 6 * + cor0.col1 + + col2 + col0 FROM tab1 AS cor0
----
-3999
-479
-838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 + 5 col0 FROM tab0 AS cor0
----
102
91
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6131
SELECT col1 DIV col1 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6131
SELECT col1 / col1 AS col2 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6132
SELECT 18 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6132
SELECT 18 / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 81 FROM tab1 AS cor0
----
-81
-81
-81

query I rowsort
SELECT tab1.col1 - 40 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 65c1ead9a904fe27810187090fe4809d

query I rowsort
SELECT + ( 94 ) AS col1 FROM tab0
----
94
94
94

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0 CROSS JOIN tab2, tab1, tab2 AS cor1
----
3645 values hashing to e3f81e329d34d83e4528a9ef7b933946

query I rowsort
SELECT 4 AS col2 FROM tab0 AS cor0
----
4
4
4

query I rowsort
SELECT ALL - col0 + - col2 FROM tab1 AS cor0
----
-121
-176
-57

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab1, tab1 cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT DISTINCT + 42 AS col0 FROM tab2, tab0 AS cor0
----
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-6141
SELECT ALL - col1 DIV col0 AS col2 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-6141
SELECT ALL - col1 / col0 AS col2 FROM tab1
----
-8
0
0

query I rowsort
SELECT ALL 80 AS col1 FROM tab2
----
80
80
80

query I rowsort
SELECT DISTINCT + + cor0.col0 + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL col1 * - col2 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6146
SELECT ALL + col1 DIV - col0 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-6146
SELECT ALL + col1 / - col0 FROM tab1
----
-8
0
0

query I rowsort
SELECT DISTINCT tab0.col2 * + col2 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - 39 AS col2 FROM tab2, tab0, tab0 cor0
----
27 values hashing to a08a82dc9276c0173448e9a1c89dba93

query I rowsort
SELECT DISTINCT + tab1.col0 AS col0 FROM tab1, tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) col1 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - tab1.col1 AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - ( + col0 ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT 5 FROM tab2, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT col2 * ( col0 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT + ( 3 ) FROM tab0 cor0
----
3
3
3

query I rowsort
SELECT + + 58 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT 63 + - 38 FROM tab0 cor0
----
25
25
25

skipif mysql # not compatible
query I rowsort
SELECT col1 * CAST ( 60 AS REAL ) AS col1 FROM tab2
----
1020
1860
3540

query I rowsort
SELECT DISTINCT + col2 * + col0 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + + col1 * col0 + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT col0 * + 37 FROM tab2
----
259
2886
2923

query I rowsort
SELECT ALL + col0 * + 36 AS col0 FROM tab0
----
1260
3204
864

query I rowsort
SELECT + 89 * - 92 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 42213237db56478e3ffe412250b7c1a1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6164
SELECT ALL + cor0.col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6164
SELECT ALL + cor0.col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - col2 * - ( - col0 + col0 ) FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab1
----
13

query I rowsort
SELECT ALL ( - col0 ) * col2 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - col2 + + col2 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + + 78 FROM tab0 AS cor0
----
78
78
78

query I rowsort
SELECT 83 + - col1 FROM tab2 AS cor0
----
24
52
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6171
SELECT + CAST( - col1 AS SIGNED ) * - col2 col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6171
SELECT + CAST ( - col1 AS INTEGER ) * - col2 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col2 + col0 * - col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT - 26 * + 22 FROM tab2
----
-572
-572
-572

query I rowsort
SELECT ALL - 97 FROM tab2
----
-97
-97
-97

query I rowsort
SELECT 67 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT DISTINCT + 10 * - col0 AS col0 FROM tab0
----
-240
-350
-890

query I rowsort
SELECT col2 * - col0 * col0 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6178
SELECT - CAST( NULL AS SIGNED ) * col2 + - cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6178
SELECT - CAST ( NULL AS INTEGER ) * col2 + - cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 8 FROM tab1, tab1 AS cor0
----
8

query I rowsort
SELECT 93 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6181
SELECT ALL CAST( col1 AS SIGNED ) + col0 FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-6181
SELECT ALL CAST ( col1 AS INTEGER ) + col0 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL ( - ( + col1 ) ) + col1 + col0 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL - col2 + - col2 AS col2 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT - col2 + col0 * col1 FROM tab2 AS cor0
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col2 + - col0 col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL + 19 AS col2 FROM tab0
----
19
19
19

query I rowsort
SELECT ALL - 3 * cor0.col1 + + cor0.col0 FROM tab2 AS cor0
----
-86
-99
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6188
SELECT DISTINCT - - col2 DIV + col0 + cor0.col2 - + col2 * - col2 FROM tab2 cor0
----
1482
702
759

skipif mysql # not compatible
query I rowsort label-6188
SELECT DISTINCT - - col2 / + col0 + cor0.col2 - + col2 * - col2 FROM tab2 cor0
----
1482
702
759

query I rowsort
SELECT - + 98 + + col0 * col0 AS col0 FROM tab2 AS cor0
----
-49
5986
6143

query I rowsort
SELECT DISTINCT col1 + - col0 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - 2 FROM tab2
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col0 col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL + - 90 * - cor0.col1 FROM tab2 cor0
----
1530
2790
5310

query I rowsort
SELECT col0 * col2 * col1 + col1 * - col1 FROM tab1 AS cor0
----
3536
36380
99671

query I rowsort
SELECT ALL - ( col0 ) * cor0.col0 * - col2 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - col0 * + col0 + col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1482
-4898
168

query I rowsort
SELECT ALL + - col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab2 AS cor0
----
68

query I rowsort
SELECT DISTINCT cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col0 * - ( col0 + - col0 ) * - col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6201
SELECT + col1 - ( col0 ) DIV - col0 AS col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-6201
SELECT + col1 - ( col0 ) / - col0 AS col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT cor0.col0 - - col2 * cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
-1
-33
-82

query I rowsort
SELECT ALL - col2 * 0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + 16 + + col1 FROM tab2 cor0
----
101
71
74

query I rowsort
SELECT - cor0.col1 + - col0 * col0 * - col0 AS col1 FROM tab2 cor0
----
312
474493
493022

query I rowsort
SELECT DISTINCT - 36 AS col1 FROM tab2 AS cor0
----
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 50 col1 FROM tab0 AS cor0
----
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL 73 AS col0 FROM tab2 AS cor0
----
73
73
73

query I rowsort
SELECT ALL + 89 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL - ( + 87 ) * - col1 FROM tab1 AS cor0
----
1131
2262
870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6214
SELECT + CAST( - tab2.col1 AS SIGNED ) FROM tab2, tab0 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

skipif mysql # not compatible
query I rowsort label-6214
SELECT + CAST ( - tab2.col1 AS INTEGER ) FROM tab2, tab0 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT col2 * - ( col1 ) + col0 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-6216
SELECT DISTINCT cor0.col1 + col1 DIV col2 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-6216
SELECT DISTINCT cor0.col1 + col1 / col2 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT ALL - + col2 * col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT - col2 + ( + col1 ) FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - col1 + + 80 FROM tab0 cor0
----
-11
-17
-6

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 AS col0 FROM tab2 cor0
----
0

query I rowsort
SELECT ALL + + col2 + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT - - col2 + col1 * + col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT + cor0.col1 + + ( + col2 ) * - col2 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 * + col2 FROM tab1 cor0
----
-2862
-3192
-9120

query I rowsort
SELECT - col1 * + col2 + - col2 * cor0.col0 FROM tab0 cor0
----
-132
-14760
-3630

query I rowsort
SELECT DISTINCT col2 * tab0.col0 + - ( col1 ) FROM tab0
----
-62
706
7207

query I rowsort
SELECT 35 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT - 44 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT DISTINCT 36 + col1 FROM tab2
----
53
67
95

query I rowsort
SELECT - tab0.col1 + + col1 + - col2 AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT 24 * col0 + + 5 FROM tab0
----
2141
581
845

query I rowsort
SELECT ALL + 85 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT col2 * + col0 + col1 AS col1 FROM tab1
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + ( + cor0.col0 ) col0 FROM tab1 cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 6 col2 FROM tab0 AS cor0
----
-198
-492
-6

query I rowsort
SELECT ALL - + col2 + 81 FROM tab2 AS cor0
----
43
54
55

query I rowsort
SELECT DISTINCT + + col1 * - col1 * - cor0.col0 FROM tab1 AS cor0
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6240
SELECT ALL col2 DIV + 56 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6240
SELECT ALL col2 / + 56 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT + col0 * ( col1 ) AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + col0 + + col0 * 95 FROM tab0 AS cor0
----
2304
3360
8544

query I rowsort
SELECT ALL - + col1 * + col0 + + col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 CROSS JOIN tab2, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6245
SELECT ALL - CAST( NULL AS SIGNED ) - 26 / col0 col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6245
SELECT ALL - CAST ( NULL AS INTEGER ) - 26 / col0 col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - 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 DISTINCT + - col0 - col0 col1 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-6250
SELECT DISTINCT ( cor0.col0 ) DIV ( + ( + col1 ) ) + - col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6250
SELECT DISTINCT ( cor0.col0 ) / ( + ( + col1 ) ) + - col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL cor0.col2 * + col2 - + col2 AS col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT - 79 + col1 FROM tab2 AS cor0
----
-20
-48
-62

query I rowsort
SELECT ALL col2 + + tab0.col1 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + col1 + + col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL 77 + col1 * - col0 AS col1 FROM tab1
----
-1
-563
-963

query I rowsort
SELECT - col2 - + col1 AS col0 FROM tab2 cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6257
SELECT ALL + - ( col0 ) DIV 12 + - col2 AS col0 FROM tab0 AS cor0
----
-3
-35
-89

skipif mysql # not compatible
query I rowsort label-6257
SELECT ALL + - ( col0 ) / 12 + - col2 AS col0 FROM tab0 AS cor0
----
-3
-35
-89

query I rowsort
SELECT DISTINCT + + col1 * col0 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab0 AS cor0
----
73

query I rowsort
SELECT 76 + col0 AS col0 FROM tab0 AS cor0
----
100
111
165

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6261
SELECT ALL - col2 * col2 + + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6261
SELECT ALL - col2 * col2 + + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col2 * + col1 * 34 + col1 col0 FROM tab2 AS cor0
----
-21947
-28427
-52097

query I rowsort
SELECT ALL cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col0 * col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + - col2 * - col0 - + col1 FROM tab0 cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-6266
SELECT col1 DIV col2 + - 31 AS col1 FROM tab1
----
-31
-31
-31

skipif mysql # not compatible
query I rowsort label-6266
SELECT col1 / col2 + - 31 AS col1 FROM tab1
----
-31
-31
-31

query I rowsort
SELECT DISTINCT + col1 * col2 + col0 * - col0 FROM tab2
----
-4550
-5595
788

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col1 col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6269
SELECT - col2 * col2 DIV + 99 FROM tab0 AS cor0
----
-11
-67
0

skipif mysql # not compatible
query I rowsort label-6269
SELECT - col2 * col2 / + 99 FROM tab0 AS cor0
----
-11
-67
0

query I rowsort
SELECT DISTINCT + col1 * col1 + col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col2 * + col0 * col0 - + col1 FROM tab2 cor0
----
-1354
-158243
-237175

query I rowsort
SELECT - + 75 * + cor0.col0 FROM tab2 AS cor0
----
-525
-5850
-5925

query I rowsort
SELECT ALL - + cor0.col0 * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 * + col1 + col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + col2 * - col2 AS col0 FROM tab1 cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6277
SELECT + col2 + + col1 DIV + col0 FROM tab1 AS cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-6277
SELECT + col2 + + col1 / + col0 FROM tab1 AS cor0
----
57
62
96

query I rowsort
SELECT ALL + ( col0 ) * + col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6279
SELECT DISTINCT - col0 + col1 DIV - 97 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-6279
SELECT DISTINCT - col0 + col1 / - 97 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL - 72 * col1 + + 64 FROM tab1 AS cor0
----
-1808
-656
-872

query I rowsort
SELECT + col0 * + col2 AS col1 FROM tab2 cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 - col0 * col0 col2 FROM tab0 AS cor0
----
-1152
-15842
-2450

query I rowsort
SELECT ALL - col0 + + cor0.col1 + + col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col0 * + 24 * + 16 + col2 FROM tab2 AS cor0
----
2715
29978
30374

query I rowsort
SELECT 71 + + tab1.col1 * col1 AS col2 FROM tab1
----
171
240
747

query I rowsort
SELECT DISTINCT + - 38 FROM tab1 AS cor0
----
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6288
SELECT ALL CAST( NULL AS SIGNED ) / col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6288
SELECT ALL CAST ( NULL AS INTEGER ) / col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 82 FROM tab1
----
82
82
82

query I rowsort
SELECT 40 AS col2 FROM tab1
----
40
40
40

query I rowsort
SELECT ALL - 6 FROM tab1 AS cor0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT - 43 AS col1 FROM tab2 cor0
----
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 19 col0 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT DISTINCT - 96 AS col0 FROM tab2 AS cor0
----
-96

query I rowsort
SELECT DISTINCT + + col1 + 41 * col1 AS col0 FROM tab0 AS cor0
----
3612
3822
4074

query I rowsort
SELECT - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - - 99 AS col1 FROM tab2 AS cor0
----
99
99
99

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 40e4acd618698dd2305f1f7b8b547f7a

query I rowsort
SELECT ( col2 ) * 91 AS col0 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT DISTINCT ( + ( + col0 ) ) * 13 AS col2 FROM tab2
----
1014
1027
91

query I rowsort
SELECT - col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 13 * - col2 AS col1 FROM tab2 AS cor0
----
338
351
494

query I rowsort
SELECT 43 AS col0 FROM tab1, tab0, tab0 AS cor0, tab2
----
81 values hashing to 53b2f139a07f856ac44a1158efd4e63d

query I rowsort
SELECT - ( 21 ) * col0 + 7 FROM tab2
----
-140
-1631
-1652

query I rowsort
SELECT DISTINCT - col0 * 67 * tab1.col1 AS col0 FROM tab1
----
-42880
-5226
-69680

query I rowsort
SELECT DISTINCT col2 * - col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT - col1 + - col0 AS col0 FROM tab1
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6308
SELECT col1 DIV col1 + col1 AS col0 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-6308
SELECT col1 / col1 + col1 AS col0 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT col2 * col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT ALL + tab0.col0 * cor0.col0 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to f7a7d834ef74d0b2fff83e6a8f658dd5

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab0
----
64

query I rowsort
SELECT - col2 - col2 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT col0 - + col0 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6314
SELECT + + ( cor0.col2 ) * - col1 + + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-1456
-567
-830

skipif mysql # not compatible
query I rowsort label-6314
SELECT + + ( cor0.col2 ) * - col1 + + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - + ( + col2 ) * cor0.col1 + - ( + col0 ) AS col1 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-6316
SELECT + - col0 * + cor0.col1 DIV cor0.col1 + + col2 * + col2 FROM tab2 AS cor0
----
1365
598
722

skipif mysql # not compatible
query I rowsort label-6316
SELECT + - col0 * + cor0.col1 / cor0.col1 + + col2 * + col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT + 92 * - 5 + col0 FROM tab0 AS cor0
----
-371
-425
-436

onlyif mysql # use DIV operator for integer division
query I rowsort label-6318
SELECT - + ( col2 ) * col1 DIV - col1 + - col1 col2 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6318
SELECT - + ( col2 ) * col1 / - col1 + - col1 col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + col0 + col2 * + col0 * col1 AS col1 FROM tab0 AS cor0
----
3430
664207
68136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6320
SELECT - ( - col1 ) * col1 + CAST( + col0 + - cor0.col2 AS SIGNED ) * - 87 AS col0 FROM tab0 AS cor0
----
6451
7672
8179

skipif mysql # not compatible
query I rowsort label-6320
SELECT - ( - col1 ) * col1 + CAST ( + col0 + - cor0.col2 AS INTEGER ) * - 87 AS col0 FROM tab0 AS cor0
----
6451
7672
8179

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col2 + col1 col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT col2 + + col2 FROM tab1 AS cor0
----
108
114
192

skipif mysql # not compatible
query I rowsort
SELECT ALL + cor0.col2 + + col2 * CAST ( 73 AS REAL ) AS col2 FROM tab0 cor0
----
2442
6068
74

query I rowsort
SELECT 83 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT col2 * + col2 + ( - col2 * cor0.col2 ) AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6326
SELECT + col2 DIV cor0.col1 + - col2 DIV col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6326
SELECT + col2 / cor0.col1 + - col2 / col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + + col1 + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT 40 + 41 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6329
SELECT ALL - 20 + + col2 * - CAST( col1 AS SIGNED ) FROM tab2
----
-1554
-666
-857

skipif mysql # not compatible
query I rowsort label-6329
SELECT ALL - 20 + + col2 * - CAST ( col1 AS INTEGER ) FROM tab2
----
-1554
-666
-857

query I rowsort
SELECT DISTINCT col2 + - col1 * 31 FROM tab1
----
-253
-307
-752

query I rowsort
SELECT + col0 + - col0 * cor0.col1 + col0 AS col1 FROM tab2 cor0
----
-1185
-203
-4446

query I rowsort
SELECT + 72 FROM tab0, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT + 43 + col2 FROM tab2 AS cor0
----
69
70
81

query I rowsort
SELECT col1 * + ( 22 + - col1 ) FROM tab1
----
-104
117
120

query I rowsort
SELECT DISTINCT - tab1.col2 - - col1 FROM tab1
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6336
SELECT - tab2.col2 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6336
SELECT - tab2.col2 * + CAST ( NULL AS REAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + 84 AS col1 FROM tab2
----
2184
2268
3192

query I rowsort
SELECT tab2.col2 * 87 AS col0 FROM tab2
----
2262
2349
3306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 32 * col0 + - cor0.col1 * + col0 col0 FROM tab2 AS cor0
----
-3871
-441
-7098

query I rowsort
SELECT ALL - + cor0.col2 * col0 + - col2 + col1 AS col1 FROM tab1 AS cor0
----
-190
-3695
-7763

query I rowsort
SELECT DISTINCT col2 * col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT DISTINCT + ( col0 ) + + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col0 * - col0 + col2 + + cor0.col1 FROM tab2 AS cor0
----
-5999
-6186
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 78 * + col0 col2 FROM tab1 cor0
----
-234
-4992
-6240

query I rowsort
SELECT + 31 AS col1 FROM tab2 cor0
----
31
31
31

query I rowsort
SELECT - col2 * - col2 AS col0 FROM tab0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 91 + col0 * - col2 + + col1 col2 FROM tab0
----
-29
-7298
-797

query I rowsort
SELECT ALL col1 + - col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col2 + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col0 + + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT cor0.col1 + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to f65167375aa80cc8b3f3f8987d2662a3

query I rowsort
SELECT + col2 + ( col2 ) FROM tab0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6355
SELECT ALL - CAST( col0 AS SIGNED ) + - col2 col2 FROM tab1
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6355
SELECT ALL - CAST ( col0 AS INTEGER ) + - col2 col2 FROM tab1
----
-121
-176
-57

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to 7864aada86bf5bf5e1621c7905de8dcd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 57 + col1 col0 FROM tab2
----
116
74
88

query I rowsort
SELECT ALL - ( col1 ) AS col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL + col2 + - cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col0 * + col1 col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 + col0 * col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - + 74 AS col0 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT ( col2 ) + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT - + col0 * + col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6365
SELECT DISTINCT - - col2 DIV 20 + cor0.col1 * - cor0.col2 - ( + col2 + cor0.col0 ) AS col2 FROM tab0 cor0
----
-133
-2894
-7629

skipif mysql # not compatible
query I rowsort label-6365
SELECT DISTINCT - - col2 / 20 + cor0.col1 * - cor0.col2 - ( + col2 + cor0.col0 ) AS col2 FROM tab0 cor0
----
-133
-2894
-7629

query I rowsort
SELECT col1 + col2 * col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT + col0 + col1 + col0 * col0 FROM tab1 AS cor0
----
38
4170
6493

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( col1 ) col2 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL + - col1 + + ( + col1 ) AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6370
SELECT DISTINCT col0 * + col0 + cor0.col1 DIV + col0 + - col1 AS col1 FROM tab0 AS cor0
----
1130
493
7831

skipif mysql # not compatible
query I rowsort label-6370
SELECT DISTINCT col0 * + col0 + cor0.col1 / + col0 + - col1 AS col1 FROM tab0 AS cor0
----
1130
493
7831

onlyif mysql # use DIV operator for integer division
query I rowsort label-6371
SELECT DISTINCT - cor0.col2 + + 43 DIV col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6371
SELECT DISTINCT - cor0.col2 + + 43 / col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL col0 + + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + - col0 * + col1 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6375
SELECT DISTINCT + - cor0.col1 + ( - col0 + + col0 ) DIV - cor0.col0 col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6375
SELECT DISTINCT + - cor0.col1 + ( - col0 + + col0 ) / - cor0.col0 col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - cor0.col1 col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6377
SELECT + col0 - + col0 DIV 89 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6377
SELECT + col0 - + col0 / 89 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - 12 + col2 AS col0 FROM tab1
----
42
45
84

query I rowsort
SELECT ALL + 82 AS col0 FROM tab1
----
82
82
82

query I rowsort
SELECT ALL 63 AS col0 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 + + ( - col0 ) AS col0 FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT 74 * cor0.col2 AS col0 FROM tab2 AS cor0
----
1924
1998
2812

onlyif mysql # use DIV operator for integer division
query I rowsort label-6383
SELECT - - col1 * col2 + + 28 DIV col0 + - col1 AS col0 FROM tab0 AS cor0
----
0
2753
7371

skipif mysql # not compatible
query I rowsort label-6383
SELECT - - col1 * col2 + + 28 / col0 + - col1 AS col0 FROM tab0 AS cor0
----
0
2753
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-6384
SELECT 73 DIV + cor0.col1 + - cor0.col2 * - 76 col2 FROM tab2 AS cor0
----
1977
2054
2892

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6384
SELECT 73 / + cor0.col1 + - cor0.col2 * - 76 col2 FROM tab2 AS cor0
----
1977
2054
2892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 + + col0 col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + cor0.col0 + 25 AS col0 FROM tab1 AS cor0
----
105
28
89

query I rowsort
SELECT col2 + ( + col1 ) * - col0 AS col2 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT + col1 - + 36 FROM tab1 cor0
----
-10
-23
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + col2 * col1 col2 FROM tab2 cor0
----
1798
5015
935

query I rowsort
SELECT ALL - col2 + 59 AS col2 FROM tab1 AS cor0
----
-37
2
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col1 col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 - col0 col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT col2 * ( col2 ) + col1 * + ( col1 ) FROM tab2 AS cor0
----
1690
1733
4157

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + col0 * - ( 28 ) FROM tab1 AS cor0
----
-1792
-2240
-84

query I rowsort
SELECT + tab0.col1 + col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0, tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col2 col2 FROM tab0
----
53
9
96

query I rowsort
SELECT 84 - - col2 FROM tab0
----
117
166
85

query I rowsort
SELECT DISTINCT - col2 + + col0 * 21 AS col0 FROM tab1
----
1287
1584
9

query I rowsort
SELECT ALL col0 + - col1 FROM tab0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6402
SELECT CAST( NULL AS SIGNED ) * + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6402
SELECT CAST ( NULL AS INTEGER ) * + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * - col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col1 * col2 + col2 + 67 FROM tab0 AS cor0
----
-2738
-29
-7313

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT 53 * col2 FROM tab1 AS cor0
----
2862
3021
5088

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6407
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * - 36 + col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6407
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * - 36 + col2 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6408
SELECT 25 + + col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
-72
23
24

skipif mysql # not compatible
query I rowsort label-6408
SELECT 25 + + col1 / - col2 AS col2 FROM tab0 AS cor0
----
-72
23
24

query I rowsort
SELECT ALL + + ( - col1 ) * + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT col0 * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + 79 + col0 FROM tab1 cor0
----
143
159
82

query I rowsort
SELECT + 32 * col2 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT ALL - cor0.col2 * 48 FROM tab0 cor0
----
-1584
-3936
-48

query I rowsort
SELECT + + ( col1 ) FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - col0 + ( col0 ) * + ( 96 ) AS col1 FROM tab2 AS cor0
----
665
7410
7505

query I rowsort
SELECT - col0 + - 96 FROM tab1
----
-160
-176
-99

query I rowsort
SELECT ( col1 ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - cor0.col0 * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - - col2 * col0 + + col0 * ( - col2 ) + col0 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col1 + + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT 60 * + col2 AS col0 FROM tab2 AS cor0
----
1560
1620
2280

query I rowsort
SELECT ALL - 91 AS col1 FROM tab0 AS cor0
----
-91
-91
-91

query I rowsort
SELECT + 26 + col0 AS col0 FROM tab2 AS cor0
----
104
105
33

query I rowsort
SELECT ALL + ( 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-6425
SELECT - CAST( NULL AS SIGNED ) + + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6425
SELECT - CAST ( NULL AS INTEGER ) + + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - 73 * col1 AS col1 FROM tab1 cor0
----
-1898
-730
-949

query I rowsort
SELECT ALL 39 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT 63 FROM tab1, tab0 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT + - 57 AS col0 FROM tab1 AS cor0
----
-57
-57
-57

query I rowsort
SELECT ALL - 14 * 52 * col0 AS col1 FROM tab0
----
-17472
-25480
-64792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6432
SELECT - 82 DIV - col2 + col2 FROM tab1
----
55
58
96

skipif mysql # not compatible
query I rowsort label-6432
SELECT - 82 / - col2 + col2 FROM tab1
----
55
58
96

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab2
----
-45

query I rowsort
SELECT DISTINCT 82 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
82

query I rowsort
SELECT + 42 AS col0 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT - + 71 FROM tab2 AS cor0
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col1 + + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + - 91 FROM tab1 AS cor0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT - col1 * - col0 + cor0.col1 FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - col2 * + col1 + 50 AS col2 FROM tab2 AS cor0
----
-1484
-596
-787

query I rowsort
SELECT DISTINCT + tab0.col0 AS col2 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + col1 * col2 + + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6444
SELECT ALL + cor0.col1 DIV col2 AS col0 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6444
SELECT ALL + cor0.col1 / col2 AS col0 FROM tab0 AS cor0
----
1
2
97

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 95de14c88adc44eda4adb5267fe9ebd1

query I rowsort
SELECT ALL col2 * - 30 AS col0 FROM tab1 AS cor0
----
-1620
-1710
-2880

query I rowsort
SELECT - 79 AS col1 FROM tab0 AS cor0
----
-79
-79
-79

query I rowsort
SELECT 19 FROM tab2, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 42e69ecdafb3c81046bc5cb4c98b1666

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6450
SELECT DISTINCT - CAST( - ( col0 ) AS SIGNED ) AS col2 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6450
SELECT DISTINCT - CAST ( - ( col0 ) AS INTEGER ) AS col2 FROM tab2
----
7
78
79

query I rowsort
SELECT + 21 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT - ( - col0 ) * 97 FROM tab0 AS cor0
----
2328
3395
8633

query I rowsort
SELECT cor0.col2 + - col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT 56 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

onlyif mysql # use DIV operator for integer division
query I rowsort label-6456
SELECT ALL - 77 DIV - col0 - - ( + col2 ) * - col2 * 12 col1 FROM tab2
----
-17328
-8112
-8737

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6456
SELECT ALL - 77 / - col0 - - ( + col2 ) * - col2 * 12 col1 FROM tab2
----
-17328
-8112
-8737

query I rowsort
SELECT - cor0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + + col0 + + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT col1 * + ( - col1 ) + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-3748
-7849
-838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 * + 79 col0 FROM tab0 AS cor0
----
1920
2800
7120

query I rowsort
SELECT ALL col0 + col2 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT 48 - 98 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

query I rowsort
SELECT ALL col2 * + col1 + + col0 FROM tab0
----
132
2862
7551

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 61a671f1b5048e339ad9838f68ebbba4

query I rowsort
SELECT + 14 FROM tab1, tab1 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT DISTINCT - cor0.col2 * - 39 AS col1 FROM tab2 AS cor0
----
1014
1053
1482

query I rowsort
SELECT ALL - col0 * ( + col0 ) + col0 FROM tab1 cor0
----
-4032
-6
-6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6468
SELECT ALL CAST( col2 AS SIGNED ) AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6468
SELECT ALL CAST ( col2 AS INTEGER ) AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT 44 AS col1 FROM tab2
----
44
44
44

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT + + 83 * + col2 FROM tab0 AS cor0
----
2739
6806
83

query I rowsort
SELECT + + cor0.col1 * - col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT 53 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

onlyif mysql # use DIV operator for integer division
query I rowsort label-6474
SELECT + 46 + cor0.col0 DIV + col1 FROM tab1 AS cor0
----
46
52
52

skipif mysql # not compatible
query I rowsort label-6474
SELECT + 46 + cor0.col0 / + col1 FROM tab1 AS cor0
----
46
52
52

query I rowsort
SELECT - ( - col1 ) * ( 74 ) - - cor0.col1 * cor0.col1 FROM tab2 cor0
----
1547
3255
7847

onlyif mysql # use DIV operator for integer division
query I rowsort label-6476
SELECT + - 59 DIV + col1 - CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6476
SELECT + - 59 / + col1 - CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6477
SELECT cor0.col1 + col2 DIV + ( - 11 ) FROM tab1 AS cor0
----
22
5
5

skipif mysql # not compatible
query I rowsort label-6477
SELECT cor0.col1 + col2 / + ( - 11 ) FROM tab1 AS cor0
----
22
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6478
SELECT + 2 DIV col1 - - col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6478
SELECT + 2 / col1 - - col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 39 col1 FROM tab0 AS cor0
----
-39
-39
-39

query I rowsort
SELECT - ( col1 ) * + 26 AS col2 FROM tab2 AS cor0
----
-1534
-442
-806

query I rowsort
SELECT cor0.col2 * - col0 - 12 AS col2 FROM tab0 AS cor0
----
-47
-7310
-804

query I rowsort
SELECT ALL - 12 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT ALL - col0 * tab2.col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + + ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL ( 77 ) * col0 + - col0 AS col0 FROM tab1
----
228
4864
6080

query I rowsort
SELECT 15 AS col2 FROM tab1
----
15
15
15

query I rowsort
SELECT DISTINCT + - cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + col1 * cor0.col0 * - col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT col0 * - col0 * col0 AS col1 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT 84 * + col0 FROM tab0
----
2016
2940
7476

query I rowsort
SELECT DISTINCT + col0 * - col2 + - col0 * + 91 FROM tab2 AS cor0
----
-10191
-826
-9126

onlyif mysql # use DIV operator for integer division
query I rowsort label-6492
SELECT + 83 DIV + cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
27

skipif mysql # not compatible
query I rowsort label-6492
SELECT + 83 / + cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
27

query I rowsort
SELECT ALL col0 + col0 * + col1 * col2 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT - 97 AS col1 FROM tab0 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ALL - col2 * tab0.col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL - + cor0.col0 * 28 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT DISTINCT + - cor0.col2 * col1 * + col0 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col1 * 31 FROM tab2 cor0
----
-1829
-527
-961

query I rowsort
SELECT - col1 + + col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6500
SELECT DISTINCT + - col0 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6500
SELECT DISTINCT + - col0 / cor0.col1 AS col2 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6501
SELECT col0 * col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6501
SELECT col0 * col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + 46 + col0 + col1 FROM tab2
----
142
183
84

query I rowsort
SELECT DISTINCT + + tab1.col2 FROM tab0, tab2, tab2 AS cor0, tab1
----
54
57
96

query I rowsort
SELECT + col2 * + col1 AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-6505
SELECT + 50 * + col1 * - ( 70 ) + - col0 DIV - col0 FROM tab1
----
-34999
-45499
-90999

skipif mysql # not compatible
query I rowsort label-6505
SELECT + 50 * + col1 * - ( 70 ) + - col0 / - col0 FROM tab1
----
-34999
-45499
-90999

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6506
SELECT DISTINCT - CAST( 18 AS SIGNED ) * col0 AS col2 FROM tab0 AS cor0
----
-1602
-432
-630

skipif mysql # not compatible
query I rowsort label-6506
SELECT DISTINCT - CAST ( 18 AS INTEGER ) * col0 AS col2 FROM tab0 AS cor0
----
-1602
-432
-630

query I rowsort
SELECT ALL - 57 FROM tab0 AS cor0
----
-57
-57
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6508
SELECT ALL - CAST( col2 AS SIGNED ) + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-6508
SELECT ALL - CAST ( col2 AS INTEGER ) + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + + col1 + - col1 * + col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col1 * - col0 * - col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT + 74 + col1 AS col1 FROM tab0 AS cor0
----
160
165
171

query I rowsort
SELECT 7 FROM tab2 AS cor0
----
7
7
7

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + col2 * col0 + 11 FROM tab1 cor0
----
3019
6651
95

query I rowsort
SELECT DISTINCT + + 34 AS col0 FROM tab1 AS cor0
----
34

query I rowsort
SELECT ALL + col2 * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col0 * col0 * col1 + - col0 * - 5 * ( + tab0.col1 ) AS col2 FROM tab0
----
-101850
-39216
-680316

query I rowsort
SELECT col1 * ( - 81 ) * + tab0.col1 FROM tab0
----
-599076
-670761
-762129

query I rowsort
SELECT ALL 36 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

query I rowsort
SELECT ALL - ( - 45 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT + 45 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6523
SELECT CAST( col1 AS SIGNED ) AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6523
SELECT CAST ( col1 AS INTEGER ) AS col1 FROM tab2
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6524
SELECT DISTINCT + CAST( - 6 * col1 AS SIGNED ) FROM tab0
----
-516
-546
-582

skipif mysql # not compatible
query I rowsort label-6524
SELECT DISTINCT + CAST ( - 6 * col1 AS INTEGER ) FROM tab0
----
-516
-546
-582

query I rowsort
SELECT ( ( col1 ) ) FROM tab2
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6526
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6526
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6527
SELECT - CAST( + col2 AS SIGNED ) * - col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-6527
SELECT - CAST ( + col2 AS INTEGER ) * - col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + 88 + cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 04c32dfeb6584e905d02ba83a8cad72e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6529
SELECT col1 + + CAST( NULL AS DECIMAL ) * 95 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6529
SELECT col1 + + CAST ( NULL AS REAL ) * 95 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col2 FROM tab2
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6531
SELECT tab2.col2 * - CAST( NULL AS DECIMAL ) * + ( col0 ) - col2 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6531
SELECT tab2.col2 * - CAST ( NULL AS REAL ) * + ( col0 ) - col2 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 36 AS col1 FROM tab2, tab2 AS cor0
----
36

query I rowsort
SELECT ALL + col0 + 78 FROM tab0 AS cor0
----
102
113
167

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to b225d3765f33551c12574f545c8c91eb

query I rowsort
SELECT ALL - tab0.col0 * - col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL col2 * + ( + col1 + + col1 ) FROM tab0
----
14924
194
5676

query I rowsort
SELECT DISTINCT + + ( + 69 ) + + col2 FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) * col0 + + ( 95 ) AS col0 FROM tab1 cor0
----
-3553
-67
-7585

query I rowsort
SELECT + col2 * - cor0.col1 - cor0.col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL - col0 - col2 * - col1 AS col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - + col1 * + 20 + + col2 * 28 AS col1 FROM tab1 AS cor0
----
1396
2428
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-6542
SELECT ALL col0 DIV col0 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6542
SELECT ALL col0 / col0 AS col2 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6543
SELECT DISTINCT + 23 DIV - col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6543
SELECT DISTINCT + 23 / - col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6544
SELECT ALL - col0 DIV - 87 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6544
SELECT ALL - col0 / - 87 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - ( - col0 ) - col1 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL 62 + 45 FROM tab2 AS cor0
----
107
107
107

query I rowsort
SELECT DISTINCT - col2 + + col1 * col1 AS col1 FROM tab1 cor0
----
43
622
73

query I rowsort
SELECT DISTINCT - - 19 + col1 FROM tab2 AS cor0
----
36
50
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6549
SELECT DISTINCT + 33 DIV + 28 - - col0 * - ( - 93 ) AS col1 FROM tab0 AS cor0
----
2233
3256
8278

skipif mysql # not compatible
query I rowsort label-6549
SELECT DISTINCT + 33 / + 28 - - col0 * - ( - 93 ) AS col1 FROM tab0 AS cor0
----
2233
3256
8278

query I rowsort
SELECT + 47 + + col1 AS col0 FROM tab1 AS cor0
----
57
60
73

query I rowsort
SELECT 30 * - 8 AS col0 FROM tab0 AS cor0
----
-240
-240
-240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 * col1 col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 83 FROM tab2, tab1 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT DISTINCT + - col0 + cor0.col0 AS col1 FROM tab0 cor0
----
0

query I rowsort
SELECT - col1 * col1 * + cor0.col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT + + 14 * + col0 FROM tab0 AS cor0
----
1246
336
490

query I rowsort
SELECT ( 90 ) * col0 AS col1 FROM tab0 AS cor0
----
2160
3150
8010

query I rowsort
SELECT ( col1 ) + - 75 * + col2 FROM tab1 AS cor0
----
-4024
-4265
-7187

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab2 AS cor0
----
97

query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + cor0.col2 col1 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - - col1 + + col1 AS col0 FROM tab0 cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-6563
SELECT col0 + col2 DIV + 65 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-6563
SELECT col0 + col2 / + 65 FROM tab0 AS cor0
----
24
35
90

query I rowsort
SELECT DISTINCT col1 + cor0.col0 * + ( + col0 ) * - col2 AS col1 FROM tab2 AS cor0
----
-1292
-158125
-237141

query I rowsort
SELECT ALL + col2 * col0 * col2 FROM tab0 cor0
----
26136
35
598436

query I rowsort
SELECT ALL + col2 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6568
SELECT ALL - - cor0.col1 + - col0 DIV col2 FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-6568
SELECT ALL - - cor0.col1 + - col0 / col2 FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT - 74 * + col1 + col2 * - 29 FROM tab1 AS cor0
----
-2393
-3490
-3746

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 - - col0 * - col2 + - 46 FROM tab2 AS cor0
----
-2074
-235
-3048

query I rowsort
SELECT - col1 + cor0.col0 * - col1 AS col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT 96 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

onlyif mysql # use DIV operator for integer division
query I rowsort label-6574
SELECT ALL - - col2 DIV - col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-6574
SELECT ALL - - col2 / - col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT + - col1 * + col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + 38 * + col2 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
1427
929
995

onlyif mysql # use DIV operator for integer division
query I rowsort label-6577
SELECT DISTINCT - + col1 + col2 DIV + 4 FROM tab2 AS cor0
----
-25
-53
-8

skipif mysql # not compatible
query I rowsort label-6577
SELECT DISTINCT - + col1 + col2 / + 4 FROM tab2 AS cor0
----
-25
-53
-8

query I rowsort
SELECT ALL + cor0.col2 + col2 * - 7 AS col2 FROM tab2 AS cor0
----
-156
-162
-228

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6579
SELECT DISTINCT + col1 / col1 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6579
SELECT DISTINCT + col1 / col1 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * + col1 * col2 AS col1 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT cor0.col0 + + 15 * cor0.col2 AS col1 FROM tab2 AS cor0
----
412
468
649

query I rowsort
SELECT + + cor0.col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + 80 * col2 AS col2 FROM tab0
----
2640
6560
80

query I rowsort
SELECT ALL + col1 + col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT - cor0.col0 * col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col1 col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - col2 * col0 + - col1 + - cor0.col0 * + col0 FROM tab2 AS cor0
----
-269
-8171
-9260

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + cor0.col2 * + col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - col1 * col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col1 + - 59 AS col0 FROM tab2 AS cor0
----
-28
-42
0

query I rowsort
SELECT - 91 + col1 FROM tab0
----
-5
0
6

query I rowsort
SELECT ALL col0 * col0 + 8 FROM tab2
----
57
6092
6249

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT + cor0.col2 * + cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to e1120e7b687b32270ef70393236e7341

query I rowsort
SELECT ALL - 58 FROM tab2, tab2 AS cor0
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - cor0.col1 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 cor1, tab1, tab0 cor2
----
3645 values hashing to b225d3765f33551c12574f545c8c91eb

query I rowsort
SELECT ALL + col0 * 17 + - col2 AS col0 FROM tab2 AS cor0
----
1300
1305
92

query I rowsort
SELECT DISTINCT col0 * col2 + - col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab0, tab2 cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT DISTINCT ( - 27 ) AS col0 FROM tab1
----
-27

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to 95de14c88adc44eda4adb5267fe9ebd1

query I rowsort
SELECT 21 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT col0 * - tab1.col0 * col2 FROM tab1
----
-233472
-486
-614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6609
SELECT DISTINCT + ( + tab1.col1 ) DIV + 70 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-6609
SELECT DISTINCT + ( + tab1.col1 ) / + 70 AS col1 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6610
SELECT - col1 + col0 * - CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6610
SELECT - col1 + col0 * - CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6611
SELECT DISTINCT col0 * col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6611
SELECT DISTINCT col0 * col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL

query I rowsort
SELECT 90 FROM tab1
----
90
90
90

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - col0 * col1 * - 89 FROM tab0 AS cor0
----
183696
302155
720811

query I rowsort
SELECT 55 * col0 AS col2 FROM tab1 AS cor0
----
165
3520
4400

query I rowsort
SELECT - - ( col0 ) + col0 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6617
SELECT + + col0 * col1 - - CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-6617
SELECT + + col0 * col1 - - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - 90 + col0 FROM tab1 cor0
----
-10
-26
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6619
SELECT ALL + 93 + + col1 DIV - 21 FROM tab0 cor0
----
89
89
89

skipif mysql # not compatible
query I rowsort label-6619
SELECT ALL + 93 + + col1 / - 21 FROM tab0 cor0
----
89
89
89

query I rowsort
SELECT DISTINCT + col1 - - col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + - ( + 88 ) * + col2 FROM tab2 cor0
----
-2288
-2376
-3344

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - ( + ( col2 ) ) * col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col1 * + col0 * + col1 AS col0 FROM tab2 AS cor0
----
-22831
-271518
-6727

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6625
SELECT - + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6625
SELECT - + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 col2 FROM tab2 AS cor0
----
38
38
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6627
SELECT - CAST( NULL AS SIGNED ) * 5 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6627
SELECT - CAST ( NULL AS INTEGER ) * 5 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + 27 AS col2 FROM tab2 AS cor0
----
-11
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + 58 AS col0 FROM tab0 AS cor0
----
58

query I rowsort
SELECT 69 - col2 AS col0 FROM tab2 AS cor0
----
31
42
43

query I rowsort
SELECT ( + col1 ) * + col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - cor0.col2 * + col1 + col0 + - 21 FROM tab2 AS cor0
----
-1477
-588
-851

query I rowsort
SELECT - col1 * + col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + 74 AS col0 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT ALL + col1 * - 29 FROM tab2 AS cor0
----
-1711
-493
-899

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col2 + + col1 col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT + col2 * col1 - col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT ALL 94 FROM tab0
----
94
94
94

query I rowsort
SELECT - 66 + 3 + - col2 FROM tab2
----
-101
-89
-90

query I rowsort
SELECT - ( ( col0 ) ) + 57 * - col2 FROM tab0 AS cor0
----
-1905
-4763
-92

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 CROSS JOIN tab2
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT DISTINCT + col0 * - col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 62 + col1 AS col0 FROM tab1 cor0
----
72
75
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col2 FROM tab0
----
65
65
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-6646
SELECT col1 * tab1.col2 DIV col0 - col0 * 65 AS col2 FROM tab1
----
-4152
-5185
273

skipif mysql # not compatible
query I rowsort label-6646
SELECT col1 * tab1.col2 / col0 - col0 * 65 AS col2 FROM tab1
----
-4152
-5185
273

query I rowsort
SELECT DISTINCT - col0 * - 2 AS col0 FROM tab0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * - col0 col2 FROM tab2 cor0
----
-1343
-217
-4602

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1
----
243 values hashing to 5d85c5683e3ffd6d68920690d7302f7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 27 * - 28 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to bb6facf480a24944b871ebecee70e2e1

query I rowsort
SELECT col2 + + col2 AS col0 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - col1 * + 1 * col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + 71 FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT ALL - - ( + col1 ) FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL col0 + - col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - 51 AS col1 FROM tab1 cor0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT ( 85 ) * col0 AS col1 FROM tab0
----
2040
2975
7565

query I rowsort
SELECT ALL 35 FROM tab2 AS cor0
----
35
35
35

query I rowsort
SELECT DISTINCT - - cor0.col2 + + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) + col2 * col2 col0 FROM tab0 cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab1 cor0, tab1 cor1
----
10
13
26

query I rowsort
SELECT DISTINCT - + ( + col2 ) + cor0.col2 AS col0 FROM tab2 cor0
----
0

query I rowsort
SELECT + col0 + - col1 * col0 * col2 AS col1 FROM tab1
----
-36416
-4209
-99760

query I rowsort
SELECT - col1 + col0 * tab1.col2 * col2 FROM tab1
----
207926
737267
8722

query I rowsort
SELECT ( 42 ) AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

onlyif mysql # use DIV operator for integer division
query I rowsort label-6667
SELECT DISTINCT 70 * - col0 + cor0.col2 DIV col2 FROM tab1 AS cor0
----
-209
-4479
-5599

skipif mysql # not compatible
query I rowsort label-6667
SELECT DISTINCT 70 * - col0 + cor0.col2 / col2 FROM tab1 AS cor0
----
-209
-4479
-5599

query I rowsort
SELECT 32 + + col0 FROM tab0 AS cor0
----
121
56
67

query I rowsort
SELECT ALL - ( - col0 ) + col0 * col2 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT + col0 * cor0.col2 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 52 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1355
584
756

query I rowsort
SELECT + col1 * + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL col1 + + tab0.col0 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL + col0 * col0 + 7 AS col2 FROM tab2
----
56
6091
6248

query I rowsort
SELECT ALL - col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT cor0.col2 - - col1 AS col0 FROM tab0 cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6677
SELECT DISTINCT - + col2 * - col1 + CAST( NULL AS SIGNED ) + + cor0.col2 AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6677
SELECT DISTINCT - + col2 * - col1 + CAST ( NULL AS INTEGER ) + + cor0.col2 AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT - 20 + col2 + + col1 AS col1 FROM tab1 AS cor0
----
47
60
89

query I rowsort
SELECT DISTINCT + - col2 * col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + + 11 FROM tab1 AS cor0
----
11
11
11

query I rowsort
SELECT + 86 + col1 + - col2 FROM tab0 AS cor0
----
139
182
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6682
SELECT ALL - - cor0.col0 + col2 DIV ( + 92 ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6682
SELECT ALL - - cor0.col0 + col2 / ( + 92 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 * 33 AS col0 FROM tab1 AS cor0
----
-340
-442
-884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6684
SELECT ALL + col2 - - col1 DIV col0 AS col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-6684
SELECT ALL + col2 - - col1 / col0 AS col2 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT ALL - cor0.col1 * - ( - 7 ) + cor0.col1 AS col2 FROM tab0 AS cor0
----
-516
-546
-582

query I rowsort
SELECT cor0.col1 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - - col2 * - ( col0 ) - col0 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT col2 * + col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + cor0.col0 * + ( col2 ) + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT + col0 + + 91 AS col1 FROM tab0 cor0
----
115
126
180

query I rowsort
SELECT DISTINCT - + col2 + 3 AS col0 FROM tab0 AS cor0
----
-30
-79
2

query I rowsort
SELECT DISTINCT col2 + cor0.col1 * col0 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-6693
SELECT DISTINCT + - cor0.col2 + col0 DIV col1 AS col2 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6693
SELECT DISTINCT + - cor0.col2 + col0 / col1 AS col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT col1 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 col2 FROM tab2
----
86

query I rowsort
SELECT DISTINCT - col2 + tab0.col2 FROM tab0
----
0

query I rowsort
SELECT DISTINCT col1 + col0 * 17 FROM tab0
----
1604
494
692

query I rowsort
SELECT - col0 + col0 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + 98 AS col2 FROM tab2
----
98
98
98

query I rowsort
SELECT DISTINCT 51 * col0 * col2 AS col0 FROM tab2
----
103428
153102
9639

onlyif mysql # use DIV operator for integer division
query I rowsort label-6701
SELECT + col1 + - col2 DIV col0 AS col2 FROM tab0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-6701
SELECT + col1 + - col2 / col0 AS col2 FROM tab0
----
85
91
97

query I rowsort
SELECT DISTINCT ( col1 ) * - col2 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + cor0.col2 + + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - col2 * col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col2 * col0 + col1 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL - 59 AS col0 FROM tab0 AS cor0
----
-59
-59
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6707
SELECT ALL - col2 DIV col2 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6707
SELECT ALL - col2 / col2 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL + col1 + - col2 * + 35 * tab2.col0 FROM tab2
----
-105053
-6584
-70921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * - tab0.col0 col2 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT col1 * col0 + + col0 AS col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT col2 + + col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT col2 - col2 * + 84 AS col0 FROM tab0 AS cor0
----
-2739
-6806
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6714
SELECT ALL col1 + - col1 + - col2 DIV - col0 col0 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6714
SELECT ALL col1 + - col1 + - col2 / - col0 col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT - col1 - 6 FROM tab2 AS cor0
----
-23
-37
-65

query I rowsort
SELECT ALL + ( 39 ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT ALL col1 * ( - col0 ) + col1 * - ( 83 * - col2 ) FROM tab0
----
233490
4656
611247

query I rowsort
SELECT ALL + col0 + - 93 * col0 FROM tab0
----
-2208
-3220
-8188

query I rowsort
SELECT ALL ( + 23 ) * cor0.col0 AS col2 FROM tab2 AS cor0
----
161
1794
1817

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - col2 + col2 col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - - col2 + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 97 + 48 col1 FROM tab2 AS cor0
----
145
145
145

query I rowsort
SELECT DISTINCT col0 + + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6724
SELECT DISTINCT - col1 DIV + cor0.col1 + + col2 AS col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-6724
SELECT DISTINCT - col1 / + cor0.col1 + + col2 AS col1 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT ALL - 51 * + col2 FROM tab2 cor0
----
-1326
-1377
-1938

query I rowsort
SELECT ALL + ( + col0 * col1 ) FROM tab1
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6727
SELECT - col1 * ( - col2 ) * CAST( 41 * - col1 AS SIGNED ) FROM tab2
----
-1063827
-3710746
-450262

skipif mysql # not compatible
query I rowsort label-6727
SELECT - col1 * ( - col2 ) * CAST ( 41 * - col1 AS INTEGER ) FROM tab2
----
-1063827
-3710746
-450262

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT + - 55 FROM tab1 AS cor0
----
-55

query I rowsort
SELECT ALL col0 * 35 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
22400
2730
36400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6731
SELECT + CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6731
SELECT + CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col2 * 4 * col2 + 75 * + col2 FROM tab2 AS cor0
----
4654
4941
8626

onlyif mysql # use DIV operator for integer division
query I rowsort label-6733
SELECT + cor0.col0 DIV + 74 + col0 AS col2 FROM tab1 AS cor0
----
3
64
81

skipif mysql # not compatible
query I rowsort label-6733
SELECT + cor0.col0 / + 74 + col0 AS col2 FROM tab1 AS cor0
----
3
64
81

query I rowsort
SELECT DISTINCT - + col0 * - cor0.col2 * + col2 FROM tab1 AS cor0
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( cor0.col2 ) * + col0 + col2 col0 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6736
SELECT ALL + CAST( + col2 AS SIGNED ) + col1 * col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

skipif mysql # not compatible
query I rowsort label-6736
SELECT ALL + CAST ( + col2 AS INTEGER ) + col1 * col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - 46 FROM tab2 AS cor0
----
-46

query I rowsort
SELECT DISTINCT - col0 + 37 FROM tab2 AS cor0
----
-41
-42
30

query I rowsort
SELECT + 32 + - col1 FROM tab1 AS cor0
----
19
22
6

query I rowsort
SELECT DISTINCT + - ( + cor0.col2 ) FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6741
SELECT CAST( NULL AS SIGNED ) / 58 + - col1 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6741
SELECT CAST ( NULL AS INTEGER ) / 58 + - col1 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 51 + col2 FROM tab1 AS cor0
----
3
45
6

query I rowsort
SELECT DISTINCT - 39 FROM tab2
----
-39

query I rowsort
SELECT + 43 AS col0 FROM tab1
----
43
43
43

query I rowsort
SELECT + ( - col0 * + col1 + col2 ) AS col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT ( + col2 ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT - 14 FROM tab1, tab2 cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT - + ( + col2 ) - cor0.col1 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6749
SELECT + col2 DIV col1 - col1 FROM tab2 AS cor0
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-6749
SELECT + col2 / col1 - col1 FROM tab2 AS cor0
----
-15
-31
-59

query I rowsort
SELECT ALL + cor0.col0 + + 22 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 2db72803afc9edec7fcc9ef560f6e2c7

query I rowsort
SELECT DISTINCT - col0 * + 41 AS col0 FROM tab2 AS cor0
----
-287
-3198
-3239

query I rowsort
SELECT + 28 + + 34 FROM tab1 AS cor0
----
62
62
62

query I rowsort
SELECT col0 * + col2 + - 43 AS col0 FROM tab1 AS cor0
----
119
3605
7637

query I rowsort
SELECT - 14 * - cor0.col0 + - col2 AS col2 FROM tab2 AS cor0
----
1066
1068
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col0 ) col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ( - col2 ) + col2 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ( 41 ) * col2 FROM tab0
----
1353
3362
41

query I rowsort
SELECT + - 47 * - col2 + col2 FROM tab1 AS cor0
----
2592
2736
4608

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT + + col1 * ( + col2 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + cor0.col0 * - 52 AS col2 FROM tab0 cor0
----
-1248
-1820
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6762
SELECT DISTINCT col1 DIV col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-6762
SELECT DISTINCT col1 / col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT + col1 + col0 * 44 FROM tab0
----
1142
1637
4007

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6765
SELECT + + col0 DIV 70 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6765
SELECT + + col0 / 70 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6766
SELECT - col1 DIV - col1 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6766
SELECT - col1 / - col1 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT col1 - 20 FROM tab0 AS cor0
----
66
71
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6768
SELECT ALL - col0 DIV col2 + - tab0.col0 FROM tab0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-6768
SELECT ALL - col0 / col2 + - tab0.col0 FROM tab0
----
-24
-70
-90

query I rowsort
SELECT DISTINCT col2 * 78 AS col0 FROM tab1
----
4212
4446
7488

query I rowsort
SELECT ALL + col2 + + col2 * 14 FROM tab1
----
1440
810
855

query I rowsort
SELECT col2 + - 13 FROM tab2
----
13
14
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 * + 52 col2 FROM tab1 AS cor0
----
-33280
-4056
-54080

query I rowsort
SELECT + col2 * + 25 * - col1 FROM tab1 cor0
----
-14250
-31200
-35100

query I rowsort
SELECT - - col0 * cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col2 + col2 * col1 AS col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT + - col1 * col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT col0 * + ( col0 ) + - col0 AS col2 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT - col0 + + 50 FROM tab2 AS cor0
----
-28
-29
43

query I rowsort
SELECT DISTINCT col2 * col2 * + col1 + + col2 * + col2 AS col2 FROM tab1 AS cor0
----
129024
35739
78732

query I rowsort
SELECT - - col0 + + col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col0 + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6783
SELECT - + col1 + - 21 DIV col1 FROM tab2 AS cor0
----
-18
-31
-59

skipif mysql # not compatible
query I rowsort label-6783
SELECT - + col1 + - 21 / col1 FROM tab2 AS cor0
----
-18
-31
-59

query I rowsort
SELECT ALL - col2 * col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + col2 + 97 * col2 FROM tab1 AS cor0
----
5292
5586
9408

query I rowsort
SELECT DISTINCT cor0.col1 * + 46 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
1426
2714
782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 7 - col2 * col1 col1 FROM tab2 AS cor0
----
-1527
-639
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-6788
SELECT ALL - col2 * 7 + col2 DIV - ( 61 ) FROM tab0 cor0
----
-231
-575
-7

skipif mysql # not compatible
query I rowsort label-6788
SELECT ALL - col2 * 7 + col2 / - ( 61 ) FROM tab0 cor0
----
-231
-575
-7

query I rowsort
SELECT DISTINCT col0 * ( col2 ) * - 9 - - col2 FROM tab0 AS cor0
----
-314
-65600
-7095

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6790
SELECT - CAST( + 34 AS SIGNED ) FROM tab2 AS cor0
----
-34
-34
-34

skipif mysql # not compatible
query I rowsort label-6790
SELECT - CAST ( + 34 AS INTEGER ) FROM tab2 AS cor0
----
-34
-34
-34

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

onlyif mysql # use DIV operator for integer division
query I rowsort label-6792
SELECT - - col1 DIV + col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6792
SELECT - - col1 / + col0 AS col2 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT ALL + - 98 * col2 AS col0 FROM tab2 AS cor0
----
-2548
-2646
-3724

query I rowsort
SELECT + - 47 AS col2 FROM tab2 cor0
----
-47
-47
-47

query I rowsort
SELECT - - ( - cor0.col0 ) * - col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6798
SELECT DISTINCT col0 DIV col2 + tab0.col1 AS col1 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-6798
SELECT DISTINCT col0 / col2 + tab0.col1 AS col1 FROM tab0
----
132
86
92

query I rowsort
SELECT ALL col2 * + tab1.col1 - col0 AS col1 FROM tab1
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-6800
SELECT DISTINCT tab0.col0 DIV tab0.col2 + tab0.col0 FROM tab0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-6800
SELECT DISTINCT tab0.col0 / tab0.col2 + tab0.col0 FROM tab0
----
24
70
90

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - col0 IN ( col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( col0 ) > ( NULL )
----

query I rowsort
SELECT + col1 * col2 - tab0.col2 AS col0 FROM tab0
----
2805
7380
96

query III rowsort
SELECT * FROM tab1 WHERE NULL = + col0 / + col2 + col1
----

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL + ( - col1 ) * ( + col2 ) FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL - col0 * col1 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 + + col2 col1 FROM tab2 cor0
----
107
108
119

query I rowsort
SELECT tab0.col1 * + col2 - tab0.col1 FROM tab0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * - 71 * col2 col1 FROM tab2 AS cor0
----
13419
143988
213142

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab1, tab0 AS cor1
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT - 99 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

query I rowsort
SELECT DISTINCT - 66 AS col1 FROM tab1, tab0 AS cor0
----
-66

query I rowsort
SELECT DISTINCT - + col0 * ( - 62 ) - + col1 * - 83 FROM tab1 AS cor0
----
2344
4798
6039

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col2 * CAST ( 50 AS REAL ) AS col1 FROM tab1 AS cor0
----
-2700
-2850
-4800

query I rowsort
SELECT DISTINCT - col1 * - col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - + col1 * ( - 32 ) FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT - 27 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to b12a0ecf0f54932a5c657f851b1962ae

query I rowsort
SELECT ALL cor0.col2 * + 41 FROM tab2 AS cor0
----
1066
1107
1558

query I rowsort
SELECT + col1 * - 5 AS col1 FROM tab1 AS cor0
----
-130
-50
-65

query I rowsort
SELECT ALL - col1 - col1 AS col2 FROM tab2
----
-118
-34
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab1 AS cor0, tab2 AS cor1
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

query I rowsort
SELECT DISTINCT + ( + tab2.col2 ) * + tab2.col0 * col2 - - ( col0 * col2 ) FROM tab2
----
117078
5292
54756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col1 FROM tab1
----
2
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6826
SELECT DISTINCT + col1 * - tab1.col1 DIV col1 - + col2 FROM tab1
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-6826
SELECT DISTINCT + col1 * - tab1.col1 / col1 - + col2 FROM tab1
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6827
SELECT - + CAST( + col1 AS SIGNED ) * + cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-6827
SELECT - + CAST ( + col1 AS INTEGER ) * + cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + 94 AS col1 FROM tab0 AS cor0
----
94

query I rowsort
SELECT - col1 * ( col2 ) + - col0 FROM tab1 cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL col1 - + 25 AS col2 FROM tab0
----
61
66
72

query I rowsort
SELECT - + 88 + col0 AS col2 FROM tab1 AS cor0
----
-24
-8
-85

query I rowsort
SELECT 4 * cor0.col2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 315f93d11152c2cf40009a8d4d7c678c

query I rowsort
SELECT DISTINCT - + col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6834
SELECT + ( - col2 ) DIV 53 + + col1 AS col2 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-6834
SELECT + ( - col2 ) / 53 + + col1 AS col2 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT DISTINCT col0 * + cor0.col1 + ( + col0 ) FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT ALL 50 * col0 * - 70 FROM tab1 AS cor0
----
-10500
-224000
-280000

query I rowsort
SELECT + - cor0.col0 + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col2 * - col0 + - 79 + col0 AS col2 FROM tab1 AS cor0
----
-238
-3663
-7679

query I rowsort
SELECT cor0.col0 * cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6840
SELECT ALL - 39 + + col2 * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6840
SELECT ALL - 39 + + col2 * CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 * col2 - + ( cor0.col2 ) * col1 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
3360
656820
67320

query I rowsort
SELECT - 42 + + col0 * + cor0.col2 * + col2 FROM tab0 AS cor0
----
-7
26094
598394

query I rowsort
SELECT ALL + + col2 - - col1 * col0 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + col0 * col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL 84 + - col1 AS col2 FROM tab1 AS cor0
----
58
71
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6848
SELECT DISTINCT - 49 * - col0 * + cor0.col2 + + col2 * col1 DIV cor0.col1 + col1 * + col1 FROM tab0 AS cor0
----
11125
365965
46237

skipif mysql # not compatible
query I rowsort label-6848
SELECT DISTINCT - 49 * - col0 * + cor0.col2 + + col2 * col1 / cor0.col1 + col1 * + col1 FROM tab0 AS cor0
----
11125
365965
46237

query I rowsort
SELECT ALL - + ( col1 ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + + col2 + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - col1 * col0 FROM tab2 cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 55 col2 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT + - col2 * col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col1 * col0 + col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL - + col0 + + col2 * col1 FROM tab1 cor0
----
1168
1401
506

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT + col0 * col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + 12 + col1 AS col2 FROM tab2
----
29
43
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 * col2 col0 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6862
SELECT + col0 DIV + col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6862
SELECT + col0 / + col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - - col1 * + col1 + + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - + cor0.col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT col2 * + col2 AS col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT - tab0.col0 * col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6867
SELECT - col1 DIV + tab2.col0 + col1 FROM tab2
----
17
27
59

skipif mysql # not compatible
query I rowsort label-6867
SELECT - col1 / + tab2.col0 + col1 FROM tab2
----
17
27
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col1 * - col2 FROM tab2
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * tab1.col0 col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - cor0.col2 * - cor0.col2 + cor0.col1 + - col2 FROM tab2 cor0
----
1423
709
733

query I rowsort
SELECT col2 - + col0 AS col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT - ( col1 ) + col2 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT 41 FROM tab0, tab2 AS cor0
----
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col2 * col2 col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT + col2 + col2 + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
1586
722
891

query I rowsort
SELECT - - col0 + - col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 57 FROM tab2 AS cor0
----
57
57
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6879
SELECT - - col1 + - col1 * + col0 - - col0 DIV col1 AS col2 FROM tab1 AS cor0
----
-1021
-52
-624

skipif mysql # not compatible
query I rowsort label-6879
SELECT - - col1 + - col1 * + col0 - - col0 / col1 AS col2 FROM tab1 AS cor0
----
-1021
-52
-624

onlyif mysql # use DIV operator for integer division
query I rowsort label-6880
SELECT DISTINCT 15 DIV - col1 AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6880
SELECT DISTINCT 15 / - col1 AS col0 FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6881
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6881
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT ( + col1 * - col1 ) FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT 12 AS col0 FROM tab0
----
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6884
SELECT ALL - CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6884
SELECT ALL - CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 10 * - ( col2 ) AS col0 FROM tab1
----
-540
-570
-960

query I rowsort
SELECT + tab2.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + 68 AS col0 FROM tab1
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 + 47 col1 FROM tab1
----
26
26
26

query I rowsort
SELECT + 11 * - ( - col2 * col0 ) + - col0 * + col0 AS col0 FROM tab2
----
16224
2030
26781

query I rowsort
SELECT tab1.col1 * + col2 + + col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT tab2.col1 * col0 AS col0 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6892
SELECT col0 + tab2.col0 + + tab2.col0 DIV col1 FROM tab2
----
14
157
162

skipif mysql # not compatible
query I rowsort label-6892
SELECT col0 + tab2.col0 + + tab2.col0 / col1 FROM tab2
----
14
157
162

query I rowsort
SELECT + col0 + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + 71 AS col1 FROM tab0 AS cor0
----
71
71
71

query I rowsort
SELECT + + 40 + - col0 AS col2 FROM tab2 AS cor0
----
-38
-39
33

query I rowsort
SELECT ALL ( col2 ) * + col0 + col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-6897
SELECT - col2 + - cor0.col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-6897
SELECT - col2 + - cor0.col1 / - col1 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - + col0 * + col0 + - cor0.col1 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT DISTINCT - ( col1 ) * cor0.col2 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL - col1 + + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - ( + col2 ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col2 * + col0 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT cor0.col1 - - col2 AS col0 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col1 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col1 * + cor0.col0 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - col2 * - col1 + + cor0.col2 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT + col1 * col0 - - col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - col1 * col1 AS col0 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - tab0.col0 * - col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT tab0.col1 * + col2 + - col2 * + col1 * col2 AS col2 FROM tab0
----
-604422
-90816
0

query I rowsort
SELECT ALL + col2 * - col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + col1 FROM tab2 WHERE col0 + - col2 * col1 * col1 <= - col1 * + col1 * - col1
----
17
31
59

query I rowsort
SELECT col0 * - col2 FROM tab1 WHERE NOT NULL <= ( col2 )
----

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-6915
SELECT - col0 DIV - col2 + col1 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-6915
SELECT - col0 / - col2 + col1 FROM tab0
----
132
86
92

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 <> - col2 - - col0 * - col0 * col0
----

query I rowsort
SELECT col0 FROM tab1 WHERE NOT NULL = - col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6918
SELECT ALL + col2 DIV + col0 - + col1 * col0 FROM tab0
----
-2063
-3395
-8099

skipif mysql # not compatible
query I rowsort label-6918
SELECT ALL + col2 / + col0 - + col1 * col0 FROM tab0
----
-2063
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6919
SELECT col2 * col1 DIV col2 col2 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6919
SELECT col2 * col1 / col2 col2 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + col2 + - col0 + col1 FROM tab1
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6921
SELECT DISTINCT - tab0.col0 DIV tab0.col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-6921
SELECT DISTINCT - tab0.col0 / tab0.col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT - tab2.col1 * + tab2.col2 * col2 AS col2 FROM tab2
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6923
SELECT DISTINCT - col0 DIV col0 AS col2 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-6923
SELECT DISTINCT - col0 / col0 AS col2 FROM tab1
----
-1

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 - col1 >= ( NULL )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL = NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col2 col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT col2 * + col1 AS col0 FROM tab2 WHERE NULL = NULL
----

query I rowsort
SELECT col1 * col2 + col1 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL - col1 + + col0 AS col2 FROM tab2 WHERE NOT NULL = ( col1 )
----

query I rowsort
SELECT ALL col0 + - col2 - - col2 * - col0 FROM tab1
----
-213
-3641
-7696

query I rowsort
SELECT DISTINCT tab2.col2 * col2 + - tab2.col0 + + col2 FROM tab2
----
1403
624
749

query I rowsort
SELECT + col1 + - col0 * - col0 AS col2 FROM tab0
----
1322
662
8012

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col2 AS col1 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6934
SELECT DISTINCT - col0 DIV col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-6934
SELECT DISTINCT - col0 / col0 FROM tab1
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6935
SELECT DISTINCT col2 * + col2 + col2 - col0 DIV col1 col0 FROM tab1
----
2970
3300
9306

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6935
SELECT DISTINCT col2 * + col2 + col2 - col0 / col1 col0 FROM tab1
----
2970
3300
9306

query I rowsort
SELECT col0 + + col1 AS col1 FROM tab2 WHERE ( + col2 - + col0 ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT + col2 + + tab2.col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT col0 * col0 - col2 FROM tab1
----
-45
4039
6304

query I rowsort
SELECT + col2 * col0 * col1 AS col2 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 + - col2 + col0 col1 FROM tab2
----
7
78
79

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0
----
54 values hashing to 3352c458f45211cf9aa3236c2cd6dd38

query I rowsort
SELECT + tab0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col1 * cor0.col1 col2 FROM tab0 cor0
----
7372
8192
9374

query I rowsort
SELECT ALL - col1 + col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT cor0.col0 * col1 * col2 + - col2 * col1 AS col0 FROM tab2 cor0
----
118118
5022
50388

onlyif mysql # use DIV operator for integer division
query I rowsort label-6946
SELECT + cor0.col0 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6946
SELECT + cor0.col0 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + col0 * + col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 + - col1 col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL col2 * cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 col2 FROM tab2 AS cor0
----
1343
217
4602

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL NOT IN ( - col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL IN ( col1 )
----

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) IN ( col0 )
----

query I rowsort
SELECT 25 + + col2 + + tab2.col0 * + col0 AS col1 FROM tab2
----
101
6135
6304

query I rowsort
SELECT ALL + col0 + + col2 * - tab2.col2 FROM tab2
----
-1365
-598
-722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6957
SELECT CAST( NULL AS SIGNED ) * col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6957
SELECT CAST ( NULL AS INTEGER ) * col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + + ( ( + col2 ) ) * - 78 + - cor0.col1 FROM tab1 AS cor0
----
-4238
-4456
-7501

query I rowsort
SELECT col2 + + col1 * - col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col0 + col2 * - col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT 33 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT ALL + tab2.col2 + + col0 FROM tab2
----
104
117
34

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 82def1c3361e635dd4cf447edc22edb9

query I rowsort
SELECT DISTINCT - 23 + - 69 * col1 * + 90 FROM tab0
----
-534083
-565133
-602393

onlyif mysql # use DIV operator for integer division
query I rowsort label-6965
SELECT + + 20 + col2 DIV - 97 FROM tab1 cor0
----
20
20
20

skipif mysql # not compatible
query I rowsort label-6965
SELECT + + 20 + col2 / - 97 FROM tab1 cor0
----
20
20
20

query I rowsort
SELECT + - 47 + + col2 + col1 * + col1 AS col1 FROM tab1 AS cor0
----
110
218
683

onlyif mysql # use DIV operator for integer division
query I rowsort label-6967
SELECT DISTINCT col1 DIV + cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-6967
SELECT DISTINCT col1 / + cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT col2 * cor0.col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6969
SELECT ALL - cor0.col0 * + col1 - + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6969
SELECT ALL - cor0.col0 * + col1 - + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 55 + + col1 FROM tab0 AS cor0
----
31
36
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-6971
SELECT DISTINCT + + col2 DIV col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6971
SELECT DISTINCT + + col2 / col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + 13 + - cor0.col0 FROM tab2 AS cor0
----
-65
-66
6

query I rowsort
SELECT ALL - col1 + - cor0.col0 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT - + ( col0 ) * - col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT ( col0 ) AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT 33 AS col1 FROM tab1, tab1 AS cor0
----
33

query I rowsort
SELECT DISTINCT + col1 * - col0 + - 27 FROM tab0 AS cor0
----
-2091
-3422
-8126

onlyif mysql # use DIV operator for integer division
query I rowsort label-6978
SELECT ALL + - 79 DIV col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-6978
SELECT ALL + - 79 / col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-11

query I rowsort
SELECT DISTINCT ( col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - + col1 + - col2 AS col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT col2 + - col0 AS col1 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6982
SELECT + - col2 * CAST( NULL AS DECIMAL ) + col0 * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6982
SELECT + - col2 * CAST ( NULL AS REAL ) + col0 * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 - 79 * + col1 FROM tab2 AS cor0
----
-1305
-2422
-4635

query I rowsort
SELECT + - col1 * col2 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - col0 col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT - col0 - + 91 * col2 AS col2 FROM tab0 cor0
----
-126
-3027
-7551

query I rowsort
SELECT col1 * - 77 AS col1 FROM tab1 AS cor0
----
-1001
-2002
-770

query I rowsort
SELECT DISTINCT + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + - col0 - + col2 * col1 FROM tab0 cor0
----
-132
-2862
-7551

query I rowsort
SELECT - + col2 * col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + + col1 * col2 + col2 + col1 FROM tab1 AS cor0
----
1357
1484
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( - col0 ) * col0 col2 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT - 75 * - col0 + - col2 AS col0 FROM tab2 AS cor0
----
498
5824
5887

query I rowsort
SELECT ALL - 7 AS col1 FROM tab2 AS cor0
----
-7
-7
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6995
SELECT + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6995
SELECT + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col2 col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT cor1.col1 * 89 + 1 AS col2 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 5ac7b3213358822614ba3b6e26ddc051

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6998
SELECT DISTINCT CAST( NULL AS DECIMAL ) + cor0.col1 * col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6998
SELECT DISTINCT CAST ( NULL AS REAL ) + cor0.col1 * col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT 98 FROM tab1 AS cor0
----
98
98
98

query I rowsort
SELECT ALL col2 * col0 * 87 AS col2 FROM tab1
----
14094
317376
668160

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab0 AS cor1, tab1, tab2 cor2
----
3645 values hashing to b34c9987c389223e07378cde8a36e94f

query I rowsort
SELECT ALL - col1 * + col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + 79 AS col2 FROM tab1 AS cor0
----
79
79
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7004
SELECT col1 * + cor0.col1 - col2 * + col0 DIV col0 FROM tab0 AS cor0
----
7363
8199
9408

skipif mysql # not compatible
query I rowsort label-7004
SELECT col1 * + cor0.col1 - col2 * + col0 / col0 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT ALL - + 10 AS col1 FROM tab1 AS cor0
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 80 col1 FROM tab1 AS cor0
----
80

query I rowsort
SELECT - 98 + col2 + + col2 AS col2 FROM tab1 cor0
----
10
16
94

query I rowsort
SELECT 4 AS col0 FROM tab1 AS cor0
----
4
4
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7009
SELECT DISTINCT CAST( cor0.col1 AS SIGNED ) * - col2 * col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

skipif mysql # not compatible
query I rowsort label-7009
SELECT DISTINCT CAST ( cor0.col1 AS INTEGER ) * - col2 * col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7010
SELECT DISTINCT - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7010
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7011
SELECT 17 DIV 52 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7011
SELECT 17 / 52 FROM tab1
----
0
0
0

query I rowsort
SELECT - 97 FROM tab2 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ALL + - col1 + - col1 * col1 AS col2 FROM tab1 AS cor0
----
-110
-182
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-7014
SELECT DISTINCT - + cor0.col1 DIV col0 AS col1 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-7014
SELECT DISTINCT - + cor0.col1 / col0 AS col1 FROM tab2 AS cor0
----
-4
0

query I rowsort
SELECT DISTINCT 91 * 28 + + col1 * + col0 FROM tab1 AS cor0
----
2626
3188
3588

query I rowsort
SELECT ALL + - col1 * ( col2 ) + cor0.col1 - - col1 FROM tab1 AS cor0
----
-1222
-1352
-550

onlyif mysql # use DIV operator for integer division
query I rowsort label-7017
SELECT col0 + 19 * col2 DIV - 53 FROM tab0 AS cor0
----
13
35
60

skipif mysql # not compatible
query I rowsort label-7017
SELECT col0 + 19 * col2 / - 53 FROM tab0 AS cor0
----
13
35
60

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 + col1 * + col0 col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7020
SELECT ALL - CAST( 49 AS SIGNED ) + col2 * + cor0.col2 FROM tab0 cor0
----
-48
1040
6675

skipif mysql # not compatible
query I rowsort label-7020
SELECT ALL - CAST ( 49 AS INTEGER ) + col2 * + cor0.col2 FROM tab0 cor0
----
-48
1040
6675

query I rowsort
SELECT DISTINCT col0 - + col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT - col0 + 30 - col0 FROM tab1
----
-130
-98
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-7023
SELECT - col0 DIV 41 FROM tab0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7023
SELECT - col0 / 41 FROM tab0
----
-2
0
0

query I rowsort
SELECT + - 60 + 40 * col0 + ( col1 + cor0.col0 ) AS col0 FROM tab0 cor0
----
1010
1472
3680

query I rowsort
SELECT ALL + ( col2 ) AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col1 - - col2 AS col0 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7027
SELECT ALL - CAST( + col2 AS SIGNED ) + col2 DIV - ( - col0 + - cor0.col1 ) FROM tab1 AS cor0
----
-53
-57
-95

skipif mysql # not compatible
query I rowsort label-7027
SELECT ALL - CAST ( + col2 AS INTEGER ) + col2 / - ( - col0 + - cor0.col1 ) FROM tab1 AS cor0
----
-53
-57
-95

query I rowsort
SELECT + - 33 + - col0 + col2 AS col0 FROM tab1 AS cor0
----
-17
-40
18

query I rowsort
SELECT - 57 + - 67 + - col2 FROM tab0 cor0
----
-125
-157
-206

query I rowsort
SELECT DISTINCT - col2 * - col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 72 AS col1 FROM tab2 AS cor0
----
72

query I rowsort
SELECT - col1 * col0 AS col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col1 + + col0 + col1 FROM tab2
----
113
196
69

query I rowsort
SELECT + 87 + + 15 + col2 AS col1 FROM tab0
----
103
135
184

query I rowsort
SELECT ALL 55 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT col0 + - col2 FROM tab0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 + + col1 * col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL col0 + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7040
SELECT ALL cor1.col2 DIV - cor0.col2 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b45baf9e81793405fbf95a2d4baa1fd9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7040
SELECT ALL cor1.col2 / - cor0.col2 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b45baf9e81793405fbf95a2d4baa1fd9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7041
SELECT ALL + - col0 + + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
-137
-38
-96

skipif mysql # not compatible
query I rowsort label-7041
SELECT ALL + - col0 + + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col2 + - col0 * + tab0.col0 AS col0 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT ALL + - 87 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT col2 - - col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL 23 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT DISTINCT col2 * 29 AS col2 FROM tab1
----
1566
1653
2784

query I rowsort
SELECT ALL col1 - ( col0 ) FROM tab0
----
2
62
62

query I rowsort
SELECT 35 FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT DISTINCT - col0 - ( - col1 * tab1.col2 ) FROM tab1
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7051
SELECT - col0 + 59 DIV col0 FROM tab2 AS cor0
----
-78
-79
1

skipif mysql # not compatible
query I rowsort label-7051
SELECT - col0 + 59 / col0 FROM tab2 AS cor0
----
-78
-79
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7052
SELECT ALL + col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7052
SELECT ALL + col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + - col0 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 5 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT ALL tab0.col1 * 34 FROM tab0
----
2924
3094
3298

query I rowsort
SELECT - col0 * col0 + - col2 FROM tab1
----
-4153
-63
-6496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7057
SELECT DISTINCT + cor0.col1 * + CAST( 12 AS SIGNED ) * + col2 AS col0 FROM tab1 cor0
----
14976
16848
6840

skipif mysql # not compatible
query I rowsort label-7057
SELECT DISTINCT + cor0.col1 * + CAST ( 12 AS INTEGER ) * + col2 AS col0 FROM tab1 cor0
----
14976
16848
6840

onlyif mysql # use DIV operator for integer division
query I rowsort label-7058
SELECT - col0 DIV - col2 col0 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7058
SELECT - col0 / - col2 col0 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-7059
SELECT DISTINCT + col1 + cor0.col1 DIV + 7 FROM tab0 AS cor0
----
104
110
98

skipif mysql # not compatible
query I rowsort label-7059
SELECT DISTINCT + col1 + cor0.col1 / + 7 FROM tab0 AS cor0
----
104
110
98

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7061
SELECT ALL + + CAST( 55 AS SIGNED ) + + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b416ff30f643e03237700697c1c457a1

skipif mysql # not compatible
query I rowsort label-7061
SELECT ALL + + CAST ( 55 AS INTEGER ) + + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b416ff30f643e03237700697c1c457a1

query I rowsort
SELECT 38 + + col1 FROM tab2
----
55
69
97

query I rowsort
SELECT ALL cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-7064
SELECT ALL + col1 DIV col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7064
SELECT ALL + col1 / col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT - col0 - col2 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - + cor0.col0 * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col0 - col0 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col0 + + col2 * 12 FROM tab0 AS cor0
----
1073
420
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col0 col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-7070
SELECT DISTINCT col1 DIV - col0 AS col0 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-7070
SELECT DISTINCT col1 / - col0 AS col0 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT ALL + 15 + cor0.col1 AS col0 FROM tab0 AS cor0
----
101
106
112

onlyif mysql # use DIV operator for integer division
query I rowsort label-7072
SELECT ALL - col1 + col1 DIV 38 AS col1 FROM tab2 AS cor0
----
-17
-31
-58

skipif mysql # not compatible
query I rowsort label-7072
SELECT ALL - col1 + col1 / 38 AS col1 FROM tab2 AS cor0
----
-17
-31
-58

query I rowsort
SELECT ALL - + col0 - col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT - - col0 * - col1 + col2 * col2 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT ( + cor0.col2 * 45 ) AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c10319fee1ef20d871275cc47f58e4a2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7076
SELECT ALL - col0 - - col1 DIV col1 col1 FROM tab1 cor0
----
-2
-63
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7076
SELECT ALL - col0 - - col1 / col1 col1 FROM tab1 cor0
----
-2
-63
-79

query I rowsort
SELECT + - col0 + 87 * - 34 FROM tab2 AS cor0
----
-2965
-3036
-3037

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7078
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) * col1 + col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7078
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) * col1 + col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col2 * 73 AS col0 FROM tab0 AS cor0
----
-2409
-5986
-73

query I rowsort
SELECT - - cor0.col1 * + col0 + col0 * cor0.col2 * col1 FROM tab1 AS cor0
----
100880
37120
4290

query I rowsort
SELECT 33 AS col0 FROM tab2
----
33
33
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7082
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7082
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 72 * + col0 + col1 FROM tab1 AS cor0
----
242
4618
5773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + 27 col0 FROM tab2 AS cor0
----
-11
0
1

query I rowsort
SELECT - col1 + col0 AS col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT ALL + + cor0.col2 AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7087
SELECT DISTINCT tab1.col1 DIV col2 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-7087
SELECT DISTINCT tab1.col1 / col2 AS col1 FROM tab1
----
0

query I rowsort
SELECT 21 AS col1 FROM tab1
----
21
21
21

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab2 AS cor0
----
15

query I rowsort
SELECT + col0 * + 85 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT ALL 99 FROM tab1 cor0
----
99
99
99

query I rowsort
SELECT - + 60 AS col2 FROM tab2 AS cor0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT - ( + col1 ) + + col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - 87 + - ( col2 ) AS col2 FROM tab0 AS cor0
----
-120
-169
-88

query I rowsort
SELECT ALL + 86 * + col1 AS col1 FROM tab2 AS cor0
----
1462
2666
5074

query I rowsort
SELECT - - 41 * ( + col2 ) AS col1 FROM tab0 AS cor0
----
1353
3362
41

query I rowsort
SELECT + + col1 * col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT + col1 + + 14 * tab0.col0 * col1 FROM tab0
----
113477
28982
47627

query I rowsort
SELECT 83 + col2 * cor0.col2 FROM tab1 AS cor0
----
2999
3332
9299

query I rowsort
SELECT DISTINCT ( - col0 * col2 ) FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - ( - tab1.col1 * col2 ) AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col2 * + col1 + col2 * 2 * col0 FROM tab0
----
167
22058
4422

query I rowsort
SELECT DISTINCT - col0 * ( col1 ) FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - 44 * col2 AS col0 FROM tab0 AS cor0
----
-1452
-3608
-44

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 60 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT ALL col1 * + col1 AS col1 FROM tab1
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7109
SELECT - + col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7109
SELECT - + col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab0 cor0, tab1
----
972 values hashing to 82e15d5967b272804e574774895a0222

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7113
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) * + col1 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7113
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) * + col1 col0 FROM tab1
----
NULL

query I rowsort
SELECT + col2 + + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + - ( ( - col1 ) ) AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7116
SELECT ALL - col1 DIV 41 AS col0 FROM tab0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-7116
SELECT ALL - col1 / 41 AS col0 FROM tab0
----
-2
-2
-2

query I rowsort
SELECT - col2 * 98 FROM tab1
----
-5292
-5586
-9408

query I rowsort
SELECT ALL 6 + + 78 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7119
SELECT tab2.col1 DIV - 46 FROM tab2, tab1 AS cor0
----
9 values hashing to 721682d0719de924079c33bd72eef789

skipif mysql # not compatible
query I rowsort label-7119
SELECT tab2.col1 / - 46 FROM tab2, tab1 AS cor0
----
9 values hashing to 721682d0719de924079c33bd72eef789

query I rowsort
SELECT 57 * - 3 AS col0 FROM tab0 AS cor0
----
-171
-171
-171

query I rowsort
SELECT + 33 * 40 AS col1 FROM tab0 AS cor0
----
1320
1320
1320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7122
SELECT - - CAST( + col0 AS SIGNED ) FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7122
SELECT - - CAST ( + col0 AS INTEGER ) FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT - + ( col1 ) + - col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + col1 * cor0.col2 * + col0 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + col0 * col1 * col0 FROM tab0 cor0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 + 83 FROM tab2 AS cor0
----
161
162
90

query I rowsort
SELECT ALL - col2 * - col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT cor0.col2 * - 22 FROM tab0, tab1 AS cor0
----
9 values hashing to 3d9a9e2c9949022ffe0fcb90d9355113

query I rowsort
SELECT - 58 AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to a38440572743ed8a3d8af7b49a5388c9

query I rowsort
SELECT ALL - cor0.col0 + col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - + col1 * - 29 + col0 AS col0 FROM tab0 AS cor0
----
2518
2728
2848

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * + 47 * 36 col0 FROM tab0 AS cor0
----
150588
40608
59220

query I rowsort
SELECT + cor0.col1 + + cor0.col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT col0 * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - tab0.col2 + col0 FROM tab0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7137
SELECT DISTINCT - col0 - col1 * CAST( - col2 AS SIGNED ) AS col0 FROM tab2
----
1456
567
830

skipif mysql # not compatible
query I rowsort label-7137
SELECT DISTINCT - col0 - col1 * CAST ( - col2 AS INTEGER ) AS col0 FROM tab2
----
1456
567
830

query I rowsort
SELECT ALL 30 FROM tab2
----
30
30
30

query I rowsort
SELECT DISTINCT ( tab2.col0 ) AS col0 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 33 - - col0 AS col1 FROM tab2
----
111
112
40

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 958533d1a7bf61199ed7c03eadf37f9a

query I rowsort
SELECT col0 + - 25 * tab2.col2 AS col0 FROM tab2
----
-572
-668
-871

query I rowsort
SELECT + col1 * + 26 AS col2 FROM tab0 AS cor0
----
2236
2366
2522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7144
SELECT - CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7144
SELECT - CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT tab2.col0 * col1 + + ( + col2 ) * - col0 + col1 AS col1 FROM tab2
----
-1642
2633
59

query I rowsort
SELECT tab0.col1 - - col0 FROM tab0
----
110
132
180

query I rowsort
SELECT col1 * - ( - col2 * + tab0.col0 ) AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT col2 * + col1 + cor0.col0 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-7149
SELECT DISTINCT - + col2 DIV - 68 + + ( col0 ) * - col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-7149
SELECT DISTINCT - + col2 / - 68 + + ( col0 ) * - col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * + ( - cor0.col2 ) + cor0.col1 col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL + - col0 * ( col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col2 + - CAST ( ( col0 ) AS REAL ) AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - col1 * - ( + cor0.col2 ) FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7155
SELECT - col2 * CAST( NULL AS SIGNED ) / - col0 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7155
SELECT - col2 * CAST ( NULL AS INTEGER ) / - col0 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + cor0.col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT 99 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab2
----
57

query I rowsort
SELECT col2 * - 38 FROM tab2 AS cor0
----
-1026
-1444
-988

query I rowsort
SELECT - cor0.col2 * - col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - - ( - col0 ) * + col0 * ( + col1 + cor0.col1 * ( cor0.col1 ) ) AS col1 FROM tab2 AS cor0
----
-1909746
-21537360
-48608

query I rowsort
SELECT ( + cor0.col2 ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT cor0.col0 + col0 * col2 * 7 FROM tab1 cor0
----
1137
25600
53840

query I rowsort
SELECT - col2 + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - 90 + - col1 * - ( col1 ) AS col0 FROM tab2 AS cor0
----
199
3391
871

query I rowsort
SELECT + 44 + col2 AS col0 FROM tab2 AS cor0
----
70
71
82

query I rowsort
SELECT - - cor0.col2 * col0 * + col2 + ( - cor0.col2 ) * - 94 FROM tab2 AS cor0
----
117648
55172
7641

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7168
SELECT + + col0 * + col0 + CAST( + cor0.col2 AS SIGNED ) - col1 * ( + 51 * col0 ) FROM tab2 AS cor0
----
-10991
-228592
-62214

skipif mysql # not compatible
query I rowsort label-7168
SELECT + + col0 * + col0 + CAST ( + cor0.col2 AS INTEGER ) - col1 * ( + 51 * col0 ) FROM tab2 AS cor0
----
-10991
-228592
-62214

onlyif mysql # use DIV operator for integer division
query I rowsort label-7169
SELECT cor0.col0 * - col1 + + CAST( 5 AS SIGNED ) DIV + col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-7169
SELECT cor0.col0 * - col1 + + CAST ( 5 AS INTEGER ) / + col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - - col1 - - col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT + - col2 + - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT 80 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7173
SELECT ALL 91 * + col0 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7173
SELECT ALL 91 * + col0 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * col2 * + ( ( col1 ) * col2 ) + + col2 - + col1 FROM tab2 cor0
----
2353123
417337
700565

query I rowsort
SELECT + + 8 FROM tab2 AS cor0
----
8
8
8

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + col1 + cor0.col2 - + col0 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT ALL - 92 AS col0 FROM tab0 cor0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT + 6 * - col2 AS col0 FROM tab1 AS cor0
----
-324
-342
-576

query I rowsort
SELECT + + 57 + col2 AS col0 FROM tab0 AS cor0
----
139
58
90

query I rowsort
SELECT ALL - col0 * + cor0.col0 + - col0 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT ALL - 75 AS col0 FROM tab0
----
-75
-75
-75

query I rowsort
SELECT - 48 FROM tab1
----
-48
-48
-48

query I rowsort
SELECT + 8 * - col1 FROM tab0 AS cor0
----
-688
-728
-776

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + cor0.col2 * + col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7187
SELECT - 49 + col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7187
SELECT - 49 + col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 18 * + col1 AS col2 FROM tab2 AS cor0
----
-1062
-306
-558

query I rowsort
SELECT ALL - 89 AS col0 FROM tab1 AS cor0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - col2 + - col2 * 72 FROM tab1 cor0
----
-3942
-4161
-7008

query I rowsort
SELECT DISTINCT col2 + + col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL - col0 * cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col1 col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + - col0 * + col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + 34 col0 FROM tab1 AS cor0
----
-20
-23
-62

query I rowsort
SELECT - col0 - col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT ALL + - col2 + - 35 FROM tab1 AS cor0
----
-131
-89
-92

query I rowsort
SELECT + - cor0.col2 * + 77 - ( col0 ) FROM tab0 AS cor0
----
-112
-2565
-6403

query I rowsort
SELECT ALL - col0 * + 9 - 84 FROM tab0 AS cor0
----
-300
-399
-885

onlyif mysql # use DIV operator for integer division
query I rowsort label-7201
SELECT - col1 * CAST( 62 AS SIGNED ) - + col2 DIV - col0 FROM tab2 AS cor0
----
-1054
-1919
-3658

skipif mysql # not compatible
query I rowsort label-7201
SELECT - col1 * CAST ( 62 AS INTEGER ) - + col2 / - col0 FROM tab2 AS cor0
----
-1054
-1919
-3658

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col1 * + col0 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + + col1 * - cor0.col0 + - col2 AS col0 FROM tab1 cor0
----
-1136
-132
-697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - col0 * 47 col2 FROM tab1 cor0
----
167
3018
3773

query I rowsort
SELECT DISTINCT - - col0 * + col1 + + col2 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT tab2.col2 + - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT 50 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7209
SELECT DISTINCT - 32 + - col1 * col0 DIV col0 AS col2 FROM tab0 AS cor0
----
-118
-123
-129

skipif mysql # not compatible
query I rowsort label-7209
SELECT DISTINCT - 32 + - col1 * col0 / col0 AS col2 FROM tab0 AS cor0
----
-118
-123
-129

query I rowsort
SELECT + col1 * cor0.col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + - 69 * col1 FROM tab0 AS cor0
----
-5934
-6279
-6693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + 0 ) col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT - 94 * col0 AS col1 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT ALL - 79 FROM tab1, tab0 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - cor1.col1 * 52 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2acdda4ff160c488593eed301c3ca2f8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7218
SELECT - 66 * 15 DIV col0 + col1 FROM tab2 AS cor0
----
-110
47
5

skipif mysql # not compatible
query I rowsort label-7218
SELECT - 66 * 15 / col0 + col1 FROM tab2 AS cor0
----
-110
47
5

query I rowsort
SELECT DISTINCT + col1 + + 67 FROM tab1 cor0
----
77
80
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7220
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7220
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + ( 42 ) + - col0 * + 24 AS col2 FROM tab2 AS cor0
----
-126
-1830
-1854

query I rowsort
SELECT ALL - 44 AS col0 FROM tab0 cor0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + cor0.col2 + - 43 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1504
-3745
-999

query I rowsort
SELECT DISTINCT col2 * col0 * col1 AS col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - + col1 * + col2 * + cor0.col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT + - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + col1 * - col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - + 79 * col2 AS col2 FROM tab2 AS cor0
----
-2054
-2133
-3002

query I rowsort
SELECT ALL 0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7230
SELECT CAST( + col1 AS SIGNED ) * + col1 + 90 * col0 FROM tab1
----
5860
7369
946

skipif mysql # not compatible
query I rowsort label-7230
SELECT CAST ( + col1 AS INTEGER ) * + col1 + 90 * col0 FROM tab1
----
5860
7369
946

onlyif mysql # use DIV operator for integer division
query I rowsort label-7231
SELECT DISTINCT + col2 DIV - col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7231
SELECT DISTINCT + col2 / - col0 FROM tab0
----
-1
0

query I rowsort
SELECT 73 FROM tab0, tab1, tab2 AS cor0, tab2
----
81 values hashing to 9f0f371d979e70a792c8597c6559f0e2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7233
SELECT - CAST( NULL AS SIGNED ) - - 55 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7233
SELECT - CAST ( NULL AS INTEGER ) - - 55 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * col2 + tab0.col2 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT 24 * ( + col2 + - tab2.col1 ) FROM tab2
----
-792
-96
504

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7236
SELECT + ( + cor0.col0 ) + - col2 * - CAST( col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1612
725
844

skipif mysql # not compatible
query I rowsort label-7236
SELECT + ( + cor0.col0 ) + - col2 * - CAST ( col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + cor0.col1 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT cor2.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT ALL + col1 - - col0 * cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT cor0.col2 * 69 AS col2 FROM tab1 AS cor0
----
3726
3933
6624

query I rowsort
SELECT DISTINCT col0 * + col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + col2 + - 73 col0 FROM tab2 AS cor0
----
-73

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to e660b5944e34dd8d75740286862b3252

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 78 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT + - 87 FROM tab0 AS cor0
----
-87

query I rowsort
SELECT ALL 16 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT ALL col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL 75 FROM tab2
----
75
75
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-7250
SELECT DISTINCT - col0 DIV - 94 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-7250
SELECT DISTINCT - col0 / - 94 AS col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT ( 58 ) + col2 + 91 FROM tab0 AS cor0
----
150
182
231

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 * - 99 col1 FROM tab1 AS cor0
----
-4653
-4653
-4653

query I rowsort
SELECT cor2.col2 FROM tab0, tab0 cor0, tab0 cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 33 * col2 col1 FROM tab0 cor0
----
1089
2706
33

query I rowsort
SELECT + ( - 9 ) FROM tab2 AS cor0
----
-9
-9
-9

query I rowsort
SELECT + ( - cor0.col2 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + col0 * tab0.col2 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL 4 AS col1 FROM tab1
----
4
4
4

query I rowsort
SELECT 99 + + tab2.col2 * - tab2.col2 FROM tab2
----
-1345
-577
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-7261
SELECT + + col2 DIV cor0.col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7261
SELECT + + col2 / cor0.col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - col0 + - col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT ALL 63 * col0 AS col1 FROM tab2 AS cor0
----
441
4914
4977

query I rowsort
SELECT - col0 * + col2 + - ( + 3 ) FROM tab1 AS cor0
----
-165
-3651
-7683

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 - + cor0.col0 * col0 * + col0 col0 FROM tab1 AS cor0
----
-262077
-511891
53

query I rowsort
SELECT ALL + - ( col1 ) * + 4 + - col0 AS col1 FROM tab2 AS cor0
----
-131
-147
-314

query I rowsort
SELECT DISTINCT + - col0 + ( col0 ) * col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - cor0.col2 * - ( + ( col1 ) ) FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL - col0 + 54 * - 41 AS col1 FROM tab1 AS cor0
----
-2217
-2278
-2294

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 DISTINCT col2 * - col2 * - col2 FROM tab1 AS cor0
----
157464
185193
884736

query I rowsort
SELECT ALL + + col1 - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7275
SELECT DISTINCT col2 DIV ( col0 ) + - col1 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-7275
SELECT DISTINCT col2 / ( col0 ) + - col1 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT - col1 * + 37 AS col2 FROM tab2 AS cor0
----
-1147
-2183
-629

query I rowsort
SELECT ALL cor0.col2 * col1 + col0 * - col0 AS col1 FROM tab2 cor0
----
-4550
-5595
788

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 * + col0 col1 FROM tab2
----
651
7254
7347

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * col1 + col2 * col2 col0 FROM tab2 AS cor0
----
2787
5278
946

query I rowsort
SELECT ALL - tab0.col1 AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - col0 * - 37 AS col1 FROM tab1 AS cor0
----
111
2368
2960

query I rowsort
SELECT DISTINCT col2 + 33 FROM tab2
----
59
60
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7283
SELECT + - col0 DIV + ( col2 ) AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7283
SELECT + - col0 / + ( col2 ) AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + 59 FROM tab0, tab2 cor0, tab1 AS cor1
----
59

query I rowsort
SELECT + + col0 * - cor0.col1 * col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL + col2 + 18 AS col1 FROM tab2 AS cor0
----
44
45
56

query I rowsort
SELECT ALL + 97 AS col0 FROM tab0 AS cor0
----
97
97
97

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - col2 * col1 + tab1.col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT col2 * + col2 AS col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT 1 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - cor0.col1 * - 19 AS col2 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT + col2 * + col0 + + col2 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7294
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7294
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 * ( - 58 ) AS col1 FROM tab0
----
-1914
-4756
-58

query I rowsort
SELECT DISTINCT + tab2.col0 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT - - ( col1 ) + - cor0.col0 AS col0 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7298
SELECT cor0.col2 * + col2 DIV col2 + + cor0.col2 FROM tab0 cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-7298
SELECT cor0.col2 * + col2 / col2 + + cor0.col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT col0 + col0 * - col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + + col0 col2 FROM tab1 cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7301
SELECT + col1 + col1 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7301
SELECT + col1 + col1 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 51 FROM tab0, tab1 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT - col2 + col0 * + col0 FROM tab0
----
1224
543
7839

query I rowsort
SELECT DISTINCT col2 + - col0 * col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT + 64 * + tab1.col2 AS col2 FROM tab1
----
3456
3648
6144

query I rowsort
SELECT ALL - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT tab2.col1 * tab2.col0 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT 66 FROM tab1, tab2 cor0, tab0 AS cor1
----
66

query I rowsort
SELECT + 23 + - col1 * + col0 AS col1 FROM tab0
----
-2041
-3372
-8076

query I rowsort
SELECT DISTINCT - - 37 + col1 AS col0 FROM tab0 AS cor0
----
123
128
134

query I rowsort
SELECT + col2 + col2 * col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL + + 96 + + col1 * col2 FROM tab0 AS cor0
----
193
2934
7558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 45 + + cor0.col0 col1 FROM tab0 cor0
----
-10
-21
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-7314
SELECT ALL - col2 DIV + col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7314
SELECT ALL - col2 / + col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT DISTINCT - col0 + - col0 * + ( col2 ) FROM tab2 AS cor0
----
-196
-2106
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 * + col1 + - col2 col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT + + col2 * col1 + - col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + - 93 AS col0 FROM tab1 cor0
----
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - col0 col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab2 AS cor0
----
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 3 * col2 + + 7 col2 FROM tab2 AS cor0
----
121
85
88

query I rowsort
SELECT ALL 69 * - col2 * + 32 FROM tab1 AS cor0
----
-119232
-125856
-211968

query I rowsort
SELECT - col2 * cor0.col1 + 38 AS col0 FROM tab2 AS cor0
----
-1496
-608
-799

query I rowsort
SELECT ALL + 80 + + col2 * col1 FROM tab2 AS cor0
----
1614
726
917

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL cor0.col2 + 43 * 79 * col1 FROM tab0 cor0
----
292175
309209
329510

query I rowsort
SELECT col2 + + cor0.col2 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-7330
SELECT DISTINCT col0 DIV + col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-7330
SELECT DISTINCT col0 / + col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - - col0 + ( + 48 ) + col1 FROM tab0 AS cor0
----
158
180
228

query I rowsort
SELECT DISTINCT col2 + ( col1 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 44 + - col2 AS col2 FROM tab0
----
-38
11
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * tab2.col0 + - tab2.col0 + + col2 * - col0 col0 FROM tab2
----
-385
-4134
-6083

query I rowsort
SELECT DISTINCT - tab1.col2 + col2 FROM tab1
----
0

query I rowsort
SELECT - col1 * col2 + + col0 + col1 AS col2 FROM tab1
----
-1155
-1375
-496

query I rowsort
SELECT col1 + col0 AS col1 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7338
SELECT col2 * col2 * + col1 + col2 * col1 DIV 5 - ( col2 ) FROM tab0
----
115
613294
94188

skipif mysql # not compatible
query I rowsort label-7338
SELECT col2 * col2 * + col1 + col2 * col1 / 5 - ( col2 ) FROM tab0
----
115
613294
94188

query I rowsort
SELECT DISTINCT 90 - + col0 * + col1 FROM tab0
----
-1974
-3305
-8009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 * col2 * + col2 col0 FROM tab2
----
-114038
-5076
-52702

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL tab2.col2 - tab2.col2 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col0 - + col1 AS col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL + col0 * col1 + col2 FROM tab1
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab1 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col2 + + tab2.col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL - col2 * col2 AS col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col0 * - col1 - + col1 AS col2 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT col1 - - col0 AS col0 FROM tab0 WHERE NOT NULL IN ( col2 / - tab0.col2 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col1 >= NULL
----

query I rowsort
SELECT col0 + - col2 * tab2.col2 * + tab2.col1 + - col0 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - col1 + + col0 * tab1.col2 FROM tab1
----
136
3638
7667

query I rowsort
SELECT col1 AS col1 FROM tab1 WHERE NOT NULL NOT BETWEEN - col1 * - col1 - col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7354
SELECT ALL col2 DIV tab2.col1 + col2 AS col2 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-7354
SELECT ALL col2 / tab2.col1 + col2 AS col2 FROM tab2
----
26
27
40

query I rowsort
SELECT DISTINCT col2 - + tab1.col1 FROM tab1
----
28
47
83

query I rowsort
SELECT + tab2.col2 * col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL - col2 * + tab0.col2 + col2 * col0 FROM tab0
----
-297
34
574

query I rowsort
SELECT - tab2.col1 + - col2 - col2 AS col2 FROM tab2
----
-111
-85
-93

query I rowsort
SELECT - col2 * col0 AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + col1 * col0 * + col1 + - col0 AS col1 FROM tab2
----
22752
271440
6720

query I rowsort
SELECT col1 + col1 AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT col2 + - col1 AS col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL col0 * col2 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7364
SELECT - 53 DIV 82 + + col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7364
SELECT - 53 / 82 + + col2 FROM tab2
----
26
27
38

query I rowsort
SELECT + 90 * col1 * col1 FROM tab0
----
665640
745290
846810

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab0 AS cor0, tab0 AS cor1
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab0, tab1, tab1 cor0, tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7368
SELECT ALL + ( tab0.col0 ) DIV 57 FROM tab0, tab1 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-7368
SELECT ALL + ( tab0.col0 ) / 57 FROM tab0, tab1 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

query I rowsort
SELECT ALL - - cor0.col1 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - + 75 + 8 AS col1 FROM tab0 AS cor0
----
-67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7371
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7371
SELECT ALL CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 1 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT - 20 FROM tab1
----
-20

query I rowsort
SELECT - 92 FROM tab2, tab1 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT 10 + - tab0.col0 * + col2 AS col0 FROM tab0
----
-25
-7288
-782

skipif mysql # not compatible
query I rowsort
SELECT - tab2.col1 + col2 * col0 * - CAST ( 64 AS REAL ) AS col2 FROM tab2
----
-12127
-129851
-192145

query I rowsort
SELECT ALL ( col2 ) * col1 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 * - col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL - ( cor0.col1 ) * col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + + cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + - 19 FROM tab2 AS cor0
----
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT 84 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
84

query I rowsort
SELECT ALL + 28 + cor0.col0 * col1 + cor0.col2 * col1 * 98 FROM tab1 AS cor0
----
123372
137698
56528

query I rowsort
SELECT - + 4 + - col2 * - 77 FROM tab1 AS cor0
----
4154
4385
7388

query I rowsort
SELECT ALL - cor0.col1 + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - - col1 * - col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + col2 + col0 AS col1 FROM tab1 cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7390
SELECT - col1 + + col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7390
SELECT - col1 + + col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 3 AS col2 FROM tab2 AS cor0
----
3

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) * + col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - cor0.col2 + - col2 * col1 FROM tab0 cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL 29 + + col0 FROM tab1 AS cor0
----
109
32
93

query I rowsort
SELECT + + 21 * - cor0.col0 * + 42 FROM tab0 AS cor0
----
-21168
-30870
-78498

query I rowsort
SELECT ALL - 48 + - col2 AS col1 FROM tab0 AS cor0
----
-130
-49
-81

query I rowsort
SELECT + 30 FROM tab0 cor0
----
30
30
30

query I rowsort
SELECT col0 * 14 FROM tab0
----
1246
336
490

query I rowsort
SELECT - col2 * 50 AS col0 FROM tab2
----
-1300
-1350
-1900

onlyif mysql # use DIV operator for integer division
query I rowsort label-7400
SELECT DISTINCT col2 DIV 46 + - tab2.col0 * + col2 AS col2 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-7400
SELECT DISTINCT col2 / 46 + - tab2.col0 * + col2 AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col0 * col1 + tab0.col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT col0 * 93 + col0 - col0 FROM tab1
----
279
5952
7440

query I rowsort
SELECT ALL - col0 - + 84 FROM tab2 AS cor0
----
-162
-163
-91

query I rowsort
SELECT DISTINCT - col1 * col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL cor0.col0 + - col0 + + 14 FROM tab2 AS cor0
----
14
14
14

query I rowsort
SELECT DISTINCT + col1 * + col1 - col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT ALL + - col2 AS col1 FROM tab0 cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 62 col1 FROM tab2 AS cor0
----
121
79
93

query I rowsort
SELECT ALL col2 * col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7410
SELECT DISTINCT col2 * - CAST( - col0 AS SIGNED ) + - col2 + 9 DIV + col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

skipif mysql # not compatible
query I rowsort label-7410
SELECT DISTINCT col2 * - CAST ( - col0 AS INTEGER ) + - col2 + 9 / + col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL - col1 - col0 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7412
SELECT + + col0 * - col2 + 40 DIV + col1 FROM tab0 cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-7412
SELECT + + col0 * - col2 + 40 / + col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-7414
SELECT ALL + col1 - col0 * + col0 DIV - col0 AS col2 FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-7414
SELECT ALL + col1 - col0 * + col0 / - col0 AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - - cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 48 FROM tab0 cor0
----
48
48
48

query I rowsort
SELECT ALL - + cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT ALL - 41 * ( col1 ) + - col2 AS col0 FROM tab2 AS cor0
----
-1298
-2445
-735

query I rowsort
SELECT 15 + - col0 FROM tab0 AS cor0
----
-20
-74
-9

query I rowsort
SELECT ALL - 86 FROM tab0 AS cor0
----
-86
-86
-86

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT DISTINCT + 63 + ( + col1 ) - col0 * - 75 FROM tab0 AS cor0
----
1949
2785
6829

query I rowsort
SELECT ALL + 90 FROM tab0 AS cor0
----
90
90
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7424
SELECT - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-7424
SELECT - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab0 cor1, tab2 AS cor2
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT 73 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT ALL col0 * col1 + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ( col2 ) + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - ( + 11 ) * - col0 FROM tab0 AS cor0
----
264
385
979

query I rowsort
SELECT - ( - 23 ) * - col1 FROM tab0 AS cor0
----
-1978
-2093
-2231

query I rowsort
SELECT DISTINCT + 96 FROM tab1 AS cor0
----
96

query I rowsort
SELECT - col0 * + cor0.col1 * - col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT - col0 * col2 * - col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab1, tab2 AS cor0
----
37

query I rowsort
SELECT DISTINCT - tab0.col1 * tab0.col1 FROM tab0, tab1, tab1 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + ( col0 ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col2 * col0 * - col2 FROM tab2 AS cor0
----
114076
5103
52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 * - col1 * - col2 col2 FROM tab2
----
39406
51057
93574

query I rowsort
SELECT col2 * cor0.col1 * cor0.col2 AS col0 FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT ALL - - ( cor0.col2 ) * - col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7441
SELECT - + col1 * cor0.col1 DIV col0 FROM tab2 AS cor0
----
-137
-3
-44

skipif mysql # not compatible
query I rowsort label-7441
SELECT - + col1 * cor0.col1 / col0 FROM tab2 AS cor0
----
-137
-3
-44

query I rowsort
SELECT + - col2 * cor0.col0 + - cor0.col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT tab0.col1 + - tab0.col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - col0 * + ( col2 ) AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col1 + + tab2.col0 * + col2 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT + col2 * col1 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT ( 69 * col1 ) FROM tab1
----
1794
690
897

query I rowsort
SELECT col0 * 40 AS col0 FROM tab2
----
280
3120
3160

query I rowsort
SELECT DISTINCT - ( 55 ) AS col0 FROM tab0
----
-55

query I rowsort
SELECT ALL col0 * 50 FROM tab1
----
150
3200
4000

query I rowsort
SELECT ALL ( - col2 + + tab2.col1 ) * - col0 FROM tab2
----
-2574
-28
1659

query I rowsort
SELECT + ( - 34 ) AS col1 FROM tab0
----
-34
-34
-34

query I rowsort
SELECT + - ( + col0 ) + + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT ( + col0 ) + + col1 AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ( - col0 ) + col2 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col2 col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT col1 * col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - col1 * + col2 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7460
SELECT + col1 * col0 + + col2 DIV col0 FROM tab2 AS cor0
----
1343
220
4602

skipif mysql # not compatible
query I rowsort label-7460
SELECT + col1 * col0 + + col2 / col0 FROM tab2 AS cor0
----
1343
220
4602

query I rowsort
SELECT ALL - col1 - - col1 * col2 FROM tab0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + col0 col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT + col1 * col0 + col1 AS col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - tab1.col1 * col0 + col1 * col0 + - col1 AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL - col1 * tab2.col0 FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT tab0.col2 + + tab0.col2 - + col1 FROM tab0 WHERE NOT NULL NOT IN ( col1 * col2 * tab0.col1 )
----

query I rowsort
SELECT DISTINCT col0 * + col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL - col0 * tab1.col0 * + tab1.col2 FROM tab1 WHERE NULL IN ( col2 )
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL + tab2.col0 AS col2 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + col2 * col2 AS col0 FROM tab2
----
1444
676
729

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab1 AS cor0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT - col1 * + col1 AS col0 FROM tab2 cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * cor0.col2 - col0 col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - col0 * cor0.col2 + col0 FROM tab0 cor0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + + col0 * - col2 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + cor0.col1 * col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col1 * col1 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL - col1 * + col1 AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT ALL col1 * + col2 AS col1 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7484
SELECT ALL col1 DIV col2 + col1 * - cor0.col0 FROM tab0 AS cor0
----
-2062
-3298
-8098

skipif mysql # not compatible
query I rowsort label-7484
SELECT ALL col1 / col2 + col1 * - cor0.col0 FROM tab0 AS cor0
----
-2062
-3298
-8098

query I rowsort
SELECT cor0.col1 * col0 + + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + tab2.col1 + + col1 * col1 AS col2 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT - col2 + tab1.col1 AS col2 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col0 * col0 * tab0.col0 col0 FROM tab0 WHERE NOT NULL NOT IN ( col2 + col0 ) AND ( col1 + col0 ) NOT IN ( - col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col1 col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT ALL + col1 * + col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab1, tab0 AS cor0
----
59

query I rowsort
SELECT ALL + col1 * - col0 * cor0.col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-7493
SELECT DISTINCT + - col1 DIV + ( col0 ) FROM tab1 cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-7493
SELECT DISTINCT + - col1 / + ( col0 ) FROM tab1 cor0
----
-8
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 84 col0 FROM tab2 AS cor0
----
1428
2604
4956

query I rowsort
SELECT ALL - + cor0.col2 + ( + col0 ) * cor0.col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT - - col1 + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT col1 * + col1 AS col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + + col0 * col2 * col1 + - col0 + + col2 AS col1 FROM tab0 AS cor0
----
3361
664111
68121

query I rowsort
SELECT ALL + col2 + 12 + col0 FROM tab1 AS cor0
----
133
188
69

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab1 AS cor0
----
-90

query I rowsort
SELECT - 45 FROM tab2 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - col1 + col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - 48 - + col0 * - col0 AS col1 FROM tab2 AS cor0
----
1
6036
6193

query I rowsort
SELECT - 25 FROM tab2 AS cor0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT + - col2 + - ( + col2 ) FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL + col2 * ( col0 + col0 ) AS col1 FROM tab2
----
378
4056
6004

query I rowsort
SELECT DISTINCT 74 + + 90 AS col0 FROM tab0, tab0 AS cor0
----
164

query I rowsort
SELECT ALL - + cor0.col1 + + col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + - 93 AS col1 FROM tab1 cor0
----
-93
-93
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7510
SELECT DISTINCT + col2 * col0 - col0 DIV col0 FROM tab2 AS cor0
----
188
2027
3001

skipif mysql # not compatible
query I rowsort label-7510
SELECT DISTINCT + col2 * col0 - col0 / col0 FROM tab2 AS cor0
----
188
2027
3001

query I rowsort
SELECT ALL + col0 * + col0 + col2 * col2 AS col2 FROM tab0 AS cor0
----
1226
14645
1665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col0 * + col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + - 88 * + col0 AS col1 FROM tab1 AS cor0
----
-264
-5632
-7040

query I rowsort
SELECT ALL 1 + col2 FROM tab1 AS cor0
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7516
SELECT + + col0 DIV - col1 col2 FROM tab2 cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7516
SELECT + + col0 / - col1 col2 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT + + 23 + + col1 * col0 + + cor0.col1 FROM tab1 AS cor0
----
1076
127
673

onlyif mysql # use DIV operator for integer division
query I rowsort label-7518
SELECT - - col1 DIV + col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7518
SELECT - - col1 / + col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT 29 * + col2 + + 95 FROM tab1 AS cor0
----
1661
1748
2879

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab2, tab1, tab2 AS cor0
----
26

query I rowsort
SELECT - col1 * col1 * tab1.col2 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT - + col1 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col0 + - 35 * + col0 col1 FROM tab0 AS cor0
----
-1225
-3115
-840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7525
SELECT ALL 71 + col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7525
SELECT ALL 71 + col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 25 * - col2 FROM tab0 AS cor0
----
2050
25
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col0 * 98 * col2 col0 FROM tab1 AS cor0
----
-15873
-357440
-752560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 * - col1 col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 * col0 + col1 AS col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT - cor1.col0 * 26 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0330bf7252f6501c8562d1aa097ebbbb

query I rowsort
SELECT ALL - col1 * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col1 + + cor0.col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7533
SELECT DISTINCT + col1 + + col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-7533
SELECT DISTINCT + col1 + + col0 / + col0 AS col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT cor0.col2 * - col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT col0 * ( + 18 ) * + col0 FROM tab0 cor0
----
10368
142578
22050

query I rowsort
SELECT DISTINCT col1 + + col2 * + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - - col2 * ( cor0.col1 ) + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL 44 + - col1 * col2 * col0 AS col1 FROM tab2
----
-119608
-50990
-5815

query I rowsort
SELECT ALL + 34 AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT 69 * tab1.col0 * 88 + - 26 FROM tab1
----
18190
388582
485734

query I rowsort
SELECT DISTINCT tab2.col2 * col1 * col2 AS col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT + 43 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT + col2 * - 60 AS col2 FROM tab2
----
-1560
-1620
-2280

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - 43 AS REAL ) FROM tab2 AS cor0 CROSS JOIN tab0, tab2 cor1
----
27 values hashing to 2f72bd9cab68c8d8c38874510a290a3c

query I rowsort
SELECT - tab1.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT 18 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7547
SELECT - col2 * + col1 * 80 + + col0 / CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7547
SELECT - col2 * + col1 * 80 + + col0 / CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 * 17 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT - col0 * - 47 + - 70 AS col1 FROM tab0 cor0
----
1058
1575
4113

query I rowsort
SELECT DISTINCT + + cor0.col1 * - col1 + 19 FROM tab0 AS cor0
----
-7377
-8262
-9390

onlyif mysql # use DIV operator for integer division
query I rowsort label-7551
SELECT col0 + col1 DIV 80 AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7551
SELECT col0 + col1 / 80 AS col0 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 - + col1 col2 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + ( col0 * col2 ) - + col1 AS col2 FROM tab1
----
136
3638
7667

query I rowsort
SELECT ALL - - col1 * col1 + + col2 * col0 + col0 FROM tab1 AS cor0
----
3812
7929
841

onlyif mysql # use DIV operator for integer division
query I rowsort label-7556
SELECT ALL + col2 - col1 DIV - col0 AS col2 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-7556
SELECT ALL + col2 - col1 / - col0 AS col2 FROM tab0 AS cor0
----
3
36
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7557
SELECT ALL - ( col0 ) + + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7557
SELECT ALL - ( col0 ) + + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + col0 - + cor0.col2 AS col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-7559
SELECT ALL 43 * - cor0.col1 DIV + col1 FROM tab0 AS cor0
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-7559
SELECT ALL 43 * - cor0.col1 / + col1 FROM tab0 AS cor0
----
-43
-43
-43

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2, tab0 cor2
----
3645 values hashing to e6082e644debd74dcf1042b918d79199

query I rowsort
SELECT ALL + - 9 * cor0.col2 FROM tab1 cor0
----
-486
-513
-864

query I rowsort
SELECT - col1 - + col0 * col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT 18 + cor0.col0 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 5388ded377c4ce557010c6648d956ee8

query I rowsort
SELECT ALL - col0 + + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - col1 * + col0 - - col2 * col1 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT DISTINCT + col0 + cor0.col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7567
SELECT DISTINCT col2 DIV + col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7567
SELECT DISTINCT col2 / + col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col0 + col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - + ( 89 ) * - col2 + 0 FROM tab2 AS cor0
----
2314
2403
3382

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7570
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * - cor0.col1 + ( col1 ) - col2 AS col1 FROM tab2 AS cor0
----
-1501
-667
-833

skipif mysql # not compatible
query I rowsort label-7570
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * - cor0.col1 + ( col1 ) - col2 AS col1 FROM tab2 AS cor0
----
-1501
-667
-833

query I rowsort
SELECT ALL - tab1.col2 * 73 * + tab1.col0 FROM tab1
----
-11826
-266304
-560640

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab2, tab1 AS cor1
----
3645 values hashing to ae08f1949fd59e00b049f28175217e60

query I rowsort
SELECT ALL + cor0.col1 + - col1 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - - 53 FROM tab1 AS cor0
----
53
53
53

query I rowsort
SELECT + 60 * col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
1614
657
876

query I rowsort
SELECT - ( col1 ) + + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7577
SELECT ( + cor0.col2 ) DIV - cor0.col0 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-7577
SELECT ( + cor0.col2 ) / - cor0.col0 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-87
-91
-97

query I rowsort
SELECT + col0 * - col2 * - col0 + 7 AS col1 FROM tab2 AS cor0
----
1330
158191
237165

query I rowsort
SELECT + col2 + + ( col2 ) FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - ( col0 ) * - col2 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
24
35
89

query I rowsort
SELECT ALL 8 FROM tab2
----
8
8
8

query I rowsort
SELECT 29 * - col0 FROM tab2
----
-203
-2262
-2291

query I rowsort
SELECT col2 * - 20 AS col1 FROM tab0 cor0
----
-1640
-20
-660

query I rowsort
SELECT - col2 * - 20 * col0 - col2 AS col1 FROM tab2 AS cor0
----
3753
40534
60002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7586
SELECT DISTINCT + col1 + - ( + col2 ) DIV + col2 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-7586
SELECT DISTINCT + col1 + - ( + col2 ) / + col2 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT DISTINCT cor0.col2 + 22 AS col0 FROM tab1 AS cor0
----
118
76
79

query I rowsort
SELECT col1 + 1 FROM tab0 AS cor0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) * 90 * 68 + - col1 * col0 col1 FROM tab1
----
18282
391040
488560

query I rowsort
SELECT col1 * col1 * + ( col0 ) FROM tab1
----
13520
2028
6400

query I rowsort
SELECT DISTINCT col0 + - 1 * - col2 + + tab1.col0 * + col1 AS col0 FROM tab1
----
1216
135
761

query I rowsort
SELECT ALL col0 * - col0 * - col1 + + col1 * 20 AS col0 FROM tab1
----
41160
754
83460

onlyif mysql # use DIV operator for integer division
query I rowsort label-7593
SELECT col0 DIV col0 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7593
SELECT col0 / col0 AS col2 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col0 * col1 col1 FROM tab1
----
-1120
-704
-81

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

query I rowsort
SELECT DISTINCT col2 + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL + cor0.col0 * col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7598
SELECT col2 * + col0 + col2 * col2 + col0 DIV col1 FROM tab0 cor0
----
14022
1881
36

skipif mysql # not compatible
query I rowsort label-7598
SELECT col2 * + col0 + col2 * col2 + col0 / col1 FROM tab0 cor0
----
14022
1881
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-7599
SELECT ALL - - col0 DIV + ( col0 ) FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7599
SELECT ALL - - col0 / + ( col0 ) FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL 3 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to f94a4a64ac54a61fc21f78e2b831ebee

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT + col2 - 50 AS col2 FROM tab0
----
-17
-49
32

query I rowsort
SELECT DISTINCT ( col0 ) + - col0 - col0 AS col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col2 - - col2 AS col0 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL - tab0.col2 - col1 * col0 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT col0 + col0 - + col2 AS col2 FROM tab0
----
15
69
96

query I rowsort
SELECT + col1 + col0 + - col2 * + 46 AS col0 FROM tab0 AS cor0
----
-1408
-3592
86

query I rowsort
SELECT col0 * + col2 + - col1 - 75 AS col1 FROM tab1 AS cor0
----
3563
61
7592

query I rowsort
SELECT 32 FROM tab2
----
32
32
32

query I rowsort
SELECT tab0.col0 * - ( 6 ) AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 253baa43b37f808e9232f2ca803533de

query I rowsort
SELECT + ( + col1 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT 0 + col1 * + col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT 70 AS col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT + col2 * - col2 AS col0 FROM tab2 cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7616
SELECT cor0.col1 * - cor0.col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7616
SELECT cor0.col1 * - cor0.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( + col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT ALL - 22 - - col0 FROM tab0 AS cor0
----
13
2
67

query I rowsort
SELECT + - col2 * - col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-7620
SELECT + col1 DIV ( col2 ) AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7620
SELECT + col1 / ( col2 ) AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7621
SELECT + col2 * CAST( col0 AS SIGNED ) FROM tab0 cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-7621
SELECT + col2 * CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7622
SELECT + col1 DIV - 25 FROM tab0 AS cor0
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-7622
SELECT + col1 / - 25 FROM tab0 AS cor0
----
-3
-3
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + col1 col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT + - 44 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT ALL - col2 * + col0 + + tab1.col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT - col0 + col2 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - + col0 + + col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + 57 * - col2 AS col1 FROM tab1 AS cor0
----
-3078
-3249
-5472

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7629
SELECT CAST( NULL AS SIGNED ) * 68 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7629
SELECT CAST ( NULL AS INTEGER ) * 68 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + col0 + - col1 * tab2.col1 FROM tab2
----
-193
-3344
-923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7631
SELECT DISTINCT - CAST( NULL AS SIGNED ) + tab1.col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7631
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + tab1.col1 FROM tab1
----
NULL

query I rowsort
SELECT + 50 + - ( + col0 ) * - tab2.col0 AS col0 FROM tab2
----
6134
6291
99

query I rowsort
SELECT DISTINCT col1 + tab0.col0 + - col1 AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT + 48 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT ALL - 42 FROM tab2 AS cor0
----
-42
-42
-42

query I rowsort
SELECT + 72 AS col1 FROM tab2
----
72
72
72

query I rowsort
SELECT DISTINCT - col2 * + col1 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - ( col1 ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - 32 AS col2 FROM tab1 AS cor0
----
-32

query I rowsort
SELECT ALL - - 45 * + col2 FROM tab2 AS cor0
----
1170
1215
1710

query I rowsort
SELECT DISTINCT 90 * col0 AS col2 FROM tab1 AS cor0
----
270
5760
7200

query I rowsort
SELECT - - 82 * + col1 FROM tab2 cor0
----
1394
2542
4838

query I rowsort
SELECT ALL - + col2 + col0 AS col1 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT 53 FROM tab2 cor0
----
53
53
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-7646
SELECT - tab2.col1 DIV 77 + 98 AS col1 FROM tab2
----
98
98
98

skipif mysql # not compatible
query I rowsort label-7646
SELECT - tab2.col1 / 77 + 98 AS col1 FROM tab2
----
98
98
98

query I rowsort
SELECT - 74 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT col2 * - 44 + + col1 * - col2 * - 23 + col1 AS col0 FROM tab0
----
168109
2284
63908

query I rowsort
SELECT + col1 + + col0 + tab2.col0 * - tab2.col0 FROM tab2
----
-11
-5947
-6145

query I rowsort
SELECT - col1 - + col2 AS col0 FROM tab2
----
-55
-58
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7651
SELECT + col0 + + CAST( - col1 AS SIGNED ) - col1 * + col0 FROM tab0
----
-2126
-3457
-8101

skipif mysql # not compatible
query I rowsort label-7651
SELECT + col0 + + CAST ( - col1 AS INTEGER ) - col1 * + col0 FROM tab0
----
-2126
-3457
-8101

onlyif mysql # use DIV operator for integer division
query I rowsort label-7652
SELECT col2 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7652
SELECT col2 / col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7653
SELECT - - col2 - 21 DIV 83 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7653
SELECT - - col2 - 21 / 83 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - cor0.col1 * + ( + ( - col1 ) ) - 65 * - col0 AS col2 FROM tab1 AS cor0
----
4260
5369
871

query I rowsort
SELECT - - col0 * + col0 + ( col1 ) FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT col2 + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col2 + 29 * + col1 FROM tab2
----
1685
455
872

query I rowsort
SELECT ALL 41 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7659
SELECT - + CAST( NULL AS SIGNED ) * + col0 - - col0 * - 89 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7659
SELECT - + CAST ( NULL AS INTEGER ) * + col0 - - col0 * - 89 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + 9 AS col2 FROM tab2 AS cor0
----
-17
-18
-29

query I rowsort
SELECT ALL + col0 * col1 + + col2 * + 81 FROM tab1 AS cor0
----
4452
5257
8816

query I rowsort
SELECT ALL + - col0 + - col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT + col2 + + 20 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT DISTINCT + - 87 FROM tab1 AS cor0
----
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-7665
SELECT 86 DIV + 5 + col1 FROM tab0 AS cor0
----
103
108
114

skipif mysql # not compatible
query I rowsort label-7665
SELECT 86 / + 5 + col1 FROM tab0 AS cor0
----
103
108
114

query I rowsort
SELECT DISTINCT + - col0 * col2 + - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col2 col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 - col2 * - col0 col0 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-7669
SELECT col0 DIV col0 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7669
SELECT col0 / col0 AS col2 FROM tab0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7670
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 70 AS col1 FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7670
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 70 AS col1 FROM tab2, tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + 59 col0 FROM tab0 AS cor0
----
-1947
-4838
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7672
SELECT + ( 17 ) DIV + cor0.col1 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7672
SELECT + ( 17 ) / + cor0.col1 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT ALL - col1 + + col2 * cor0.col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT DISTINCT + 7 * + 36 AS col1 FROM tab1 AS cor0
----
252

query I rowsort
SELECT ALL + + 18 FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT DISTINCT + 10 + col2 FROM tab2 AS cor0
----
36
37
48

query I rowsort
SELECT DISTINCT 70 FROM tab0 AS cor0
----
70

query I rowsort
SELECT - 5 * - col2 + - col1 AS col2 FROM tab2 AS cor0
----
104
173
71

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab1 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 5acb69cde71208fe580e10b8b669428e

query I rowsort
SELECT DISTINCT ( - col0 ) + col2 * ( col2 ) FROM tab0 AS cor0
----
-34
1065
6635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7681
SELECT ALL CAST( + 18 AS SIGNED ) + tab2.col2 AS col1 FROM tab2
----
44
45
56

skipif mysql # not compatible
query I rowsort label-7681
SELECT ALL CAST ( + 18 AS INTEGER ) + tab2.col2 AS col1 FROM tab2
----
44
45
56

query I rowsort
SELECT + 23 FROM tab2
----
23
23
23

query I rowsort
SELECT + 30 - - col0 AS col1 FROM tab2 AS cor0
----
108
109
37