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 DISTINCT - + col0 * 72 FROM tab1 AS cor0
----
-216
-4608
-5760

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

skipif mysql # not compatible
query I rowsort label-1
SELECT + col0 + CAST ( 98 AS INTEGER ) * col1 FROM tab2 AS cor0
----
1745
3045
5860

query I rowsort
SELECT DISTINCT - col1 * 63 FROM tab2 AS cor0
----
-1071
-1953
-3717

query I rowsort
SELECT ALL - cor0.col2 * 6 + cor0.col1 AS col2 FROM tab1 cor0
----
-298
-332
-563

query I rowsort
SELECT DISTINCT - col2 - + 18 AS col2 FROM tab1 AS cor0
----
-114
-72
-75

query I rowsort
SELECT - 27 - - col1 AS col0 FROM tab1
----
-1
-14
-17

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

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

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

query I rowsort
SELECT ALL - col0 - 69 AS col2 FROM tab1 AS cor0
----
-133
-149
-72

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

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

query I rowsort
SELECT 67 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

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

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 2c9bc625661696fa1cf187c4d0f703a1

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-15
SELECT col2 + + CAST( + col2 AS SIGNED ) AS col1 FROM tab0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-15
SELECT col2 + + CAST ( + col2 AS INTEGER ) AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT 26 * col2 + - ( + col1 ) + col1 AS col1 FROM tab1 AS cor0
----
1404
1482
2496

onlyif mysql # use DIV operator for integer division
query I rowsort label-17
SELECT + 81 + col2 DIV 38 FROM tab1 AS cor0
----
82
82
83

skipif mysql # not compatible
query I rowsort label-17
SELECT + 81 + col2 / 38 FROM tab1 AS cor0
----
82
82
83

query I rowsort
SELECT 86 * - cor0.col0 - + col1 AS col2 FROM tab0 AS cor0
----
-2150
-3107
-7745

query I rowsort
SELECT + col1 * ( + ( col1 ) ) + col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT 40 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

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

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

query I rowsort
SELECT cor0.col0 * + ( col0 ) + + col1 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-427
1288
1321

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

query I rowsort
SELECT col0 + col1 * cor0.col2 + - col2 FROM tab1 AS cor0
----
1232
1353
577

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-29
SELECT 26 DIV cor0.col0 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-29
SELECT 26 / cor0.col0 FROM tab2 cor0
----
0
0
3

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

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

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

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

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

query I rowsort
SELECT col1 * + 43 AS col2 FROM tab2 AS cor0
----
1333
2537
731

query I rowsort
SELECT col1 + - 12 AS col0 FROM tab0
----
74
79
85

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

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

query I rowsort
SELECT DISTINCT 87 + col0 * col2 AS col0 FROM tab2 AS cor0
----
2115
276
3089

query I rowsort
SELECT DISTINCT + 76 * + tab0.col1 FROM tab0, tab0 AS cor0
----
6536
6916
7372

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-41
SELECT ALL + col1 - cor0.col2 DIV - 61 AS col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-41
SELECT ALL + col1 - cor0.col2 / - 61 AS col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-42
SELECT ALL + cor0.col2 * - col0 + CAST( col2 AS SIGNED ) * col1 FROM tab0 AS cor0
----
164
2046
62

skipif mysql # not compatible
query I rowsort label-42
SELECT ALL + cor0.col2 * - col0 + CAST ( col2 AS INTEGER ) * col1 FROM tab0 AS cor0
----
164
2046
62

query I rowsort
SELECT + 57 FROM tab2 cor0
----
57
57
57

query I rowsort
SELECT DISTINCT + col0 + col2 * + col2 AS col2 FROM tab2 AS cor0
----
1523
736
754

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-46
SELECT ALL - - col2 DIV - col0 FROM tab2 cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-46
SELECT ALL - - col2 / - col0 FROM tab2 cor0
----
-3
0
0

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

query I rowsort
SELECT DISTINCT 60 * - cor0.col0 FROM tab2 AS cor0
----
-420
-4680
-4740

query I rowsort
SELECT DISTINCT + ( col2 ) * - 92 + - col0 AS col1 FROM tab2 AS cor0
----
-2470
-2491
-3575

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

query I rowsort
SELECT DISTINCT - ( 47 ) FROM tab1
----
-47

query I rowsort
SELECT ALL - 73 * col2 FROM tab2
----
-1898
-1971
-2774

query I rowsort
SELECT ALL + 15 FROM tab0
----
15
15
15

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) - col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - 36 + - 68 AS col2 FROM tab2
----
-104
-104
-104

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

query I rowsort
SELECT ALL 27 AS col0 FROM tab1
----
27
27
27

query I rowsort
SELECT ( - 94 ) AS col0 FROM tab0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT - 41 - - col1 FROM tab1
----
-15
-28
-31

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-63
SELECT ALL - + CAST( NULL AS SIGNED ) * - 59 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-63
SELECT ALL - + CAST ( NULL AS INTEGER ) * - 59 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 cor1
----
243 values hashing to d489341cd587fd6eb0b972c5464c6ddc

query I rowsort
SELECT col1 * - 51 * - col0 FROM tab2
----
11067
234702
68493

query I rowsort
SELECT 39 FROM tab0, tab0 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT DISTINCT col0 * col0 * 83 + col1 + 73 AS col0 FROM tab0
----
101845
47967
657607

query I rowsort
SELECT + col0 * + 81 AS col1 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT 98 * cor0.col1 FROM tab2 cor0
----
1666
3038
5782

onlyif mysql # use DIV operator for integer division
query I rowsort label-70
SELECT ALL - 11 * cor0.col1 DIV col0 FROM tab1 AS cor0
----
-1
-1
-95

skipif mysql # not compatible
query I rowsort label-70
SELECT ALL - 11 * cor0.col1 / col0 FROM tab1 AS cor0
----
-1
-1
-95

query I rowsort
SELECT DISTINCT + 16 AS col1 FROM tab0 cor0
----
16

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

query I rowsort
SELECT + 55 * 6 AS col2 FROM tab0 AS cor0
----
330
330
330

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

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

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

skipif mysql # not compatible
query I rowsort label-76
SELECT - col1 / ( - col1 ) FROM tab1 AS cor0
----
1
1
1

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

query I rowsort
SELECT ALL + - col2 * ( - 49 ) + - col1 AS col2 FROM tab1 AS cor0
----
2620
2783
4691

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 * - 16 + - col2 + col1 * ( + 80 ) FROM tab0 cor0
----
7375
7775
8510

query I rowsort
SELECT ALL col0 + 14 FROM tab1 AS cor0
----
17
78
94

query I rowsort
SELECT DISTINCT + - col1 * + 16 FROM tab1 AS cor0
----
-160
-208
-416

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

query I rowsort
SELECT - + col2 * ( 28 ) FROM tab1 AS cor0
----
-1512
-1596
-2688

onlyif mysql # use DIV operator for integer division
query I rowsort label-88
SELECT - - col0 + 89 DIV col2 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-88
SELECT - - col0 + 89 / col2 FROM tab1 AS cor0
----
4
65
80

query I rowsort
SELECT DISTINCT col1 + 24 * 60 * - col0 + col0 AS col1 FROM tab2 AS cor0
----
-10042
-112183
-113664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 68 col1 FROM tab0 AS cor0
----
-1632
-2380
-6052

query I rowsort
SELECT ALL + + col1 + ( 20 ) AS col2 FROM tab0 cor0
----
106
111
117

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

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

query IIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 WHERE NOT NULL <= ( NULL )
----

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

skipif mysql # not compatible
query I rowsort label-95
SELECT + CAST ( + col0 AS INTEGER ) * col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT col0 + 99 * tab1.col0 * col0 AS col2 FROM tab1
----
405568
633680
894

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

query I rowsort
SELECT - - 18 + col1 AS col0 FROM tab1 AS cor0
----
28
31
44

query I rowsort
SELECT ( 55 ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

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

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

query I rowsort
SELECT DISTINCT - + col1 * col0 * ( col1 * col1 ) FROM tab0 cor0
----
-15265344
-31943555
-67067819

query I rowsort
SELECT DISTINCT - + 66 + col2 AS col2 FROM tab0 cor0
----
-33
-65
16

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

query I rowsort
SELECT ALL - 54 + - col2 * - ( col2 ) FROM tab0 AS cor0
----
-53
1035
6670

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-106
SELECT + col0 + + col2 DIV - col0 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-106
SELECT + col0 + + col2 / - col0 FROM tab2 AS cor0
----
4
78
79

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

query I rowsort
SELECT ALL 56 FROM tab1 AS cor0
----
56
56
56

query I rowsort
SELECT - 96 * cor0.col0 FROM tab0 AS cor0
----
-2304
-3360
-8544

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-113
SELECT ALL - + col1 DIV - col0 + + col0 + 9 * + col0 AS col1 FROM tab0 AS cor0
----
243
352
891

skipif mysql # not compatible
query I rowsort label-113
SELECT ALL - + col1 / - col0 + + col0 + 9 * + col0 AS col1 FROM tab0 AS cor0
----
243
352
891

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

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

query I rowsort
SELECT DISTINCT + 15 AS col1 FROM tab0, tab2, tab0 cor0
----
15

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab0 cor0, tab0 AS cor1
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

query I rowsort
SELECT - + cor0.col0 * + 46 AS col0 FROM tab1 AS cor0
----
-138
-2944
-3680

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

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

skipif mysql # not compatible
query I rowsort label-120
SELECT - col2 / col2 + - col2 FROM tab0
----
-2
-34
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-121
SELECT DISTINCT - - ( - 7 ) DIV cor1.col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
-2
0

skipif mysql # not compatible
query I rowsort label-121
SELECT DISTINCT - - ( - 7 ) / cor1.col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
-2
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-122
SELECT CAST( 69 AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

skipif mysql # not compatible
query I rowsort label-122
SELECT CAST ( 69 AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT ALL + 16 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 + cor0.col1 * 33 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 2ae29f91532d3cfa67dbb865996ff5c9

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

query I rowsort
SELECT ALL - col1 + + 95 - col2 * + col0 FROM tab1 AS cor0
----
-3563
-7598
-93

query I rowsort
SELECT ( - col0 ) + col2 * - col0 AS col1 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT - 14 * + 74 AS col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 434f329a7775dc917b895a290ab55b19

query I rowsort
SELECT - col0 * 93 * - tab1.col0 AS col2 FROM tab1
----
380928
595200
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 21 col1 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

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

query I rowsort
SELECT DISTINCT 76 * col0 + col2 FROM tab0
----
1857
2661
6846

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col2 AS REAL ) + col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 48 + 77 * - col1 FROM tab0
----
-6670
-7055
-7517

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

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

query I rowsort
SELECT DISTINCT - col2 + + 51 FROM tab2 AS cor0
----
13
24
25

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-137
SELECT DISTINCT - CAST ( col2 AS INTEGER ) * cor0.col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-140
SELECT col0 + + 45 DIV col1 + 20 FROM tab2 AS cor0
----
101
28
98

skipif mysql # not compatible
query I rowsort label-140
SELECT col0 + + 45 / col1 + 20 FROM tab2 AS cor0
----
101
28
98

query I rowsort
SELECT DISTINCT 79 * + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-3871
-480636
-493039

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 + 92 - + col1 AS col2 FROM tab2 AS cor0
----
1418
278
4635

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

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

query I rowsort
SELECT ALL 52 + cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
100
122
230

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 18 + + col1 col1 FROM tab0 AS cor0
----
104
109
115

query I rowsort
SELECT + col2 * col2 + col0 + col2 * + col1 AS col2 FROM tab1 cor0
----
10544
3883
4323

query I rowsort
SELECT DISTINCT col0 * - col2 * - col0 + tab0.col2 FROM tab0
----
1226
19041
649604

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

query I rowsort
SELECT - + 12 + + col2 AS col0 FROM tab0 AS cor0
----
-11
21
70

query I rowsort
SELECT - col1 * cor0.col1 + - cor0.col1 * - 13 + + col0 FROM tab1 AS cor0
----
-335
80
94

query I rowsort
SELECT ALL col1 * - tab0.col1 AS col2 FROM tab0
----
-7396
-8281
-9409

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

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

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

query I rowsort
SELECT + col1 * col0 * + col0 - col1 * col1 FROM tab2 AS cor0
----
105808
355475
558

query I rowsort
SELECT ALL col1 + col1 - - col0 AS col1 FROM tab1
----
106
55
84

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

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

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

query I rowsort
SELECT - col0 + - col1 - - col0 * cor0.col1 * + cor0.col1 FROM tab1 AS cor0
----
13427
1999
6326

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

query I rowsort
SELECT + col2 + + col2 + col0 AS col0 FROM tab1
----
111
178
272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col1 * col0 col0 FROM tab1 AS cor0
----
-234
-40960
-83200

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

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

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

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

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

query I rowsort
SELECT ALL + + 14 FROM tab0 AS cor0
----
14
14
14

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

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

skipif mysql # not compatible
query I rowsort label-172
SELECT - 11 + + col0 / + col0 AS col0 FROM tab1 cor0
----
-10
-10
-10

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

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

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

query I rowsort
SELECT + 30 * - col0 FROM tab0 AS cor0
----
-1050
-2670
-720

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-177
SELECT + 91 DIV + col0 + col0 AS col1 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-177
SELECT + 91 / + col0 + col0 AS col1 FROM tab0
----
27
37
90

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

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

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

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

skipif mysql # not compatible
query I rowsort label-181
SELECT + col2 / - col2 + + col1 - + col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 + - col1 * - tab2.col2 * - col1 AS col0 FROM tab2
----
-10965
-25916
-90447

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL > NULL
----

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

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

query I rowsort
SELECT DISTINCT col1 * - tab1.col0 FROM tab1 WHERE ( NULL ) >= NULL
----

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

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE NOT col1 < ( col0 )
----
-26

query I rowsort
SELECT DISTINCT - tab1.col2 * col1 + col2 * - col1 * - col2 FROM tab1
----
118560
31920
74412

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col2 + tab2.col2 * col0 col1 FROM tab2
----
1026
3562
3648

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

query III rowsort
SELECT * FROM tab1 WHERE NULL < NULL
----

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 + + col0 * + 24 AS col0 FROM tab2 AS cor0
----
141
1846
1858

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

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

query I rowsort
SELECT col1 + col0 + col0 * col2 FROM tab0
----
167
7478
902

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

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

query I rowsort
SELECT DISTINCT col0 * col2 * + col2 + + col1 FROM tab2
----
114093
5134
52787

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 * col1 + - col1 col2 FROM tab2 AS cor0
----
-22630
-24565
-39943

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

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

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col2 * col2 = - col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL > col2
----

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

query I rowsort
SELECT - tab1.col0 + col2 + - col2 * + col1 * + col2 AS col1 FROM tab1
----
-119792
-32497
-75765

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

query I rowsort
SELECT DISTINCT col2 * tab1.col2 FROM tab1
----
2916
3249
9216

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

query III rowsort
SELECT * FROM tab0 WHERE ( col2 ) NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT + col0 * - tab2.col0 + + col0 FROM tab2
----
-42
-6006
-6162

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

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

query I rowsort
SELECT ALL + col0 * - col1 + - col0 FROM tab2
----
-1422
-224
-4680

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + cor0.col0 col1 FROM tab1 cor0
----
128
160
6

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

skipif mysql # not compatible
query I rowsort label-227
SELECT ALL + CAST ( col2 AS INTEGER ) * col2 AS col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT cor0.col1 + + ( col1 ) * + 78 FROM tab1 AS cor0
----
1027
2054
790

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-230
SELECT ALL - 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-230
SELECT ALL - CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-231
SELECT ( col0 ) * cor0.col1 + - col0 DIV col0 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-231
SELECT ( col0 ) * cor0.col1 + - col0 / col0 FROM tab0 AS cor0
----
2063
3394
8098

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

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

query I rowsort
SELECT ALL - + 47 FROM tab0 AS cor0
----
-47
-47
-47

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

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

query I rowsort
SELECT + 98 + - col2 * + col2 AS col2 FROM tab2 AS cor0
----
-1346
-578
-631

query I rowsort
SELECT ALL 64 * col1 + - 17 AS col2 FROM tab1 cor0
----
1647
623
815

query I rowsort
SELECT - 83 * col0 AS col2 FROM tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT DISTINCT + 91 + col0 * + ( - col2 ) FROM tab1 AS cor0
----
-3557
-71
-7589

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-242
SELECT - col1 DIV + col1 + col2 * + col0 * 95 FROM tab0 AS cor0
----
3324
693309
75239

skipif mysql # not compatible
query I rowsort label-242
SELECT - col1 / + col1 + col2 * + col0 * 95 FROM tab0 AS cor0
----
3324
693309
75239

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

query I rowsort
SELECT ALL cor2.col0 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT ALL col1 + + 12 AS col0 FROM tab0
----
103
109
98

query I rowsort
SELECT ALL + col0 + + 30 * - col2 AS col2 FROM tab0
----
-2371
-966
5

query I rowsort
SELECT DISTINCT + col2 + 80 * + col0 * + col0 AS col2 FROM tab1
----
327737
512096
774

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

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

query I rowsort
SELECT col0 * - col0 + + col1 + col1 * col2 FROM tab2 cor0
----
-4491
-5578
819

query I rowsort
SELECT DISTINCT + - col1 * + 31 + col2 FROM tab2 AS cor0
----
-1803
-489
-934

query I rowsort
SELECT ALL - + col1 - 28 FROM tab0 cor0
----
-114
-119
-125

query I rowsort
SELECT ALL - ( 17 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT + cor2.col0 AS col2 FROM tab2, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

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

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

query I rowsort
SELECT DISTINCT - col1 + - col1 + col0 AS col1 FROM tab2 AS cor0
----
-40
-55
45

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

query I rowsort
SELECT ALL - - col0 * + col2 + - 96 * col1 FROM tab2 AS cor0
----
-2787
-3636
1370

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

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

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

query I rowsort
SELECT col2 + 77 AS col2 FROM tab2 AS cor0
----
103
104
115

query I rowsort
SELECT - + 89 * cor0.col1 + + col0 FROM tab0 AS cor0
----
-7630
-8010
-8598

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

query I rowsort
SELECT DISTINCT col2 * - 89 AS col2 FROM tab1
----
-4806
-5073
-8544

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

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

query I rowsort
SELECT DISTINCT - 61 + - cor0.col2 * - col0 AS col1 FROM tab0 AS cor0
----
-26
7237
731

query I rowsort
SELECT ALL + + col1 * col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT DISTINCT + 64 + 45 * col1 FROM tab1 AS cor0
----
1234
514
649

query I rowsort
SELECT - 69 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-104
-7367
-861

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 + + col2 col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - col2 * 37 AS col0 FROM tab0
----
-1221
-3034
-37

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

skipif mysql # not compatible
query I rowsort label-273
SELECT DISTINCT + col2 / CAST ( NULL AS REAL ) + col1 AS col0 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT tab1.col2 + + ( + col2 * col2 ) FROM tab1
----
2970
3306
9312

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

query I rowsort
SELECT ALL 47 FROM tab1, tab0 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

onlyif mysql # use DIV operator for integer division
query I rowsort label-277
SELECT ALL - 32 - cor0.col2 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
-29
-32
-32

skipif mysql # not compatible
query I rowsort label-277
SELECT ALL - 32 - cor0.col2 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
-29
-32
-32

query I rowsort
SELECT + ( 82 ) * col2 + col1 AS col0 FROM tab1 AS cor0
----
4454
4684
7885

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-280
SELECT DISTINCT - CAST( + 3 AS SIGNED ) * col1 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
-191
-225
-290

skipif mysql # not compatible
query I rowsort label-280
SELECT DISTINCT - CAST ( + 3 AS INTEGER ) * col1 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
-191
-225
-290

query I rowsort
SELECT + col2 + - col1 * - col0 * - col2 FROM tab2 AS cor0
----
-119626
-50996
-5832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + 88 col2 FROM tab0
----
121
170
89

query I rowsort
SELECT ( 77 ) + + col2 FROM tab2 AS cor0
----
103
104
115

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 40 * 35 + col2 * col2 * - col1 col2 FROM tab2 AS cor0
----
-21199
-23148
-38484

query I rowsort
SELECT ALL 93 AS col0 FROM tab2
----
93
93
93

query I rowsort
SELECT ALL - ( col2 + col0 ) * - col0 FROM tab2
----
238
8112
9243

query I rowsort
SELECT + cor0.col2 * 25 FROM tab2 AS cor0
----
650
675
950

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

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

query I rowsort
SELECT DISTINCT 8 * tab0.col1 FROM tab0
----
688
728
776

query I rowsort
SELECT ALL + ( col0 * ( - col0 ) + col2 ) FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT 67 * col2 FROM tab2
----
1742
1809
2546

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

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

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

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

query I rowsort
SELECT ALL + col0 * - 81 * col2 AS col0 FROM tab2 AS cor0
----
-15309
-164268
-243162

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 + 43 FROM tab2 AS cor0
----
121
122
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 col2 FROM tab1 AS cor0
----
128
160
6

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

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

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

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

skipif mysql # not compatible
query I rowsort label-307
SELECT + col1 + CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL col1 * + 38 FROM tab1
----
380
494
988

query I rowsort
SELECT ALL + tab2.col0 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 93 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT ALL - 79 * + ( col0 ) FROM tab2
----
-553
-6162
-6241

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

query I rowsort
SELECT ALL - - 26 * col2 FROM tab1 AS cor0
----
1404
1482
2496

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

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

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

skipif mysql # not compatible
query I rowsort label-316
SELECT ALL CAST ( + 99 AS INTEGER ) FROM tab2
----
99
99
99

query I rowsort
SELECT - - tab2.col0 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-17
-31
-59

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

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

query I rowsort
SELECT - + ( cor0.col0 ) + col1 * 53 AS col0 FROM tab2 AS cor0
----
1636
3049
822

query I rowsort
SELECT + 97 + col1 FROM tab2 AS cor0
----
114
128
156

query I rowsort
SELECT DISTINCT col0 * - col1 + 4 FROM tab0
----
-2060
-3391
-8095

query I rowsort
SELECT ALL 9 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT DISTINCT - col1 * col2 + 27 * - 5 + - col1 * + 94 AS col2 FROM tab0
----
-11057
-16151
-9350

query I rowsort
SELECT + col1 + - col0 + col1 * col0 AS col1 FROM tab2
----
1281
241
4583

query I rowsort
SELECT + 18 * cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 0e7a467c0ce53e9a34a2e1960996a2b4

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

query I rowsort
SELECT - + col1 * - col0 + ( + col0 ) FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - 41 * - tab0.col1 + - 41 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 086f1ad47368558fe2bf3d27be8d944f

query I rowsort
SELECT + 40 * col0 + + ( 56 + col1 ) FROM tab2 AS cor0
----
3233
3235
367

onlyif mysql # use DIV operator for integer division
query I rowsort label-332
SELECT col2 * + col0 * + col1 + col1 DIV cor0.col2 + col0 * - col1 DIV + col1 AS col2 FROM tab1 cor0
----
36416
4209
99760

skipif mysql # not compatible
query I rowsort label-332
SELECT col2 * + col0 * + col1 + col1 / cor0.col2 + col0 * - col1 / + col1 AS col2 FROM tab1 cor0
----
36416
4209
99760

query I rowsort
SELECT DISTINCT - - col0 * col1 + - 21 FROM tab0 AS cor0
----
2043
3374
8078

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

query I rowsort
SELECT ALL col0 * - col2 * + col1 - + col0 AS col2 FROM tab1 AS cor0
----
-36544
-4215
-99920

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

query I rowsort
SELECT DISTINCT col0 + + 65 * - col0 FROM tab2 cor0
----
-448
-4992
-5056

query I rowsort
SELECT ALL + - col2 * - 95 FROM tab2 AS cor0
----
2470
2565
3610

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

query I rowsort
SELECT - col2 * col2 + 17 FROM tab0 AS cor0
----
-1072
-6707
16

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

query I rowsort
SELECT - col2 * 65 + 53 AS col1 FROM tab2 AS cor0
----
-1637
-1702
-2417

query I rowsort
SELECT 19 * + cor0.col2 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT + - 99 * - cor0.col0 * + col2 AS col0 FROM tab1 AS cor0
----
16038
361152
760320

onlyif mysql # use DIV operator for integer division
query I rowsort label-345
SELECT DISTINCT col0 DIV tab1.col2 - - tab1.col2 AS col1 FROM tab1
----
54
58
96

skipif mysql # not compatible
query I rowsort label-345
SELECT DISTINCT col0 / tab1.col2 - - tab1.col2 AS col1 FROM tab1
----
54
58
96

query I rowsort
SELECT ALL ( + 87 ) - - col0 * 82 * + 30 FROM tab0
----
219027
59127
86187

query I rowsort
SELECT + cor0.col1 - ( cor0.col0 ) FROM tab1 AS cor0
----
-54
-67
23

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

query I rowsort
SELECT DISTINCT col2 * - col2 + col1 * 1 AS col0 FROM tab1 AS cor0
----
-2890
-3239
-9203

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

query I rowsort
SELECT - 20 AS col0 FROM tab1 AS cor0
----
-20
-20
-20

onlyif mysql # use DIV operator for integer division
query I rowsort label-352
SELECT DISTINCT - col0 DIV + 58 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-352
SELECT DISTINCT - col0 / + 58 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL - col0 * col0 + col2 * 82 FROM tab1 AS cor0
----
1472
4419
578

query I rowsort
SELECT ALL - 20 + col1 AS col0 FROM tab1 AS cor0
----
-10
-7
6

query I rowsort
SELECT cor0.col1 * 48 AS col1 FROM tab2 AS cor0
----
1488
2832
816

query I rowsort
SELECT - - 63 * 6 AS col1 FROM tab2 AS cor0
----
378
378
378

query I rowsort
SELECT ALL + - cor0.col1 + 72 FROM tab0 cor0
----
-14
-19
-25

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

query I rowsort
SELECT DISTINCT + + 76 FROM tab0 AS cor0
----
76

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

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

query I rowsort
SELECT col1 * col0 * + col1 AS col1 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT DISTINCT + 85 * col2 + 0 FROM tab1 AS cor0
----
4590
4845
8160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 - - col1 col0 FROM tab2 AS cor0
----
32
46
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * col0 * - col0 col0 FROM tab0
----
-1225
-19008
-649522

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

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

query I rowsort
SELECT + col1 * + 56 + col0 + col1 AS col0 FROM tab1
----
1485
634
821

query I rowsort
SELECT + col0 * 87 FROM tab0
----
2088
3045
7743

query I rowsort
SELECT 63 + + col1 AS col1 FROM tab0 AS cor0
----
149
154
160

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

query I rowsort
SELECT ALL col1 * - 30 AS col1 FROM tab1 AS cor0
----
-300
-390
-780

query I rowsort
SELECT DISTINCT - + ( col0 ) * + col1 - + 28 FROM tab0 AS cor0
----
-2092
-3423
-8127

query I rowsort
SELECT ALL - tab2.col2 * - tab2.col2 + col0 * tab2.col0 FROM tab2
----
6760
7685
778

query I rowsort
SELECT DISTINCT col1 + 28 AS col0 FROM tab2
----
45
59
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - ( 76 ) + col1 col2 FROM tab0
----
-23
-67
20

query I rowsort
SELECT DISTINCT - cor0.col1 * tab2.col1 * - 17 FROM tab2, tab1 cor0, tab2 AS cor1
----
9 values hashing to 5a0e4bcf495b317b0532802a57fb2ae8

query I rowsort
SELECT DISTINCT col1 * - 32 AS col2 FROM tab0
----
-2752
-2912
-3104

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-379
SELECT col2 DIV + col0 + + col0 AS col0 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-379
SELECT col2 / + col0 + + col0 AS col0 FROM tab0
----
25
35
89

query I rowsort
SELECT DISTINCT + 82 FROM tab0 AS cor0
----
82

query I rowsort
SELECT ALL + 86 + col2 FROM tab0 AS cor0
----
119
168
87

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

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

query I rowsort
SELECT ALL - 51 * - col0 + col0 AS col1 FROM tab2 cor0
----
364
4056
4108

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

query I rowsort
SELECT + 29 + col2 FROM tab1 AS cor0
----
125
83
86

query I rowsort
SELECT DISTINCT + + 98 - 95 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-3037
-7692
3

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

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

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

query I rowsort
SELECT - - 33 * col1 AS col2 FROM tab0 AS cor0
----
2838
3003
3201

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

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

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

query I rowsort
SELECT ALL - 78 AS col0 FROM tab0 AS cor0
----
-78
-78
-78

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

query I rowsort
SELECT 49 * + col1 FROM tab0 cor0
----
4214
4459
4753

query I rowsort
SELECT DISTINCT + col1 * + 88 FROM tab0 AS cor0
----
7568
8008
8536

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

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

query I rowsort
SELECT DISTINCT col2 + cor0.col0 * col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + col1 + 81 * 4 FROM tab0 AS cor0
----
410
415
421

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-403
SELECT DISTINCT - col0 + 1 DIV - 87 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-403
SELECT DISTINCT - col0 + 1 / - 87 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + col1 - 44 * - 99 AS col2 FROM tab0 AS cor0
----
4442
4447
4453

query I rowsort
SELECT ALL - col2 + 17 * + 68 AS col0 FROM tab2 cor0
----
1118
1129
1130

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

skipif mysql # not compatible
query I rowsort label-406
SELECT col1 / 89 - col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col2 * + 90 + + cor0.col2 * - col2 AS col2 FROM tab0 cor0
----
1881
656
89

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-413
SELECT + col2 * col0 DIV - col1 + col0 FROM tab2 AS cor0
----
-97
1
44

skipif mysql # not compatible
query I rowsort label-413
SELECT + col2 * col0 / - col1 + col0 FROM tab2 AS cor0
----
-97
1
44

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

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

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

skipif mysql # not compatible
query I rowsort label-416
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 49 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT + 90 * - col1 - - col1 AS col0 FROM tab1 cor0
----
-1157
-2314
-890

query I rowsort
SELECT ALL + + col2 - - col0 * ( cor0.col2 ) AS col2 FROM tab1 cor0
----
216
3705
7776

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

query I rowsort
SELECT ALL 36 AS col2 FROM tab1 AS cor0
----
36
36
36

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT ALL + 27 FROM tab1 AS cor0
----
27
27
27

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

query I rowsort
SELECT - 80 * col0 AS col0 FROM tab0 AS cor0
----
-1920
-2800
-7120

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

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

query I rowsort
SELECT - col0 + - 45 FROM tab2 AS cor0
----
-123
-124
-52

query I rowsort
SELECT 1 AS col1 FROM tab1
----
1
1
1

query I rowsort
SELECT 19 FROM tab2
----
19
19
19

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab2
----
37

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 * + col1 * col0 col0 FROM tab1 cor0
----
13424
1974
6343

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

query I rowsort
SELECT 94 FROM tab0, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

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

query I rowsort
SELECT DISTINCT - 15 * 82 FROM tab0 AS cor0
----
-1230

query I rowsort
SELECT ALL 64 * col2 FROM tab1 AS cor0
----
3456
3648
6144

query I rowsort
SELECT + - col0 + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1260
-600
-8010

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

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

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

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

query I rowsort
SELECT ( + 42 ) FROM tab0
----
42
42
42

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

query I rowsort
SELECT DISTINCT col0 + + 23 FROM tab2
----
101
102
30

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

skipif mysql # not compatible
query I rowsort label-447
SELECT DISTINCT - col2 / 30 AS col0 FROM tab2
----
-1
0

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

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

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

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

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

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

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

query I rowsort
SELECT - 30 + - col0 FROM tab0
----
-119
-54
-65

query I rowsort
SELECT + 34 * 39 FROM tab0, tab0 AS cor0
----
9 values hashing to 2960fe9d9d65cbc56dfd35cf13275c80

query I rowsort
SELECT - cor0.col1 - 40 FROM tab2 AS cor0
----
-57
-71
-99

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

query I rowsort
SELECT 91 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT ALL - 80 * 73 FROM tab1, tab0 AS cor0
----
9 values hashing to da8602d9f2b95c54680f3da67e818d60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - + 43 * + 11 col2 FROM tab1
----
-447
-460
-463

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

query I rowsort
SELECT - - col1 * + 39 + - col0 AS col0 FROM tab0 AS cor0
----
3330
3460
3748

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

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

query I rowsort
SELECT ALL col2 * ( col2 ) - col2 FROM tab2
----
1406
650
702

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

query I rowsort
SELECT ALL - + 29 + col2 AS col0 FROM tab0 AS cor0
----
-28
4
53

query I rowsort
SELECT 95 * - col2 AS col2 FROM tab2 AS cor0
----
-2470
-2565
-3610

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

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

query I rowsort
SELECT DISTINCT + col1 + - col1 * + col2 * - col2 FROM tab0 AS cor0
----
194
611975
93740

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-474
SELECT DISTINCT + CAST( - ( col1 ) AS SIGNED ) DIV - col0 + - col0 * col1 FROM tab0 cor0
----
-2061
-3393
-8098

skipif mysql # not compatible
query I rowsort label-474
SELECT DISTINCT + CAST ( - ( col1 ) AS INTEGER ) / - col0 + - col0 * col1 FROM tab0 cor0
----
-2061
-3393
-8098

query I rowsort
SELECT - 66 * 44 AS col0 FROM tab2 cor0
----
-2904
-2904
-2904

query I rowsort
SELECT + ( 60 ) + - col1 FROM tab1 cor0
----
34
47
50

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

query I rowsort
SELECT ALL - 74 * col1 * + col1 - col1 FROM tab2 AS cor0
----
-21403
-257653
-71145

onlyif mysql # use DIV operator for integer division
query I rowsort label-479
SELECT ALL + 11 * col1 DIV ( + 85 * col0 ) AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-479
SELECT ALL + 11 * col1 / ( + 85 * col0 ) AS col2 FROM tab2
----
0
0
0

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

query I rowsort
SELECT 90 + col0 * - col1 FROM tab1 AS cor0
----
-550
-950
12

query I rowsort
SELECT + 52 * - col2 * - ( cor0.col1 * col0 ) AS col2 FROM tab2 AS cor0
----
2653768
304668
6221904

query I rowsort
SELECT DISTINCT col1 * + col1 + - col0 - - cor0.col1 FROM tab1 AS cor0
----
102
46
699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + ( 48 ) col2 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT col1 * - 27 AS col2 FROM tab0 cor0
----
-2322
-2457
-2619

query I rowsort
SELECT ALL - col0 * - 9 FROM tab2 AS cor0
----
63
702
711

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col0 * + 20 + col1 col0 FROM tab1 AS cor0
----
1226
1533
83

query I rowsort
SELECT ALL + 84 * + col0 AS col0 FROM tab1 cor0
----
252
5376
6720

query I rowsort
SELECT cor0.col1 * + col0 * + col1 + - cor0.col2 + + col0 FROM tab0 AS cor0
----
177495
329349
737016

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

query I rowsort
SELECT ALL cor0.col1 + + col2 * - 51 FROM tab0 cor0
----
-1597
-4091
46

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

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

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

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

skipif mysql # not compatible
query I rowsort label-496
SELECT DISTINCT ( col1 ) * CAST ( - col2 AS INTEGER ) + cor0.col1 + + col0 FROM tab0 AS cor0
----
-2728
-7282
35

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

query I rowsort
SELECT + - 97 * + cor0.col0 + + 32 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-11545
-5080
-6499

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

query I rowsort
SELECT - 7 AS col2 FROM tab1 AS cor0
----
-7
-7
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-501
SELECT ALL + cor0.col1 * + col1 - + 4 DIV col2 FROM tab0 AS cor0
----
7396
8281
9405

skipif mysql # not compatible
query I rowsort label-501
SELECT ALL + cor0.col1 * + col1 - + 4 / col2 FROM tab0 AS cor0
----
7396
8281
9405

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 90 + + col1 col0 FROM tab2 AS cor0
----
-31
-59
-73

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

query I rowsort
SELECT - 17 FROM tab0, tab2 AS cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-508
SELECT - CAST( + 39 AS SIGNED ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

skipif mysql # not compatible
query I rowsort label-508
SELECT - CAST ( + 39 AS INTEGER ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 * + col2 * + col1 FROM tab0
----
-244068
-679042
-9409

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

query I rowsort
SELECT col2 - - ( + 42 + col1 ) AS col2 FROM tab0
----
140
161
215

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

query I rowsort
SELECT + 55 * col2 + col1 * + col1 AS col0 FROM tab2
----
2379
2446
4911

query I rowsort
SELECT ALL tab2.col2 AS col1 FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

skipif mysql # not compatible
query I rowsort
SELECT ( col0 ) * - col2 + - CAST ( - ( col1 ) AS REAL ) FROM tab2
----
-158
-1969
-2985

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

query I rowsort
SELECT ALL col0 * 72 FROM tab1
----
216
4608
5760

query I rowsort
SELECT ( cor0.col0 ) FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT - 51 FROM tab2
----
-51

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

query I rowsort
SELECT DISTINCT - ( + col0 ) * col0 + + col2 + 24 AS col0 FROM tab2 AS cor0
----
-6034
-6179
2

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

query I rowsort
SELECT DISTINCT 88 * - cor0.col1 FROM tab1, tab1 AS cor0
----
-1144
-2288
-880

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

query I rowsort
SELECT - 17 * ( - cor0.col0 ) FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT ALL - 91 * + cor0.col2 + col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-3003
-7462
-91

query I rowsort
SELECT ALL + 82 * col2 AS col2 FROM tab2 AS cor0
----
2132
2214
3116

query I rowsort
SELECT DISTINCT ( 48 ) FROM tab1
----
48

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

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

query I rowsort
SELECT DISTINCT + + 39 AS col0 FROM tab0 AS cor0
----
39

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

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

query I rowsort
SELECT DISTINCT - 84 AS col2 FROM tab2 cor0
----
-84

query I rowsort
SELECT - ( 56 ) FROM tab1 AS cor0
----
-56
-56
-56

query I rowsort
SELECT - cor0.col2 * ( 81 ) FROM tab1, tab0 AS cor0
----
9 values hashing to c9108b5bd74bee0d25e122f67deb331a

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

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

skipif mysql # not compatible
query I rowsort
SELECT - col1 * col2 * - ( 66 + + col0 * - CAST ( + col0 AS REAL ) ) AS col1 FROM tab2 AS cor0
----
-3989050
-9231612
14229

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

query I rowsort
SELECT ALL col2 * - 24 FROM tab2
----
-624
-648
-912

query I rowsort
SELECT - col1 * - 80 AS col1 FROM tab1
----
1040
2080
800

query I rowsort
SELECT - + col1 + col0 + col2 * col2 * 97 AS col0 FROM tab2 AS cor0
----
140130
65591
70689

query I rowsort
SELECT DISTINCT + col1 + + 46 + col0 AS col0 FROM tab1 AS cor0
----
120
139
75

query I rowsort
SELECT ALL 17 FROM tab2, tab2 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

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

query I rowsort
SELECT DISTINCT - col2 + 10 FROM tab0 cor0
----
-23
-72
9

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-556
SELECT - CAST ( + ( - col0 ) AS INTEGER ) + + ( col2 ) * - col2 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + 12 + - 49 AS col1 FROM tab1 cor0
----
-37
-37
-37

query I rowsort
SELECT ALL cor0.col2 + + cor0.col1 * - col1 FROM tab1 AS cor0
----
-43
-622
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-559
SELECT - ( 77 ) DIV cor0.col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-559
SELECT - ( 77 ) / cor0.col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT - - col1 * 44 FROM tab2 AS cor0
----
1364
2596
748

query I rowsort
SELECT DISTINCT col0 * - ( 42 ) FROM tab1
----
-126
-2688
-3360

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

query I rowsort
SELECT 15 * + tab0.col0 * col2 FROM tab0
----
109470
11880
525

query I rowsort
SELECT ALL - tab2.col1 - col2 AS col0 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT ALL - 34 AS col1 FROM tab0
----
-34
-34
-34

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 * - col1 col0 FROM tab0 cor0
----
-3010
-3185
-3395

query I rowsort
SELECT - col0 + cor0.col1 * col1 + col2 FROM tab0 AS cor0
----
7405
8274
9375

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + cor0.col1 + col2 col2 FROM tab1 AS cor0
----
106
122
77

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

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

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

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

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

query I rowsort
SELECT + 26 + - 41 * - col0 AS col1 FROM tab0 AS cor0
----
1010
1461
3675

query I rowsort
SELECT DISTINCT - 58 * - col2 AS col2 FROM tab1
----
3132
3306
5568

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 * col2 col0 FROM tab1 AS cor0
----
1728
1824
3072

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

query I rowsort
SELECT ALL - 45 + col0 + - col1 FROM tab0 AS cor0
----
-107
-107
-47

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

query I rowsort
SELECT DISTINCT 95 FROM tab1 cor0
----
95

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

query I rowsort
SELECT - 63 + - col0 * col0 AS col2 FROM tab2 AS cor0
----
-112
-6147
-6304

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

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

query I rowsort
SELECT 91 * + col1 + + col0 AS col2 FROM tab0 cor0
----
7850
8370
8862

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

query I rowsort
SELECT DISTINCT + 10 * + 41 AS col2 FROM tab0
----
410

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

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

query I rowsort
SELECT DISTINCT tab2.col2 AS col0 FROM tab2, tab1 cor0
----
26
27
38

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

query I rowsort
SELECT DISTINCT + col2 * 63 AS col0 FROM tab1
----
3402
3591
6048

query I rowsort
SELECT - col2 + + col0 FROM tab1 AS cor0 WHERE NOT NULL BETWEEN + col2 + col2 - col0 * + col0 AND ( - col1 * + col1 + col0 * col1 - col2 )
----

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

query I rowsort
SELECT DISTINCT - col2 + col1 * col1 AS col0 FROM tab2 AS cor0
----
251
3455
934

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

query I rowsort
SELECT ALL col0 * + tab1.col2 + col2 * col2 * + tab1.col2 + col0 FROM tab1
----
157629
188905
892496

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

query I rowsort
SELECT ALL - col1 + + col1 + col1 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * tab1.col0 + - col0 col0 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-606
SELECT DISTINCT tab1.col0 * col1 DIV col2 col0 FROM tab1
----
1
10
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-606
SELECT DISTINCT tab1.col0 * col1 / col2 col0 FROM tab1
----
1
10
11

query I rowsort
SELECT ALL - col2 * - col0 * col1 + col2 + + col0 AS col2 FROM tab0
----
3431
664289
68169

query I rowsort
SELECT tab2.col1 / - col1 + - tab2.col1 AS col1 FROM tab2 WHERE NULL NOT IN ( - col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col0 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL - col2 + col2 * col2 * col0 FROM tab2
----
114038
5076
52702

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

skipif mysql # not compatible
query I rowsort label-611
SELECT ALL tab1.col0 / tab1.col2 FROM tab1
----
0
0
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-613
SELECT ALL - col1 + col0 * col1 DIV col2 FROM tab0
----
-24
3298
7

skipif mysql # not compatible
query I rowsort label-613
SELECT ALL - col1 + col0 * col1 / col2 FROM tab0
----
-24
3298
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-615
SELECT ALL col1 DIV col1 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-615
SELECT ALL col1 / col1 AS col2 FROM tab2
----
1
1
1

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL IN ( - col2 / - col0 )
----

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + col2 * - col2 * col2 col2 FROM tab0
----
-35913
-551279
34

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

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0, tab0 AS cor0 WHERE NULL NOT IN ( - cor0.col2 )
----

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

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

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NULL >= ( - col0 ) OR NOT - col0 + + col2 NOT BETWEEN ( col0 * + col2 ) AND ( NULL )
----

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-628
SELECT DISTINCT - + cor0.col1 DIV + col1 - col1 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-628
SELECT DISTINCT - + cor0.col1 / + col1 - col1 FROM tab0 AS cor0
----
-87
-92
-98

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

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

query I rowsort
SELECT tab1.col1 + col0 * col1 - col0 FROM tab1
----
101
586
973

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + + col1 + - col2 * + col2 + col1 AS col1 FROM tab2 AS cor0
----
-1410
-558
-667

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-641
SELECT ALL - col1 DIV ( - col1 ) FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-641
SELECT ALL - col1 / ( - col1 ) FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT col1 * - col0 * tab1.col2 FROM tab1
----
-36480
-4212
-99840

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-645
SELECT col1 DIV 77 + tab2.col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-645
SELECT col1 / 77 + tab2.col1 FROM tab2
----
17
31
59

query I rowsort
SELECT col1 + col2 * - 38 FROM tab0
----
-1168
-3025
59

query I rowsort
SELECT tab2.col0 + 48 FROM tab2
----
126
127
55

query I rowsort
SELECT 75 AS col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT ALL - col1 + 81 * - col0 FROM tab0 AS cor0
----
-2030
-2932
-7300

query I rowsort
SELECT DISTINCT + col0 * + 53 FROM tab0 AS cor0
----
1272
1855
4717

query I rowsort
SELECT + - col0 + 71 AS col2 FROM tab0 AS cor0
----
-18
36
47

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

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

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

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

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

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

query I rowsort
SELECT ALL + 58 + + 80 AS col0 FROM tab2 cor0
----
138
138
138

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

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

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

query I rowsort
SELECT - ( + 47 ) + + cor0.col2 * + col2 FROM tab1 AS cor0
----
2869
3202
9169

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

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

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

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

query I rowsort
SELECT 31 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

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

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

query I rowsort
SELECT - ( col2 ) + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT DISTINCT 20 * - col2 * ( + 30 ) + col0 AS col1 FROM tab2 AS cor0
----
-15522
-16193
-22721

query I rowsort
SELECT ALL + col0 * - col2 + 79 FROM tab0 AS cor0
----
-713
-7219
44

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

query I rowsort
SELECT 29 * - col1 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT + + 43 AS col1 FROM tab0 AS cor0
----
43
43
43

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

query I rowsort
SELECT ALL 44 FROM tab1 cor0
----
44
44
44

query I rowsort
SELECT ALL - col0 * cor0.col2 + col0 * + col1 AS col0 FROM tab0 AS cor0
----
1272
3360
801

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

skipif mysql # not compatible
query I rowsort label-675
SELECT + + 39 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-682
SELECT - + col1 + + 76 DIV + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-17
-21
-59

skipif mysql # not compatible
query I rowsort label-682
SELECT - + col1 + + 76 / + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-17
-21
-59

query I rowsort
SELECT DISTINCT 41 FROM tab1, tab0 cor0
----
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-684
SELECT col2 + CAST( + col0 AS SIGNED ) DIV col0 AS col1 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-684
SELECT col2 + CAST ( + col0 AS INTEGER ) / col0 AS col1 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT - cor0.col2 * + 19 FROM tab0 AS cor0
----
-1558
-19
-627

query I rowsort
SELECT 29 * + col0 AS col2 FROM tab2
----
203
2262
2291

onlyif mysql # use DIV operator for integer division
query I rowsort label-687
SELECT col1 + + ( - col2 ) DIV - col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-687
SELECT col1 + + ( - col2 ) / - col0 FROM tab1 AS cor0
----
10
14
44

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

skipif mysql # not compatible
query I rowsort label-688
SELECT + col2 + 82 / ( col2 + + col0 * col0 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col1 * ( 2 ) AS col2 FROM tab2 cor0
----
118
34
62

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

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

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

query I rowsort
SELECT col0 + - 95 AS col1 FROM tab1 AS cor0
----
-15
-31
-92

query I rowsort
SELECT ALL - 94 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 28 col1 FROM tab2 AS cor0
----
45
59
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-695
SELECT + col0 * col0 DIV - col0 + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-695
SELECT + col0 * col0 / - col0 + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

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

skipif mysql # not compatible
query I rowsort label-696
SELECT DISTINCT tab0.col0 / + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

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

skipif mysql # not compatible
query I rowsort label-697
SELECT ALL col2 / 99 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT 76 + col1 AS col2 FROM tab1
----
102
86
89

query I rowsort
SELECT ALL + 61 + col0 * col2 AS col2 FROM tab1
----
223
3709
7741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 64 ) col1 FROM tab1
----
64

query I rowsort
SELECT ( col0 + col1 ) * + 1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT + + 98 + + col0 FROM tab0 AS cor0
----
122
133
187

query I rowsort
SELECT - 54 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT - col0 * 58 FROM tab0
----
-1392
-2030
-5162

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

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

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

query I rowsort
SELECT DISTINCT - col1 + - col0 * - ( col2 * col0 ) FROM tab2 AS cor0
----
1292
158125
237141

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

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

query I rowsort
SELECT - ( + col1 ) - - 41 AS col1 FROM tab2 cor0
----
-18
10
24

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

query I rowsort
SELECT + col2 + cor0.col2 * + 26 FROM tab0 AS cor0
----
2214
27
891

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

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

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

query I rowsort
SELECT ALL 39 FROM tab2, tab1 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

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

query I rowsort
SELECT 1 + tab1.col0 FROM tab1
----
4
65
81

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

query I rowsort
SELECT col0 * - cor0.col1 + 60 AS col1 FROM tab0 AS cor0
----
-2004
-3335
-8039

query I rowsort
SELECT DISTINCT col0 - col0 FROM tab2
----
0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-724
SELECT ALL tab1.col0 * + col0 - col2 DIV 2 FROM tab1
----
-18
4068
6352

skipif mysql # not compatible
query I rowsort label-724
SELECT ALL tab1.col0 * + col0 - col2 / 2 FROM tab1
----
-18
4068
6352

query I rowsort
SELECT + - col1 + + col0 * 68 AS col1 FROM tab1 AS cor0
----
178
4342
5427

query I rowsort
SELECT cor0.col2 - col2 * ( 47 ) FROM tab1 AS cor0
----
-2484
-2622
-4416

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-731
SELECT DISTINCT - col0 * col2 + col1 DIV col2 col2 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-731
SELECT DISTINCT - col0 * col2 + col1 / col2 col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT col1 * + 20 FROM tab0
----
1720
1820
1940

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

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

query I rowsort
SELECT - cor0.col0 * 80 FROM tab2 AS cor0
----
-560
-6240
-6320

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

query I rowsort
SELECT - col1 * - 5 AS col0 FROM tab1 AS cor0
----
130
50
65

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

query I rowsort
SELECT ALL + col2 * ( + col2 ) FROM tab2
----
1444
676
729

query I rowsort
SELECT - 55 FROM tab0 cor0
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - 37 * col2 col0 FROM tab2 AS cor0
----
-23902
-30969
-56758

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-742
SELECT CAST( - col1 AS SIGNED ) * col2 * 60 AS col2 FROM tab0 AS cor0
----
-170280
-447720
-5820

skipif mysql # not compatible
query I rowsort label-742
SELECT CAST ( - col1 AS INTEGER ) * col2 * 60 AS col2 FROM tab0 AS cor0
----
-170280
-447720
-5820

query I rowsort
SELECT DISTINCT + ( 70 ) FROM tab2 cor0
----
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-744
SELECT - CAST( col1 AS SIGNED ) * + col1 + col1 AS col1 FROM tab2
----
-272
-3422
-930

skipif mysql # not compatible
query I rowsort label-744
SELECT - CAST ( col1 AS INTEGER ) * + col1 + col1 AS col1 FROM tab2
----
-272
-3422
-930

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

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

query I rowsort
SELECT DISTINCT + 18 * + col2 AS col1 FROM tab2 AS cor0
----
468
486
684

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-751
SELECT + - col2 + 49 DIV - col0 AS col0 FROM tab1 AS cor0
----
-57
-70
-96

skipif mysql # not compatible
query I rowsort label-751
SELECT + - col2 + 49 / - col0 AS col0 FROM tab1 AS cor0
----
-57
-70
-96

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

query I rowsort
SELECT + 97 * col2 AS col1 FROM tab1 AS cor0
----
5238
5529
9312

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

query I rowsort
SELECT DISTINCT + col1 + - col2 * + 23 AS col0 FROM tab2 cor0
----
-539
-590
-857

query I rowsort
SELECT ALL + 17 + col2 AS col0 FROM tab0 AS cor0
----
18
50
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 67 * + col1 * + col1 col2 FROM tab2 AS cor0
----
19363
233227
64387

onlyif mysql # use DIV operator for integer division
query I rowsort label-758
SELECT + 16 DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-758
SELECT + 16 / col0 AS col1 FROM tab2 AS cor0
----
0
0
2

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

query I rowsort
SELECT - col1 * - col0 * 36 AS col2 FROM tab1 AS cor0
----
23040
2808
37440

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

query I rowsort
SELECT ALL + ( col2 ) + + col1 * col1 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL col1 * - 72 * col0 FROM tab2
----
-15624
-331344
-96696

query I rowsort
SELECT 19 AS col0 FROM tab0
----
19
19
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-765
SELECT ALL ( col1 ) DIV - col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-765
SELECT ALL ( col1 ) / - col0 FROM tab2
----
-4
0
0

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

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

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

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

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

query I rowsort
SELECT - + 15 FROM tab0 AS cor0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT - 35 * - col2 FROM tab1
----
1890
1995
3360

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

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

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

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

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

query I rowsort
SELECT + col0 + + 60 AS col2 FROM tab1 cor0
----
124
140
63

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

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

query I rowsort
SELECT ALL + col2 + 48 FROM tab1 AS cor0
----
102
105
144

query I rowsort
SELECT + col2 + 9 FROM tab2 AS cor0
----
35
36
47

query I rowsort
SELECT DISTINCT - col0 * 7 AS col2 FROM tab1 cor0
----
-21
-448
-560

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col1 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 164bdd441d6fbe34592d7280cc7d0af5

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

query I rowsort
SELECT ALL + col1 + + 43 + - col2 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-2847
-3196
-9160

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

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

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

query I rowsort
SELECT ALL 11 FROM tab0, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT ALL col2 * - 41 AS col0 FROM tab0 AS cor0
----
-1353
-3362
-41

query I rowsort
SELECT ( - 24 ) FROM tab2 AS cor0
----
-24
-24
-24

query I rowsort
SELECT ALL - - 34 * cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 8653fa89c5aae4b8705e70c3e66aa94a

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

query I rowsort
SELECT - + col2 * 22 + 83 AS col0 FROM tab0 AS cor0
----
-1721
-643
61

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

query I rowsort
SELECT 31 + tab0.col1 * + col2 FROM tab0
----
128
2869
7493

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

skipif mysql # not compatible
query I rowsort label-794
SELECT ALL - 20 / - col0 FROM tab0
----
0
0
0

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

query I rowsort
SELECT - col2 * - 10 AS col2 FROM tab2 AS cor0
----
260
270
380

query I rowsort
SELECT + col1 * + col0 + - 15 FROM tab0
----
2049
3380
8084

query I rowsort
SELECT ALL - 84 * tab2.col1 * 80 FROM tab2
----
-114240
-208320
-396480

query I rowsort
SELECT ALL - col0 + cor0.col0 * col2 * col2 AS col0 FROM tab2 cor0
----
113997
5096
52650

query I rowsort
SELECT ALL - 7 + + col0 * + 94 FROM tab1 cor0
----
275
6009
7513

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

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

skipif mysql # not compatible
query I rowsort label-802
SELECT ALL - col2 / - 99 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - cor0.col0 * + 36 AS col0 FROM tab1 cor0
----
108
2304
2880

query I rowsort
SELECT DISTINCT + col1 * - 86 AS col1 FROM tab1 AS cor0
----
-1118
-2236
-860

query I rowsort
SELECT DISTINCT col0 * - 83 + + col2 - col0 * 67 AS col1 FROM tab2 AS cor0
----
-1023
-11674
-11812

query I rowsort
SELECT ALL + col0 + 39 AS col1 FROM tab0 AS cor0
----
128
63
74

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

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

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

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

query I rowsort
SELECT ALL col0 + + col0 * - col0 FROM tab0
----
-1190
-552
-7832

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

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

query I rowsort
SELECT col2 * - col0 + + col0 * - col2 AS col1 FROM tab0
----
-14596
-1584
-70

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

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

query I rowsort
SELECT ALL + tab1.col0 - col1 AS col0 FROM tab1 WHERE ( NULL ) NOT BETWEEN ( col0 ) AND ( NULL )
----

query I rowsort
SELECT + col2 * tab0.col0 * col2 AS col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT tab0.col1 + - col1 * col2 * - col2 FROM tab0
----
194
611975
93740

query I rowsort
SELECT ALL - tab1.col2 * col1 * - col1 AS col0 FROM tab1
----
16224
36504
5700

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-821
SELECT col0 * - col1 + + col1 DIV + col0 FROM tab1
----
-1040
-640
-70

skipif mysql # not compatible
query I rowsort label-821
SELECT col0 * - col1 + + col1 / + col0 FROM tab1
----
-1040
-640
-70

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

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

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

query I rowsort
SELECT ALL col2 FROM tab2 WHERE + col2 IN ( col2 )
----
26
27
38

query I rowsort
SELECT col1 + - col1 FROM tab2 WHERE - col2 * col0 >= ( + col2 )
----

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

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( NULL ) = NULL
----

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

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

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

query I rowsort
SELECT + + col0 + col2 + 50 * col1 AS col0 FROM tab2 AS cor0
----
1584
3054
967

query I rowsort
SELECT DISTINCT 51 AS col0 FROM tab0 AS cor0
----
51

query I rowsort
SELECT - + cor0.col2 * - col1 * 19 + col2 FROM tab2 AS cor0
----
12312
15930
29172

query I rowsort
SELECT + 93 + - col1 FROM tab2 AS cor0
----
34
62
76

query I rowsort
SELECT DISTINCT - 19 - + col1 AS col0 FROM tab0 AS cor0
----
-105
-110
-116

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-840
SELECT + col0 + - tab1.col0 * + col2 + col1 DIV col2 AS col2 FROM tab1
----
-159
-3584
-7600

skipif mysql # not compatible
query I rowsort label-840
SELECT + col0 + - tab1.col0 * + col2 + col1 / col2 AS col2 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + col1 * tab1.col2 * + col0 FROM tab1
----
36480
4212
99840

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-844
SELECT tab1.col1 + col2 - tab1.col1 DIV col2 AS col1 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-844
SELECT tab1.col1 + col2 - tab1.col1 / col2 AS col1 FROM tab1
----
109
67
80

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

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

query I rowsort
SELECT ALL - 33 + + col2 FROM tab0 AS cor0
----
-32
0
49

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

query I rowsort
SELECT + 60 + + cor0.col1 FROM tab2 AS cor0
----
119
77
91

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

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

query I rowsort
SELECT DISTINCT + - col0 + - col2 + + cor0.col2 * 50 AS col2 FROM tab2 AS cor0
----
1196
1316
1783

query I rowsort
SELECT - - col1 * cor0.col0 + col0 + col1 AS col2 FROM tab1 AS cor0
----
107
1133
714

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 + col1 col1 FROM tab0 AS cor0
----
103
109
98

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

query I rowsort
SELECT - 29 + cor0.col1 - 18 * - 98 FROM tab0 AS cor0
----
1821
1826
1832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 + col2 * + ( col1 + - tab1.col2 ) col2 FROM tab1
----
-1476
-2643
-7932

query I rowsort
SELECT + col2 * + 98 FROM tab2 AS cor0
----
2548
2646
3724

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

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

query I rowsort
SELECT - cor0.col0 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

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

query I rowsort
SELECT ALL cor0.col1 + cor0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 993162448d72b066e1ac9ba4caa8d8d7

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-865
SELECT - 54 + + col0 DIV tab1.col0 FROM tab1
----
-53
-53
-53

skipif mysql # not compatible
query I rowsort label-865
SELECT - 54 + + col0 / tab1.col0 FROM tab1
----
-53
-53
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) * + col1 * - col0 col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - 24 + + 61 FROM tab2
----
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-868
SELECT CAST( 12 AS SIGNED ) * tab1.col0 AS col1 FROM tab1
----
36
768
960

skipif mysql # not compatible
query I rowsort label-868
SELECT CAST ( 12 AS INTEGER ) * tab1.col0 AS col1 FROM tab1
----
36
768
960

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

skipif mysql # not compatible
query I rowsort label-869
SELECT tab1.col0 / col0 FROM tab1
----
1
1
1

query I rowsort
SELECT 41 * 40 FROM tab1
----
1640
1640
1640

query I rowsort
SELECT DISTINCT + 51 + + 66 AS col1 FROM tab1
----
117

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

query I rowsort
SELECT - 30 + - col2 FROM tab1 AS cor0
----
-126
-84
-87

query I rowsort
SELECT DISTINCT + + 86 + + col2 FROM tab0 AS cor0
----
119
168
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-875
SELECT ALL ( col0 + col0 ) DIV - col1 AS col0 FROM tab2
----
-2
-9
0

skipif mysql # not compatible
query I rowsort label-875
SELECT ALL ( col0 + col0 ) / - col1 AS col0 FROM tab2
----
-2
-9
0

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

skipif mysql # not compatible
query I rowsort label-876
SELECT - 51 / - col0 AS col0 FROM tab2
----
0
0
7

query I rowsort
SELECT col2 * + 31 * - col2 FROM tab1
----
-100719
-285696
-90396

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-879
SELECT + col1 * 59 DIV col2 AS col1 FROM tab1 cor0
----
10
28
7

skipif mysql # not compatible
query I rowsort label-879
SELECT + col1 * 59 / col2 AS col1 FROM tab1 cor0
----
10
28
7

query I rowsort
SELECT ALL + - col2 * + 23 FROM tab2 cor0
----
-598
-621
-874

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

query I rowsort
SELECT DISTINCT col1 * 10 AS col0 FROM tab2 AS cor0
----
170
310
590

query I rowsort
SELECT - col2 * 52 AS col0 FROM tab0 AS cor0
----
-1716
-4264
-52

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

query I rowsort
SELECT - col1 + 79 * col1 AS col2 FROM tab2 AS cor0
----
1326
2418
4602

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

query I rowsort
SELECT ALL - col0 * - 74 AS col1 FROM tab0
----
1776
2590
6586

query I rowsort
SELECT - 35 + ( col0 ) * + col0 AS col2 FROM tab1 AS cor0
----
-26
4061
6365

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-894
SELECT ALL + col2 DIV + col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-894
SELECT ALL + col2 / + col1 FROM tab1
----
2
5
7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-896
SELECT DISTINCT - cor0.col2 + - col0 * col1 DIV - col1 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-896
SELECT DISTINCT - cor0.col2 + - col0 * col1 / - col1 FROM tab0 AS cor0
----
-9
34
7

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

query I rowsort
SELECT - 65 * + cor1.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 3b55c7dc206447e17991a3b085d746e6

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - col0 * + ( col2 ) col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT + 81 * + col1 AS col2 FROM tab0
----
6966
7371
7857

query I rowsort
SELECT DISTINCT 10 + col2 + col0 AS col2 FROM tab0
----
181
46
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 14 col1 FROM tab1 AS cor0
----
-140
-182
-364

query I rowsort
SELECT DISTINCT - + cor0.col2 + cor1.col1 FROM tab1 cor0 CROSS JOIN tab1 cor1
----
-28
-31
-41
-44
-47
-70
-83
-86

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

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

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

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

query I rowsort
SELECT ALL - 11 FROM tab1, tab0 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

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

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

query I rowsort
SELECT DISTINCT + col2 + - ( 75 ) * - col1 * - 36 AS col2 FROM tab2 AS cor0
----
-159274
-45862
-83673

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

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 944e54872ec2718f5c1c2710e1806e36

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

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

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

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

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

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

query I rowsort
SELECT 51 + + ( col0 ) FROM tab0
----
140
75
86

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-924
SELECT 62 DIV + 40 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-924
SELECT 62 / + 40 AS col1 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-925
SELECT ALL ( col2 ) DIV col0 - + col2 AS col2 FROM tab0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-925
SELECT ALL ( col2 ) / col0 - + col2 AS col2 FROM tab0
----
-1
-32
-82

query I rowsort
SELECT ALL col2 - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT + 28 * + col0 - col0 FROM tab0
----
2403
648
945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - - ( tab1.col1 + - col0 * tab1.col1 ) col2 FROM tab1
----
-49
-566
-947

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

query I rowsort
SELECT ALL - 17 AS col2 FROM tab2 AS cor0
----
-17
-17
-17

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

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

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

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

query I rowsort
SELECT - cor0.col0 + col2 * 65 * - col1 AS col1 FROM tab1 AS cor0
----
-37114
-81200
-91263

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

query I rowsort
SELECT + - 6 + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
2832
7456
91

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-941
SELECT DISTINCT col2 DIV + col0 - + col2 * col1 AS col0 FROM tab1 cor0
----
-1247
-1386
-570

skipif mysql # not compatible
query I rowsort label-941
SELECT DISTINCT col2 / + col0 - + col2 * col1 AS col0 FROM tab1 cor0
----
-1247
-1386
-570

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - cor0.col2 col0 FROM tab0 AS cor0
----
-35
-7298
-792

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

query I rowsort
SELECT DISTINCT - 85 * - col1 + - col0 AS col1 FROM tab1 AS cor0
----
1025
2207
786

query I rowsort
SELECT ALL - 49 * - col2 AS col0 FROM tab1 AS cor0
----
2646
2793
4704

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-951
SELECT ALL + 50 DIV col0 FROM tab1 AS cor0
----
0
0
16

skipif mysql # not compatible
query I rowsort label-951
SELECT ALL + 50 / col0 FROM tab1 AS cor0
----
0
0
16

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

query I rowsort
SELECT ALL + ( + col1 ) - + col0 AS col0 FROM tab2
----
-19
-62
24

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

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

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

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

query I rowsort
SELECT + ( col2 ) * ( + col1 ) * col2 + + col2 AS col0 FROM tab0 AS cor0
----
611966
93687
98

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-959
SELECT ALL - col2 * col1 - - CAST( - col1 AS SIGNED ) * col1 * 56 col0 FROM tab1 cor0
----
-10712
-39260
-6170

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-959
SELECT ALL - col2 * col1 - - CAST ( - col1 AS INTEGER ) * col1 * 56 col0 FROM tab1 cor0
----
-10712
-39260
-6170

query I rowsort
SELECT ALL + 53 FROM tab1
----
53
53
53

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

query I rowsort
SELECT + col0 + - 67 * col0 * + col2 AS col2 FROM tab0 AS cor0
----
-2310
-488877
-53040

query I rowsort
SELECT 90 + - col0 * + cor0.col2 * ( + col1 * cor0.col1 ) AS col1 FROM tab2 AS cor0
----
-181539
-7059378
-867488

query I rowsort
SELECT - 23 + + col2 * col1 * + col0 AS col2 FROM tab0 AS cor0
----
3372
664095
68089

query I rowsort
SELECT - + col1 + 34 - - col2 AS col1 FROM tab2 AS cor0
----
1
30
55

query I rowsort
SELECT ( - col2 ) * - col0 + + col2 * ( tab1.col0 ) FROM tab1
----
15360
324
7296

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

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

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

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

query I rowsort
SELECT ALL - 48 FROM tab0
----
-48
-48
-48

query I rowsort
SELECT ALL col2 * 78 FROM tab2
----
2028
2106
2964

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

skipif mysql # not compatible
query I rowsort label-973
SELECT DISTINCT + cor0.col1 / cor0.col0 FROM tab2, tab0, tab0 AS cor0
----
1
2
3

query I rowsort
SELECT + tab1.col1 + + cor0.col2 AS col2 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 1fa18cbfcccda263f7b810e83e3d150c

query I rowsort
SELECT 2 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

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

skipif mysql # not compatible
query I rowsort label-976
SELECT - col1 * + CAST ( - 33 AS INTEGER ) + col0 FROM tab2 cor0
----
1030
2025
640

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col2 FROM tab1
----
29
29
29

query I rowsort
SELECT DISTINCT 85 AS col2 FROM tab2
----
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 col0 FROM tab0, tab2 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - 63 FROM tab2, tab2 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

query I rowsort
SELECT DISTINCT + cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT - - col0 + 57 FROM tab2 AS cor0
----
135
136
64

query I rowsort
SELECT DISTINCT + col2 * - col0 * - ( col0 * 32 ) AS col1 FROM tab0 AS cor0
----
20784704
39200
608256

query I rowsort
SELECT + - col2 - 22 AS col2 FROM tab1 AS cor0
----
-118
-76
-79

query I rowsort
SELECT - col1 * cor0.col1 - col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT - col0 * + 32 + cor0.col1 AS col2 FROM tab1 cor0
----
-2038
-2547
-70

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-989
SELECT col0 DIV cor0.col1 + - 88 AS col1 FROM tab2 AS cor0
----
-84
-87
-88

skipif mysql # not compatible
query I rowsort label-989
SELECT col0 / cor0.col1 + - 88 AS col1 FROM tab2 AS cor0
----
-84
-87
-88

query I rowsort
SELECT ALL + col1 * 71 * col0 AS col2 FROM tab0 AS cor0
----
146544
241045
575029

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - ( col0 ) col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - col0 + - cor0.col1 + - 36 FROM tab2 AS cor0
----
-132
-173
-74

query I rowsort
SELECT cor0.col1 * 46 - ( - col0 ) FROM tab1 AS cor0
----
1199
524
678

query I rowsort
SELECT DISTINCT col1 + - 74 AS col0 FROM tab1 cor0
----
-48
-61
-64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-995
SELECT DISTINCT col2 + - CAST( col2 * + col2 AS SIGNED ) FROM tab2
----
-1406
-650
-702

skipif mysql # not compatible
query I rowsort label-995
SELECT DISTINCT col2 + - CAST ( col2 * + col2 AS INTEGER ) FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT col0 * + ( - 24 ) FROM tab1
----
-1536
-1920
-72

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

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

skipif mysql # not compatible
query I rowsort label-998
SELECT + col1 / + ( col1 ) FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 12 * - col1 col1 FROM tab0 cor0
----
1010
1163
999

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

query I rowsort
SELECT col0 * 69 AS col1 FROM tab2 AS cor0
----
483
5382
5451

query I rowsort
SELECT - + col1 + 92 FROM tab1 AS cor0
----
66
79
82

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 85 * 30 col1 FROM tab1 AS cor0
----
2550
2550
2550

query I rowsort
SELECT ALL 42 * 48 + - col0 FROM tab1 AS cor0
----
1936
1952
2013

query I rowsort
SELECT DISTINCT 58 * + ( - col2 ) + ( - col0 ) - col1 AS col0 FROM tab2 AS cor0
----
-1604
-1645
-2300

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1008
SELECT + ( - 59 ) * + cor0.col0 + col0 DIV + col0 FROM tab1 AS cor0
----
-176
-3775
-4719

skipif mysql # not compatible
query I rowsort label-1008
SELECT + ( - 59 ) * + cor0.col0 + col0 / + col0 FROM tab1 AS cor0
----
-176
-3775
-4719

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

query I rowsort
SELECT col2 + + 15 AS col1 FROM tab0 AS cor0
----
16
48
97

query I rowsort
SELECT ALL 72 + col2 FROM tab0 cor0
----
105
154
73

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

query I rowsort
SELECT DISTINCT + col0 * col0 * + 58 AS col2 FROM tab0 cor0
----
33408
459418
71050

onlyif mysql # use DIV operator for integer division
query I rowsort label-1014
SELECT ALL - col1 * col0 DIV - 77 AS col0 FROM tab0 AS cor0
----
105
26
44

skipif mysql # not compatible
query I rowsort label-1014
SELECT ALL - col1 * col0 / - 77 AS col0 FROM tab0 AS cor0
----
105
26
44

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

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

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

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

query I rowsort
SELECT 47 * + col1 + + col2 AS col0 FROM tab0 AS cor0
----
4075
4359
4560

onlyif mysql # use DIV operator for integer division
query I rowsort label-1018
SELECT + - col1 * cor0.col1 DIV + 27 + cor0.col1 * + col0 AS col0 FROM tab1 AS cor0
----
1034
53
637

skipif mysql # not compatible
query I rowsort label-1018
SELECT + - col1 * cor0.col1 / + 27 + cor0.col1 * + col0 AS col0 FROM tab1 AS cor0
----
1034
53
637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1019
SELECT + cor0.col0 * + col1 * CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
119652
51034
5859

skipif mysql # not compatible
query I rowsort label-1019
SELECT + cor0.col0 * + col1 * CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
119652
51034
5859

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

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

query I rowsort
SELECT + - 41 * - col2 FROM tab0 AS cor0
----
1353
3362
41

query I rowsort
SELECT - + col2 * + 83 AS col0 FROM tab1 cor0
----
-4482
-4731
-7968

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
86
91
97

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1025
SELECT ALL CAST( 57 AS SIGNED ) + col2 * col2 AS col1 FROM tab2
----
1501
733
786

skipif mysql # not compatible
query I rowsort label-1025
SELECT ALL CAST ( 57 AS INTEGER ) + col2 * col2 AS col1 FROM tab2
----
1501
733
786

onlyif mysql # use DIV operator for integer division
query I rowsort label-1026
SELECT DISTINCT col2 * 40 * col1 + ( 32 ) * + col2 + col2 DIV - tab1.col1 FROM tab1
----
24619
52985
57886

skipif mysql # not compatible
query I rowsort label-1026
SELECT DISTINCT col2 * 40 * col1 + ( 32 ) * + col2 + col2 / - tab1.col1 FROM tab1
----
24619
52985
57886

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1028
SELECT DISTINCT 49 DIV col0 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1028
SELECT DISTINCT 49 / col0 AS col1 FROM tab0 AS cor0
----
0
1
2

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1031
SELECT - + 77 DIV col2 + - col0 FROM tab0 AS cor0
----
-112
-26
-89

skipif mysql # not compatible
query I rowsort label-1031
SELECT - + 77 / col2 + - col0 FROM tab0 AS cor0
----
-112
-26
-89

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

query I rowsort
SELECT ( + 80 ) * col1 AS col1 FROM tab1 AS cor0
----
1040
2080
800

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

query I rowsort
SELECT - + 52 + col0 FROM tab2 AS cor0
----
-45
26
27

query I rowsort
SELECT - - 86 + ( + cor0.col0 ) + col0 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1508
310
4766

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

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

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

skipif mysql # not compatible
query I rowsort label-1039
SELECT - - col2 * + col1 * CAST ( 29 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
216398
2813
82302

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 73 + cor0.col0 * - 81 col0 FROM tab0 AS cor0
----
-2017
-2908
-7282

query I rowsort
SELECT - 45 * + col0 * ( + col1 + + col1 ) FROM tab1 AS cor0
----
-57600
-7020
-93600

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

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

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

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

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

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

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

query I rowsort
SELECT - col0 - 49 * - 5 FROM tab2 AS cor0
----
166
167
238

onlyif mysql # use DIV operator for integer division
query I rowsort label-1048
SELECT DISTINCT cor0.col0 DIV ( + 65 ) + col0 * + ( ( col1 ) ) DIV ( col1 ) FROM tab1 AS cor0
----
3
64
81

skipif mysql # not compatible
query I rowsort label-1048
SELECT DISTINCT cor0.col0 / ( + 65 ) + col0 * + ( ( col1 ) ) / ( col1 ) FROM tab1 AS cor0
----
3
64
81

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

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

query I rowsort
SELECT ALL - - 9 FROM tab0 AS cor0
----
9
9
9

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

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

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

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

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

query I rowsort
SELECT col1 - + 91 * - col2 FROM tab2
----
2425
2488
3475

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

query I rowsort
SELECT - col2 * + ( + col2 ) FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT col0 - - col0 AS col2 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL - 93 - col0 FROM tab0 AS cor0
----
-117
-128
-182

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - 21 col0 FROM tab1 AS cor0
----
-31
-34
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1064
SELECT DISTINCT CAST( col0 AS SIGNED ) * - col0 + cor0.col0 * 26 FROM tab2 AS cor0
----
-4056
-4187
133

skipif mysql # not compatible
query I rowsort label-1064
SELECT DISTINCT CAST ( col0 AS INTEGER ) * - col0 + cor0.col0 * 26 FROM tab2 AS cor0
----
-4056
-4187
133

query I rowsort
SELECT ALL 28 FROM tab1 cor0
----
28
28
28

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

query I rowsort
SELECT 57 + + col0 AS col1 FROM tab2
----
135
136
64

query I rowsort
SELECT col2 * + 7 + tab2.col1 FROM tab2
----
220
241
283

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

query I rowsort
SELECT DISTINCT 37 + col1 FROM tab0
----
123
128
134

onlyif mysql # use DIV operator for integer division
query I rowsort label-1071
SELECT ALL - col0 * ( - col0 ) * + ( col0 * + col1 ) + 88 + col2 * + col1 DIV + col1 FROM tab0
----
1188985
4158964
64152349

skipif mysql # not compatible
query I rowsort label-1071
SELECT ALL - col0 * ( - col0 ) * + ( col0 * + col1 ) + 88 + col2 * + col1 / + col1 FROM tab0
----
1188985
4158964
64152349

query I rowsort
SELECT ( - ( - col0 ) ) + + col2 + col1 AS col1 FROM tab1
----
131
189
83

query I rowsort
SELECT - 47 * - 11 AS col0 FROM tab2
----
517
517
517

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

query I rowsort
SELECT DISTINCT col1 + - 58 FROM tab0
----
28
33
39

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

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

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

query I rowsort
SELECT + 29 * + col1 AS col2 FROM tab2
----
1711
493
899

onlyif mysql # use DIV operator for integer division
query I rowsort label-1080
SELECT ALL - tab1.col1 + 38 DIV tab1.col2 AS col1 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-1080
SELECT ALL - tab1.col1 + 38 / tab1.col2 AS col1 FROM tab1
----
-10
-13
-26

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

query I rowsort
SELECT ALL - - 95 AS col2 FROM tab2 cor0
----
95
95
95

query I rowsort
SELECT ALL + 47 FROM tab1
----
47
47
47

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

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

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

query I rowsort
SELECT - + col2 * + 12 FROM tab1 AS cor0
----
-1152
-648
-684

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

query I rowsort
SELECT ALL 94 * col2 FROM tab2
----
2444
2538
3572

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

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

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

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

query I rowsort
SELECT ALL - 50 FROM tab1, tab2 AS cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1094
SELECT DISTINCT + + col2 * ( + 52 ) DIV + col2 - col1 FROM tab0 AS cor0
----
-34
-39
-45

skipif mysql # not compatible
query I rowsort label-1094
SELECT DISTINCT + + col2 * ( + 52 ) / + col2 - col1 FROM tab0 AS cor0
----
-34
-39
-45

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

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

query I rowsort
SELECT DISTINCT + col2 + col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
260
71
81

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

query I rowsort
SELECT DISTINCT - col1 + 41 AS col1 FROM tab1 AS cor0
----
15
28
31

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1104
SELECT ALL col2 DIV - col2 + - 53 + col1 * 40 FROM tab1 cor0
----
346
466
986

skipif mysql # not compatible
query I rowsort label-1104
SELECT ALL col2 / - col2 + - 53 + col1 * 40 FROM tab1 cor0
----
346
466
986

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

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

query I rowsort
SELECT + 48 * 85 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 3e3cfa484ed89436abdce763c1930495

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1108
SELECT + col0 * - col2 - + CAST( 51 AS SIGNED ) FROM tab1 AS cor0
----
-213
-3699
-7731

skipif mysql # not compatible
query I rowsort label-1108
SELECT + col0 * - col2 - + CAST ( 51 AS INTEGER ) FROM tab1 AS cor0
----
-213
-3699
-7731

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

query I rowsort
SELECT 46 + cor0.col2 * + col0 FROM tab0 AS cor0
----
7344
81
838

query I rowsort
SELECT + 32 + - col1 FROM tab0 AS cor0
----
-54
-59
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-1112
SELECT ALL + CAST( 81 AS SIGNED ) DIV - cor1.col1 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

skipif mysql # not compatible
query I rowsort label-1112
SELECT ALL + CAST ( 81 AS INTEGER ) / - cor1.col1 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

onlyif mysql # use DIV operator for integer division
query I rowsort label-1113
SELECT + - col1 * + col1 * col2 - col0 DIV + ( + 29 ) FROM tab0 AS cor0
----
-244068
-679045
-9410

skipif mysql # not compatible
query I rowsort label-1113
SELECT + - col1 * + col1 * col2 - col0 / + ( + 29 ) FROM tab0 AS cor0
----
-244068
-679045
-9410

query I rowsort
SELECT - - col1 * col0 + col1 + + cor0.col1 FROM tab1 AS cor0
----
1066
130
660

query I rowsort
SELECT DISTINCT 98 + col1 FROM tab1
----
108
111
124

query I rowsort
SELECT - + col2 * cor0.col0 * - col0 - + col2 FROM tab1 AS cor0
----
233415
432
614304

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

query I rowsort
SELECT + 72 * - col1 FROM tab0
----
-6192
-6552
-6984

query I rowsort
SELECT + 49 * col1 * col2 FROM tab2
----
31654
41013
75166

onlyif mysql # use DIV operator for integer division
query I rowsort label-1120
SELECT DISTINCT + 51 DIV col1 AS col1 FROM tab1
----
1
3
5

skipif mysql # not compatible
query I rowsort label-1120
SELECT DISTINCT + 51 / col1 AS col1 FROM tab1
----
1
3
5

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

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

query I rowsort
SELECT DISTINCT col2 + + col2 + col0 FROM tab1
----
111
178
272

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

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

query I rowsort
SELECT DISTINCT + + 28 AS col0 FROM tab1 AS cor0
----
28

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

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

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

query I rowsort
SELECT - - 41 + col0 FROM tab2 AS cor0
----
119
120
48

query I rowsort
SELECT DISTINCT - + 44 + + col1 AS col0 FROM tab0 AS cor0
----
42
47
53

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1132
SELECT DISTINCT + + col0 DIV ( col1 ) + 76 AS col1 FROM tab2 AS cor0
----
76
77
80

skipif mysql # not compatible
query I rowsort label-1132
SELECT DISTINCT + + col0 / ( col1 ) + 76 AS col1 FROM tab2 AS cor0
----
76
77
80

query I rowsort
SELECT ALL 20 - - cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8ba9372c9c6e904a4234cb687d26837e

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

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

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

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

query I rowsort
SELECT 84 * + 1 + col0 AS col0 FROM tab2
----
162
163
91

query I rowsort
SELECT + tab2.col2 + 56 * - col0 FROM tab2
----
-365
-4342
-4386

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

query I rowsort
SELECT ALL + - 7 + - 41 * + col1 FROM tab2 AS cor0
----
-1278
-2426
-704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 56 col2 FROM tab0 AS cor0
----
142
147
153

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1142
SELECT ALL + CAST( col1 AS SIGNED ) * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-1142
SELECT ALL + CAST ( col1 AS INTEGER ) * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + col2 + - col2 * - cor0.col0 AS col0 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT - 2 * col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

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

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

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

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

query I rowsort
SELECT - 24 AS col0 FROM tab0
----
-24
-24
-24

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1150
SELECT DISTINCT col1 * 7 DIV + tab1.col1 FROM tab1
----
7

skipif mysql # not compatible
query I rowsort label-1150
SELECT DISTINCT col1 * 7 / + tab1.col1 FROM tab1
----
7

query I rowsort
SELECT + col0 * + tab0.col1 * tab0.col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT tab0.col2 + - 95 AS col1 FROM tab0
----
-13
-62
-94

query I rowsort
SELECT ALL + + col0 * ( col2 + col2 ) AS col0 FROM tab0 AS cor0
----
14596
1584
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 + - ( col2 ) * + col2 col2 FROM tab0 AS cor0
----
-6544
-979
131

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

query I rowsort
SELECT ALL - col1 * - 93 + col0 FROM tab2 cor0
----
1660
2890
5565

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

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

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

query I rowsort
SELECT cor0.col2 FROM tab1, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1161
SELECT - col2 * - col2 + col1 DIV ( + 32 ) + - col1 AS col0 FROM tab1 AS cor0
----
2890
3239
9203

skipif mysql # not compatible
query I rowsort label-1161
SELECT - col2 * - col2 + col1 / ( + 32 ) + - col1 AS col0 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT - 24 AS col1 FROM tab1
----
-24
-24
-24

query I rowsort
SELECT - col1 + col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2942
-3259
-9229

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

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

query I rowsort
SELECT col2 + - 3 AS col2 FROM tab1 AS cor0
----
51
54
93

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1167
SELECT ALL - col2 * - col2 - - col1 DIV col2 FROM tab1
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-1167
SELECT ALL - col2 * - col2 - - col1 / col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + 59 * col0 + col1 * cor0.col1 AS col2 FROM tab2 cor0
----
1374
4950
8083

query I rowsort
SELECT + ( col0 ) * + col0 - col1 AS col1 FROM tab2 AS cor0
----
18
6025
6224

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

query I rowsort
SELECT ALL - ( + 46 ) * col2 - + 96 FROM tab2 AS cor0
----
-1292
-1338
-1844

onlyif mysql # use DIV operator for integer division
query I rowsort label-1172
SELECT ALL + 76 + 50 DIV col2 AS col2 FROM tab0 AS cor0
----
126
76
77

skipif mysql # not compatible
query I rowsort label-1172
SELECT ALL + 76 + 50 / col2 AS col2 FROM tab0 AS cor0
----
126
76
77

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

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

query I rowsort
SELECT DISTINCT col2 * + ( - tab1.col0 ) * - col2 + - col2 AS col1 FROM tab1
----
207879
737184
8694

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

skipif mysql # not compatible
query I rowsort label-1176
SELECT col0 / col2 AS col2 FROM tab1
----
0
0
1

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

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

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

skipif mysql # not compatible
query I rowsort label-1179
SELECT + + CAST ( + 36 AS INTEGER ) * - col2 + ( col1 ) FROM tab0 AS cor0
----
-1102
-2861
61

query I rowsort
SELECT - + 79 * + cor0.col2 + + col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-3863
-4188
-6544

query I rowsort
SELECT + 2 AS col1 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT - - ( col0 ) * col0 + + col2 * + col2 AS col1 FROM tab1 cor0
----
15616
2925
7345

query I rowsort
SELECT DISTINCT - 14 * - 58 + + cor0.col1 FROM tab0 AS cor0
----
898
903
909

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

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

query I rowsort
SELECT - - 93 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
117
128
182

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 46 + + col2 col1 FROM tab0 AS cor0
----
-13
-45
36

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

query I rowsort
SELECT - ( + 98 ) + col1 FROM tab1 cor0
----
-72
-85
-88

query I rowsort
SELECT + col2 * 31 FROM tab1 AS cor0
----
1674
1767
2976

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

skipif mysql # not compatible
query I rowsort label-1190
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) + cor0.col2 AS col0 FROM tab0 AS cor0
----
164
2
66

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1192
SELECT - - cor0.col2 DIV 30 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1192
SELECT - - cor0.col2 / 30 FROM tab2 AS cor0
----
0
0
1

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

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

query I rowsort
SELECT + 62 + col0 AS col1 FROM tab2
----
140
141
69

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

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

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

query I rowsort
SELECT + col2 * 37 AS col0 FROM tab1 cor0
----
1998
2109
3552

query I rowsort
SELECT ALL col0 * + 8 * col2 AS col1 FROM tab2 AS cor0
----
1512
16224
24016

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

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

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

query I rowsort
SELECT col2 + col0 * + cor0.col0 * cor0.col1 FROM tab2 AS cor0
----
106135
1546
358982

query I rowsort
SELECT - cor0.col2 * + cor0.col2 + col0 * col0 AS col2 FROM tab2 AS cor0
----
-680
4797
5408

query I rowsort
SELECT + col0 + 67 * col2 FROM tab1 AS cor0
----
3621
3883
6512

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

query I rowsort
SELECT - 73 FROM tab1, tab1 AS cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

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

query I rowsort
SELECT ALL - cor0.col1 * - col0 * 7 AS col1 FROM tab0 AS cor0
----
14448
23765
56693

query I rowsort
SELECT ALL col1 * 66 AS col1 FROM tab1 AS cor0
----
1716
660
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-1210
SELECT cor0.col1 * 62 DIV + cor0.col1 FROM tab1 cor0
----
62
62
62

skipif mysql # not compatible
query I rowsort label-1210
SELECT cor0.col1 * 62 / + cor0.col1 FROM tab1 cor0
----
62
62
62

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

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

query I rowsort
SELECT col0 + - ( + col1 ) AS col2 FROM tab1 AS cor0
----
-23
54
67

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

query I rowsort
SELECT DISTINCT - + col2 + 33 FROM tab1 AS cor0
----
-21
-24
-63

query I rowsort
SELECT - - 1 + 91 - col1 * 65 AS col0 FROM tab0 AS cor0
----
-5498
-5823
-6213

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

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

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

query I rowsort
SELECT DISTINCT col1 * - cor0.col2 * col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1221
SELECT col2 * - 93 + - col2 * CAST( + col1 AS SIGNED ) col0 FROM tab0 AS cor0
----
-15088
-190
-5907

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1221
SELECT col2 * - 93 + - col2 * CAST ( + col1 AS INTEGER ) col0 FROM tab0 AS cor0
----
-15088
-190
-5907

onlyif mysql # use DIV operator for integer division
query I rowsort label-1222
SELECT DISTINCT col2 * + 24 - + 24 DIV + col2 FROM tab0
----
0
1968
792

skipif mysql # not compatible
query I rowsort label-1222
SELECT DISTINCT col2 * + 24 - + 24 / + col2 FROM tab0
----
0
1968
792

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

query I rowsort
SELECT - - 57 AS col2 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT DISTINCT + 90 * + cor0.col1 FROM tab0 AS cor0
----
7740
8190
8730

query I rowsort
SELECT ALL + 73 FROM tab0 AS cor0
----
73
73
73

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

query I rowsort
SELECT DISTINCT + 12 + - col2 * - col2 FROM tab2 cor0
----
1456
688
741

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

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

query I rowsort
SELECT DISTINCT tab2.col0 * - col0 + - col2 AS col2 FROM tab2
----
-6110
-6279
-76

query I rowsort
SELECT DISTINCT 31 * + tab1.col1 AS col1 FROM tab1
----
310
403
806

query I rowsort
SELECT DISTINCT - 50 * + cor0.col0 AS col1 FROM tab0, tab1, tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT ALL - tab0.col2 * col0 * 78 AS col1 FROM tab0
----
-2730
-569244
-61776

query I rowsort
SELECT col1 * col1 + - ( - col2 + col2 ) * ( col2 ) FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-1236
SELECT DISTINCT - 64 DIV - tab0.col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-1236
SELECT DISTINCT - 64 / - tab0.col1 FROM tab0
----
0

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

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

query I rowsort
SELECT - 73 * col1 AS col2 FROM tab1 cor0
----
-1898
-730
-949

query I rowsort
SELECT 73 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

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

query III rowsort
SELECT * FROM tab1 WHERE ( + col2 ) < NULL
----

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

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

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

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

query I rowsort
SELECT col2 / - tab2.col0 - col0 * tab2.col2 FROM tab2 WHERE NOT NULL BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col1 + tab2.col1 * tab2.col1 * col1 col0 FROM tab2
----
208860
30752
5202

query I rowsort
SELECT ALL ( - col2 ) + + 17 FROM tab0 AS cor0
----
-16
-65
16

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

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

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

query I rowsort
SELECT col1 FROM tab0 WHERE NOT col1 NOT IN ( - col0 )
----

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

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

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

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

query I rowsort
SELECT ALL - col1 + col0 + col2 * - col2 FROM tab1 AS cor0
----
-2939
-3195
-9149

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

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

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

query I rowsort
SELECT ALL - tab1.col0 + col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col1 + col0 * + col2 * tab2.col1 FROM tab2
----
119711
51051
5890

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

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

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

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

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

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

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( col1 * col2 * - col2 ) = + col2
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1268
SELECT col2 DIV col1 + + col2 + col1 AS col2 FROM tab1
----
116
72
82

skipif mysql # not compatible
query I rowsort label-1268
SELECT col2 / col1 + + col2 + col1 AS col2 FROM tab1
----
116
72
82

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col0 * - col1 + - col2 col0 FROM tab0
----
118824
49503
720729

query I rowsort
SELECT tab0.col0 * col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL - tab1.col1 * - col1 + + tab1.col1 AS col2 FROM tab1
----
110
182
702

query I rowsort
SELECT ALL col2 * + col0 * + col1 + tab2.col1 * col2 FROM tab2
----
121186
51680
6696

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 col0 FROM tab0
----
-34
-7
9

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1278
SELECT - - 50 DIV col1 AS col2 FROM tab1 cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-1278
SELECT - - 50 / col1 AS col2 FROM tab1 cor0
----
1
3
5

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col1 + col1 col1 FROM tab0
----
100
139
193

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

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

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

query I rowsort
SELECT col0 + + 51 * col2 AS col0 FROM tab0 AS cor0
----
1707
4271
86

query I rowsort
SELECT ALL 89 AS col0 FROM tab0 AS cor0
----
89
89
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1287
SELECT - col2 * - col0 * CAST( - 33 AS SIGNED ) FROM tab0 AS cor0
----
-1155
-240834
-26136

skipif mysql # not compatible
query I rowsort label-1287
SELECT - col2 * - col0 * CAST ( - 33 AS INTEGER ) FROM tab0 AS cor0
----
-1155
-240834
-26136

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

query I rowsort
SELECT ALL 69 * 58 AS col0 FROM tab1
----
4002
4002
4002

query I rowsort
SELECT DISTINCT col0 * ( tab2.col0 ) + 61 * + col2 FROM tab2
----
1696
7670
8559

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

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

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

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

query I rowsort
SELECT + col0 + col2 + + col1 * col2 * col0 FROM tab2
----
119756
51151
5893

query I rowsort
SELECT col0 - 9 AS col2 FROM tab1 AS cor0
----
-6
55
71

query I rowsort
SELECT DISTINCT + ( + tab2.col0 ) FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT + col2 + - col1 * 48 * ( + tab1.col2 * 34 ) AS col2 FROM tab1
----
-2036640
-2291274
-930183

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1299
SELECT DISTINCT tab2.col1 + - tab2.col1 DIV + tab2.col1 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-1299
SELECT DISTINCT tab2.col1 + - tab2.col1 / + tab2.col1 FROM tab2
----
16
30
58

query I rowsort
SELECT + 66 * tab0.col2 * ( + ( col0 ) ) FROM tab0
----
2310
481668
52272

query I rowsort
SELECT + - col0 + - col1 + - 80 * - col1 FROM tab2 AS cor0
----
1264
2442
4583

query I rowsort
SELECT - - col0 + ( 89 ) + col0 FROM tab0 AS cor0
----
137
159
267

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

query I rowsort
SELECT col1 + + col2 + 40 FROM tab2 AS cor0
----
125
95
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 31 * col2 + + col2 * 56 * + col2 col1 FROM tab1 AS cor0
----
164970
183711
519072

query I rowsort
SELECT ALL - 70 AS col2 FROM tab0 AS cor0
----
-70
-70
-70

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

query I rowsort
SELECT ALL - 85 * - cor0.col1 FROM tab2 AS cor0
----
1445
2635
5015

query I rowsort
SELECT DISTINCT + col1 * - col0 + - 25 FROM tab2 AS cor0
----
-1368
-242
-4627

query I rowsort
SELECT ALL - ( + col0 ) * - col0 - + 52 FROM tab0 AS cor0
----
1173
524
7869

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

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

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

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

query I rowsort
SELECT DISTINCT + + 37 * col0 + + col2 FROM tab2 AS cor0
----
286
2912
2961

onlyif mysql # use DIV operator for integer division
query I rowsort label-1316
SELECT DISTINCT + col2 DIV + 93 AS col2 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-1316
SELECT DISTINCT + col2 / + 93 AS col2 FROM tab2
----
0

query I rowsort
SELECT 84 * col2 AS col1 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT 90 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1319
SELECT - CAST( - ( + col1 ) + 16 AS SIGNED ) FROM tab1
----
-3
-6
10

skipif mysql # not compatible
query I rowsort label-1319
SELECT - CAST ( - ( + col1 ) + 16 AS INTEGER ) FROM tab1
----
-3
-6
10

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

skipif mysql # not compatible
query I rowsort label-1320
SELECT DISTINCT ( col0 ) / + tab1.col2 FROM tab1
----
0
1

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

query I rowsort
SELECT 74 + col0 AS col2 FROM tab0
----
109
163
98

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

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

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

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

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

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

query I rowsort
SELECT 64 * + col1 FROM tab2
----
1088
1984
3776

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

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1
----
243 values hashing to 098e223d780e18b6582523fd6f55eec9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col1 col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1333
SELECT DISTINCT - col1 + + ( col0 ) DIV + col1 AS col2 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1333
SELECT DISTINCT - col1 + + ( col0 ) / + col1 AS col2 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + 14 col0 FROM tab2
----
-364
-378
-532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab0, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 59 + col0 FROM tab2
----
137
138
66

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

query I rowsort
SELECT ALL - 93 AS col0 FROM tab2
----
-93
-93
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1339
SELECT - CAST( + ( col2 ) AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1339
SELECT - CAST ( + ( col2 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL col0 + + col1 * + col0 FROM tab2 AS cor0
----
1422
224
4680

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

query I rowsort
SELECT DISTINCT + 39 + + col1 * + cor0.col2 FROM tab1 AS cor0
----
1287
1443
609

query I rowsort
SELECT DISTINCT + 41 + + col2 * col2 FROM tab2 AS cor0
----
1485
717
770

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

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

query I rowsort
SELECT - col0 * ( col0 ) * ( tab1.col0 * + col2 ) + - 97 FROM tab1
----
-14942305
-1555
-49152097

query I rowsort
SELECT DISTINCT 61 + col2 AS col0 FROM tab1 AS cor0
----
115
118
157

onlyif mysql # use DIV operator for integer division
query I rowsort label-1348
SELECT ALL + 7 DIV + col2 AS col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1348
SELECT ALL + 7 / + col2 AS col2 FROM tab1 cor0
----
0
0
0

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

query I rowsort
SELECT ALL col1 + + 46 FROM tab0 AS cor0
----
132
137
143

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

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

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

query I rowsort
SELECT - 51 * + col1 AS col0 FROM tab0
----
-4386
-4641
-4947

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

query I rowsort
SELECT DISTINCT 50 * col1 FROM tab2 AS cor0
----
1550
2950
850

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

query I rowsort
SELECT ALL - 4 + col0 * col1 AS col0 FROM tab0 AS cor0
----
2060
3391
8095

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

skipif mysql # not compatible
query I rowsort label-1358
SELECT CAST ( 2 AS INTEGER ) * + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 76 * + col0 col1 FROM tab2 AS cor0
----
532
5928
6004

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

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

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

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

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

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

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 + col2 + col0 + 7 * col2 * col0 FROM tab1 AS cor0
----
1191
25657
53936

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

query I rowsort
SELECT DISTINCT - - col1 + 37 + + cor0.col2 FROM tab1 AS cor0
----
104
117
146

query I rowsort
SELECT + col2 * 68 + + 18 FROM tab0 AS cor0
----
2262
5594
86

query I rowsort
SELECT DISTINCT col1 * + 18 + + 39 AS col1 FROM tab2
----
1101
345
597

query I rowsort
SELECT ALL col0 * + 73 + + col2 + + col2 FROM tab0
----
1818
2557
6661

query I rowsort
SELECT col0 + - tab2.col1 * col1 FROM tab2
----
-210
-3403
-954

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

query I rowsort
SELECT ALL + tab2.col1 * + col0 + - 51 * col0 + ( + 41 ) AS col1 FROM tab2
----
-2645
-99
665

query I rowsort
SELECT - tab0.col1 * + 7 AS col0 FROM tab0
----
-602
-637
-679

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

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

query I rowsort
SELECT ALL - + col1 + + 52 * - col2 FROM tab0 AS cor0
----
-149
-1802
-4355

onlyif mysql # use DIV operator for integer division
query I rowsort label-1380
SELECT DISTINCT + + col1 * - col2 + cor0.col0 * col0 DIV 37 + + col2 AS col2 FROM tab0 cor0
----
-2790
-63
-7166

skipif mysql # not compatible
query I rowsort label-1380
SELECT DISTINCT + + col1 * - col2 + cor0.col0 * col0 / 37 + + col2 AS col2 FROM tab0 cor0
----
-2790
-63
-7166

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

skipif mysql # not compatible
query I rowsort label-1381
SELECT 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-1382
SELECT DISTINCT - - col1 + 38 DIV - cor0.col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1382
SELECT DISTINCT - - col1 + 38 / - cor0.col2 FROM tab1 AS cor0
----
10
13
26

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

query I rowsort
SELECT ALL + - 12 + col2 AS col0 FROM tab2 AS cor0
----
14
15
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 + + CAST ( + col1 AS REAL ) + col2 col0 FROM tab2
----
144
72
89

query I rowsort
SELECT - 84 FROM tab0, tab0 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT DISTINCT - col1 + - col2 + + tab2.col2 * + col0 * tab2.col0 FROM tab2
----
1265
158099
237103

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

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

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

query I rowsort
SELECT ALL + - 92 FROM tab1 AS cor0
----
-92
-92
-92

query I rowsort
SELECT + + ( + col1 ) + + cor0.col1 + 8 * - cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
-10710
-1674
-36698

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1395
SELECT DISTINCT + col0 + ( col2 ) * + CAST( 68 AS SIGNED ) FROM tab0 AS cor0
----
103
2268
5665

skipif mysql # not compatible
query I rowsort label-1395
SELECT DISTINCT + col0 + ( col2 ) * + CAST ( 68 AS INTEGER ) FROM tab0 AS cor0
----
103
2268
5665

query I rowsort
SELECT DISTINCT col1 + tab1.col0 * + col2 + col1 FROM tab1
----
214
3668
7706

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

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

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

query I rowsort
SELECT ALL - 16 AS col1 FROM tab2
----
-16
-16
-16

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

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

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

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

query I rowsort
SELECT + + ( cor0.col1 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-1405
SELECT ALL col1 * 24 DIV - col0 col0 FROM tab0
----
-24
-66
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1405
SELECT ALL col1 * 24 / - col0 col0 FROM tab0
----
-24
-66
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 col0 FROM tab1, tab2, tab0 AS cor0
----
86
91
97

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

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

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

query I rowsort
SELECT DISTINCT - col1 * 97 + col0 AS col0 FROM tab2
----
-1570
-3000
-5645

query I rowsort
SELECT 63 * + col1 FROM tab2
----
1071
1953
3717

query I rowsort
SELECT DISTINCT + col1 + + 9 * + col2 FROM tab0
----
106
383
829

query I rowsort
SELECT + ( - 22 ) + + col1 + col0 * 49 FROM tab1
----
151
3124
3911

query I rowsort
SELECT 73 + col0 * - col2 AS col2 FROM tab1
----
-3575
-7607
-89

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

query I rowsort
SELECT ( - 33 ) AS col2 FROM tab2
----
-33
-33
-33

query I rowsort
SELECT - 28 + 34 * col0 + + col0 AS col1 FROM tab1
----
2212
2772
77

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

query I rowsort
SELECT DISTINCT - col2 * - cor0.col0 + cor0.col0 * + col1 AS col0 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT ALL + cor0.col2 + - 70 FROM tab2, tab2 cor0
----
9 values hashing to d7600f907c2d572aaec394a61ee1c60b

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 2 + + col2 col1 FROM tab0
----
3
35
84

query I rowsort
SELECT - + 65 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 4ca93c42a91c7dff917e7b7090ba9e57

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

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

query I rowsort
SELECT + 92 + cor0.col2 AS col2 FROM tab2 cor0
----
118
119
130

query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 * 45 AS col2 FROM tab1 AS cor0
----
-164160
-345600
-7290

query I rowsort
SELECT DISTINCT + 91 * - col2 + - 21 AS col1 FROM tab1 AS cor0
----
-4935
-5208
-8757

query I rowsort
SELECT DISTINCT - - 37 AS col2 FROM tab2 cor0
----
37

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 + - col0 col2 FROM tab1 AS cor0
----
-1
15
76

query I rowsort
SELECT ALL + 94 + + col0 AS col2 FROM tab2
----
101
172
173

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

query I rowsort
SELECT - tab2.col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

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

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

query I rowsort
SELECT - - 29 * cor0.col1 + - ( + col1 + - col0 ) * + ( col1 * - col0 ) FROM tab1 AS cor0
----
-34270
-69303
2548

onlyif mysql # use DIV operator for integer division
query I rowsort label-1439
SELECT + col1 * + col1 - ( 71 ) DIV - cor0.col2 AS col2 FROM tab1 AS cor0
----
101
169
677

skipif mysql # not compatible
query I rowsort label-1439
SELECT + col1 * + col1 - ( 71 ) / - cor0.col2 AS col2 FROM tab1 AS cor0
----
101
169
677

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

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

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

query I rowsort
SELECT ALL col2 * - col1 * + ( - 81 ) FROM tab0
----
229878
604422
7857

query I rowsort
SELECT + + col0 + + ( - col2 ) + col0 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT - - col1 * + col2 * col0 + col2 FROM tab0 cor0
----
3396
664200
68145

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

query I rowsort
SELECT + + 52 + + col2 AS col2 FROM tab0 AS cor0
----
134
53
85

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

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

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

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

query I rowsort
SELECT + 73 * col0 * col1 AS col2 FROM tab2 AS cor0
----
15841
335946
98039

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

query I rowsort
SELECT tab0.col1 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

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

query I rowsort
SELECT - ( 78 ) FROM tab1 AS cor0
----
-78
-78
-78

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

query I rowsort
SELECT + - col0 * + col2 * + cor0.col2 AS col0 FROM tab1 cor0
----
-207936
-737280
-8748

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

query I rowsort
SELECT + ( + 93 ) FROM tab0
----
93
93
93

query I rowsort
SELECT ALL + 78 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT + + col2 + col0 * - 59 AS col0 FROM tab2 AS cor0
----
-386
-4576
-4623

query I rowsort
SELECT DISTINCT - tab0.col2 * - 54 FROM tab0
----
1782
4428
54

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

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

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

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

query I rowsort
SELECT ALL - col2 + + 57 * - col1 + col0 * col2 AS col2 FROM tab0 cor0
----
-4143
-5495
2029

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

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

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

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

query I rowsort
SELECT ALL + + 58 * + 98 AS col2 FROM tab2 AS cor0
----
5684
5684
5684

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

query I rowsort
SELECT ALL + - cor0.col1 * col1 - col0 * - ( + cor0.col1 ) * - cor0.col2 FROM tab1 AS cor0
----
-100009
-36580
-4888

query I rowsort
SELECT - - 55 * + cor0.col2 + + col0 * 50 AS col2 FROM tab2 AS cor0
----
1835
5330
6040

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

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

query I rowsort
SELECT - + 62 * col2 FROM tab1 AS cor0
----
-3348
-3534
-5952

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

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

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

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

query I rowsort
SELECT DISTINCT - 28 * col2 + + ( + 94 ) + col1 FROM tab1 AS cor0
----
-1392
-1492
-2581

query I rowsort
SELECT DISTINCT + 74 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
100
84
87

query I rowsort
SELECT - col1 + + col2 + + 21 FROM tab1 AS cor0
----
104
49
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-1484
SELECT 25 + - col1 DIV col1 + col1 col0 FROM tab0 AS cor0
----
110
115
121

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1484
SELECT 25 + - col1 / col1 + col1 col0 FROM tab0 AS cor0
----
110
115
121

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

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

query I rowsort
SELECT DISTINCT + + 60 * col1 + col0 FROM tab1 AS cor0
----
1563
664
860

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1488
SELECT + + col2 * col0 + CAST( 26 AS SIGNED ) AS col2 FROM tab1 cor0
----
188
3674
7706

skipif mysql # not compatible
query I rowsort label-1488
SELECT + + col2 * col0 + CAST ( 26 AS INTEGER ) AS col2 FROM tab1 cor0
----
188
3674
7706

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

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

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

query I rowsort
SELECT DISTINCT ( - 36 * tab0.col1 ) FROM tab0
----
-3096
-3276
-3492

query I rowsort
SELECT ALL + 92 * - 93 * - col1 FROM tab1
----
111228
222456
85560

onlyif mysql # use DIV operator for integer division
query I rowsort label-1493
SELECT + col2 DIV col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1493
SELECT + col2 / col1 AS col2 FROM tab1
----
2
5
7

query I rowsort
SELECT ALL 99 AS col0 FROM tab1
----
99
99
99

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

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

query I rowsort
SELECT + 17 + + col1 FROM tab1 AS cor0
----
27
30
43

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

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

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

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

query I rowsort
SELECT ALL col0 + cor0.col1 * col2 * 35 FROM tab1 cor0
----
20014
43760
49143

query I rowsort
SELECT - ( - 53 + col2 ) FROM tab2
----
15
26
27

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

query I rowsort
SELECT 11 + - cor0.col0 AS col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 2ac78a5b067116e0df3c155961597cb7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 83 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-83

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

query I rowsort
SELECT ALL 19 + - col2 * + col0 + - col0 FROM tab0
----
-51
-7368
-797

onlyif mysql # use DIV operator for integer division
query I rowsort label-1509
SELECT 56 * col1 + + col2 DIV tab0.col1 + tab0.col0 AS col1 FROM tab0
----
4840
5185
5467

skipif mysql # not compatible
query I rowsort label-1509
SELECT 56 * col1 + + col2 / tab0.col1 + tab0.col0 AS col1 FROM tab0
----
4840
5185
5467

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

query I rowsort
SELECT + col2 * 66 + - col1 FROM tab0 AS cor0
----
-31
2092
5321

query I rowsort
SELECT DISTINCT col2 * col2 + col1 + + col1 AS col1 FROM tab2
----
1478
791
794

query I rowsort
SELECT DISTINCT 50 * + tab1.col1 + tab1.col2 FROM tab1
----
1354
557
746

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

query I rowsort
SELECT 94 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT ALL - col1 * col1 * ( col0 + col1 ) FROM tab1
----
-15717
-19604
-7400

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1
----
243 values hashing to 877a8dbac0e29b86e845fb64ed9d2242

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

query I rowsort
SELECT DISTINCT col0 * 38 + - col0 AS col2 FROM tab2 AS cor0
----
259
2886
2923

query I rowsort
SELECT ALL col1 * + 71 FROM tab1 AS cor0
----
1846
710
923

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - + col0 + - 8 AS col2 FROM tab0 AS cor0
----
-32
-43
-97

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

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

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

query I rowsort
SELECT col1 + - col0 + tab2.col1 AS col1 FROM tab2
----
-45
40
55

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

query I rowsort
SELECT ALL + - ( col1 ) + - col1 * ( ( + cor0.col0 ) * 7 ) FROM tab2 AS cor0
----
-1550
-32273
-9418

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1531
SELECT DISTINCT - + ( col2 ) * + col2 + 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-1531
SELECT DISTINCT - + ( col2 ) * + col2 + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 + - col1 * col1 + col0 * + cor0.col0 FROM tab0 AS cor0
----
-451
-6906
-8281

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1535
SELECT DISTINCT - cor0.col2 DIV col1 - + col2 * + col1 col0 FROM tab1 AS cor0
----
-1255
-1406
-575

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1535
SELECT DISTINCT - cor0.col2 / col1 - + col2 * + col1 col0 FROM tab1 AS cor0
----
-1255
-1406
-575

query I rowsort
SELECT 24 * + col0 FROM tab0
----
2136
576
840

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

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

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

query I rowsort
SELECT - - 9 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

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

query I rowsort
SELECT DISTINCT - 71 * cor0.col2 - 68 FROM tab0 AS cor0
----
-139
-2411
-5890

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

query I rowsort
SELECT ALL + 11 + + cor0.col2 * col1 FROM tab0 AS cor0
----
108
2849
7473

query I rowsort
SELECT - 19 + - ( - col1 * - cor0.col1 ) + col1 AS col1 FROM tab2 AS cor0
----
-291
-3441
-949

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

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

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

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

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

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

query I rowsort
SELECT col0 + 34 * col2 FROM tab1 AS cor0
----
1839
2002
3344

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

query I rowsort
SELECT + 64 FROM tab1, tab2 cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

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

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

query I rowsort
SELECT + col2 * col1 * col2 AS col1 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

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

skipif mysql # not compatible
query I rowsort label-1558
SELECT ALL + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 * + col0 AS col2 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1560
SELECT - col2 DIV 68 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1560
SELECT - col2 / 68 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1561
SELECT col1 DIV + 73 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1561
SELECT col1 / + 73 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + tab2.col1 + col1 * + tab2.col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT + tab0.col2 * - col1 + col0 * + col0 AS col2 FROM tab0
----
-2262
1128
459

query I rowsort
SELECT DISTINCT col1 + - tab1.col0 * + col2 + col0 FROM tab1
----
-133
-3574
-7587

query I rowsort
SELECT + col2 * + cor0.col0 + 50 + col1 * ( + col2 ) AS col1 FROM tab1 AS cor0
----
1616
4268
8978

query I rowsort
SELECT + tab2.col1 * ( - col0 * col1 ) FROM tab2
----
-22831
-271518
-6727

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1567
SELECT ALL + CAST( NULL AS DECIMAL ) + col1 * + col0 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1567
SELECT ALL + CAST ( NULL AS REAL ) + col1 * + col0 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( - col2 ) + col2 * col0 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - ( col0 ) - + col1 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1570
SELECT ALL + 92 + + col1 + + col2 * - CAST( - 90 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
279
3148
7563

skipif mysql # not compatible
query I rowsort label-1570
SELECT ALL + 92 + + col1 + + col2 * - CAST ( - 90 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
279
3148
7563

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT ALL + col1 + - 34 * col2 FROM tab1 AS cor0
----
-1810
-1928
-3251

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 91c4f11552b395e0eb390f09eebaec3d

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab0 cor3
----
3645 values hashing to f2e58df61204c8a189e87d6816ea9159

query I rowsort
SELECT DISTINCT + 44 FROM tab2 cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2
----
44

query I rowsort
SELECT DISTINCT col0 * + tab1.col0 - col2 * 55 FROM tab1
----
-2961
1120
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-1577
SELECT - col2 DIV - col0 + + col0 + + 94 col1 FROM tab1
----
115
158
175

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1577
SELECT - col2 / - col0 + + col0 + + 94 col1 FROM tab1
----
115
158
175

query I rowsort
SELECT ALL ( col1 ) - + col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT 15 + 27 FROM tab1
----
42

query I rowsort
SELECT ALL col0 + - col2 - + col1 AS col0 FROM tab0
----
-63
-84
-95

query I rowsort
SELECT DISTINCT + col2 - col1 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - col0 - 17 FROM tab1 AS cor0
----
-20
-81
-97

query I rowsort
SELECT + - ( col1 ) + col0 * + 1 + cor0.col0 * - col0 AS col2 FROM tab1 cor0
----
-32
-4042
-6333

query I rowsort
SELECT col2 + + 89 + - col0 FROM tab0 AS cor0
----
55
82
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + col1 col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - + 67 AS col1 FROM tab0 AS cor0
----
-67
-67
-67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1587
SELECT - 91 DIV - 18 + + col0 FROM tab0 cor0
----
29
40
94

skipif mysql # not compatible
query I rowsort label-1587
SELECT - 91 / - 18 + + col0 FROM tab0 cor0
----
29
40
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-1588
SELECT + - 24 + - cor0.col2 DIV + col1 FROM tab1 AS cor0
----
-26
-29
-31

skipif mysql # not compatible
query I rowsort label-1588
SELECT + - 24 + - cor0.col2 / + col1 FROM tab1 AS cor0
----
-26
-29
-31

query I rowsort
SELECT DISTINCT 6 * col2 FROM tab1
----
324
342
576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT - col2 + col0 * col1 * 29 FROM tab0 AS cor0
----
234789
59823
98454

query I rowsort
SELECT cor0.col0 * + 99 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT - col1 * - tab2.col0 - - tab2.col0 AS col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT - col1 * + 59 AS col1 FROM tab0 AS cor0
----
-5074
-5369
-5723

query I rowsort
SELECT DISTINCT cor0.col1 * - 22 AS col2 FROM tab2 AS cor0
----
-1298
-374
-682

onlyif mysql # use DIV operator for integer division
query I rowsort label-1596
SELECT ALL - - col1 DIV + col0 AS col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-1596
SELECT ALL - - col1 / + col0 AS col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT - col1 * - ( + col0 * + col0 ) AS col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT col1 + + ( 91 + col0 ) AS col0 FROM tab0 AS cor0
----
201
223
271

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 - 67 * col0 col2 FROM tab2
----
-438
-5167
-5276

query I rowsort
SELECT DISTINCT col1 + col1 AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT ( ( + tab0.col2 ) ) * tab0.col1 + col1 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - tab1.col2 + - col1 * col0 + + tab1.col2 AS col1 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1603
SELECT 36 DIV tab2.col0 - col2 AS col2 FROM tab2
----
-22
-26
-38

skipif mysql # not compatible
query I rowsort label-1603
SELECT 36 / tab2.col0 - col2 AS col2 FROM tab2
----
-22
-26
-38

query I rowsort
SELECT 34 + tab1.col1 * col2 AS col2 FROM tab1
----
1282
1438
604

query I rowsort
SELECT ALL 93 - col2 FROM tab0 AS cor0
----
11
60
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1606
SELECT DISTINCT - - CAST( col0 AS SIGNED ) * + col0 - - cor0.col1 * col0 AS col0 FROM tab2 AS cor0
----
10686
266
7584

skipif mysql # not compatible
query I rowsort label-1606
SELECT DISTINCT - - CAST ( col0 AS INTEGER ) * + col0 - - cor0.col1 * col0 AS col0 FROM tab2 AS cor0
----
10686
266
7584

query I rowsort
SELECT ALL - cor0.col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT col2 + + col0 * + col0 FROM tab0
----
1226
609
8003

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1609
SELECT + CAST( NULL AS SIGNED ) + - col1 * - col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1609
SELECT + CAST ( NULL AS INTEGER ) + - col1 * - col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1610
SELECT ALL + CAST( NULL AS SIGNED ) + - col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1610
SELECT ALL + CAST ( NULL AS INTEGER ) + - col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 95 * col2 + + col1 * col2 AS col1 FROM tab0 AS cor0
----
-297
-328
2

query I rowsort
SELECT DISTINCT + - col2 + col0 + + col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + - col0 - - col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT 32 AS col1 FROM tab0 AS cor0
----
32

query I rowsort
SELECT DISTINCT col0 + - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + 82 * col1 FROM tab2 AS cor0
----
1394
2542
4838

query I rowsort
SELECT + cor0.col1 + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col0 - col2 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1619
SELECT DISTINCT - col2 DIV + col0 + cor0.col2 FROM tab2 AS cor0
----
24
26
38

skipif mysql # not compatible
query I rowsort label-1619
SELECT DISTINCT - col2 / + col0 + cor0.col2 FROM tab2 AS cor0
----
24
26
38

query I rowsort
SELECT DISTINCT - + col0 - col1 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT + 41 + + col2 FROM tab0 AS cor0
----
123
42
74

query I rowsort
SELECT DISTINCT col1 + + col0 * - cor0.col1 + + col2 FROM tab1 AS cor0
----
-573
-931
2

query I rowsort
SELECT ALL + col0 + cor0.col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - ( - col2 ) FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + + col0 * col2 + - col1 FROM tab1 AS cor0
----
136
3638
7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col0 + col2 + col0 col0 FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT - col2 * - cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT - col2 - - cor0.col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col0 * - col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + col1 + 9 * - 54 * col1 FROM tab1 AS cor0
----
-12610
-4850
-6305

query I rowsort
SELECT + cor0.col2 * - ( + ( col0 ) ) * + col1 AS col2 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - col0 + ( 32 ) FROM tab0 AS cor0
----
-3
-57
8

query I rowsort
SELECT - col2 * - 94 FROM tab0 AS cor0
----
3102
7708
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-1634
SELECT - col2 * ( + col1 ) DIV col0 FROM tab2 AS cor0
----
-119
-19
-8

skipif mysql # not compatible
query I rowsort label-1634
SELECT - col2 * ( + col1 ) / col0 FROM tab2 AS cor0
----
-119
-19
-8

query I rowsort
SELECT + col0 * + col1 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL + - col1 * col2 + col0 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT + - col0 * - 59 FROM tab2 AS cor0
----
413
4602
4661

query I rowsort
SELECT DISTINCT col2 + col1 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT + col0 + - col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL 44 * 86 AS col1 FROM tab1 AS cor0
----
3784
3784
3784

query I rowsort
SELECT ALL - col2 - 24 AS col0 FROM tab0 AS cor0
----
-106
-25
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1642
SELECT - CAST( + col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-1642
SELECT - CAST ( + col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - col2 + 18 * - col1 FROM tab2 AS cor0
----
-1088
-344
-585

query I rowsort
SELECT - cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + col1 * + 77 - + col1 * tab2.col0 AS col1 FROM tab2
----
-34
-59
2170

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 19a23ac6b759f8988954bf75ba7c431a

query I rowsort
SELECT ALL - 15 FROM tab0, tab2 cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query I rowsort
SELECT col1 * 90 * + col0 FROM tab1
----
57600
7020
93600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1649
SELECT DISTINCT - tab0.col1 * CAST( 32 AS SIGNED ) * col2 FROM tab0
----
-238784
-3104
-90816

skipif mysql # not compatible
query I rowsort label-1649
SELECT DISTINCT - tab0.col1 * CAST ( 32 AS INTEGER ) * col2 FROM tab0
----
-238784
-3104
-90816

query I rowsort
SELECT cor0.col2 - - col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-1651
SELECT ALL col0 * col1 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1651
SELECT ALL col0 * col1 / cor0.col0 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - - col1 + - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - + col0 + + col2 * - col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT ALL - + col0 + + col2 * col0 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-1655
SELECT + col0 DIV - col0 - col1 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-1655
SELECT + col0 / - col0 - col1 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + + col0 + - cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * col2 AS col1 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT + - col1 - - cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + - col0 * - col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

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-1662
SELECT ALL col0 DIV col2 - col2 AS col2 FROM tab0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-1662
SELECT ALL col0 / col2 - col2 AS col2 FROM tab0
----
-33
-81
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - col1 * - col2 col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT - col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * col2 * - col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 + col1 AS col2 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT col2 * tab1.col2 + col2 AS col2 FROM tab1
----
2970
3306
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 col0 FROM tab1 cor0
----
-20
-26
-52

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT ( + col1 * col2 * col2 ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT col2 * - col0 * col1 FROM tab2
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-1671
SELECT ALL - + col0 * + col0 DIV - col0 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1671
SELECT ALL - + col0 * + col0 / - col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 84 AS col0 FROM tab2
----
84
84
84

query I rowsort
SELECT col1 + - col1 * - tab2.col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT - tab0.col0 + - col0 * col1 FROM tab0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-1675
SELECT ALL + col0 DIV col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1675
SELECT ALL + col0 / col1 AS col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1676
SELECT col1 + col2 DIV - tab0.col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1676
SELECT col1 + col2 / - tab0.col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT - tab2.col1 + + col0 * tab2.col0 AS col2 FROM tab2
----
18
6025
6224

query I rowsort
SELECT + - 33 * - col2 FROM tab1 cor0
----
1782
1881
3168

query I rowsort
SELECT col1 + col0 * ( col1 ) * col1 AS col0 FROM tab0 AS cor0
----
177590
329412
737100

query I rowsort
SELECT + 11 AS col0 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT - col1 * - col1 FROM tab1 cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1682
SELECT DISTINCT - cor0.col0 + + col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1682
SELECT DISTINCT - cor0.col0 + + col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1683
SELECT DISTINCT + col1 + - cor0.col0 DIV - col2 AS col1 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-1683
SELECT DISTINCT + col1 + - cor0.col0 / - col2 AS col1 FROM tab1 AS cor0
----
11
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1684
SELECT - col2 + col1 DIV + col1 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-1684
SELECT - col2 + col1 / + col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT DISTINCT - 26 * col2 AS col0 FROM tab1 AS cor0
----
-1404
-1482
-2496

query I rowsort
SELECT 79 + + cor0.col0 * + ( col2 ) AS col0 FROM tab0 AS cor0
----
114
7377
871

query I rowsort
SELECT - cor0.col1 * 33 AS col0 FROM tab2 AS cor0
----
-1023
-1947
-561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 + + col1 col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - cor0.col2 - - col2 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1690
SELECT - - cor0.col0 + + cor0.col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-1690
SELECT - - cor0.col0 + + cor0.col0 / + col0 AS col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL - cor1.col2 * - 76 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f15d2817f2ea042f876ce434f787327a

query I rowsort
SELECT + + col2 * + 30 AS col2 FROM tab1 AS cor0
----
1620
1710
2880

query I rowsort
SELECT + col1 - 71 FROM tab2 AS cor0
----
-12
-40
-54

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab0 AS cor0
----
3

query I rowsort
SELECT 47 + + cor0.col1 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 1ea78ec4befe62254397cde19f57a80f

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT - 31 * - col0 * col0 AS col2 FROM tab2 AS cor0
----
1519
188604
193471

query I rowsort
SELECT DISTINCT - col2 * col2 * tab0.col1 AS col1 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT - 28 AS col1 FROM tab0, tab0 AS cor0
----
-28

query I rowsort
SELECT - 65 + cor0.col1 * col2 AS col2 FROM tab1 cor0
----
1183
1339
505

query I rowsort
SELECT ALL ( 52 ) * col0 AS col1 FROM tab1
----
156
3328
4160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 61 col0 FROM tab1 AS cor0
----
-61
-61
-61

query I rowsort
SELECT 29 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT col1 + - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - col0 + col0 * ( 50 ) * cor0.col0 FROM tab1 cor0
----
204736
319920
447

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1706
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-1706
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT col1 * + 56 FROM tab2
----
1736
3304
952

query I rowsort
SELECT ALL ( col1 + tab1.col1 ) FROM tab1
----
20
26
52

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 DISTINCT - 76 * - cor0.col1 + - col1 * col0 FROM tab0 AS cor0
----
-1183
3977
4472

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col2 col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL ( col1 ) + - 67 FROM tab2 AS cor0
----
-36
-50
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1713
SELECT DISTINCT - 87 DIV - 54 AS col0 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-1713
SELECT DISTINCT - 87 / - 54 AS col0 FROM tab1
----
1

query I rowsort
SELECT DISTINCT - ( col0 + - tab2.col0 * 86 ) AS col0 FROM tab2
----
595
6630
6715

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT col0 * + col1 AS col1 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col2 FROM tab2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col1 col0 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1719
SELECT - col2 * col2 + col0 DIV - col0 FROM tab0 AS cor0
----
-1090
-2
-6725

skipif mysql # not compatible
query I rowsort label-1719
SELECT - col2 * col2 + col0 / - col0 FROM tab0 AS cor0
----
-1090
-2
-6725

query I rowsort
SELECT ALL + - cor0.col0 * + col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 + 68 FROM tab2 AS cor0
----
106
94
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-1722
SELECT DISTINCT - + col2 DIV + cor0.col2 + - col2 * - cor0.col2 + + cor0.col1 FROM tab0 AS cor0
----
1174
6814
97

skipif mysql # not compatible
query I rowsort label-1722
SELECT DISTINCT - + col2 / + cor0.col2 + - col2 * - cor0.col2 + + cor0.col1 FROM tab0 AS cor0
----
1174
6814
97

query I rowsort
SELECT DISTINCT - - col2 * ( + col0 ) + ( - col1 ) * col2 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT col2 * + ( + 68 ) FROM tab1
----
3672
3876
6528

query I rowsort
SELECT col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL col1 * - 33 FROM tab0
----
-2838
-3003
-3201

query I rowsort
SELECT - 41 FROM tab2, tab2 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT + 70 * + ( col2 ) FROM tab2
----
1820
1890
2660

query I rowsort
SELECT ALL + 80 + col1 FROM tab0
----
166
171
177

onlyif mysql # use DIV operator for integer division
query I rowsort label-1730
SELECT ALL col0 + - col1 DIV + col0 FROM tab2
----
3
78
79

skipif mysql # not compatible
query I rowsort label-1730
SELECT ALL col0 + - col1 / + col0 FROM tab2
----
3
78
79

query I rowsort
SELECT col0 * - col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT 65 * 87 AS col0 FROM tab2 AS cor0
----
5655
5655
5655

query I rowsort
SELECT - col1 + + 0 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - col1 + 19 AS col1 FROM tab0 cor0
----
-67
-72
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1735
SELECT + + 73 DIV + col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1735
SELECT + + 73 / + col0 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT + col1 - - col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - - col0 + + 24 FROM tab1 AS cor0
----
104
27
88

query I rowsort
SELECT ALL + - 35 * - col0 FROM tab1 AS cor0
----
105
2240
2800

query I rowsort
SELECT ALL - cor0.col2 + - 57 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4c9652a4de940209e295eed98c409431

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1740
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + + 68 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1740
SELECT DISTINCT - CAST ( NULL AS REAL ) + + 68 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - 3 * - ( cor0.col2 ) * col1 AS col0 FROM tab0 AS cor0
----
22386
291
8514

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1742
SELECT - + CAST( + cor0.col1 AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-1742
SELECT - + CAST ( + cor0.col1 AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT cor0.col1 + col1 FROM tab0 AS cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + CAST ( - col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + col2 + 10 FROM tab1
----
106
64
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1746
SELECT ALL - cor0.col2 * + CAST( NULL AS SIGNED ) col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1746
SELECT ALL - cor0.col2 * + CAST ( NULL AS INTEGER ) col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col0 + - 97 + + col1 * - col1 FROM tab2
----
-1051
-307
-3500

query I rowsort
SELECT col1 * 17 * col0 AS col1 FROM tab1
----
10880
1326
17680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 + - col1 + + col0 * col2 col0 FROM tab2
----
174
1985
3001

query I rowsort
SELECT + 11 - 54 * col1 AS col1 FROM tab1
----
-1393
-529
-691

onlyif mysql # use DIV operator for integer division
query I rowsort label-1751
SELECT ALL - + cor0.col1 DIV 25 + col1 AS col0 FROM tab1 AS cor0
----
10
13
25

skipif mysql # not compatible
query I rowsort label-1751
SELECT ALL - + cor0.col1 / 25 + col1 AS col0 FROM tab1 AS cor0
----
10
13
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1752
SELECT + - CAST( NULL AS SIGNED ) + - 79 * + col0 + 50 * cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1752
SELECT + - CAST ( NULL AS INTEGER ) + - 79 * + col0 + 50 * cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * cor0.col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + 46 FROM tab2
----
46

query I rowsort
SELECT DISTINCT ( tab0.col0 * + ( + col0 ) ) AS col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ( col2 * col2 ) + + col1 AS col2 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT ALL + col0 + + col2 * - col1 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + 29 FROM tab1
----
29
29
29

query I rowsort
SELECT + tab1.col2 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT - + 22 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 647e567609c5ada1d3454d2102819bfe

query I rowsort
SELECT DISTINCT 96 FROM tab1
----
96

query I rowsort
SELECT ALL cor0.col0 * 57 + 45 FROM tab1, tab0 AS cor0
----
9 values hashing to 975c1fb3503e0a2a75a5da9e11c3fe22

query I rowsort
SELECT ALL + col2 + ( + 60 ) FROM tab1 AS cor0
----
114
117
156

onlyif mysql # use DIV operator for integer division
query I rowsort label-1765
SELECT DISTINCT cor0.col1 * col0 + + 36 * col0 DIV + col0 FROM tab1 AS cor0
----
1076
114
676

skipif mysql # not compatible
query I rowsort label-1765
SELECT DISTINCT cor0.col1 * col0 + + 36 * col0 / + col0 FROM tab1 AS cor0
----
1076
114
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1766
SELECT DISTINCT col2 + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-1766
SELECT DISTINCT col2 + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col2 + - 56 AS col0 FROM tab1 AS cor0
----
-2
1
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL - col1 + - tab0.col0 AS col2 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + 55 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
55

query I rowsort
SELECT + col0 * ( col1 ) + + col2 * + ( + col0 ) * + col2 + - col2 FROM tab2
----
115381
5293
57304

query I rowsort
SELECT DISTINCT + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT col0 * 51 AS col0 FROM tab1 AS cor0
----
153
3264
4080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1775
SELECT DISTINCT - col0 * - CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-1775
SELECT DISTINCT - col0 * - CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - - col2 * ( - cor0.col1 ) + - col1 * cor0.col0 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT ALL col0 * 19 AS col1 FROM tab1 AS cor0
----
1216
1520
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1778
SELECT + + col0 DIV - col2 AS col0 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1778
SELECT + + col0 / - col2 AS col0 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - col1 * + ( + cor0.col1 + - col1 ) FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1780
SELECT DISTINCT + col2 * col1 DIV 66 FROM tab1 AS cor0
----
18
21
8

skipif mysql # not compatible
query I rowsort label-1780
SELECT DISTINCT + col2 * col1 / 66 FROM tab1 AS cor0
----
18
21
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1781
SELECT ALL col1 + - col0 DIV + col2 AS col1 FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-1781
SELECT ALL col1 + - col0 / + col2 AS col1 FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT DISTINCT col1 + + col2 * col2 AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL - col0 - - 91 AS col1 FROM tab1 cor0
----
11
27
88

query I rowsort
SELECT ALL col0 - - 96 * + 97 FROM tab1 cor0
----
9315
9376
9392

query I rowsort
SELECT DISTINCT col2 * + 63 + + col2 + - col0 FROM tab1 AS cor0
----
3453
3584
6064

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1786
SELECT + tab2.col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-1786
SELECT + tab2.col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT cor0.col2 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + 75 + cor0.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 0671e28986b54fbf40581e5632aa9124

query I rowsort
SELECT DISTINCT - col2 * + 74 + - cor0.col0 + col1 FROM tab1 AS cor0
----
-3973
-4272
-7171

query I rowsort
SELECT col2 * 72 AS col2 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT ALL col1 * - 38 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT + + cor0.col1 * col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + ( + 62 ) * col1 AS col0 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT - - ( - ( + cor0.col0 ) ) * col0 - - cor0.col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT - - 3 AS col1 FROM tab0 AS cor0
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1796
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - 42 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1796
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - 42 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col1 + + col0 + col1 AS col0 FROM tab0 AS cor0
----
196
229
271

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1798
SELECT + + CAST( - col1 AS SIGNED ) + + col2 * col2 AS col2 FROM tab2 AS cor0
----
1427
617
698

skipif mysql # not compatible
query I rowsort label-1798
SELECT + + CAST ( - col1 AS INTEGER ) + + col2 * col2 AS col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT DISTINCT + col1 + + col0 * col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL + ( + 72 ) + col2 FROM tab1 AS cor0
----
126
129
168

query I rowsort
SELECT 23 + + col2 FROM tab2 AS cor0
----
49
50
61

query I rowsort
SELECT DISTINCT + + ( + 98 ) AS col2 FROM tab0 AS cor0
----
98

query I rowsort
SELECT - 24 * - col0 * + col1 AS col2 FROM tab2 AS cor0
----
110448
32232
5208

query I rowsort
SELECT - col2 - - tab1.col2 * + col2 FROM tab1
----
2862
3192
9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1805
SELECT - + CAST( - ( + col2 ) AS SIGNED ) * + 60 col2 FROM tab0 AS cor0
----
1980
4920
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1805
SELECT - + CAST ( - ( + col2 ) AS INTEGER ) * + 60 col2 FROM tab0 AS cor0
----
1980
4920
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1806
SELECT - CAST( - col0 AS SIGNED ) * col1 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-1806
SELECT - CAST ( - col0 AS INTEGER ) * col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - 75 AS col0 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT cor0.col0 + - col2 * + col1 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT - + 9 * + col2 AS col1 FROM tab2 AS cor0
----
-234
-243
-342

query I rowsort
SELECT + + col0 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col2 * - col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1812
SELECT ALL ( col1 ) DIV col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-1812
SELECT ALL ( col1 ) / col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT col0 * col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT ALL + 77 + col1 * col1 AS col0 FROM tab2 AS cor0
----
1038
3558
366

onlyif mysql # use DIV operator for integer division
query I rowsort label-1815
SELECT DISTINCT 23 DIV - col1 AS col0 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1815
SELECT DISTINCT 23 / - col1 AS col0 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT ALL - - 99 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT + + ( col2 ) + 93 AS col0 FROM tab1 AS cor0
----
147
150
189

query I rowsort
SELECT ( + tab2.col2 * - col0 ) - - ( - col2 ) * - col1 FROM tab2
----
-2356
-494
648

query I rowsort
SELECT DISTINCT ( - col1 ) * col2 + + 12 FROM tab2 AS cor0
----
-1522
-634
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * - cor0.col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col0 * col0 AS col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - 70 FROM tab0 cor0
----
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1823
SELECT ALL - col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-1823
SELECT ALL - col0 / - col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT cor1.col0 FROM tab1, tab0 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT + + col1 + - 39 * + col1 AS col1 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT ALL + 16 AS col0 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT col2 * + col0 * col1 + + cor0.col1 AS col1 FROM tab1 cor0
----
36490
4238
99853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 19 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

onlyif mysql # use DIV operator for integer division
query I rowsort label-1829
SELECT - - col2 DIV + cor0.col0 AS col0 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1829
SELECT - - col2 / + cor0.col0 AS col0 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT 39 * + col2 FROM tab1 AS cor0
----
2106
2223
3744

query I rowsort
SELECT ALL 80 AS col0 FROM tab1
----
80
80
80

query I rowsort
SELECT ALL - 60 AS col1 FROM tab1
----
-60
-60
-60

query I rowsort
SELECT ALL + tab2.col2 + + 19 FROM tab2, tab0 AS cor0
----
9 values hashing to 2b3a6f48dd73fb47d938664cabb4690b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1834
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1834
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-1835
SELECT col2 DIV col0 col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1835
SELECT col2 / col0 col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 24 col2 FROM tab2 AS cor0
----
24
24
24

query I rowsort
SELECT - - ( col1 ) * col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT col2 * + col2 * col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT DISTINCT - - 87 * + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
7482
7917
8439

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1841
SELECT - col2 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1841
SELECT - col2 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * + 96 * tab0.col2 AS col2 FROM tab0
----
272448
716352
9312

query I rowsort
SELECT + + col2 * 79 + col1 + col0 AS col2 FROM tab0 AS cor0
----
211
2717
6658

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col1 * - 10 col1 FROM tab2 AS cor0
----
-249
-317
-668

onlyif mysql # use DIV operator for integer division
query I rowsort label-1845
SELECT DISTINCT + - col0 * 63 DIV ( col1 ) FROM tab2 AS cor0
----
-14
-292
-83

skipif mysql # not compatible
query I rowsort label-1845
SELECT DISTINCT + - col0 * 63 / ( col1 ) FROM tab2 AS cor0
----
-14
-292
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1846
SELECT - col2 * - CAST( col0 + - col2 * - col2 AS SIGNED ) AS col2 FROM tab0
----
36
36729
558666

skipif mysql # not compatible
query I rowsort label-1846
SELECT - col2 * - CAST ( col0 + - col2 * - col2 AS INTEGER ) AS col2 FROM tab0
----
36
36729
558666

query I rowsort
SELECT DISTINCT col0 * col2 + col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT col2 + cor0.col2 AS col1 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT 17 AS col1 FROM tab0
----
17
17
17

query I rowsort
SELECT + + 99 AS col0 FROM tab1 AS cor0
----
99
99
99

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to def82b52aa9c83b91991d7d043276abe

query I rowsort
SELECT ALL cor1.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - + col1 + col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * - col1 + col1 AS col0 FROM tab2
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1855
SELECT + CAST( + 52 AS SIGNED ) FROM tab0 AS cor0
----
52
52
52

skipif mysql # not compatible
query I rowsort label-1855
SELECT + CAST ( + 52 AS INTEGER ) FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT ALL + col2 * - 3 * col0 + col0 * cor0.col2 AS col0 FROM tab2 cor0
----
-378
-4056
-6004

query I rowsort
SELECT + col1 * - col0 + + col2 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1858
SELECT - CAST( NULL AS SIGNED ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1858
SELECT - CAST ( NULL AS INTEGER ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - 39 * + col1 col2 FROM tab0 AS cor0
----
-3321
-3467
-3782

query I rowsort
SELECT + + 15 + - 96 AS col2 FROM tab2 AS cor0
----
-81
-81
-81

query I rowsort
SELECT DISTINCT - 65 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT - 37 AS col1 FROM tab2 cor0
----
-37
-37
-37

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) * col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL 77 + - col0 AS col2 FROM tab0 AS cor0
----
-12
42
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-1865
SELECT ALL + - col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1865
SELECT ALL + - col2 / - col1 AS col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - - col0 * col0 + col2 AS col2 FROM tab2 cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1867
SELECT DISTINCT - + col2 DIV + col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1867
SELECT DISTINCT - + col2 / + col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT - - col2 + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + 14 + col1 * - ( + col2 ) FROM tab0 AS cor0
----
-2824
-7448
-83

query I rowsort
SELECT - col0 * - col0 * cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
1350
158210
237196

query I rowsort
SELECT - col0 * 90 - + col1 * + col1 FROM tab1 AS cor0
----
-5860
-7369
-946

query I rowsort
SELECT cor0.col1 + + 11 FROM tab2 AS cor0
----
28
42
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1873
SELECT + col0 DIV 50 - col0 * col1 AS col2 FROM tab2 AS cor0
----
-1342
-217
-4601

skipif mysql # not compatible
query I rowsort label-1873
SELECT + col0 / 50 - col0 * col1 AS col2 FROM tab2 AS cor0
----
-1342
-217
-4601

query I rowsort
SELECT cor0.col1 * + col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - cor0.col0 + col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - col2 * + col0 + + cor0.col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-1877
SELECT - ( + 3 ) + + tab2.col1 DIV 41 FROM tab2, tab2 AS cor0
----
9 values hashing to 286b207e8c7713c5fdef5f2000639bd6

skipif mysql # not compatible
query I rowsort label-1877
SELECT - ( + 3 ) + + tab2.col1 / 41 FROM tab2, tab2 AS cor0
----
9 values hashing to 286b207e8c7713c5fdef5f2000639bd6

query I rowsort
SELECT DISTINCT ( + col1 ) * - col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-1879
SELECT ALL + + col0 + - col0 DIV - col0 + col2 FROM tab2 cor0
----
105
118
35

skipif mysql # not compatible
query I rowsort label-1879
SELECT ALL + + col0 + - col0 / - col0 + col2 FROM tab2 cor0
----
105
118
35

query I rowsort
SELECT ALL - ( ( col0 ) ) * - 2 - col2 FROM tab0 AS cor0
----
15
69
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1881
SELECT ALL - - CAST( - 40 AS SIGNED ) FROM tab2 cor0
----
-40
-40
-40

skipif mysql # not compatible
query I rowsort label-1881
SELECT ALL - - CAST ( - 40 AS INTEGER ) FROM tab2 cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - + 24 AS col2 FROM tab2 AS cor0
----
-24

query I rowsort
SELECT ALL - col2 + ( 22 ) - + col1 FROM tab2
----
-33
-36
-63

query I rowsort
SELECT col0 + 6 FROM tab2
----
13
84
85

query I rowsort
SELECT ALL + col0 * col2 + 80 AS col2 FROM tab0
----
115
7378
872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 75 col0 FROM tab0, tab0 cor0
----
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-1887
SELECT col0 DIV 10 - - col2 AS col2 FROM tab1
----
104
54
63

skipif mysql # not compatible
query I rowsort label-1887
SELECT col0 / 10 - - col2 AS col2 FROM tab1
----
104
54
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col1 ) col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - + col0 * col2 * - ( col0 ) FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL + 79 + + col1 FROM tab2 AS cor0
----
110
138
96

query I rowsort
SELECT ALL - ( col1 ) * - 99 * 91 AS col1 FROM tab1 cor0
----
117117
234234
90090

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-1893
SELECT ALL ( + 89 ) DIV cor0.col0 - 0 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 397fa53045331a6e875f7522e6c0a60a

skipif mysql # not compatible
query I rowsort label-1893
SELECT ALL ( + 89 ) / cor0.col0 - 0 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 397fa53045331a6e875f7522e6c0a60a

query I rowsort
SELECT ALL 58 * col0 + - ( + col0 ) * - col2 FROM tab1 cor0
----
12320
336
7360

query I rowsort
SELECT ALL 46 * + col1 - - col1 * ( - col2 * + ( - col1 ) ) AS col0 FROM tab2
----
11764
27373
93220

query I rowsort
SELECT ALL tab2.col0 - - col0 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL + col1 * col2 + - tab2.col2 - - tab2.col0 AS col1 FROM tab2
----
1586
687
817

query I rowsort
SELECT col1 * col2 - - col0 AS col0 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT ALL + - cor0.col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT + col1 + - col0 AS col1 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1901
SELECT ALL - - col0 * CAST( + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-1901
SELECT ALL - - col0 * CAST ( + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col1 * col1 - + col0 AS col1 FROM tab2 AS cor0
----
-3559
-368
-968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + ( + col1 ) col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL col0 * - col1 + col2 * ( + col1 ) AS col2 FROM tab2
----
-3068
-697
620

query I rowsort
SELECT - ( col0 ) + col1 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL + col2 + + col0 - - 15 AS col1 FROM tab2
----
119
132
49

query I rowsort
SELECT tab1.col0 AS col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + tab0.col1 + + col1 * tab0.col0 * col1 + col2 * col1 FROM tab0
----
180428
329509
744562

query I rowsort
SELECT col1 * + tab1.col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 * col0 AS col1 FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 50 + cor0.col0 col0 FROM tab0 AS cor0
----
139
74
85

query I rowsort
SELECT DISTINCT + - col1 + col1 * col1 * 97 FROM tab1 AS cor0
----
16380
65546
9690

query I rowsort
SELECT DISTINCT - ( 48 ) FROM tab1, tab0 AS cor0
----
-48

query I rowsort
SELECT ALL + col1 * + 63 * + col1 AS col0 FROM tab1 AS cor0
----
10647
42588
6300

query I rowsort
SELECT ALL - - 30 * ( - col0 ) AS col0 FROM tab2 AS cor0
----
-210
-2340
-2370

query I rowsort
SELECT - 61 * - col0 + col2 FROM tab1 AS cor0
----
237
3961
4976

onlyif mysql # use DIV operator for integer division
query I rowsort label-1917
SELECT DISTINCT + - 13 * 5 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1917
SELECT DISTINCT + - 13 * 5 / col0 AS col2 FROM tab0 AS cor0
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1918
SELECT cor0.col2 DIV col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1918
SELECT cor0.col2 / col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - ( + ( col0 ) ) * col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - ( - 14 ) + + col1 AS col1 FROM tab1 cor0
----
24
27
40

query I rowsort
SELECT col2 * + tab1.col0 AS col1 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-1922
SELECT col1 DIV col1 - 74 AS col2 FROM tab0
----
-73
-73
-73

skipif mysql # not compatible
query I rowsort label-1922
SELECT col1 / col1 - 74 AS col2 FROM tab0
----
-73
-73
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-1923
SELECT DISTINCT + col1 DIV + col2 + + col2 + - col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-1923
SELECT DISTINCT + col1 / + col2 + + col2 + - col2 FROM tab1
----
0

query I rowsort
SELECT col2 + 72 AS col1 FROM tab0
----
105
154
73

query I rowsort
SELECT DISTINCT col0 + tab2.col2 * col1 AS col1 FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT - + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-10
-13
-26

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2, tab0 cor0 CROSS JOIN tab1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1928
SELECT ALL + - col0 * 25 DIV col1 FROM tab1 AS cor0
----
-153
-160
-2

skipif mysql # not compatible
query I rowsort label-1928
SELECT ALL + - col0 * 25 / col1 FROM tab1 AS cor0
----
-153
-160
-2

query I rowsort
SELECT - col2 * - 2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + ( ( col1 ) ) + ( - 96 ) FROM tab1 cor0
----
-70
-83
-86

query I rowsort
SELECT DISTINCT - - 20 + - col1 FROM tab0 AS cor0
----
-66
-71
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1932
SELECT DISTINCT CAST( col2 AS SIGNED ) col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1932
SELECT DISTINCT CAST ( col2 AS INTEGER ) col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + 24 FROM tab2
----
24
24
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1934
SELECT CAST( NULL AS SIGNED ) + 2 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1934
SELECT CAST ( NULL AS INTEGER ) + 2 col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - ( col1 ) * - col1 + + col0 * + cor0.col2 + cor0.col1 * 29 AS col2 FROM tab0 AS cor0
----
10682
12257
18218

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + - cor0.col1 * + col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL 30 + col0 FROM tab1 cor0
----
110
33
94

query I rowsort
SELECT + - ( col2 ) * 71 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT DISTINCT + col2 * + col0 * 16 - 24 FROM tab0 AS cor0
----
116744
12648
536

query I rowsort
SELECT ALL - ( col1 ) + col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - ( col0 ) * - 56 FROM tab1 cor0
----
168
3584
4480

query I rowsort
SELECT col0 * - ( 75 ) FROM tab1
----
-225
-4800
-6000

query I rowsort
SELECT col1 * + 16 FROM tab1 AS cor0
----
160
208
416

onlyif mysql # use DIV operator for integer division
query I rowsort label-1945
SELECT DISTINCT + + col0 DIV col2 + col1 FROM tab0 AS cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-1945
SELECT DISTINCT + + col0 / col2 + col1 FROM tab0 AS cor0
----
132
86
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1946
SELECT ALL + col0 * + col0 - 71 DIV + cor0.col0 FROM tab1 AS cor0
----
-14
4095
6400

skipif mysql # not compatible
query I rowsort label-1946
SELECT ALL + col0 * + col0 - 71 / + cor0.col0 FROM tab1 AS cor0
----
-14
4095
6400

query I rowsort
SELECT DISTINCT col1 - 66 AS col2 FROM tab2 cor0
----
-35
-49
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1948
SELECT ALL + col2 * ( - col1 ) + + col2 * - CAST( NULL AS SIGNED ) * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1948
SELECT ALL + col2 * ( - col1 ) + + col2 * - CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * + col2 * + 56 AS col2 FROM tab1 AS cor0
----
-31920
-69888
-78624

query I rowsort
SELECT ALL + col0 + - col1 + - col2 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT ALL + col2 - col0 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort
SELECT - col0 * CAST ( - 1 AS REAL ) FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1954
SELECT DISTINCT col0 + col1 * col1 DIV cor0.col0 FROM tab2 AS cor0
----
122
144
82

skipif mysql # not compatible
query I rowsort label-1954
SELECT DISTINCT col0 + col1 * col1 / cor0.col0 FROM tab2 AS cor0
----
122
144
82

query I rowsort
SELECT + col0 * + 73 + + col1 AS col2 FROM tab2 AS cor0
----
542
5753
5784

query I rowsort
SELECT DISTINCT + col0 * 72 FROM tab0 cor0
----
1728
2520
6408

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 489dc4a89dc53914f025e2426f93a929

query I rowsort
SELECT ALL col1 + cor0.col2 * + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL - cor0.col1 * 43 - + col0 FROM tab0 AS cor0
----
-3722
-4002
-4206

query I rowsort
SELECT DISTINCT 87 AS col2 FROM tab2, tab2 AS cor0
----
87

query I rowsort
SELECT 3 + col0 FROM tab2 AS cor0
----
10
81
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1962
SELECT CAST( col2 AS SIGNED ) * col0 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-1962
SELECT CAST ( col2 AS INTEGER ) * col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT col0 - col0 * col0 AS col0 FROM tab1 cor0
----
-4032
-6
-6320

query I rowsort
SELECT + col2 + + 14 * col1 FROM tab0 cor0
----
1237
1356
1359

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 181d902c42955a43a374f13a73d8b0a1

query I rowsort
SELECT col0 * ( 75 ) + - cor0.col1 * - ( 33 + col0 ) AS col1 FROM tab2 AS cor0
----
12399
1765
7829

onlyif mysql # use DIV operator for integer division
query I rowsort label-1968
SELECT - col1 DIV - CAST( 15 AS SIGNED ) FROM tab0 cor0
----
5
6
6

skipif mysql # not compatible
query I rowsort label-1968
SELECT - col1 / - CAST ( 15 AS INTEGER ) FROM tab0 cor0
----
5
6
6

query I rowsort
SELECT col1 * + 73 * col0 AS col0 FROM tab2 AS cor0
----
15841
335946
98039

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT + 29 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT col0 + + col2 * 10 FROM tab1 AS cor0
----
1040
543
634

query I rowsort
SELECT - - col2 + 64 FROM tab2 AS cor0
----
102
90
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 * col0 col1 FROM tab2
----
553
6162
6241

query I rowsort
SELECT + + col2 + + cor0.col0 * + col1 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to 1a92b418ae3c05ba566f88a890a407ae

query I rowsort
SELECT col0 + - col1 FROM tab1 cor0
----
-23
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1978
SELECT - CAST( 71 AS SIGNED ) * tab1.col0 + 96 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to fa3133d5593c3f58af4d624bf8e56321

skipif mysql # not compatible
query I rowsort label-1978
SELECT - CAST ( 71 AS INTEGER ) * tab1.col0 + 96 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to fa3133d5593c3f58af4d624bf8e56321

query I rowsort
SELECT + 23 AS col1 FROM tab0 cor0
----
23
23
23

query I rowsort
SELECT ALL - 93 FROM tab0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT - col1 * - col0 + 6 FROM tab0 AS cor0
----
2070
3401
8105

query I rowsort
SELECT - 16 + col1 FROM tab1 AS cor0
----
-3
-6
10

query I rowsort
SELECT DISTINCT 18 + + 81 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
99

query I rowsort
SELECT 77 * col1 + - 61 + - 46 AS col2 FROM tab2 AS cor0
----
1202
2280
4436

onlyif mysql # use DIV operator for integer division
query I rowsort label-1985
SELECT - col1 + col0 DIV - ( + cor0.col2 ) FROM tab0 AS cor0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-1985
SELECT - col1 + col0 / - ( + cor0.col2 ) FROM tab0 AS cor0
----
-132
-86
-92

query I rowsort
SELECT ALL 94 + 97 * cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to f5c1859aeee0e86c71aac8dac7a50d0b

query I rowsort
SELECT - col0 * col0 + - ( col2 * - col1 ) AS col2 FROM tab0 cor0
----
-1128
-459
2262

query I rowsort
SELECT 43 + - col0 AS col1 FROM tab0 AS cor0
----
-46
19
8

query I rowsort
SELECT DISTINCT - col1 - - col0 * 51 FROM tab1
----
127
3254
4067

query I rowsort
SELECT DISTINCT - 67 FROM tab1
----
-67

query I rowsort
SELECT - col2 + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - - col1 * - col0 + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - 19 FROM tab0, tab1 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

query I rowsort
SELECT + col0 - 75 FROM tab1
----
-11
-72
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + 90 ) col0 FROM tab2, tab2 AS cor0
----
90

query I rowsort
SELECT ALL + ( + cor0.col2 ) * cor0.col2 + 10 FROM tab0, tab0 AS cor0
----
9 values hashing to 8c17b7c0c26c38b9494c269ffc67b620

query I rowsort
SELECT + cor0.col2 * ( + 75 ) * col2 + + 69 AS col2 FROM tab0 cor0
----
144
504369
81744

query I rowsort
SELECT ALL + col0 + + cor0.col0 * + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT col0 + col1 * col1 * + col2 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT ALL + cor0.col2 * col2 * + cor0.col2 FROM tab0 AS cor0
----
1
35937
551368

query I rowsort
SELECT + col2 * 76 AS col0 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT DISTINCT - - cor0.col2 * + col2 - + col0 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT + + col2 * 96 + 72 FROM tab0 AS cor0
----
168
3240
7944

query I rowsort
SELECT col2 * - 48 FROM tab1 AS cor0
----
-2592
-2736
-4608

query I rowsort
SELECT ALL ( - 24 * col0 ) AS col0 FROM tab1
----
-1536
-1920
-72

query I rowsort
SELECT tab2.col0 + 34 FROM tab2
----
112
113
41

query I rowsort
SELECT - ( - col0 ) + col0 FROM tab0
----
178
48
70

query I rowsort
SELECT 25 + col1 AS col0 FROM tab2
----
42
56
84

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT + + col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - - col2 + + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + 7 * col1 AS col2 FROM tab0 AS cor0
----
602
637
679

query I rowsort
SELECT 81 * + cor0.col2 FROM tab0 AS cor0
----
2673
6642
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col0 * - col0 + + 54 AS col2 FROM tab2 AS cor0
----
-6030
-6187
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 - + col1 col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - - col2 - col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - 74 AS col1 FROM tab2
----
-74
-74
-74

query I rowsort
SELECT + cor0.col2 FROM tab1, tab0, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT + + 92 * - cor0.col2 AS col2 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 3b05eb27808dc2eef2fc90b83eeb01c3

query I rowsort
SELECT - col1 * 95 + + col0 FROM tab0
----
-8146
-8556
-9180

query I rowsort
SELECT DISTINCT + + col1 + 30 AS col0 FROM tab2 AS cor0
----
47
61
89

query I rowsort
SELECT + - col1 + - col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - - col2 * + ( + col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - col0 + col1 * ( cor0.col1 ) + col1 FROM tab0 AS cor0
----
7458
8283
9471

skipif mysql # not compatible
query I rowsort
SELECT ALL + + col0 * CAST ( 81 AS REAL ) + + col1 FROM tab1 AS cor0
----
269
5194
6493

query I rowsort
SELECT DISTINCT cor0.col0 * - 17 * ( - col0 ) FROM tab0 AS cor0
----
134657
20825
9792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2028
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2028
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col1 + + 4 FROM tab0 cor0
----
-82
-87
-93

query I rowsort
SELECT DISTINCT 21 * - 77 * col1 + + col1 AS col0 FROM tab1 AS cor0
----
-16160
-21008
-42016

query I rowsort
SELECT DISTINCT 58 + - col1 AS col1 FROM tab1 AS cor0
----
32
45
48

query I rowsort
SELECT ALL + 0 * col1 AS col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 7 * col1 col2 FROM tab1 cor0
----
-182
-70
-91

query I rowsort
SELECT DISTINCT + col2 * 88 + + col0 FROM tab1 AS cor0
----
4755
5080
8528

query I rowsort
SELECT DISTINCT 55 * - col1 FROM tab1 cor0
----
-1430
-550
-715

query I rowsort
SELECT + - col0 + col0 + col2 * col2 FROM tab2 cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-2037
SELECT DISTINCT - + col2 + col0 * + CAST( + col0 + col0 AS SIGNED ) DIV col0 FROM tab0 AS cor0
----
15
69
96

skipif mysql # not compatible
query I rowsort label-2037
SELECT DISTINCT - + col2 + col0 * + CAST ( + col0 + col0 AS INTEGER ) / col0 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT ALL + - 65 AS col0 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 81 + + col1 * 73 FROM tab2
----
1322
2344
4388

query I rowsort
SELECT - + col2 + col0 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT ALL ( + col0 ) * 19 AS col2 FROM tab2 AS cor0
----
133
1482
1501

onlyif mysql # use DIV operator for integer division
query I rowsort label-2042
SELECT col2 DIV + col1 + 26 AS col2 FROM tab0 AS cor0
----
26
26
26

skipif mysql # not compatible
query I rowsort label-2042
SELECT col2 / + col1 + 26 AS col2 FROM tab0 AS cor0
----
26
26
26

query I rowsort
SELECT ALL + - col2 * - col2 - col0 AS col1 FROM tab1 cor0
----
2913
3185
9136

query I rowsort
SELECT ALL - 49 AS col2 FROM tab1
----
-49
-49
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - cor0.col1 + ( - col2 ) * col1 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - + col2 - + ( col2 ) FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT col2 * 91 + col0 * col0 * col0 FROM tab0 AS cor0
----
16827
42966
712431

query I rowsort
SELECT DISTINCT - + col2 * ( col2 ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - cor0.col1 * - col2 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - col0 * col1 + col2 AS col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL - col2 + + col2 * col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT DISTINCT - + col0 + - cor0.col1 - + ( - col0 + col0 ) * col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ( col0 ) + col0 + col2 * col2 AS col1 FROM tab0
----
1137
6902
71

query I rowsort
SELECT DISTINCT col1 + - col1 AS col2 FROM tab2
----
0

query I rowsort
SELECT cor0.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + cor0.col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT col1 * - tab1.col2 AS col1 FROM tab1
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2059
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab2 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-2059
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab2 cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col1 col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ( tab0.col0 ) * - col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + col1 - tab0.col1 * ( + col2 ) * - col1 AS col2 FROM tab0
----
244154
679133
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 + - col2 + + col1 * col2 * + cor0.col2 col2 FROM tab0 AS cor0
----
-9313
603521
86225

query I rowsort
SELECT ALL + col2 * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + - col1 * + cor0.col1 + - col0 + col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1014
-1805
-5093

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col2 + tab2.col1 * + col1 * - col0 AS col1 FROM tab2
----
-22793
-271492
-6700

query I rowsort
SELECT + tab1.col1 + - col0 * col1 AS col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT col0 * + col1 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL col2 * + col2 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT col0 * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + tab2.col1 FROM tab2, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + + col0 + + col2 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - - col2 + - col1 - - col0 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 + + cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to d13d2967d1ce54a2e29e5805605f71e1

query I rowsort
SELECT ALL + col0 + - ( col2 ) * + col1 * col0 - + col0 * - col0 FROM tab2
----
-113490
-44714
-5803

query I rowsort
SELECT ALL - 75 - + col0 FROM tab2
----
-153
-154
-82

query I rowsort
SELECT - 14 * - col2 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT - col2 * + col2 - cor0.col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL 18 FROM tab0, tab2 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT - ( tab0.col1 ) * col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - ( - tab1.col0 ) AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT ( + 11 ) AS col0 FROM tab1
----
11
11
11

query I rowsort
SELECT ALL - col0 * col1 * + col2 AS col0 FROM tab2
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col1 + - col1 col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab2 AS cor0
----
-58

query I rowsort
SELECT DISTINCT + 15 * - col1 + col1 FROM tab1 cor0
----
-140
-182
-364

query I rowsort
SELECT ALL - - 39 * col1 AS col2 FROM tab1 AS cor0
----
1014
390
507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 + - col0 col2 FROM tab2 AS cor0
----
-13
-14
58

query I rowsort
SELECT ALL + col0 * col2 + + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - - col1 * - col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - col2 * col0 + col2 + + col0 AS col0 FROM tab2 AS cor0
----
2132
223
3119

query I rowsort
SELECT DISTINCT 45 AS col1 FROM tab1 AS cor0
----
45

query I rowsort
SELECT DISTINCT + + 2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2095
SELECT - + col2 DIV col2 + + cor0.col1 * - col1 FROM tab0 AS cor0
----
-7397
-8282
-9410

skipif mysql # not compatible
query I rowsort label-2095
SELECT - + col2 / col2 + + cor0.col1 * - col1 FROM tab0 AS cor0
----
-7397
-8282
-9410

query I rowsort
SELECT - ( - col2 ) + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col2 + + col0 * cor0.col2 AS col0 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT + col1 * col2 + + col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL - + 88 + - col1 * col0 + col1 AS col2 FROM tab1 AS cor0
----
-1115
-140
-718

query I rowsort
SELECT ALL - ( tab1.col1 + col0 ) AS col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT ALL - 21 FROM tab1
----
-21
-21
-21

onlyif mysql # use DIV operator for integer division
query I rowsort label-2102
SELECT col0 DIV 80 col1 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2102
SELECT col0 / 80 col1 FROM tab0
----
0
0
1

query I rowsort
SELECT ALL - 31 AS col1 FROM tab0
----
-31
-31
-31

query I rowsort
SELECT - 22 * - col1 FROM tab0
----
1892
2002
2134

query I rowsort
SELECT + col0 + 23 * col1 FROM tab1 cor0
----
294
379
601

query I rowsort
SELECT - 44 + + cor0.col1 * + col0 AS col2 FROM tab0 AS cor0
----
2020
3351
8055

query I rowsort
SELECT ALL + 52 FROM tab1, tab1 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 7b4a664e9c62b46b517569587d5a621d

query I rowsort
SELECT - col1 - - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * - cor0.col1 - cor0.col2 FROM tab0 AS cor0
----
2805
7380
96

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 DISTINCT + - col2 * - cor0.col1 + - col0 * col0 AS col2 FROM tab2 AS cor0
----
-4550
-5595
788

query I rowsort
SELECT ALL + - col2 - col1 * + col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT - + col0 + - col2 AS col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT - col2 * + 0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + col2 * - 64 FROM tab1
----
-3456
-3648
-6144

query I rowsort
SELECT 83 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT DISTINCT 19 * col0 AS col1 FROM tab1 AS cor0
----
1216
1520
57

query I rowsort
SELECT ALL + col2 + + col0 + + col1 * - col1 * + cor0.col2 FROM tab1 AS cor0
----
-16048
-36447
-5579

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + - col0 col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + col1 * + cor0.col0 AS col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT cor0.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-2122
SELECT col0 * CAST( NULL AS DECIMAL ) 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-2122
SELECT col0 * CAST ( NULL AS REAL ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 77 AS col2 FROM tab2
----
77
77
77

query I rowsort
SELECT + col0 + 59 AS col2 FROM tab0 AS cor0
----
148
83
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2125
SELECT - col0 + cor0.col0 DIV - 94 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-2125
SELECT - col0 + cor0.col0 / - 94 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + col2 * + col2 + 3 FROM tab0
----
1092
4
6727

query I rowsort
SELECT DISTINCT + cor0.col1 * 60 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
5160
5460
5820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 - - col2 col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - 10 FROM tab0, tab1 AS cor0
----
-10

query I rowsort
SELECT ALL + ( - col0 ) * col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT 80 * - col0 - - cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
-1128
-2765
178

onlyif mysql # use DIV operator for integer division
query I rowsort label-2132
SELECT ALL ( - col0 ) DIV col2 AS col2 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2132
SELECT ALL ( - col0 ) / col2 AS col2 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT + col2 - + col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2134
SELECT + tab1.col0 DIV - 93 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2134
SELECT + tab1.col0 / - 93 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT - + cor0.col2 * - 40 AS col2 FROM tab0 AS cor0
----
1320
3280
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 93 * col0 col2 FROM tab0 cor0
----
2232
3255
8277

query I rowsort
SELECT - - ( 87 ) + + col1 * col1 * col2 FROM tab2 AS cor0
----
11069
26034
90593

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2138
SELECT ALL - - CAST( NULL AS SIGNED ) + col1 * + cor0.col0 * ( - 25 * - col1 ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2138
SELECT ALL - - CAST ( NULL AS INTEGER ) + col1 * + cor0.col0 * ( - 25 * - col1 ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - ( ( + cor0.col0 ) ) + col2 * - ( + col1 ) AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + cor0.col1 col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - col1 * 61 + - ( tab2.col1 ) FROM tab2
----
-1054
-1922
-3658

query I rowsort
SELECT DISTINCT + col2 * + 1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 24 FROM tab0, tab1 cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT DISTINCT + tab1.col0 * + col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT + 6 - + col0 AS col1 FROM tab1
----
-58
-74
3

query I rowsort
SELECT - 31 * 51 + col2 FROM tab0
----
-1499
-1548
-1580

query I rowsort
SELECT - col1 * 61 AS col0 FROM tab0
----
-5246
-5551
-5917

query I rowsort
SELECT cor0.col0 + tab2.col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to e8a110a574ce9d6da24c6814b3fe3d2f

query I rowsort
SELECT tab0.col0 + - col1 AS col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT - - col0 - + col1 FROM tab0 AS cor0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 14 * col1 - - 31 col2 FROM tab2 AS cor0
----
-11687
-21445
-9013

query I rowsort
SELECT ALL - 56 FROM tab0 AS cor0
----
-56
-56
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2154
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2154
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2155
SELECT ALL + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2155
SELECT ALL + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2156
SELECT DISTINCT - col0 DIV - col1 AS col0 FROM tab1
----
0
6

skipif mysql # not compatible
query I rowsort label-2156
SELECT DISTINCT - col0 / - col1 AS col0 FROM tab1
----
0
6

query I rowsort
SELECT ALL - 90 + + col1 FROM tab1
----
-64
-77
-80

query I rowsort
SELECT col2 * ( + col2 ) * col1 + col0 FROM tab0
----
132
611973
93678

onlyif mysql # use DIV operator for integer division
query I rowsort label-2159
SELECT ALL + col2 DIV - tab1.col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2159
SELECT ALL + col2 / - tab1.col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL + col2 * 51 FROM tab1 AS cor0
----
2754
2907
4896

query I rowsort
SELECT DISTINCT + col2 * - 64 + + col1 FROM tab1 AS cor0
----
-3430
-3638
-6131

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - + col1 * 14 FROM tab1 AS cor0
----
-140
-182
-364

query I rowsort
SELECT DISTINCT - col0 + - col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2165
SELECT ALL col2 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2165
SELECT ALL col2 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL col2 * tab0.col2 + col0 AS col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL - - cor0.col1 * - cor0.col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - - col2 * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 12 * - col1 + - 48 FROM tab1 AS cor0
----
-168
-204
-360

onlyif mysql # use DIV operator for integer division
query I rowsort label-2171
SELECT ALL + col0 + col0 * ( + col2 ) DIV - col1 AS col0 FROM tab0
----
15
35
9

skipif mysql # not compatible
query I rowsort label-2171
SELECT ALL + col0 + col0 * ( + col2 ) / - col1 AS col0 FROM tab0
----
15
35
9

query I rowsort
SELECT DISTINCT + 61 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
61

query I rowsort
SELECT ALL tab0.col1 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col1 * - 26 AS col2 FROM tab0
----
2236
2366
2522

query I rowsort
SELECT ALL 93 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT ALL - col2 * col2 + ( + col2 ) * ( - col2 * col1 ) FROM tab2 AS cor0
----
-23328
-25992
-40560

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0 cor1, tab0 AS cor2
----
972 values hashing to 3a31dab513390ca6bd05c71a3d9c50f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2178
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2178
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 * + 36 AS col1 FROM tab2 AS cor0
----
1368
936
972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * col0 * + col0 col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2181
SELECT ALL - + col2 DIV ( 85 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2181
SELECT ALL - + col2 / ( 85 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT col2 * + col2 + 78 FROM tab1 AS cor0
----
2994
3327
9294

query I rowsort
SELECT DISTINCT - col2 * + col0 + col0 AS col2 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT - + 23 + tab2.col2 * + tab2.col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 601e1aa4a49da7d29a0fb5496d169831

query I rowsort
SELECT + 13 + + col1 * + col0 FROM tab0
----
2077
3408
8112

query I rowsort
SELECT ALL + col2 - col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL 39 - + 81 FROM tab1
----
-42
-42
-42

query I rowsort
SELECT - ( 91 ) + - col0 AS col0 FROM tab2
----
-169
-170
-98

query I rowsort
SELECT DISTINCT + 74 AS col1 FROM tab2 AS cor0
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-2191
SELECT ALL + ( col1 ) DIV cor0.col0 AS col1 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2191
SELECT ALL + ( col1 ) / cor0.col0 AS col1 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT - ( + col2 ) * col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - 66 + + 4 FROM tab0 AS cor0
----
-62

query I rowsort
SELECT DISTINCT + 68 AS col2 FROM tab2, tab1 AS cor0
----
68

query I rowsort
SELECT col0 + - 91 FROM tab0 cor0
----
-2
-56
-67

query I rowsort
SELECT - 60 FROM tab2, tab0 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT + col1 * - 81 + + cor0.col1 * col0 FROM tab1 AS cor0
----
-13
-170
-2028

query I rowsort
SELECT ALL - 69 AS col2 FROM tab0 AS cor0
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + col1 * col1 * - col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - + col0 * + col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + - col0 + col1 * ( + col2 ) AS col2 FROM tab1 AS cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col0 col0 FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 col1 FROM tab2 AS cor0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT + 13 + col0 AS col2 FROM tab1 AS cor0
----
16
77
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2205
SELECT - 81 * - col0 - + 84 DIV col0 AS col1 FROM tab0 AS cor0
----
1941
2833
7209

skipif mysql # not compatible
query I rowsort label-2205
SELECT - 81 * - col0 - + 84 / col0 AS col1 FROM tab0 AS cor0
----
1941
2833
7209

query I rowsort
SELECT DISTINCT - + 27 FROM tab1 AS cor0
----
-27

query I rowsort
SELECT DISTINCT + + 89 * col2 + - ( col2 ) * + col1 AS col0 FROM tab1 cor0
----
3402
4503
7296

query I rowsort
SELECT - 32 + col2 FROM tab2 AS cor0
----
-5
-6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2209
SELECT ALL col1 DIV - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2209
SELECT ALL col1 / - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * col2 + 12 AS col1 FROM tab0 cor0
----
47
7310
804

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 + - col0 col2 FROM tab1 AS cor0
----
25
86
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 * + cor0.col0 + - 37 col2 FROM tab2 AS cor0
----
-653
-6901
-6989

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2213
SELECT DISTINCT - col1 * col0 + + CAST( 77 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1987
-3318
-8022

skipif mysql # not compatible
query I rowsort label-2213
SELECT DISTINCT - col1 * col0 + + CAST ( 77 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1987
-3318
-8022

query I rowsort
SELECT ALL + + 69 FROM tab0 cor0
----
69
69
69

query I rowsort
SELECT DISTINCT - col1 * col2 - + cor0.col1 * col0 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT - 18 - - col1 * 76 FROM tab1 AS cor0
----
1958
742
970

onlyif mysql # use DIV operator for integer division
query I rowsort label-2217
SELECT DISTINCT - col2 DIV col0 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2217
SELECT DISTINCT - col2 / col0 FROM tab1 cor0
----
-1
-18
0

query I rowsort
SELECT ALL - col1 * - col2 + + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-2219
SELECT DISTINCT + col2 DIV + cor0.col1 - - col0 DIV + cor0.col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-2219
SELECT DISTINCT + col2 / + cor0.col1 - - col0 / + cor0.col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL - + col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT + + 72 - col2 FROM tab2 AS cor0
----
34
45
46

query I rowsort
SELECT + - col2 * - col2 + - col1 * - 94 FROM tab1 AS cor0
----
10438
4189
5360

query I rowsort
SELECT ALL + + 31 * + col2 FROM tab0 AS cor0
----
1023
2542
31

query I rowsort
SELECT ALL + 81 * + col0 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT + + col0 + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + - col2 * - cor0.col0 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - 70 * col1 - - cor0.col2 * - col1 FROM tab0 AS cor0
----
-13832
-6887
-8858

query I rowsort
SELECT - col1 * + 38 FROM tab0 AS cor0
----
-3268
-3458
-3686

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 3 col0 FROM tab1, tab2, tab2 AS cor0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + col0 col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + col2 * + ( - 85 ) AS col0 FROM tab0 AS cor0
----
-2805
-6970
-85

query I rowsort
SELECT - col2 + col2 * col2 + col0 AS col2 FROM tab2
----
1485
709
728

query I rowsort
SELECT 98 AS col1 FROM tab2
----
98
98
98

query I rowsort
SELECT col0 + - col0 * 7 FROM tab1
----
-18
-384
-480

onlyif mysql # use DIV operator for integer division
query I rowsort label-2235
SELECT DISTINCT - col0 DIV + col0 + 59 * - 41 + + col1 FROM tab0
----
-2323
-2329
-2334

skipif mysql # not compatible
query I rowsort label-2235
SELECT DISTINCT - col0 / + col0 + 59 * - 41 + + col1 FROM tab0
----
-2323
-2329
-2334

query I rowsort
SELECT + col2 * 19 FROM tab1 AS cor0
----
1026
1083
1824

query I rowsort
SELECT - col1 * 13 * - cor0.col2 AS col2 FROM tab2 cor0
----
10881
19942
8398

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - col2 ) col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - cor0.col1 * - col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL ( - ( + cor0.col1 ) ) * - cor0.col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + 27 AS col2 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT col1 * 74 * - col1 FROM tab1 AS cor0
----
-12506
-50024
-7400

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ( col2 ) * + col2 AS col2 FROM tab2 cor0
----
1444
676
729

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-2246
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2246
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab2
----
NULL

query I rowsort
SELECT + ( - 58 ) FROM tab0
----
-58
-58
-58

query I rowsort
SELECT + col2 * tab2.col2 * col0 + + col2 AS col1 FROM tab2
----
114114
5130
52754

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab2, tab1 cor1
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 36 + col0 * + col2 col0 FROM tab2 AS cor0
----
153
1992
2966

query I rowsort
SELECT + cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query III rowsort
SELECT * FROM tab0 WHERE NOT ( + col0 ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col2 * - col0 - col1 AS col1 FROM tab0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT tab0.col2 * col2 - - col0 AS col1 FROM tab0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-2256
SELECT ALL col1 DIV tab1.col1 + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-2256
SELECT ALL col1 / tab1.col1 + col0 FROM tab1
----
4
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 * + tab2.col2 col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT DISTINCT - col0 + + col1 * + col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT ALL + col1 + + col1 * - col2 AS col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT col0 * + col2 FROM tab1 AS cor0 WHERE NOT NULL > ( col0 / col1 + col0 + + col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NOT NULL IN ( + col2 + cor0.col0 )
----

query I rowsort
SELECT + col0 - + col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT col2 FROM tab1 WHERE col1 IN ( - col1 * + col1 )
----

query I rowsort
SELECT DISTINCT col0 * - col1 - + col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + tab0.col1 FROM tab0 WHERE NULL < NULL
----

query I rowsort
SELECT - col2 + - col1 AS col1 FROM tab1
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2267
SELECT + col0 DIV tab0.col1 + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2267
SELECT + col0 / tab0.col1 + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT - tab2.col0 + - col1 + - col0 FROM tab2
----
-175
-215
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * tab0.col2 col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - col1 * - col2 + + col1 * tab2.col1 + col0 FROM tab2
----
1014
1805
5093

onlyif mysql # use DIV operator for integer division
query I rowsort label-2271
SELECT - col0 * tab0.col2 DIV - col1 AS col1 FROM tab0
----
0
80
9

skipif mysql # not compatible
query I rowsort label-2271
SELECT - col0 * tab0.col2 / - col1 AS col1 FROM tab0
----
0
80
9

query I rowsort
SELECT ALL col1 + col0 + col1 * col0 AS col1 FROM tab2
----
1439
255
4739

query I rowsort
SELECT DISTINCT - col2 * col0 + - col0 * - col1 AS col0 FROM tab2
----
-1659
2574
28

query I rowsort
SELECT ALL + col1 + - col2 FROM tab0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2275
SELECT ALL col2 DIV col0 + col0 * col1 + + tab2.col1 AS col1 FROM tab2
----
1360
251
4661

skipif mysql # not compatible
query I rowsort label-2275
SELECT ALL col2 / col0 + col0 * col1 + + tab2.col1 AS col1 FROM tab2
----
1360
251
4661

query III rowsort
SELECT * FROM tab0 WHERE NOT tab0.col0 + tab0.col2 NOT IN ( col1 * - col1 + col2 )
----

query I rowsort
SELECT - tab0.col0 - + col0 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT + col2 * col2 AS col0 FROM tab1 WHERE NULL NOT IN ( + tab1.col0 * + col2 )
----

query I rowsort
SELECT DISTINCT + col2 * col0 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col2 * - tab2.col0 + - col2 + col2 * col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT DISTINCT col0 - col0 * tab1.col1 * tab1.col0 FROM tab1 WHERE ( + col2 * + col0 ) BETWEEN + col0 AND ( NULL )
----

query I rowsort
SELECT ALL - col1 * cor0.col0 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
-3926
101
512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col0 FROM tab1 cor0
----
10
13
26

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NOT NULL <> ( col1 / - col2 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) <> ( col0 )
----

query IIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab1
----
54 values hashing to 69e208df4a305efdfcc036bb4b31e720

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE NULL >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2288
SELECT DISTINCT - cor0.col0 DIV - col2 - + col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-2288
SELECT DISTINCT - cor0.col0 / - col2 - + col2 FROM tab1 AS cor0
----
-54
-56
-96

query I rowsort
SELECT col0 * cor0.col1 * + col0 AS col1 FROM tab0 AS cor0
----
118825
49536
720811

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL IN ( + tab1.col2 )
----

query I rowsort
SELECT col1 * 94 * col2 FROM tab0 AS cor0
----
266772
701428
9118

query I rowsort
SELECT DISTINCT col0 * ( cor0.col1 * - col1 ) FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT + col0 * - ( + cor0.col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + - col0 AS col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + - col0 + cor0.col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - cor0.col0 * + 45 FROM tab2 AS cor0
----
-315
-3510
-3555

onlyif mysql # use DIV operator for integer division
query I rowsort label-2298
SELECT - col0 * col0 DIV - cor0.col2 col1 FROM tab0 AS cor0
----
1225
17
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2298
SELECT - col0 * col0 / - cor0.col2 col1 FROM tab0 AS cor0
----
1225
17
96

query I rowsort
SELECT DISTINCT cor0.col2 + 89 FROM tab2, tab0, tab1 AS cor0, tab1
----
143
146
185

query I rowsort
SELECT ALL + col0 + cor0.col1 * + cor0.col0 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - col0 * 69 AS col2 FROM tab2 AS cor0
----
-483
-5382
-5451

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2302
SELECT col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2302
SELECT col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - cor0.col0 + - col1 * 70 * col1 FROM tab0 AS cor0
----
-517744
-579759
-658665

query I rowsort
SELECT ALL - 7 * - cor0.col0 - col1 * - col1 FROM tab0 AS cor0
----
7564
8904
9654

query I rowsort
SELECT ALL - - ( + 38 ) - - cor0.col0 FROM tab0 AS cor0
----
127
62
73

query I rowsort
SELECT - cor1.col1 FROM tab1 cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT - 69 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-107
-95
-96

query I rowsort
SELECT DISTINCT + - ( + col0 ) + col2 * - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to 8bda8b9cf32f196464e0ee0b41a5162d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT DISTINCT - col0 * col0 * + col0 AS col0 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT + tab0.col0 + col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT col1 * tab0.col1 + col0 FROM tab0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 col2 FROM tab2 AS cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 FROM tab2 cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-2316
SELECT ( - col1 ) DIV - 65 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2316
SELECT ( - col1 ) / - 65 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 - - col0 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT + col0 * col2 + - col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT ALL - col1 + col1 AS col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 col1 FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-2321
SELECT + col0 DIV col0 + col1 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-2321
SELECT + col0 / col0 + col1 FROM tab2
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2322
SELECT DISTINCT - col1 * col2 + - col0 DIV - col0 FROM tab1
----
-1247
-1403
-569

skipif mysql # not compatible
query I rowsort label-2322
SELECT DISTINCT - col1 * col2 + - col0 / - col0 FROM tab1
----
-1247
-1403
-569

query I rowsort
SELECT DISTINCT ( - tab1.col0 ) * tab1.col2 + col1 + - col0 * col0 FROM tab1
----
-14067
-145
-7734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col2 ) + - col0 col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL + col0 * tab0.col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT cor0.col0 * col1 + + ( col1 ) * + col0 FROM tab0 cor0
----
16198
4128
6790

query I rowsort
SELECT cor1.col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT 85 * + tab0.col2 FROM tab0
----
2805
6970
85

query I rowsort
SELECT + 95 AS col2 FROM tab1, tab1 cor0, tab1 cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT DISTINCT - 49 + col2 + - col2 * + col1 FROM tab0
----
-145
-2854
-7429

query I rowsort
SELECT + col0 * + col1 - 58 AS col0 FROM tab1
----
20
582
982

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( - 16 AS REAL ) * col1 + + ( col2 ) col0 FROM tab1 AS cor0
----
217
304
470

query I rowsort
SELECT ALL + 29 AS col0 FROM tab0 AS cor0
----
29
29
29

query I rowsort
SELECT DISTINCT + 42 * - col0 AS col0 FROM tab0 cor0
----
-1008
-1470
-3738

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col2 AS REAL ) + col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL + col0 * + col0 * col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT DISTINCT - 44 * + 62 FROM tab1 AS cor0
----
-2728

query I rowsort
SELECT - - 97 + - col1 AS col1 FROM tab1 cor0
----
71
84
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-2339
SELECT DISTINCT ( + col1 ) DIV + col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2339
SELECT DISTINCT ( + col1 ) / + col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT ( cor0.col2 ) AS col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL - ( + cor0.col1 ) AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - col2 * + col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + col1 + + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + 31 * col1 * - cor0.col1 FROM tab0 AS cor0
----
-229276
-256711
-291679

query I rowsort
SELECT ALL + 53 * col0 + + col0 + + col1 * col1 AS col2 FROM tab0 AS cor0
----
11299
13087
8692

query I rowsort
SELECT + 45 FROM tab1 cor0
----
45
45
45

query I rowsort
SELECT DISTINCT ( - col2 ) - cor0.col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + + ( col1 ) * col1 - - col2 AS col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - ( col0 ) + col0 * ( - col1 ) AS col0 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2350
SELECT DISTINCT col2 DIV col1 - + 71 AS col0 FROM tab2
----
-69
-71

skipif mysql # not compatible
query I rowsort label-2350
SELECT DISTINCT col2 / col1 - + 71 AS col0 FROM tab2
----
-69
-71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2351
SELECT ALL col1 - CAST( col2 AS SIGNED ) * - tab1.col0 * 3 FROM tab1
----
10954
23053
512

skipif mysql # not compatible
query I rowsort label-2351
SELECT ALL col1 - CAST ( col2 AS INTEGER ) * - tab1.col0 * 3 FROM tab1
----
10954
23053
512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 67 col2 FROM tab1, tab1 AS cor0
----
-67

query I rowsort
SELECT + tab1.col1 * - 74 + 37 * col0 + - 80 AS col0 FROM tab1
----
-1893
1548
1918

query I rowsort
SELECT - - col2 * - 20 * col0 FROM tab2 AS cor0
----
-3780
-40560
-60040

query I rowsort
SELECT + + col1 * - 60 AS col1 FROM tab2 AS cor0
----
-1020
-1860
-3540

onlyif mysql # use DIV operator for integer division
query I rowsort label-2356
SELECT + CAST( + 95 AS SIGNED ) DIV col2 FROM tab1 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2356
SELECT + CAST ( + 95 AS INTEGER ) / col2 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) * + col0 + col2 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT 44 FROM tab1, tab1 AS cor0
----
44

query I rowsort
SELECT DISTINCT + - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT tab0.col1 + + col0 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT + + col2 + + cor0.col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2362
SELECT ALL CAST( NULL AS SIGNED ) * + col1 + col0 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2362
SELECT ALL CAST ( NULL AS INTEGER ) * + col1 + col0 AS col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2363
SELECT ALL + col0 * col0 DIV - col2 AS col1 FROM tab0
----
-1225
-17
-96

skipif mysql # not compatible
query I rowsort label-2363
SELECT ALL + col0 * col0 / - col2 AS col1 FROM tab0
----
-1225
-17
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2364
SELECT ALL - + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2364
SELECT ALL - + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 15 FROM tab2, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT + + col1 * ( + 10 + - col2 ) AS col0 FROM tab1 AS cor0
----
-1118
-1144
-470

query I rowsort
SELECT - 37 + col2 AS col0 FROM tab2
----
-10
-11
1

query I rowsort
SELECT + col1 + + 13 FROM tab2
----
30
44
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-2369
SELECT col2 DIV col0 + + 20 + col0 FROM tab0
----
109
45
55

skipif mysql # not compatible
query I rowsort label-2369
SELECT col2 / col0 + + 20 + col0 FROM tab0
----
109
45
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + 51 col0 FROM tab0
----
137
142
148

query I rowsort
SELECT - col0 * cor0.col1 * col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT + - col1 + + 78 AS col0 FROM tab0 AS cor0
----
-13
-19
-8

query I rowsort
SELECT DISTINCT - col1 * ( col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col1 + CAST ( - 49 + + col0 AS REAL ) AS col2 FROM tab0 AS cor0
----
131
61
83

query I rowsort
SELECT DISTINCT col2 * ( 16 * col0 ) AS col1 FROM tab0 cor0
----
116768
12672
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-2376
SELECT + + cor0.col0 DIV 15 AS col1 FROM tab2 AS cor0
----
0
5
5

skipif mysql # not compatible
query I rowsort label-2376
SELECT + + cor0.col0 / 15 AS col1 FROM tab2 AS cor0
----
0
5
5

query I rowsort
SELECT ALL 53 * + 92 FROM tab0, tab1 AS cor0
----
9 values hashing to 361517f618165dffca5187dc8296ea71

query I rowsort
SELECT ALL + col2 + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2379
SELECT ALL - col2 DIV 12 AS col1 FROM tab2 cor0
----
-2
-2
-3

skipif mysql # not compatible
query I rowsort label-2379
SELECT ALL - col2 / 12 AS col1 FROM tab2 cor0
----
-2
-2
-3

query I rowsort
SELECT ( col2 ) * - col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - tab1.col1 * - col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - 98 * + col0 AS col1 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT 14 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT - ( + tab1.col2 ) * - 47 + + col0 AS col1 FROM tab1
----
2541
2743
4592

query I rowsort
SELECT ALL 14 FROM tab2
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT DISTINCT - 32 FROM tab0, tab0 cor0, tab0 AS cor1
----
-32

query I rowsort
SELECT col1 * col2 + col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL + + cor0.col0 - + col1 AS col1 FROM tab2 cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 36 * - col2 col2 FROM tab2 cor0
----
-1368
-936
-972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col2 ) + - col2 col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col0 * + ( + 42 ) FROM tab2 AS cor0
----
-294
-3276
-3318

query I rowsort
SELECT col0 * 38 AS col1 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT 46 * - tab2.col1 AS col2 FROM tab2
----
-1426
-2714
-782

query I rowsort
SELECT DISTINCT col2 * col2 * ( - tab1.col2 + tab1.col0 ) AS col1 FROM tab1
----
-147456
-148716
22743

query I rowsort
SELECT ALL + 30 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 39 + + cor0.col2 * - 96 * col2 FROM tab0 AS cor0
----
-104505
-57
-645465

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 181d902c42955a43a374f13a73d8b0a1

query I rowsort
SELECT - - col1 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + col2 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 45 * - col2 FROM tab2
----
1170
1215
1710

query I rowsort
SELECT ALL tab1.col1 * col1 AS col1 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2405
SELECT DISTINCT + col2 DIV - ( - col2 ) FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2405
SELECT DISTINCT + col2 / - ( - col2 ) FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT col2 * - col0 * ( 27 * + col0 ) AS col2 FROM tab2
----
-35721
-4270968
-6403266

onlyif mysql # use DIV operator for integer division
query I rowsort label-2407
SELECT + 38 DIV + col2 - + 85 FROM tab1
----
-85
-85
-85

skipif mysql # not compatible
query I rowsort label-2407
SELECT + 38 / + col2 - + 85 FROM tab1
----
-85
-85
-85

query I rowsort
SELECT ( col2 ) - col1 * 15 FROM tab0
----
-1257
-1283
-1454

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col2 col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - tab0.col0 * col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2412
SELECT DISTINCT tab1.col2 * CAST( 20 * + col2 AS SIGNED ) col1 FROM tab1
----
184320
58320
64980

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2412
SELECT DISTINCT tab1.col2 * CAST ( 20 * + col2 AS INTEGER ) col1 FROM tab1
----
184320
58320
64980

query I rowsort
SELECT col1 * + 64 AS col2 FROM tab2
----
1088
1984
3776

onlyif mysql # use DIV operator for integer division
query I rowsort label-2414
SELECT DISTINCT - col2 DIV + ( tab1.col2 ) FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-2414
SELECT DISTINCT - col2 / + ( tab1.col2 ) FROM tab1
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2415
SELECT CAST( NULL AS SIGNED ) / + 82 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2415
SELECT CAST ( NULL AS INTEGER ) / + 82 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 40 AS col1 FROM tab2 AS cor0
----
-40

query I rowsort
SELECT ALL cor0.col1 * + 76 AS col1 FROM tab2 AS cor0
----
1292
2356
4484

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2418
SELECT ALL CAST( NULL AS DECIMAL ) * cor0.col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2418
SELECT ALL CAST ( NULL AS REAL ) * cor0.col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 25 + - col1 FROM tab1 cor0
----
-1
12
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT - tab1.col0 + + tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col0 * col0 + - col0 * col2 * - col1 FROM tab0
----
4620
672039
68688

query I rowsort
SELECT 94 FROM tab2, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT ALL + col0 + + col2 + - col1 AS col1 FROM tab0
----
-29
-61
80

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ( + 16 ) * col2 + 20 FROM tab2 AS cor0
----
436
452
628

onlyif mysql # use DIV operator for integer division
query I rowsort label-2427
SELECT col0 DIV col1 + + cor0.col2 FROM tab2 AS cor0
----
27
27
42

skipif mysql # not compatible
query I rowsort label-2427
SELECT col0 / col1 + + cor0.col2 FROM tab2 AS cor0
----
27
27
42

query I rowsort
SELECT + ( col1 ) + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL ( col1 ) + + col2 * ( 64 ) FROM tab2
----
1723
1759
2449

query I rowsort
SELECT 3 FROM tab0, tab1, tab1 AS cor0, tab2
----
81 values hashing to c7bd37716aa9c76e684a54f53d1ee343

query I rowsort
SELECT + ( ( col2 ) ) * 13 FROM tab2
----
338
351
494

query I rowsort
SELECT DISTINCT - tab0.col0 + - col0 AS col2 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT ALL - col0 + 16 * col2 + tab0.col2 * tab0.col1 * - tab0.col2 AS col0 FROM tab0
----
-116
-610661
-93150

query I rowsort
SELECT 77 * + 43 FROM tab2
----
3311
3311
3311

query I rowsort
SELECT ALL + col1 + tab0.col2 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT ( 66 * + tab2.col2 ) + col0 FROM tab2
----
1789
1794
2587

query I rowsort
SELECT ALL col2 - ( + cor0.col1 ) FROM tab0 cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2438
SELECT ALL - col1 DIV col0 + - col0 FROM tab1
----
-11
-64
-80

skipif mysql # not compatible
query I rowsort label-2438
SELECT ALL - col1 / col0 + - col0 FROM tab1
----
-11
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col2 col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2441
SELECT - + col1 + - col1 DIV - col2 FROM tab0 AS cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-2441
SELECT - + col1 + - col1 / - col2 FROM tab0 AS cor0
----
-84
-90
0

query I rowsort
SELECT ALL + 1 + + col2 * - 86 FROM tab1 AS cor0
----
-4643
-4901
-8255

onlyif mysql # use DIV operator for integer division
query I rowsort label-2443
SELECT ALL - col2 DIV + col1 + + col2 FROM tab2 cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-2443
SELECT ALL - col2 / + col1 + + col2 FROM tab2 cor0
----
26
27
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + col0 col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT 25 AS col1 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT ALL - 12 AS col2 FROM tab2 AS cor0
----
-12
-12
-12

query I rowsort
SELECT DISTINCT - ( col0 ) * col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col0 * col0 + 82 * ( + col0 * - 70 + col2 ) FROM tab1 AS cor0
----
-12783
-358590
-444928

query I rowsort
SELECT DISTINCT + col2 * - col0 - 11 AS col1 FROM tab2 AS cor0
----
-200
-2039
-3013

query I rowsort
SELECT ALL col0 * cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT 87 * 17 FROM tab1
----
1479
1479
1479

query I rowsort
SELECT DISTINCT + 7 * - col1 AS col1 FROM tab0 AS cor0
----
-602
-637
-679

query I rowsort
SELECT ALL + - col2 + col1 * 37 + - 60 * col1 * - 76 AS col0 FROM tab1 cor0
----
119468
45913
59665

query I rowsort
SELECT - + cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * col1 + + ( + col1 ) col2 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - + col2 + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 10 AS col2 FROM tab0 AS cor0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col0 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL col1 + - col1 AS col2 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + 41 col1 FROM tab1 cor0
----
105
121
44

query I rowsort
SELECT - col0 + col1 * - col1 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT DISTINCT col2 + + ( + col0 + - tab0.col1 ) AS col2 FROM tab0
----
-29
-61
80

query I rowsort
SELECT ALL col2 * col0 * + col2 AS col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT - col1 - + 6 FROM tab0 AS cor0
----
-103
-92
-97

query I rowsort
SELECT DISTINCT + col1 * + ( - col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + + col2 - cor0.col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + 36 col2 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT col0 + - col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 * - 8 * col2 + - col2 * cor0.col0 * col1 AS col2 FROM tab0 cor0
----
-4171
-723814
-90816

query I rowsort
SELECT cor0.col2 * - col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2471
SELECT - + col0 * CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-2471
SELECT - + col0 * CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT col0 - col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT - col2 * - 15 * col2 + cor0.col2 FROM tab1 AS cor0
----
138336
43794
48792

query I rowsort
SELECT DISTINCT + 73 * col0 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT DISTINCT - 94 FROM tab2, tab1 cor0
----
-94

query I rowsort
SELECT col1 * col0 * - cor0.col1 + col0 AS col1 FROM tab1 AS cor0
----
-13440
-2025
-6336

query I rowsort
SELECT ALL + col2 * - col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2479
SELECT DISTINCT + 84 DIV 76 + col0 * ( + col1 ) DIV col1 FROM tab1 cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-2479
SELECT DISTINCT + 84 / 76 + col0 * ( + col1 ) / col1 FROM tab1 cor0
----
4
65
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2480
SELECT + - CAST( NULL AS SIGNED ) + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2480
SELECT + - CAST ( NULL AS INTEGER ) + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * cor0.col0 + + col1 col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT tab2.col0 * ( col1 + tab2.col0 ) FROM tab2
----
10686
266
7584

query I rowsort
SELECT ALL + col2 * + col0 * col0 + col0 * col2 FROM tab1 AS cor0
----
237120
622080
648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 78 col2 FROM tab1 AS cor0
----
78
78
78

query I rowsort
SELECT ALL - + ( col2 ) + cor0.col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ( col1 ) * 26 FROM tab0 AS cor0
----
2236
2366
2522

query I rowsort
SELECT DISTINCT + 90 * cor0.col0 FROM tab0 AS cor0
----
2160
3150
8010

query I rowsort
SELECT ALL + 92 AS col0 FROM tab0 cor0
----
92
92
92

query I rowsort
SELECT DISTINCT 62 AS col1 FROM tab1 AS cor0
----
62

query I rowsort
SELECT - + 33 * col2 AS col0 FROM tab1 cor0
----
-1782
-1881
-3168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2491
SELECT - col0 - - CAST( NULL AS SIGNED ) * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2491
SELECT - col0 - - CAST ( NULL AS INTEGER ) * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + - ( 41 ) col2 FROM tab1 AS cor0
----
-15
-28
-31

query I rowsort
SELECT DISTINCT - + cor0.col1 * - col0 + col2 * col0 AS col2 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT DISTINCT col2 + + col0 + + col0 FROM tab1 AS cor0
----
185
256
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 * col1 col1 FROM tab0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-2496
SELECT - + cor0.col1 DIV + 54 - cor0.col0 FROM tab2 AS cor0
----
-7
-79
-79

skipif mysql # not compatible
query I rowsort label-2496
SELECT - + cor0.col1 / + 54 - cor0.col0 FROM tab2 AS cor0
----
-7
-79
-79

query I rowsort
SELECT tab1.col2 + - col0 AS col1 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT col2 - col0 * + tab1.col1 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT col2 * - col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - + col1 * 96 AS col2 FROM tab1 AS cor0
----
-1248
-2496
-960

query I rowsort
SELECT - col1 * + 41 * - col2 FROM tab0 AS cor0
----
116358
305942
3977

query I rowsort
SELECT ALL - - 64 * col2 - + col1 * - 91 FROM tab2 AS cor0
----
3979
4549
7033

query I rowsort
SELECT DISTINCT + col0 + - col2 * + col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL + - 73 + + 66 * - col0 FROM tab0 cor0
----
-1657
-2383
-5947

onlyif mysql # use DIV operator for integer division
query I rowsort label-2505
SELECT ALL 40 + + 3 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
40
40
40

skipif mysql # not compatible
query I rowsort label-2505
SELECT ALL 40 + + 3 / cor0.col0 AS col1 FROM tab0 AS cor0
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 25 * + 19 FROM tab0 AS cor0
----
475
475
475

query I rowsort
SELECT - cor1.col0 + + 31 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 86c3f43b6734d0089ed0939503b0b145

query I rowsort
SELECT ALL + ( col1 + + col1 * col0 ) AS col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab1
----
73

query I rowsort
SELECT 81 FROM tab2, tab2 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

onlyif mysql # use DIV operator for integer division
query I rowsort label-2512
SELECT ALL - col1 DIV + col1 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2512
SELECT ALL - col1 / + col1 AS col2 FROM tab0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2513
SELECT DISTINCT CAST( NULL AS DECIMAL ) * tab1.col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2513
SELECT DISTINCT CAST ( NULL AS REAL ) * tab1.col2 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2514
SELECT ALL + col0 DIV + 83 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2514
SELECT ALL + col0 / + 83 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 52 col2 FROM tab2
----
-52
-52
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2516
SELECT DISTINCT CAST( + col0 AS SIGNED ) * - col0 FROM tab2
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-2516
SELECT DISTINCT CAST ( + col0 AS INTEGER ) * - col0 FROM tab2
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2517
SELECT + + 55 + col0 * CAST( - 25 AS SIGNED ) AS col0 FROM tab2 cor0
----
-120
-1895
-1920

skipif mysql # not compatible
query I rowsort label-2517
SELECT + + 55 + col0 * CAST ( - 25 AS INTEGER ) AS col0 FROM tab2 cor0
----
-120
-1895
-1920

onlyif mysql # use DIV operator for integer division
query I rowsort label-2518
SELECT - - 77 DIV col0 AS col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-2518
SELECT - - 77 / col0 AS col0 FROM tab0 AS cor0
----
0
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2519
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2519
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2520
SELECT col2 DIV - cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2520
SELECT col2 / - cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 84 * col0 FROM tab1
----
-252
-5376
-6720

query I rowsort
SELECT DISTINCT 22 AS col1 FROM tab0
----
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2523
SELECT DISTINCT 31 * - tab0.col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2523
SELECT DISTINCT 31 * - tab0.col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT + cor0.col2 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to d95cefa45985203e212af5af5dd9be5b

query I rowsort
SELECT DISTINCT 44 AS col0 FROM tab2
----
44

query I rowsort
SELECT DISTINCT - + col2 + col2 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - + 17 + col2 FROM tab1 AS cor0
----
37
40
79

query I rowsort
SELECT DISTINCT col2 * - col0 + col2 AS col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + tab1.col2 * - 95 + col1 AS col2 FROM tab1
----
-5104
-5405
-9107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 34 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT + tab0.col0 * - tab0.col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + tab1.col2 * + col1 + - tab1.col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT col0 + col1 + tab2.col0 AS col1 FROM tab2
----
175
215
45

query I rowsort
SELECT - col2 + + 58 * + col0 FROM tab1
----
120
3655
4544

query I rowsort
SELECT - cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 + col1 * col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - col2 + ( 52 ) AS col1 FROM tab1 AS cor0
----
-2
-44
-5

query I rowsort
SELECT - + col0 * - col2 - col2 AS col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT + col0 + + 18 AS col0 FROM tab2
----
25
96
97

query I rowsort
SELECT 65 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT DISTINCT + + col2 + + col2 * col1 * - col2 FROM tab1 AS cor0
----
-119712
-32433
-75762

onlyif mysql # use DIV operator for integer division
query I rowsort label-2543
SELECT DISTINCT - - col0 DIV 47 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2543
SELECT DISTINCT - - col0 / 47 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT ALL 10 + - col2 AS col2 FROM tab2 AS cor0
----
-16
-17
-28

onlyif mysql # use DIV operator for integer division
query I rowsort label-2545
SELECT DISTINCT + col1 * col0 DIV col0 + + cor0.col2 AS col1 FROM tab0 cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-2545
SELECT DISTINCT + col1 * col0 / col0 + + cor0.col2 AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT ( + 34 ) * - col2 FROM tab1 AS cor0
----
-1836
-1938
-3264

query I rowsort
SELECT - cor0.col0 + ( cor0.col0 ) FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2548
SELECT DISTINCT - col0 DIV 4 AS col1 FROM tab1
----
-16
-20
0

skipif mysql # not compatible
query I rowsort label-2548
SELECT DISTINCT - col0 / 4 AS col1 FROM tab1
----
-16
-20
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2549
SELECT + cor0.col0 DIV col1 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2549
SELECT + cor0.col0 / col1 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT ALL - - 13 + col2 * + col0 FROM tab1 cor0
----
175
3661
7693

query I rowsort
SELECT + - ( + col1 ) + col2 * + 22 AS col2 FROM tab2 AS cor0
----
513
563
819

query I rowsort
SELECT + 16 + col0 * - col0 FROM tab2 AS cor0
----
-33
-6068
-6225

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + + cor0.col0 * 74 * - col0 + + 56 FROM tab1 AS cor0
----
-303048
-473544
-610

query I rowsort
SELECT + col1 + col0 * - col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT col0 + col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + - col2 + 35 FROM tab0 AS cor0
----
-47
2
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-2558
SELECT DISTINCT + col2 + - 62 DIV col0 col0 FROM tab2
----
19
26
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2558
SELECT DISTINCT + col2 + - 62 / col0 col0 FROM tab2
----
19
26
38

query I rowsort
SELECT DISTINCT tab2.col1 + + ( + col1 + + col0 ) FROM tab2
----
113
196
69

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab2 cor0, tab1 AS cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2561
SELECT + + col1 + + CAST( - 20 AS SIGNED ) AS col2 FROM tab1 cor0
----
-10
-7
6

skipif mysql # not compatible
query I rowsort label-2561
SELECT + + col1 + + CAST ( - 20 AS INTEGER ) AS col2 FROM tab1 cor0
----
-10
-7
6

query I rowsort
SELECT DISTINCT - 3 AS col1 FROM tab2, tab1 cor0
----
-3

query I rowsort
SELECT ALL - 6 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8be8910507908e6353d02a545b748252

query I rowsort
SELECT DISTINCT - ( col2 ) - cor0.col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2565
SELECT ALL - CAST( NULL AS SIGNED ) * col1 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2565
SELECT ALL - CAST ( NULL AS INTEGER ) * col1 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 58 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT DISTINCT ( 91 ) + - col2 AS col1 FROM tab2 AS cor0
----
53
64
65

query I rowsort
SELECT ALL + - ( + 77 ) + + cor0.col2 * - ( + 23 ) FROM tab2 AS cor0
----
-675
-698
-951

query I rowsort
SELECT DISTINCT - col0 * + col1 AS col2 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2570
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-2570
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + ( col1 ) + col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2572
SELECT DISTINCT col2 DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-2572
SELECT DISTINCT col2 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT col0 * 45 + col2 FROM tab1 AS cor0
----
189
2937
3696

query I rowsort
SELECT - col2 * 45 FROM tab0
----
-1485
-3690
-45

query I rowsort
SELECT - col2 + - tab0.col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT + col2 - col2 * - 44 AS col2 FROM tab1
----
2430
2565
4320

query I rowsort
SELECT ALL - col0 * col0 AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ( cor0.col1 ) + 98 * ( + col0 ) + col2 FROM tab1 AS cor0
----
374
6339
7949

query I rowsort
SELECT cor0.col0 + col0 * col1 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2580
SELECT + + col0 * col1 + - ( col2 ) + + col0 * CAST( 11 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
2295
3779
8996

skipif mysql # not compatible
query I rowsort label-2580
SELECT + + col0 * col1 + - ( col2 ) + + col0 * CAST ( 11 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
2295
3779
8996

onlyif mysql # use DIV operator for integer division
query I rowsort label-2581
SELECT 73 DIV 89 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2581
SELECT 73 / 89 AS col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2583
SELECT + col0 DIV - 80 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2583
SELECT + col0 / - 80 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - col1 + + col1 + + col0 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - 24 col2 FROM tab1
----
-21
40
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-2586
SELECT DISTINCT + 34 DIV 60 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-2586
SELECT DISTINCT + 34 / 60 FROM tab2
----
0

query I rowsort
SELECT ALL - ( col1 ) * col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 78 * + col0 AS col2 FROM tab2
----
546
6084
6162

query I rowsort
SELECT - ( + tab1.col0 ) * ( + col0 + - col2 ) * + col1 AS col2 FROM tab1
----
-4480
16640
3978

query I rowsort
SELECT ALL 13 + - cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 652705b2419a713fc192d1c65c1e576b

query I rowsort
SELECT + ( + col1 ) + - col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + - cor0.col1 * + col1 - + 94 * + col0 FROM tab0 AS cor0
----
-12699
-16647
-9652

query I rowsort
SELECT - 84 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT - col1 + col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT tab1.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - 16 * - col1 FROM tab1
----
160
208
416

onlyif mysql # use DIV operator for integer division
query I rowsort label-2597
SELECT + 37 * col1 DIV + col0 FROM tab2
----
163
27
7

skipif mysql # not compatible
query I rowsort label-2597
SELECT + 37 * col1 / + col0 FROM tab2
----
163
27
7

query I rowsort
SELECT ALL + col2 * 35 AS col1 FROM tab0 cor0
----
1155
2870
35

query I rowsort
SELECT - cor0.col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - col1 * 34 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT - col0 * - 99 AS col0 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT + col2 + + col1 + 76 FROM tab2
----
131
134
161

query I rowsort
SELECT ALL 43 + col2 AS col2 FROM tab2
----
69
70
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2604
SELECT DISTINCT tab1.col1 * CAST( 39 AS SIGNED ) FROM tab1, tab2 AS cor0
----
1014
390
507

skipif mysql # not compatible
query I rowsort label-2604
SELECT DISTINCT tab1.col1 * CAST ( 39 AS INTEGER ) FROM tab1, tab2 AS cor0
----
1014
390
507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2605
SELECT ALL 2 - col2 * CAST( - col1 + + col1 AS SIGNED ) FROM tab0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-2605
SELECT ALL 2 - col2 * CAST ( - col1 + + col1 AS INTEGER ) FROM tab0
----
2
2
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2606
SELECT ALL col2 + + CAST( NULL AS SIGNED ) + + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2606
SELECT ALL col2 + + CAST ( NULL AS INTEGER ) + + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ( - 43 ) - cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 cor2
----
81 values hashing to dff19d63a0bc2dbfcddcd21c94cf2df1

query I rowsort
SELECT ALL col0 * 2 + - col1 * - col1 * - 4 + 18 FROM tab1
----
-254
-2680
-498

query I rowsort
SELECT ALL tab0.col0 * - 67 + + col0 FROM tab0
----
-1584
-2310
-5874

query I rowsort
SELECT ALL - col0 + - 81 AS col1 FROM tab0 AS cor0
----
-105
-116
-170

query I rowsort
SELECT - + col2 * col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col1 + - 94 AS col1 FROM tab1 AS cor0
----
-104
-107
-120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + 87 col2 FROM tab2 AS cor0
----
104
118
146

query I rowsort
SELECT col1 + ( - ( col2 ) ) * - col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col1 col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT col0 + + 51 FROM tab2 cor0
----
129
130
58

query I rowsort
SELECT DISTINCT col1 + 50 AS col1 FROM tab2 AS cor0
----
109
67
81

query I rowsort
SELECT ALL - col1 + 65 AS col1 FROM tab2 AS cor0
----
34
48
6

query I rowsort
SELECT col0 * ( + 37 ) * col1 + + col1 + col1 FROM tab1 AS cor0
----
23700
2938
38506

query I rowsort
SELECT ALL - - col1 * - col2 * + cor0.col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT ALL + - col1 * - ( + col0 ) + - col2 + + col2 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2622
SELECT - + col0 * col0 + col1 DIV + col2 AS col0 FROM tab1 cor0
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-2622
SELECT - + col0 * col0 + col1 / + col2 AS col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col0 * + 3 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT ALL + ( - col1 + - col1 * 0 ) AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab0
----
22

query I rowsort
SELECT + ( + col0 ) + + col1 * - col0 AS col2 FROM tab1 cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 67 col0 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT - - col1 * - ( col2 ) AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - 33 AS col1 FROM tab0
----
-33

query I rowsort
SELECT 79 * - ( - col0 ) AS col2 FROM tab1 AS cor0
----
237
5056
6320

query I rowsort
SELECT ALL - col0 + + col2 + + ( + col1 ) FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + + 37 * col1 + col1 AS col2 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT col1 - - col1 * - col0 * + 90 AS col0 FROM tab2 AS cor0
----
-120853
-19499
-414121

query I rowsort
SELECT - + col0 + - col2 * ( cor0.col0 ) + - col1 * 35 AS col0 FROM tab2 cor0
----
-1281
-3676
-4171

query I rowsort
SELECT + col1 + - col0 * + ( + 23 ) + + col0 FROM tab0 AS cor0
----
-1867
-442
-673

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 4 AS col1 FROM tab2
----
4
4
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2639
SELECT DISTINCT - col0 + col1 + + CAST( + ( col1 ) + - 43 AS SIGNED ) * + 17 * cor0.col1 AS col1 FROM tab0 AS cor0
----
62928
74258
89108

skipif mysql # not compatible
query I rowsort label-2639
SELECT DISTINCT - col0 + col1 + + CAST ( + ( col1 ) + - 43 AS INTEGER ) * + 17 * cor0.col1 AS col1 FROM tab0 AS cor0
----
62928
74258
89108

query I rowsort
SELECT ALL - - col0 * col1 - - col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT + col2 * col2 + cor0.col1 * + col2 FROM tab2 AS cor0
----
1566
2090
2210

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col0 FROM tab1 cor0
----
-94
-94
-94

query I rowsort
SELECT ALL col2 - - col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL col1 * 65 FROM tab2
----
1105
2015
3835

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2645
SELECT + CAST( NULL AS SIGNED ) + tab0.col1 * + col2 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2645
SELECT + CAST ( NULL AS INTEGER ) + tab0.col1 * + col2 AS col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2646
SELECT CAST( - col2 AS SIGNED ) * + col0 + + ( - tab2.col2 ) * col0 AS col2 FROM tab2
----
-378
-4056
-6004

skipif mysql # not compatible
query I rowsort label-2646
SELECT CAST ( - col2 AS INTEGER ) * + col0 + + ( - tab2.col2 ) * col0 AS col2 FROM tab2
----
-378
-4056
-6004

query I rowsort
SELECT DISTINCT - 64 AS col1 FROM tab2, tab1, tab2 AS cor0
----
-64

query I rowsort
SELECT DISTINCT - 13 AS col2 FROM tab0 cor0
----
-13

query I rowsort
SELECT - 18 + col1 FROM tab1 AS cor0
----
-5
-8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 3 * col2 FROM tab1 AS cor0
----
162
171
288

query I rowsort
SELECT DISTINCT 17 AS col0 FROM tab0 cor0
----
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-2653
SELECT + cor0.col1 DIV + cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2653
SELECT + cor0.col1 / + cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT 94 + col2 AS col1 FROM tab0 AS cor0
----
127
176
95

query I rowsort
SELECT DISTINCT + - cor0.col1 + - col1 + col0 FROM tab2 AS cor0
----
-40
-55
45

query I rowsort
SELECT 93 FROM tab0, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT + 10 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2658
SELECT ALL - + col2 / + CAST( NULL AS SIGNED ) + 1 col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2658
SELECT ALL - + col2 / + CAST ( NULL AS INTEGER ) + 1 col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + + col0 * 86 FROM tab2 AS cor0
----
629
6734
6832

query I rowsort
SELECT DISTINCT - + col1 * col0 - 32 FROM tab0 AS cor0
----
-2096
-3427
-8131

query I rowsort
SELECT + col1 * col2 + - 10 AS col2 FROM tab2 AS cor0
----
1524
636
827

onlyif mysql # use DIV operator for integer division
query I rowsort label-2662
SELECT ALL + col2 DIV + 41 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-2662
SELECT ALL + col2 / + 41 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT ALL col1 - ( col1 + - col1 ) AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - col2 * - col1 + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT - - col1 - - col1 * - ( cor0.col0 ) FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL + col2 + col2 * + ( col2 * 90 + + 33 ) FROM tab1 AS cor0
----
264276
294348
832704

query I rowsort
SELECT DISTINCT - + col1 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 col0 FROM tab1 cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2669
SELECT ALL - col2 * col1 + - col1 * + col1 * - CAST( + col0 + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1241891
1483118
810722

skipif mysql # not compatible
query I rowsort label-2669
SELECT ALL - col2 * col1 + - col1 * + col1 * - CAST ( + col0 + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1241891
1483118
810722

query I rowsort
SELECT DISTINCT + col0 * col0 - + col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT + + col1 + + col0 AS col0 FROM tab2 cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + ( 17 * cor0.col2 ) col2 FROM tab0 AS cor0
----
1483
52
585

query I rowsort
SELECT - col1 * 35 * + 51 + col0 AS col2 FROM tab1 AS cor0
----
-17786
-23125
-46407

query I rowsort
SELECT ALL + col2 + - col0 FROM tab2 cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col2 ) * cor0.col0 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - + ( - 63 ) * col1 FROM tab0 AS cor0
----
5418
5733
6111

query I rowsort
SELECT DISTINCT - ( col1 ) * cor0.col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - 13 + col1 AS col0 FROM tab0 AS cor0
----
73
78
84

query I rowsort
SELECT col2 * 89 * + col2 + + ( ( + col2 ) ) * + 74 AS col0 FROM tab2 AS cor0
----
131328
62088
66879

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 53 col1 FROM tab2 AS cor0
----
53
53
53

query I rowsort
SELECT - 5 FROM tab2 AS cor0
----
-5
-5
-5

query I rowsort
SELECT - col0 + 37 AS col2 FROM tab0
----
-52
13
2

query I rowsort
SELECT - + col1 * + ( - col2 ) + cor0.col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT + - 0 * - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col2 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + col0 * - col1 AS col2 FROM tab1
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2687
SELECT + + col1 * - col2 + col1 * - CAST( - col2 AS SIGNED ) * col2 AS col0 FROM tab1 cor0
----
118560
31920
74412

skipif mysql # not compatible
query I rowsort label-2687
SELECT + + col1 * - col2 + col1 * - CAST ( - col2 AS INTEGER ) * col2 AS col0 FROM tab1 cor0
----
118560
31920
74412

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) + - col2 col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + col2 * col1 - + cor0.col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT - 67 FROM tab2, tab1 AS cor0
----
-67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2692
SELECT + col0 DIV - col0 - col1 * - col1 FROM tab2 AS cor0
----
288
3480
960

skipif mysql # not compatible
query I rowsort label-2692
SELECT + col0 / - col0 - col1 * - col1 FROM tab2 AS cor0
----
288
3480
960

query I rowsort
SELECT + col1 * - col2 + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT + col0 - ( - 26 ) FROM tab1 cor0
----
106
29
90

query I rowsort
SELECT + ( cor0.col2 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # use DIV operator for integer division
query I rowsort label-2696
SELECT + col1 DIV + 40 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2696
SELECT + col1 / + 40 AS col0 FROM tab2
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 col2 FROM tab0, tab2 AS cor0
----
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2698
SELECT DISTINCT + col0 * CAST( col1 AS SIGNED ) AS col0 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-2698
SELECT DISTINCT + col0 * CAST ( col1 AS INTEGER ) AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col1 + - col0 * col2 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL col1 + 66 FROM tab0 cor0
----
152
157
163

query I rowsort
SELECT + - col0 * 79 + col0 FROM tab2 AS cor0
----
-546
-6084
-6162

query I rowsort
SELECT + cor0.col0 * + col0 + - 56 * + col1 FROM tab1 AS cor0
----
-1447
3536
5672

onlyif mysql # use DIV operator for integer division
query I rowsort label-2703
SELECT + col1 DIV 87 col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2703
SELECT + col1 / 87 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * - 95 FROM tab0
----
-8170
-8645
-9215

query I rowsort
SELECT DISTINCT tab1.col0 + col1 - col0 AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + col1 - col1 AS col2 FROM tab2
----
0

query IIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2
----
54 values hashing to 018801f36b33d2fe82cb95918ba502d6

query I rowsort
SELECT DISTINCT tab1.col2 * + col2 AS col1 FROM tab1
----
2916
3249
9216

query III rowsort
SELECT * FROM tab0 WHERE NOT + col0 BETWEEN NULL AND - col2 + - col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT - - col2 * col1 + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-3526
-5152
1395

query I rowsort
SELECT + col0 + + col2 * + col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT + tab0.col1 - - col0 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - col0 + - col2 AS col1 FROM tab1
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col2 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * col2 col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2716
SELECT DISTINCT col1 DIV - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2716
SELECT DISTINCT col1 / - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT cor0.col2 + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - col0 * - col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL + col1 - - col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT col2 + col1 * col0 * col0 + col2 AS col2 FROM tab1
----
342
41074
83392

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) > ( NULL )
----

query I rowsort
SELECT col0 * col1 AS col2 FROM tab1 AS cor0 WHERE NOT + col2 + col1 * col1 IN ( + cor0.col2 )
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - cor0.col1 col2 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT col1 + cor0.col0 * + cor0.col1 + col0 * col0 FROM tab0 AS cor0
----
16111
2726
4717

query I rowsort
SELECT - col1 + + col1 + - col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col0 * + col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2727
SELECT ALL col2 DIV + col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2727
SELECT ALL col2 / + col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - - col2 * col2 + + cor0.col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT col2 * - col2 + col0 AS col0 FROM tab0
----
-1065
-6635
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - cor0.col1 * - col1 - col1 * + col0 FROM tab2 AS cor0
----
-1178
-1632
-8083

query I rowsort
SELECT - + col0 * cor0.col0 - + col1 AS col1 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT - col2 * - cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col2 * col2 * - col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT DISTINCT - + col1 + - cor0.col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL - + cor0.col0 * col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - tab0.col0 * col1 * col2 AS col0 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-2739
SELECT col0 * + tab2.col1 DIV col1 AS col2 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2739
SELECT col0 * + tab2.col1 / col1 AS col2 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT 86 + - col2 FROM tab2 cor0
----
48
59
60

query I rowsort
SELECT ALL + col2 - col1 * + cor0.col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL 30 + col1 * col1 FROM tab1 AS cor0
----
130
199
706

query I rowsort
SELECT - - 39 AS col0 FROM tab1 cor0
----
39
39
39

query I rowsort
SELECT ( col2 ) + col2 * + col0 * + col2 AS col1 FROM tab1 AS cor0
----
207993
737376
8802

query I rowsort
SELECT col1 + + col1 AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT - col2 + col2 - - col1 * - col1 AS col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - col1 + + col0 AS col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT col2 AS col0 FROM tab1 WHERE NULL NOT IN ( col0 )
----

query I rowsort
SELECT ALL - col1 + col1 * - tab0.col2 AS col1 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT + - 69 * col0 * 30 AS col0 FROM tab2 AS cor0
----
-14490
-161460
-163530

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 40 * col0 col0 FROM tab2 AS cor0
----
-280
-3120
-3160

query I rowsort
SELECT DISTINCT + 43 * col2 FROM tab0 AS cor0
----
1419
3526
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col0 + col0 col1 FROM tab2
----
175
215
45

query I rowsort
SELECT DISTINCT - col1 - + col2 FROM tab1
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2755
SELECT ALL - 82 * col2 - - ( 97 + + col0 ) DIV - col2 FROM tab1
----
-4429
-4676
-7873

skipif mysql # not compatible
query I rowsort label-2755
SELECT ALL - 82 * col2 - - ( 97 + + col0 ) / - col2 FROM tab1
----
-4429
-4676
-7873

query I rowsort
SELECT - col2 * - 99 + 25 AS col1 FROM tab1 AS cor0
----
5371
5668
9529

query I rowsort
SELECT + col2 * 42 FROM tab0 cor0
----
1386
3444
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 * + 73 col2 FROM tab2 AS cor0
----
13797
148044
219146

query I rowsort
SELECT ALL col1 * + 71 AS col0 FROM tab2 cor0
----
1207
2201
4189

query I rowsort
SELECT - cor0.col1 - + cor0.col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT col2 + 14 * ( + col1 * - col1 ) AS col2 FROM tab2 AS cor0
----
-13427
-4008
-48708

onlyif mysql # use DIV operator for integer division
query I rowsort label-2762
SELECT ALL - 15 + col1 DIV col1 + col1 FROM tab0
----
72
77
83

skipif mysql # not compatible
query I rowsort label-2762
SELECT ALL - 15 + col1 / col1 + col1 FROM tab0
----
72
77
83

query I rowsort
SELECT DISTINCT col1 * col2 * + tab2.col1 + col0 * col1 * + tab2.col2 FROM tab2
----
210158
31806
62016

query I rowsort
SELECT 11 + col2 + - 43 FROM tab2
----
-5
-6
6

query I rowsort
SELECT ALL - col1 - tab2.col2 * col2 AS col2 FROM tab2
----
-1461
-735
-760

query I rowsort
SELECT col1 FROM tab2 WHERE NOT - col1 * col0 <= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col0 col0 FROM tab1 WHERE NULL > NULL
----

query I rowsort
SELECT ALL + col1 + col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT + col1 * + col2 AS col2 FROM tab0
----
2838
7462
97

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 * + col0 col2 FROM tab0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - tab0.col2 col2 FROM tab0
----
0

query I rowsort
SELECT ALL col2 + col0 FROM tab0
----
171
36
57

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( - col2 ) <> + col2 + - col1 / - col1 + col1
----

query I rowsort
SELECT + tab2.col0 * + col2 FROM tab2
----
189
2028
3002

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) > NULL
----

query I rowsort
SELECT ALL col0 + + col2 AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT - col0 * col2 * tab2.col0 + col0 FROM tab2
----
-1316
-158106
-237079

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL < + col2
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL NOT IN ( tab2.col1 * tab2.col2 + tab2.col0 * col1 )
----

query I rowsort
SELECT + col2 + col2 AS col0 FROM tab1 WHERE col0 NOT BETWEEN col0 AND ( NULL )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( col1 - - col0 )
----

query I rowsort
SELECT col2 - + tab2.col0 * - col2 * col1 FROM tab2
----
119678
51072
5886

onlyif mysql # use DIV operator for integer division
query I rowsort label-2784
SELECT DISTINCT col0 DIV - col0 + - col0 AS col2 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-2784
SELECT DISTINCT col0 / - col0 + - col0 AS col2 FROM tab1
----
-4
-65
-81

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL < col1
----

query I rowsort
SELECT col1 - - col1 AS col0 FROM tab0
----
172
182
194

query III rowsort
SELECT * FROM tab0 WHERE col1 = col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT col0 + col0 * tab1.col2 * col0 FROM tab1
----
233536
489
614480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2789
SELECT - col1 + + CAST( + 26 AS SIGNED ) * - cor0.col2 FROM tab0 AS cor0
----
-123
-2223
-944

skipif mysql # not compatible
query I rowsort label-2789
SELECT - col1 + + CAST ( + 26 AS INTEGER ) * - cor0.col2 FROM tab0 AS cor0
----
-123
-2223
-944

query I rowsort
SELECT + col0 + - col0 * + col1 * + col0 FROM tab1 cor0
----
-231
-40896
-83120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + - col1 col2 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT col2 + 98 FROM tab0 cor0
----
131
180
99

query I rowsort
SELECT ALL - col0 + - tab0.col1 * 15 AS col0 FROM tab0
----
-1314
-1454
-1490

query I rowsort
SELECT DISTINCT 4 + tab1.col0 + - ( col0 ) FROM tab1
----
4

query I rowsort
SELECT + col0 * + col1 * + col2 AS col1 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - tab0.col1 * tab0.col2 col2 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT 22 + tab2.col0 FROM tab2
----
100
101
29

query I rowsort
SELECT DISTINCT - ( - col2 ) + 92 + - col2 AS col2 FROM tab2
----
92

query I rowsort
SELECT col2 * - tab0.col2 AS col0 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col2 * + 79 AS col2 FROM tab2
----
2054
2133
3002

query I rowsort
SELECT DISTINCT + tab1.col1 * 69 AS col1 FROM tab1
----
1794
690
897

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to bb6428239bf7f3ea361f6a10500a581d

query I rowsort
SELECT ALL - + col0 AS col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - + cor0.col2 * - col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT col2 * 96 + cor0.col0 FROM tab2 AS cor0
----
2574
2599
3727

query I rowsort
SELECT ALL - - col2 * col1 + 34 AS col0 FROM tab1 cor0
----
1282
1438
604

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col0 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2808
SELECT - col1 DIV 85 + - 4 + cor0.col2 FROM tab1 AS cor0
----
50
53
92

skipif mysql # not compatible
query I rowsort label-2808
SELECT - col1 / 85 + - 4 + cor0.col2 FROM tab1 AS cor0
----
50
53
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-2809
SELECT + cor0.col1 * col2 DIV col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2809
SELECT + cor0.col1 * col2 / col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col2 + - 41 * + col1 AS col1 FROM tab0
----
-3493
-3649
-3976

query I rowsort
SELECT DISTINCT tab1.col1 + - col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + 16 - col2 FROM tab1
----
-38
-41
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2813
SELECT ALL - cor0.col2 DIV + col2 - + col1 AS col0 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-2813
SELECT ALL - cor0.col2 / + col2 - + col1 AS col0 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT ALL col2 * col2 + col0 * + 55 FROM tab2 AS cor0
----
1114
4966
5789

query I rowsort
SELECT DISTINCT - col1 * col1 - - col1 FROM tab2 cor0
----
-272
-3422
-930

query I rowsort
SELECT + 57 AS col2 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT ALL 10 * tab2.col2 + col1 FROM tab2
----
301
319
397

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT col2 + - col2 * + cor0.col2 - col0 FROM tab2 AS cor0
----
-1485
-709
-728

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 + + 33 AS col0 FROM tab1 AS cor0
----
-1007
-45
-607

query I rowsort
SELECT + - 55 - - col0 FROM tab0 cor0
----
-20
-31
34

query I rowsort
SELECT col1 + - col2 + - 64 FROM tab2
----
-31
-60
-85

query I rowsort
SELECT DISTINCT tab1.col2 * + col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL + - col1 + col2 * col0 + col0 FROM tab1 AS cor0
----
139
3702
7747

query I rowsort
SELECT DISTINCT - + 93 FROM tab2 AS cor0
----
-93

query I rowsort
SELECT - - 96 AS col2 FROM tab1 AS cor0
----
96
96
96

query I rowsort
SELECT col2 - col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT 60 * + col1 + col2 + + col0 FROM tab2 AS cor0
----
1137
1894
3644

onlyif mysql # use DIV operator for integer division
query I rowsort label-2829
SELECT DISTINCT 52 DIV col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2829
SELECT DISTINCT 52 / col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT + 75 + - col0 AS col2 FROM tab2 AS cor0
----
-3
-4
68

query I rowsort
SELECT DISTINCT 14 * - col0 + ( 27 ) * - cor0.col0 FROM tab2 cor0
----
-287
-3198
-3239

query I rowsort
SELECT col2 * cor0.col1 + + 12 FROM tab0 AS cor0
----
109
2850
7474

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - cor0.col0 col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + 20 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2835
SELECT col1 * + CAST( NULL AS SIGNED ) + - col0 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2835
SELECT col1 * + CAST ( NULL AS INTEGER ) + - col0 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( - col1 ) + - col0 * col1 * tab2.col2 FROM tab2
----
-119593
-51017
-5828

query I rowsort
SELECT + col0 - col2 * col1 AS col2 FROM tab0 cor0
----
-2814
-62
-7373

query I rowsort
SELECT 36 FROM tab0, tab2 cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT ( cor0.col0 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL cor0.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT 95 * col0 FROM tab0 AS cor0
----
2280
3325
8455

query I rowsort
SELECT DISTINCT - + 40 + - col1 * - col1 FROM tab1 AS cor0
----
129
60
636

query I rowsort
SELECT - ( cor0.col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2844
SELECT DISTINCT - 19 DIV + cor0.col1 + + tab1.col1 AS col0 FROM tab1, tab2 AS cor0, tab0 cor1
----
10
12
13
25
26
9

skipif mysql # not compatible
query I rowsort label-2844
SELECT DISTINCT - 19 / + cor0.col1 + + tab1.col1 AS col0 FROM tab1, tab2 AS cor0, tab0 cor1
----
10
12
13
25
26
9

query I rowsort
SELECT + col0 * 50 AS col1 FROM tab1 AS cor0
----
150
3200
4000

query I rowsort
SELECT - 12 * col1 FROM tab2 AS cor0
----
-204
-372
-708

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 42 col0 FROM tab2 AS cor0
----
-42
-42
-42

query I rowsort
SELECT + 28 FROM tab1
----
28
28
28

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab0
----
91

query I rowsort
SELECT ALL + 63 * - ( col1 ) AS col0 FROM tab1
----
-1638
-630
-819

query I rowsort
SELECT - - 99 + + 54 * - col2 AS col0 FROM tab0 AS cor0
----
-1683
-4329
45

query I rowsort
SELECT ALL 75 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab2, tab0 AS cor0
----
73

query I rowsort
SELECT DISTINCT - 40 + - col1 FROM tab2 cor0
----
-57
-71
-99

query I rowsort
SELECT ( - 83 ) - cor0.col2 FROM tab0 AS cor0
----
-116
-165
-84

query I rowsort
SELECT DISTINCT + 93 * col1 * col0 FROM tab1 AS cor0
----
59520
7254
96720

query I rowsort
SELECT DISTINCT + + 92 * 75 AS col2 FROM tab0 AS cor0
----
6900

query I rowsort
SELECT + 65 * - 68 * - col0 FROM tab0
----
106080
154700
393380

query I rowsort
SELECT ALL col0 * + col1 * col1 + 12 * + col2 * col2 FROM tab0
----
190572
329327
817697

onlyif mysql # use DIV operator for integer division
query I rowsort label-2860
SELECT ALL - col2 - - col1 DIV col1 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-2860
SELECT ALL - col2 - - col1 / col1 FROM tab0
----
-32
-81
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2861
SELECT cor0.col1 DIV cor0.col2 - + col1 FROM tab0 cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-2861
SELECT cor0.col1 / cor0.col2 - + col1 FROM tab0 cor0
----
-84
-90
0

query I rowsort
SELECT DISTINCT + 86 * + 85 + col2 * col0 FROM tab0 AS cor0
----
14608
7345
8102

onlyif mysql # use DIV operator for integer division
query I rowsort label-2863
SELECT + 81 + - col0 DIV - col2 AS col0 FROM tab1 cor0
----
81
81
82

skipif mysql # not compatible
query I rowsort label-2863
SELECT + 81 + - col0 / - col2 AS col0 FROM tab1 cor0
----
81
81
82

query I rowsort
SELECT 89 * - col2 - col0 FROM tab0 cor0
----
-124
-2961
-7387

query I rowsort
SELECT DISTINCT + cor0.col2 + 52 FROM tab0, tab2 AS cor0
----
78
79
90

query I rowsort
SELECT cor0.col1 + + ( col2 ) + ( cor0.col2 ) FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT DISTINCT 6 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
6

query I rowsort
SELECT + 56 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT + ( + col0 ) - ( col0 * col0 ) FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT - col2 * + col2 + tab0.col0 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT tab1.col1 * - tab1.col0 + - col0 AS col0 FROM tab1
----
-1120
-704
-81

query I rowsort
SELECT col1 + - col1 * col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + + col2 * + col0 * + col1 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT - - col0 * ( + col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col1 + col2 * - 25 AS col2 FROM tab2 AS cor0
----
-706
-709
-967

query I rowsort
SELECT ALL + cor0.col1 * ( - col2 ) + - col2 AS col1 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL ( + tab0.col2 ) FROM tab0
----
1
33
82

query I rowsort
SELECT ALL cor0.col2 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * col2 + 65 col2 FROM tab1 AS cor0
----
2981
3314
9281

query I rowsort
SELECT ALL - cor0.col0 * - col0 AS col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT col0 + - col0 * - col2 * col1 AS col2 FROM tab2
----
119730
51113
5866

query I rowsort
SELECT + + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - cor0.col1 * - 76 AS col0 FROM tab1 AS cor0
----
1976
760
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - - col0 * - ( col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2886
SELECT ALL col1 DIV col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2886
SELECT ALL col1 / col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + cor0.col0 * 8 + + col1 AS col0 FROM tab2 AS cor0
----
649
683
87

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to f9adf26f20dc8fcc43c2de18a5fd4859

query I rowsort
SELECT - col0 * + ( + 36 ) FROM tab1 AS cor0
----
-108
-2304
-2880

query I rowsort
SELECT ALL - cor0.col0 * - col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ( col1 ) * + col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + + col0 * col1 + - cor0.col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL + ( 7 ) * col1 FROM tab2 AS cor0
----
119
217
413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2894
SELECT DISTINCT + CAST( NULL AS SIGNED ) / col0 + col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2894
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / col0 + col0 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * col0 + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + 76 + - cor0.col0 * + col0 FROM tab0 AS cor0
----
-1149
-500
-7845

query I rowsort
SELECT ALL - col1 * cor0.col2 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + - ( + col0 ) col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT ( col1 ) * + col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT ( ( - col1 ) ) * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2901
SELECT - col0 DIV + cor0.col0 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-2901
SELECT - col0 / + cor0.col0 col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col0 * + col0 - + col0 AS col1 FROM tab0
----
1190
552
7832

query I rowsort
SELECT - col0 * col2 + 32 AS col0 FROM tab2
----
-157
-1996
-2970

query I rowsort
SELECT ( col0 ) * - col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT col0 - 44 * col2 AS col1 FROM tab2
----
-1066
-1181
-1593

query I rowsort
SELECT - - 29 AS col2 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT DISTINCT col2 - col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - 30 AS col1 FROM tab0 AS cor0
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) + col2 col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col2 * 13 col1 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT ALL - - 25 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT + col0 * col0 AS col1 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT - cor0.col0 + + cor0.col1 * - col1 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT ALL + cor0.col0 + + col0 + 82 FROM tab1 AS cor0
----
210
242
88

query I rowsort
SELECT DISTINCT + 25 AS col0 FROM tab1 AS cor0
----
25

query I rowsort
SELECT - - ( - col2 ) * + 30 + - ( + col1 ) FROM tab1 cor0
----
-1646
-1720
-2893

query I rowsort
SELECT ALL - ( col1 ) + - col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + cor0.col2 + + 75 FROM tab0, tab2 cor0, tab0 AS cor1
----
101
102
113

query I rowsort
SELECT + 11 * col2 * + col2 FROM tab1
----
101376
32076
35739

query I rowsort
SELECT DISTINCT + ( + col1 ) * - col2 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT 46 * - 99 * - col0 AS col0 FROM tab1
----
13662
291456
364320

query I rowsort
SELECT - + col0 + - col1 * 62 * cor0.col1 FROM tab0 AS cor0
----
-458576
-513511
-583393

query I rowsort
SELECT cor0.col1 * - col0 + col0 + + col2 AS col2 FROM tab2 AS cor0
----
-1226
-183
-4498

query I rowsort
SELECT DISTINCT col0 + + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - 97 * col0 + - col1 FROM tab0 AS cor0
----
-2414
-3492
-8724

query I rowsort
SELECT DISTINCT + + 56 FROM tab2 AS cor0
----
56

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 * col2 AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL + 19 + + col1 * - col1 AS col2 FROM tab1 AS cor0
----
-150
-657
-81

query I rowsort
SELECT - 31 * - col0 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT DISTINCT + 20 AS col1 FROM tab1 AS cor0
----
20

query I rowsort
SELECT ALL - + col2 * + col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 6a08afba67ce3272fad6d766e76c67f0

query I rowsort
SELECT ALL + - col2 * col0 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT - 65 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT DISTINCT col1 * col2 * - col1 + - tab0.col1 AS col2 FROM tab0
----
-244154
-679133
-9506

query I rowsort
SELECT ALL - tab1.col1 * col2 + col1 AS col1 FROM tab1
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2937
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2937
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + + 38 FROM tab0 AS cor0
----
38

query I rowsort
SELECT ALL 42 + ( cor0.col0 ) + + 84 FROM tab0 AS cor0
----
150
161
215

query I rowsort
SELECT ALL ( - col1 ) * - col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - col0 * col0 + - col1 * 31 FROM tab2 AS cor0
----
-1010
-6768
-7913

onlyif mysql # use DIV operator for integer division
query I rowsort label-2942
SELECT col1 DIV - 64 + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-2942
SELECT col1 / - 64 + col1 FROM tab0 AS cor0
----
85
90
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2943
SELECT DISTINCT - 20 DIV - col1 + - col0 * 32 FROM tab0 AS cor0
----
-1120
-2848
-768

skipif mysql # not compatible
query I rowsort label-2943
SELECT DISTINCT - 20 / - col1 + - col0 * 32 FROM tab0 AS cor0
----
-1120
-2848
-768

query I rowsort
SELECT DISTINCT ( + col1 + col1 * + 52 ) FROM tab1
----
1378
530
689

query I rowsort
SELECT 12 * 90 AS col1 FROM tab2
----
1080
1080
1080

query I rowsort
SELECT 18 * - 76 AS col2 FROM tab0
----
-1368
-1368
-1368

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) FROM tab1, tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2948
SELECT + CAST( - 60 AS SIGNED ) FROM tab1 AS cor0
----
-60
-60
-60

skipif mysql # not compatible
query I rowsort label-2948
SELECT + CAST ( - 60 AS INTEGER ) FROM tab1 AS cor0
----
-60
-60
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2949
SELECT - 34 - 21 DIV + col1 col2 FROM tab2 AS cor0
----
-34
-34
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2949
SELECT - 34 - 21 / + col1 col2 FROM tab2 AS cor0
----
-34
-34
-35

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ( col0 ) * cor0.col0 - col1 AS col2 FROM tab2 AS cor0
----
18
6025
6224

query IIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2953
SELECT col2 DIV + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2953
SELECT col2 / + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2954
SELECT 76 + - col2 DIV + col1 FROM tab0 cor0
----
76
76
76

skipif mysql # not compatible
query I rowsort label-2954
SELECT 76 + - col2 / + col1 FROM tab0 cor0
----
76
76
76

query I rowsort
SELECT - col0 + 32 * col0 FROM tab2
----
217
2418
2449

query I rowsort
SELECT tab2.col1 * + 97 FROM tab2
----
1649
3007
5723

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - tab1.col1 col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT ALL + 44 + col1 AS col2 FROM tab0
----
130
135
141

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2959
SELECT + CAST( + 39 * + col2 AS SIGNED ) FROM tab2
----
1014
1053
1482

skipif mysql # not compatible
query I rowsort label-2959
SELECT + CAST ( + 39 * + col2 AS INTEGER ) FROM tab2
----
1014
1053
1482

query I rowsort
SELECT ALL - - col2 - ( - col0 * + col2 + - col0 ) FROM tab1 AS cor0
----
219
3769
7856

onlyif mysql # use DIV operator for integer division
query I rowsort label-2961
SELECT DISTINCT - cor0.col2 DIV ( + 54 ) + col2 DIV + col1 AS col1 FROM tab1 AS cor0
----
1
4
6

skipif mysql # not compatible
query I rowsort label-2961
SELECT DISTINCT - cor0.col2 / ( + 54 ) + col2 / + col1 AS col1 FROM tab1 AS cor0
----
1
4
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 * - col0 col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + 25 + col2 * + tab1.col1 AS col0 FROM tab1
----
1273
1429
595

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to a3c09af95301183ccb084eb1936b14e3

query I rowsort
SELECT + cor0.col1 * 22 FROM tab2 cor0
----
1298
374
682

query I rowsort
SELECT ALL - 59 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 1e6537c922fa953e0fd2f59430803703

onlyif mysql # use DIV operator for integer division
query I rowsort label-2967
SELECT DISTINCT 83 DIV - 35 AS col0 FROM tab2 AS cor0
----
-2

skipif mysql # not compatible
query I rowsort label-2967
SELECT DISTINCT 83 / - 35 AS col0 FROM tab2 AS cor0
----
-2

query I rowsort
SELECT + + col2 * + col1 AS col0 FROM tab2 cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2969
SELECT CAST( col2 AS SIGNED ) AS col0 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2969
SELECT CAST ( col2 AS INTEGER ) AS col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL + + ( col2 ) + + cor0.col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + 56 FROM tab1, tab2 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT DISTINCT col0 * - ( 64 ) * + col1 FROM tab1
----
-40960
-4992
-66560

query I rowsort
SELECT DISTINCT col1 * col2 * + col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
1
33
82

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab2 cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT - + ( - 30 ) * - col2 * + col0 FROM tab2 cor0
----
-5670
-60840
-90060

query I rowsort
SELECT + 42 * - 23 AS col1 FROM tab1 AS cor0
----
-966
-966
-966

query I rowsort
SELECT + 52 + 85 * col2 FROM tab0 cor0
----
137
2857
7022

query I rowsort
SELECT ( - 34 ) FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT - 1 + 87 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-610
-6787
-6874

query I rowsort
SELECT + col2 + col2 * col2 AS col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT cor0.col2 + cor0.col1 * - tab1.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to c6cb677ad3b56fbfb8617331fbbe7138

query I rowsort
SELECT + + 27 + + col2 * ( col2 + + col1 ) AS col1 FROM tab1 AS cor0
----
10491
3846
4347

query I rowsort
SELECT - cor0.col0 * col2 * + 0 + - 9 AS col1 FROM tab2 AS cor0
----
-9
-9
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2985
SELECT 31 DIV col0 + 68 FROM tab0 AS cor0
----
68
68
69

skipif mysql # not compatible
query I rowsort label-2985
SELECT 31 / col0 + 68 FROM tab0 AS cor0
----
68
68
69

query I rowsort
SELECT - col2 * col0 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + + 42 * - col0 + - col1 FROM tab0 AS cor0
----
-1094
-1567
-3829

query I rowsort
SELECT DISTINCT - col0 + col0 * - col2 AS col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT ALL cor0.col0 * - 74 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to bd7585b95a205dba5c52e44e47ec4b9f

query I rowsort
SELECT + + col2 * + col1 * - cor0.col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - col2 * - ( ( + col1 ) ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 60 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT ALL 21 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT DISTINCT + - col0 * col1 + + cor0.col0 * 74 * col1 FROM tab2 AS cor0
----
15841
335946
98039

query I rowsort
SELECT ALL + 22 + col0 * col2 * 44 FROM tab2 AS cor0
----
132110
8338
89254

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col1 col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT 21 * col1 AS col0 FROM tab0 AS cor0
----
1806
1911
2037

query I rowsort
SELECT ALL - 28 * - col2 AS col2 FROM tab2 AS cor0
----
1064
728
756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2999
SELECT DISTINCT - col1 / + col1 + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2999
SELECT DISTINCT - col1 / + col1 + CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + - col1 * - col0 - - col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-3001
SELECT ALL 29 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3001
SELECT ALL 29 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3002
SELECT DISTINCT - + cor0.col0 * + col2 * 67 + + col1 * col2 DIV + col0 AS col2 FROM tab1 AS cor0
----
-10386
-244408
-514545

skipif mysql # not compatible
query I rowsort label-3002
SELECT DISTINCT - + cor0.col0 * + col2 * 67 + + col1 * col2 / + col0 AS col2 FROM tab1 AS cor0
----
-10386
-244408
-514545

query I rowsort
SELECT col0 + col1 * col2 * - 45 AS col2 FROM tab0 AS cor0
----
-127686
-335701
-4330

query I rowsort
SELECT ALL - col2 - - cor0.col1 * col1 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT ALL + col0 * - 34 + + ( col2 * + 99 ) FROM tab0 AS cor0
----
-1091
2451
5092

query I rowsort
SELECT ALL col0 + col2 AS col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + tab2.col1 * 66 FROM tab2, tab2 AS cor0
----
9 values hashing to 21ddb10b9c4f379837d13f9116fdc3b2

query I rowsort
SELECT DISTINCT cor0.col0 - + col1 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT 70 FROM tab2, tab1 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3010
SELECT ALL - CAST( NULL AS SIGNED ) * cor0.col1 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3010
SELECT ALL - CAST ( NULL AS INTEGER ) * cor0.col1 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3011
SELECT ALL + + cor0.col1 + CAST( NULL AS DECIMAL ) * - 24 col1 FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3011
SELECT ALL + + cor0.col1 + CAST ( NULL AS REAL ) * - 24 col1 FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + ( + col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3013
SELECT - - cor0.col1 DIV col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3013
SELECT - - cor0.col1 / col0 FROM tab0 AS cor0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3014
SELECT DISTINCT + + col2 DIV ( cor0.col1 * - col2 + cor0.col0 * - col1 ) col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3014
SELECT DISTINCT + + col2 / ( cor0.col1 * - col2 + cor0.col0 * - col1 ) col2 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3015
SELECT - - CAST( NULL AS SIGNED ) + col2 + + col1 * + col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3015
SELECT - - CAST ( NULL AS INTEGER ) + col2 + + col1 * + col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 91 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3017
SELECT col0 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3017
SELECT col0 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 29 AS col0 FROM tab2, tab0 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to 40739d223aa019bd2dfe2db99d596302

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT ALL + col1 * ( 82 * col1 ) AS col2 FROM tab2
----
23698
285442
78802

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT DISTINCT 12 AS col2 FROM tab1, tab0 AS cor0
----
12

query I rowsort
SELECT - col2 * + col2 AS col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT 78 * - 22 + + col2 * col1 FROM tab0
----
-1619
1122
5746

query I rowsort
SELECT col2 + + cor0.col1 + cor0.col2 * + col1 AS col2 FROM tab1 AS cor0
----
1357
1484
637

query I rowsort
SELECT DISTINCT col1 + 64 AS col1 FROM tab1
----
74
77
90

query I rowsort
SELECT 27 AS col2 FROM tab2
----
27
27
27

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3029
SELECT - - 39 * col1 DIV - CAST( 5 * col1 AS SIGNED ) col2 FROM tab1 AS cor0
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3029
SELECT - - 39 * col1 / - CAST ( 5 * col1 AS INTEGER ) col2 FROM tab1 AS cor0
----
-7
-7
-7

query I rowsort
SELECT ALL + col0 + col0 + col0 AS col2 FROM tab1
----
192
240
9

query I rowsort
SELECT ALL + col1 + 28 * col0 * col1 FROM tab0
----
226863
57878
95157

query I rowsort
SELECT 25 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT ALL 73 FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT DISTINCT cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + 41 * + col0 + 26 AS col2 FROM tab1 AS cor0
----
149
2650
3306

onlyif mysql # use DIV operator for integer division
query I rowsort label-3036
SELECT - ( + tab0.col0 ) DIV ( - col1 * - col2 ) + + 97 FROM tab0
----
97
97
97

skipif mysql # not compatible
query I rowsort label-3036
SELECT - ( + tab0.col0 ) / ( - col1 * - col2 ) + + 97 FROM tab0
----
97
97
97

query I rowsort
SELECT DISTINCT + + col0 * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 62 ) col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3039
SELECT - + col2 DIV col0 AS col2 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3039
SELECT - + col2 / col0 AS col2 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col1 * col1 AS col0 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT ALL + - cor0.col0 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-3043
SELECT DISTINCT - col1 DIV - col2 + col0 * - col0 + - tab1.col0 FROM tab1
----
-12
-4160
-6480

skipif mysql # not compatible
query I rowsort label-3043
SELECT DISTINCT - col1 / - col2 + col0 * - col0 + - tab1.col0 FROM tab1
----
-12
-4160
-6480

query I rowsort
SELECT DISTINCT col0 + col2 * col1 + col0 FROM tab2
----
1690
804
851

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3045
SELECT + col1 * + CAST( col1 AS SIGNED ) col1 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3045
SELECT + col1 * + CAST ( col1 AS INTEGER ) col1 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - - 83 col1 FROM tab0
----
116
165
84

query I rowsort
SELECT ALL col2 - - col2 FROM tab0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3048
SELECT - 40 DIV + tab1.col1 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 7d4fcf1f8ab6fedb787caca2362634b1

skipif mysql # not compatible
query I rowsort label-3048
SELECT - 40 / + tab1.col1 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 7d4fcf1f8ab6fedb787caca2362634b1

query I rowsort
SELECT ALL + col1 * col2 + + col2 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0, tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - col2 + 0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + col2 * cor0.col0 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - - col0 - - col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3054
SELECT ALL + cor0.col1 + CAST( NULL AS DECIMAL ) * - col0 + col1 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3054
SELECT ALL + cor0.col1 + CAST ( NULL AS REAL ) * - col0 + col1 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 56 FROM tab0, tab1 AS cor0
----
56

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to f464d40c605db608927f2c4d66190a23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3057
SELECT col0 + 85 DIV - col2 col2 FROM tab0 AS cor0
----
-50
22
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3057
SELECT col0 + 85 / - col2 col2 FROM tab0 AS cor0
----
-50
22
88

query I rowsort
SELECT DISTINCT + - cor0.col0 * - cor0.col1 AS col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3059
SELECT DISTINCT + col2 * 3 + - 79 * - col1 + + col2 DIV col1 FROM tab0 AS cor0
----
6893
7435
7666

skipif mysql # not compatible
query I rowsort label-3059
SELECT DISTINCT + col2 * 3 + - 79 * - col1 + + col2 / col1 FROM tab0 AS cor0
----
6893
7435
7666

query I rowsort
SELECT + col2 + 83 FROM tab1 AS cor0
----
137
140
179

onlyif mysql # use DIV operator for integer division
query I rowsort label-3061
SELECT + 96 DIV col1 col0 FROM tab2 AS cor0
----
1
3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3061
SELECT + 96 / col1 col0 FROM tab2 AS cor0
----
1
3
5

query I rowsort
SELECT ALL + + col2 * col2 * col2 AS col1 FROM tab1 AS cor0
----
157464
185193
884736

query I rowsort
SELECT 16 + + col0 + col1 FROM tab2 AS cor0
----
112
153
54

query I rowsort
SELECT DISTINCT + + 73 * + cor0.col0 FROM tab0 AS cor0
----
1752
2555
6497

onlyif mysql # use DIV operator for integer division
query I rowsort label-3065
SELECT DISTINCT - CAST( col0 AS SIGNED ) * + col2 + 25 * 97 + cor0.col0 * ( col1 ) DIV + cor0.col0 col0 FROM tab1 cor0
----
-1213
-5242
2289

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3065
SELECT DISTINCT - CAST ( col0 AS INTEGER ) * + col2 + 25 * 97 + cor0.col0 * ( col1 ) / + cor0.col0 col0 FROM tab1 cor0
----
-1213
-5242
2289

query I rowsort
SELECT + col2 * 96 + col0 * col2 AS col0 FROM tab0 cor0
----
131
15170
3960

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 DISTINCT - - col1 + 33 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT DISTINCT - + col0 * - 13 FROM tab1 AS cor0
----
1040
39
832

query I rowsort
SELECT ALL - ( cor0.col2 ) * - col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-3071
SELECT ALL + cor0.col0 DIV - 53 + + col1 * col0 * + 4 FROM tab0 AS cor0
----
13580
32395
8256

skipif mysql # not compatible
query I rowsort label-3071
SELECT ALL + cor0.col0 / - 53 + + col1 * col0 * + 4 FROM tab0 AS cor0
----
13580
32395
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-3072
SELECT DISTINCT cor0.col1 * col2 + col0 * cor0.col1 DIV - col0 + - col0 * + 69 FROM tab0 AS cor0
----
-2415
1096
1230

skipif mysql # not compatible
query I rowsort label-3072
SELECT DISTINCT cor0.col1 * col2 + col0 * cor0.col1 / - col0 + - col0 * + 69 FROM tab0 AS cor0
----
-2415
1096
1230

query I rowsort
SELECT ALL - - col1 * + col0 AS col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3074
SELECT DISTINCT CAST( NULL AS SIGNED ) * 54 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3074
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 54 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + tab1.col2 - + col1 FROM tab1
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3076
SELECT + col1 DIV - ( - col1 ) + col1 + + col0 FROM tab1
----
30
75
94

skipif mysql # not compatible
query I rowsort label-3076
SELECT + col1 / - ( - col1 ) + col1 + + col0 FROM tab1
----
30
75
94

query I rowsort
SELECT DISTINCT - + col1 * col2 * + col0 AS col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL - col0 * 26 + - col1 FROM tab0 AS cor0
----
-1007
-2405
-710

query I rowsort
SELECT + cor0.col1 * col1 + col2 * col1 + + col1 FROM tab2 AS cor0
----
1829
5074
952

query I rowsort
SELECT DISTINCT + + cor0.col1 * col2 + col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT col0 * - cor0.col2 + cor0.col2 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT - - col1 + - col1 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL col0 * - col1 AS col0 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 col2 FROM tab2
----
-37
-37
-37

query I rowsort
SELECT ALL + - col2 + + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3086
SELECT ALL - 80 + col1 DIV 37 FROM tab2 AS cor0
----
-79
-80
-80

skipif mysql # not compatible
query I rowsort label-3086
SELECT ALL - 80 + col1 / 37 FROM tab2 AS cor0
----
-79
-80
-80

query I rowsort
SELECT ALL + col1 * - cor0.col0 + ( 2 * - col0 ) AS col2 FROM tab0 AS cor0
----
-2112
-3465
-8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col1 col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + + 72 * col2 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT cor0.col1 - ( col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * ( col2 * + col1 ) + col2 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT + + col0 + + ( - col2 + - col1 * - col0 ) FROM tab0 AS cor0
----
2055
3429
8106

query I rowsort
SELECT ALL + col1 + col1 * cor0.col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + + cor0.col1 - 10 AS col1 FROM tab0 AS cor0
----
76
81
87

query I rowsort
SELECT ALL - col1 + col1 * col1 AS col0 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT - col0 * col0 + 86 + cor0.col2 AS col0 FROM tab0 AS cor0
----
-1138
-457
-7753

query I rowsort
SELECT + col0 - col1 AS col2 FROM tab0 cor0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3098
SELECT - col0 + - CAST( 51 + + col2 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-108
-172
-227

skipif mysql # not compatible
query I rowsort label-3098
SELECT - col0 + - CAST ( 51 + + col2 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-108
-172
-227

query I rowsort
SELECT ALL col2 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + 42 + 85 FROM tab2 AS cor0
----
127
127
127

query I rowsort
SELECT DISTINCT + + col2 + - ( - col0 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3102
SELECT DISTINCT + + col0 DIV - col2 col1 FROM tab1 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3102
SELECT DISTINCT + + col0 / - col2 col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT - - ( col1 ) * - cor0.col1 + col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT + - ( 9 ) FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT ALL col1 * 52 AS col1 FROM tab2 cor0
----
1612
3068
884

query I rowsort
SELECT ( col2 ) * tab2.col1 FROM tab2
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3107
SELECT + CAST( col1 AS SIGNED ) col2 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3107
SELECT + CAST ( col1 AS INTEGER ) col2 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + - col0 * col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + cor0.col0 + ( cor0.col0 * 7 ) FROM tab2 AS cor0
----
56
624
632

query I rowsort
SELECT ALL - col1 * col0 + + col1 * col2 FROM tab2 cor0
----
-3068
-697
620

query I rowsort
SELECT DISTINCT + col2 * col2 + col1 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + + col1 + col0 * col0 + col0 AS col1 FROM tab2 AS cor0
----
6221
6337
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3113
SELECT ALL ( - col0 ) - col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3113
SELECT ALL ( - col0 ) - col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 66 AS col0 FROM tab1 AS cor0
----
-66
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col0 FROM tab1 AS cor0
----
44
44
44

query I rowsort
SELECT ALL col1 * col1 + col2 - 28 FROM tab2 cor0
----
299
3479
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3117
SELECT DISTINCT - CAST( NULL AS SIGNED ) + 51 * + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3117
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + 51 * + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col0 + + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT 68 + + 12 * + col0 FROM tab0 AS cor0
----
1136
356
488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( col0 ) col1 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3121
SELECT ALL - - 20 * + col1 - col0 DIV col0 FROM tab1 AS cor0
----
199
259
519

skipif mysql # not compatible
query I rowsort label-3121
SELECT ALL - - 20 * + col1 - col0 / col0 FROM tab1 AS cor0
----
199
259
519

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3122
SELECT + ( col0 ) * + CAST( NULL AS SIGNED ) 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-3122
SELECT + ( col0 ) * + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL + cor0.col0 - tab0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ceed5d4760732a197411f1a6cb5c657f

query I rowsort
SELECT cor0.col1 * col1 * col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - 50 + + col0 * col0 FROM tab1 AS cor0
----
-41
4046
6350

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 + col0 col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + + col1 + cor0.col1 * col1 AS col0 FROM tab2 cor0
----
306
3540
992

query I rowsort
SELECT + 33 AS col0 FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT - col1 * - col0 + - col2 * - cor0.col1 * - col2 FROM tab1 AS cor0
----
-118768
-31850
-75738

query I rowsort
SELECT ALL col2 * - 72 AS col2 FROM tab1
----
-3888
-4104
-6912

onlyif mysql # use DIV operator for integer division
query I rowsort label-3132
SELECT col1 DIV col2 + - col0 AS col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3132
SELECT col1 / col2 + - col0 AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 19 AS col1 FROM tab1 cor0
----
19

query I rowsort
SELECT ALL - - col1 * col0 * col1 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT - 50 * tab2.col1 FROM tab2
----
-1550
-2950
-850

query I rowsort
SELECT - 19 FROM tab0
----
-19
-19
-19

query I rowsort
SELECT - 94 FROM tab2
----
-94
-94
-94

query I rowsort
SELECT ALL - 86 FROM tab1
----
-86
-86
-86

query I rowsort
SELECT col0 * col2 + + col1 * col0 AS col0 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT + 84 FROM tab0, tab1 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT + + col1 * col2 - cor0.col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + 97 + - ( col2 ) FROM tab0 AS cor0
----
15
64
96

query I rowsort
SELECT ALL - 1 + - cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5a734e9fefb7a49347d7e3ad5297f4b1

query I rowsort
SELECT ALL col2 * ( 45 ) * col1 AS col2 FROM tab0
----
127710
335790
4365

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1, tab2, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - 18 FROM tab1, tab2 AS cor0
----
-18

query I rowsort
SELECT + ( ( col2 ) ) + col1 * - col2 + + col2 * col2 AS col1 FROM tab1 AS cor0
----
1566
2736
8064

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3148
SELECT DISTINCT + CAST( 31 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
31

skipif mysql # not compatible
query I rowsort label-3148
SELECT DISTINCT + CAST ( 31 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
31

query I rowsort
SELECT ALL + tab0.col2 * 16 * - tab0.col2 + + col2 * - col2 FROM tab0
----
-114308
-17
-18513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3150
SELECT - col1 / - CAST( NULL AS SIGNED ) + + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3150
SELECT - col1 / - CAST ( NULL AS INTEGER ) + + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 + - 94 * + col2 FROM tab2
----
-2418
-2511
-3534

query I rowsort
SELECT DISTINCT + - col2 * 17 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT col0 + - ( ( col1 ) ) FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3154
SELECT ALL + + col0 + CAST( NULL AS DECIMAL ) + - 44 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3154
SELECT ALL + + col0 + CAST ( NULL AS REAL ) + - 44 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 * - 12 AS col2 FROM tab2 AS cor0
----
-312
-324
-456

query I rowsort
SELECT + + col2 * + col0 + + col1 * - col1 FROM tab2 AS cor0
----
-1453
-772
2713

query I rowsort
SELECT DISTINCT - col2 + ( - cor0.col0 + + col2 ) FROM tab0 cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 + + cor0.col2 col0 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT ALL + + col1 * col0 - - col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - col0 + - 9 * + col2 AS col2 FROM tab2 AS cor0
----
-250
-312
-421

query I rowsort
SELECT ALL - ( - 90 ) FROM tab1 cor0
----
90
90
90

query I rowsort
SELECT DISTINCT - - ( col2 ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 + col1 AS col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + col0 + 16 * + col0 AS col0 FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT ALL + col2 * 29 + 93 * + tab2.col2 AS col0 FROM tab2
----
3172
3294
4636

query I rowsort
SELECT DISTINCT + 64 FROM tab2 AS cor0
----
64

query I rowsort
SELECT ALL - cor0.col0 + - ( - col2 * + 22 ) + col0 AS col0 FROM tab0 AS cor0
----
1804
22
726

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT + - col1 + - cor0.col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - + col0 + - col0 + ( + cor0.col2 ) FROM tab2 AS cor0
----
-120
-130
13

query I rowsort
SELECT - col0 * + col2 + - cor0.col2 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3173
SELECT - col1 + col2 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3173
SELECT - col1 + col2 * - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * col0 - + col0 * col0 AS col2 FROM tab2 AS cor0
----
-12168
-12482
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col2 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 32 - - cor0.col0 * - ( - col0 ) AS col1 FROM tab2 AS cor0
----
17
6052
6209

query I rowsort
SELECT + col1 * - col2 - - ( + 86 ) FROM tab1 cor0
----
-1162
-1318
-484

query I rowsort
SELECT ALL - 63 AS col1 FROM tab1
----
-63
-63
-63

query I rowsort
SELECT - cor0.col1 + cor0.col0 * col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL col0 + 56 FROM tab0 cor0
----
145
80
91

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col0 - col1 * col1 AS col1 FROM tab0
----
-7372
-8192
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3184
SELECT ALL 16 + + col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3184
SELECT ALL 16 + + col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * - 33 FROM tab0, tab0 cor0
----
-2838
-3003
-3201

query I rowsort
SELECT + col1 * col1 + col1 * 2 + col2 * + ( 16 ) FROM tab2
----
1455
4015
931

query I rowsort
SELECT + 75 * + col1 AS col2 FROM tab0
----
6450
6825
7275

query I rowsort
SELECT ALL + 67 - + tab2.col0 AS col2 FROM tab2
----
-11
-12
60

query I rowsort
SELECT ALL + col2 - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ( + cor0.col1 + cor0.col0 ) * - 15 FROM tab0, tab0 AS cor0
----
9 values hashing to bb072178c2c50065405384b41b547a3d

onlyif mysql # use DIV operator for integer division
query I rowsort label-3191
SELECT DISTINCT col2 DIV + 48 AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3191
SELECT DISTINCT col2 / + 48 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * - 70 + 31 FROM tab2 cor0
----
-1159
-2139
-4099

query I rowsort
SELECT + - col0 * + 57 + - col0 AS col1 FROM tab2 AS cor0
----
-406
-4524
-4582

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3194
SELECT DISTINCT - col2 - CAST( col0 AS SIGNED ) * - col1 * 15 AS col2 FROM tab1 AS cor0
----
1116
15504
9543

skipif mysql # not compatible
query I rowsort label-3194
SELECT DISTINCT - col2 - CAST ( col0 AS INTEGER ) * - col1 * 15 AS col2 FROM tab1 AS cor0
----
1116
15504
9543

query I rowsort
SELECT + col2 + + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT + 95 * col2 - + ( 79 * + col0 ) FROM tab1
----
2800
359
4893

query I rowsort
SELECT ALL 89 * - col0 - col1 * + col1 * + col1 FROM tab2
----
-11944
-212321
-30414

query I rowsort
SELECT col2 - + col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 - col0 AS col1 FROM tab2
----
0

query I rowsort
SELECT - col2 + - ( col1 ) + + col0 AS col1 FROM tab2
----
-51
-7
24

query I rowsort
SELECT - col0 * - ( - col1 ) * col2 + 82 FROM tab1
----
-36398
-4130
-99758

query I rowsort
SELECT ALL + col1 + ( - col2 ) FROM tab2
----
-21
33
4

query I rowsort
SELECT tab1.col2 + col0 * - 35 * col2 AS col0 FROM tab1
----
-127623
-268704
-5616

query I rowsort
SELECT ALL - tab1.col0 * col0 + + col2 * + col0 + - col2 * - col0 FROM tab1
----
315
3200
8960

query I rowsort
SELECT DISTINCT - col2 * col2 + + 24 AS col1 FROM tab0
----
-1065
-6700
23

query I rowsort
SELECT DISTINCT col1 + + 6 * col2 FROM tab0
----
103
284
583

query I rowsort
SELECT + 52 FROM tab2, tab1 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

onlyif mysql # use DIV operator for integer division
query I rowsort label-3208
SELECT ALL + col2 DIV 80 AS col2 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3208
SELECT ALL + col2 / 80 AS col2 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT DISTINCT 18 * 32 FROM tab0, tab0 cor0
----
576

query I rowsort
SELECT - col0 * 37 + ( col0 ) * + col0 FROM tab0 AS cor0
----
-312
-70
4628

query I rowsort
SELECT - cor0.col0 * 33 + col2 AS col2 FROM tab2 AS cor0
----
-204
-2548
-2569

query I rowsort
SELECT DISTINCT + col1 + col2 AS col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3213
SELECT + CAST( - col2 AS SIGNED ) + col1 AS col0 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-3213
SELECT + CAST ( - col2 AS INTEGER ) + col1 AS col0 FROM tab1
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3214
SELECT DISTINCT + + col0 * - col2 + + CAST( NULL AS SIGNED ) + 19 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3214
SELECT DISTINCT + + col0 * - col2 + + CAST ( NULL AS INTEGER ) + 19 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 * col1 ) + ( - tab1.col2 + - col0 ) col1 FROM tab1
----
-221
-345
-733

query I rowsort
SELECT DISTINCT - cor0.col2 + + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT 18 + + col0 * col0 * col0 AS col0 FROM tab2 AS cor0
----
361
474570
493057

query I rowsort
SELECT ALL + col2 * col0 * 60 FROM tab1 AS cor0
----
218880
460800
9720

query I rowsort
SELECT ALL - cor0.col1 + - col2 * 90 AS col2 FROM tab2 AS cor0
----
-2399
-2461
-3437

query I rowsort
SELECT - 53 * col2 + + 29 FROM tab1 AS cor0
----
-2833
-2992
-5059

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + ( - col1 ) + - col0 AS col0 FROM tab0
----
-110
-132
-180

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab1, tab0 AS cor1
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT + 16 * col2 AS col0 FROM tab2
----
416
432
608

query I rowsort
SELECT + col2 + - col2 * + col1 AS col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + 4 AS col0 FROM tab1 cor0
----
4

query I rowsort
SELECT DISTINCT col0 + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - 11 * + col1 FROM tab1 AS cor0
----
-110
-143
-286

query I rowsort
SELECT DISTINCT + - col2 * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-3230
SELECT + - col0 * col0 DIV col1 AS col1 FROM tab2 AS cor0
----
-1
-103
-367

skipif mysql # not compatible
query I rowsort label-3230
SELECT + - col0 * col0 / col1 AS col1 FROM tab2 AS cor0
----
-1
-103
-367

query I rowsort
SELECT DISTINCT - 36 + - col2 * - cor0.col2 FROM tab1 cor0
----
2880
3213
9180

query I rowsort
SELECT DISTINCT - ( - col0 ) * - col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3233
SELECT col1 DIV col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3233
SELECT col1 / col0 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT DISTINCT + col0 + - col2 + col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 47 + col2 * + col1 AS col0 FROM tab2 cor0
----
1581
693
884

query I rowsort
SELECT cor0.col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3237
SELECT - col0 * cor0.col2 * - CAST( + 23 AS SIGNED ) FROM tab2 AS cor0
----
4347
46644
69046

skipif mysql # not compatible
query I rowsort label-3237
SELECT - col0 * cor0.col2 * - CAST ( + 23 AS INTEGER ) FROM tab2 AS cor0
----
4347
46644
69046

query I rowsort
SELECT - tab2.col1 + ( 78 ) AS col1 FROM tab2
----
19
47
61

query I rowsort
SELECT col0 + 22 FROM tab1
----
102
25
86

query I rowsort
SELECT DISTINCT 43 FROM tab0, tab1 AS cor0
----
43

query I rowsort
SELECT DISTINCT - 42 AS col2 FROM tab2, tab2 AS cor0
----
-42

query I rowsort
SELECT ALL col1 + + ( col0 ) * + tab2.col1 * - 74 FROM tab2
----
-16027
-340489
-99365

onlyif mysql # use DIV operator for integer division
query I rowsort label-3243
SELECT - col0 + - col2 + col2 DIV - col1 FROM tab2 AS cor0
----
-104
-119
-34

skipif mysql # not compatible
query I rowsort label-3243
SELECT - col0 + - col2 + col2 / - col1 FROM tab2 AS cor0
----
-104
-119
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-3244
SELECT ALL + col0 + - ( col0 + cor0.col0 ) DIV 60 AS col2 FROM tab1 AS cor0
----
3
62
78

skipif mysql # not compatible
query I rowsort label-3244
SELECT ALL + col0 + - ( col0 + cor0.col0 ) / 60 AS col2 FROM tab1 AS cor0
----
3
62
78

query I rowsort
SELECT ALL - + col0 * - ( - col1 ) + col1 AS col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT 4 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL - - col1 * - 74 * + col2 + col0 + + col0 FROM tab1 AS cor0
----
-103890
-42052
-92192

onlyif mysql # use DIV operator for integer division
query I rowsort label-3248
SELECT col0 DIV 59 AS col0 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3248
SELECT col0 / 59 AS col0 FROM tab2
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3249
SELECT + + ( + 0 ) + + col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3249
SELECT + + ( + 0 ) + + col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( col0 ) * - col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + - col0 * col2 + - col1 * ( - col0 ) FROM tab2 cor0
----
-1659
2574
28

query I rowsort
SELECT ALL - col2 * 4 FROM tab2 AS cor0
----
-104
-108
-152

query I rowsort
SELECT - col2 * 47 FROM tab0 AS cor0
----
-1551
-3854
-47

query I rowsort
SELECT DISTINCT ( col2 ) * - cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col0 + + col0 * col0 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3256
SELECT - CAST( NULL AS SIGNED ) + col2 / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3256
SELECT - CAST ( NULL AS INTEGER ) + col2 / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3257
SELECT + CAST( - col1 AS SIGNED ) * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-3257
SELECT + CAST ( - col1 AS INTEGER ) * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3258
SELECT DISTINCT - col2 DIV - tab0.col2 col1 FROM tab0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3258
SELECT DISTINCT - col2 / - tab0.col2 col1 FROM tab0
----
1

query I rowsort
SELECT ALL + - ( - col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col2 + col0 * - col2 * 42 AS col1 FROM tab1 AS cor0
----
-153159
-322464
-6750

query I rowsort
SELECT - ( col1 ) * - col0 + cor0.col2 * + col0 + - col2 AS col1 FROM tab2 AS cor0
----
379
4307
6604

query I rowsort
SELECT ( + 1 ) + cor0.col1 AS col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT - col2 * + col1 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col2 + col0 col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT 64 FROM tab0, tab2 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT cor0.col0 - cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 1c0f12b2ac8c8b522b92205460500f94

query I rowsort
SELECT col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3268
SELECT + ( - cor0.col2 ) + - col2 DIV ( ( + col1 ) * ( + col0 ) ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3268
SELECT + ( - cor0.col2 ) + - col2 / ( ( + col1 ) * ( + col0 ) ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3269
SELECT + col2 * col2 DIV col1 FROM tab2 AS cor0
----
11
23
84

skipif mysql # not compatible
query I rowsort label-3269
SELECT + col2 * col2 / col1 FROM tab2 AS cor0
----
11
23
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col2 FROM tab1 cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT 87 FROM tab2 AS cor0
----
87
87
87

query I rowsort
SELECT col0 * col1 + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col2 * - cor0.col1 * - 32 FROM tab2 AS cor0
----
20672
26784
49088

query I rowsort
SELECT DISTINCT - + col0 * col2 + col2 AS col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT + 48 * col1 AS col1 FROM tab0 AS cor0
----
4128
4368
4656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + - col2 col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT - col2 * + col0 * - col0 + col2 FROM tab1 AS cor0
----
233529
540
614496

query I rowsort
SELECT ALL - + col0 + - col2 * col1 FROM tab0 AS cor0
----
-132
-2862
-7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + ( 68 ) col0 FROM tab0 cor0
----
1632
2380
6052

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
54
57
96

query I rowsort
SELECT - col2 + col1 - col1 * col0 AS col0 FROM tab2 AS cor0
----
-1364
-213
-4569

query I rowsort
SELECT - col0 * 57 AS col1 FROM tab0 AS cor0
----
-1368
-1995
-5073

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3285
SELECT - col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3285
SELECT - col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 30 FROM tab0
----
-30
-30
-30

query I rowsort
SELECT - cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT 95 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT + + cor0.col2 * + col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 2 + + ( + col1 ) - - 31 * + cor0.col2 FROM tab1 AS cor0
----
1698
1775
2987

query I rowsort
SELECT + - 30 AS col0 FROM tab0 AS cor0
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT - + 40 * + 16 * col1 AS col1 FROM tab0 AS cor0
----
-55040
-58240
-62080

query I rowsort
SELECT ALL 78 + cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to cac3e02d99ed2821efd3e4f568978d21

query I rowsort
SELECT + col1 - - col0 FROM tab1 cor0
----
29
74
93

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab1, tab1 AS cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT - col2 * col1 * + col2 AS col2 FROM tab2
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-3298
SELECT - col0 DIV + col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-3298
SELECT - col0 / + col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + ( - tab1.col0 + col2 ) * + col0 FROM tab1
----
-448
1280
153

query I rowsort
SELECT ALL - col2 - - col0 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL col0 * - col0 FROM tab0 cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3302
SELECT col0 + - col0 + col0 DIV cor0.col1 AS col0 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3302
SELECT col0 + - col0 + col0 / cor0.col1 AS col0 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL col1 + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3304
SELECT + col1 + + col2 DIV col0 + col2 AS col1 FROM tab0 AS cor0
----
120
173
98

skipif mysql # not compatible
query I rowsort label-3304
SELECT + col1 + + col2 / col0 + col2 AS col1 FROM tab0 AS cor0
----
120
173
98

query I rowsort
SELECT col2 + 25 * 26 FROM tab2 AS cor0
----
676
677
688

query I rowsort
SELECT DISTINCT + col1 * + col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col2 + 17 + col2 AS col1 FROM tab2 AS cor0
----
69
71
93

query I rowsort
SELECT ALL - col0 * tab0.col0 + - col2 * col1 + - col1 * col2 AS col0 FROM tab0
----
-1419
-22845
-6252

query I rowsort
SELECT col2 - - tab0.col1 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL 2 - - col2 FROM tab1
----
56
59
98

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL - col0 * - ( 33 ) AS col1 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT ALL + + col1 + 7 FROM tab2 AS cor0
----
24
38
66

query I rowsort
SELECT col1 + ( - col0 ) * col0 AS col0 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL - + col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - + col2 * 15 + col2 + col2 FROM tab0 AS cor0
----
-1066
-13
-429

query I rowsort
SELECT ALL - + col0 * 6 - + col1 FROM tab1 cor0
----
-394
-44
-493

query I rowsort
SELECT DISTINCT - - col1 * - col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - ( - cor0.col1 ) col0 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3320
SELECT ALL cor0.col0 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3320
SELECT ALL cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3321
SELECT CAST( - 33 + col0 AS SIGNED ) AS col0 FROM tab1
----
-30
31
47

skipif mysql # not compatible
query I rowsort label-3321
SELECT CAST ( - 33 + col0 AS INTEGER ) AS col0 FROM tab1
----
-30
31
47

query I rowsort
SELECT - - ( 47 ) * + col1 AS col1 FROM tab1 cor0
----
1222
470
611

query I rowsort
SELECT - col0 * - col0 + - col0 FROM tab1 AS cor0
----
4032
6
6320

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( - col2 AS REAL ) + cor0.col0 / + CAST ( + col1 * col0 AS INTEGER ) FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3325
SELECT + - CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3325
SELECT + - CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - + col0 * - col0 + - cor0.col2 + cor0.col0 AS col1 FROM tab2 AS cor0
----
29
6136
6282

query I rowsort
SELECT 98 AS col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3328
SELECT - col0 DIV + col0 - col2 * col2 col2 FROM tab1 AS cor0
----
-2917
-3250
-9217

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3328
SELECT - col0 / + col0 - col2 * col2 col2 FROM tab1 AS cor0
----
-2917
-3250
-9217

query I rowsort
SELECT DISTINCT + col1 + col0 * col0 FROM tab1 cor0
----
35
4106
6413

query I rowsort
SELECT + - col1 + + col1 + + col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT col1 * col2 - + 48 AS col1 FROM tab0 AS cor0
----
2790
49
7414

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 * ( - col1 ) + - col1 col0 FROM tab1 AS cor0
----
-102
-46
-699

query I rowsort
SELECT - col1 * - col2 + ( 77 ) AS col2 FROM tab2 AS cor0
----
1611
723
914

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3334
SELECT - 89 * + col2 + CAST( NULL AS SIGNED ) / 77 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3334
SELECT - 89 * + col2 + CAST ( NULL AS INTEGER ) / 77 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * col0 + - 39 FROM tab1 AS cor0
----
-30
4057
6361

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 61 col0 FROM tab1 AS cor0
----
-61
-61
-61

query I rowsort
SELECT ALL - - col0 * col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3338
SELECT ALL col1 * col1 + CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
157
265
730

skipif mysql # not compatible
query I rowsort label-3338
SELECT ALL col1 * col1 + CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + - col0 * - col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - - 37 * + col2 FROM tab0 AS cor0
----
1221
3034
37

query I rowsort
SELECT ALL ( - col2 ) * col1 + col0 + cor0.col0 AS col2 FROM tab0 cor0
----
-27
-2790
-7284

onlyif mysql # use DIV operator for integer division
query I rowsort label-3342
SELECT ALL + - col1 + - col1 DIV - col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-3342
SELECT ALL + - col1 + - col1 / - col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT - + 9 AS col1 FROM tab2 AS cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - col2 - - col0 * - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 + + 64 AS col1 FROM tab1 cor0
----
64

query I rowsort
SELECT DISTINCT - + col0 + - col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL + + col1 * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - - col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col0 + - col0 AS col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT + - col2 + + col0 AS col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + 80 + col2 * + col0 * 81 FROM tab1 AS cor0
----
13202
295568
622160

onlyif mysql # use DIV operator for integer division
query I rowsort label-3352
SELECT + + col2 - col1 DIV ( - col1 + + col2 ) FROM tab2 AS cor0
----
27
34
38

skipif mysql # not compatible
query I rowsort label-3352
SELECT + + col2 - col1 / ( - col1 + + col2 ) FROM tab2 AS cor0
----
27
34
38

query I rowsort
SELECT + col0 - col0 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT + col1 + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + col1 + - 74 AS col2 FROM tab1 AS cor0
----
-48
-61
-64

query I rowsort
SELECT col1 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 + + col2 * col2 col1 FROM tab1
----
2926
3259
9226

onlyif mysql # use DIV operator for integer division
query I rowsort label-3359
SELECT + col0 + - col0 DIV 77 col0 FROM tab1
----
3
64
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3359
SELECT + col0 + - col0 / 77 col0 FROM tab1
----
3
64
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3360
SELECT ALL + col1 DIV 15 AS col0 FROM tab0 AS cor0
----
5
6
6

skipif mysql # not compatible
query I rowsort label-3360
SELECT ALL + col1 / 15 AS col0 FROM tab0 AS cor0
----
5
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col2 ) + col0 col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
86
91
97

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab0 cor2 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT DISTINCT + 2 + ( - col0 + ( - col1 ) ) FROM tab0 AS cor0
----
-108
-130
-178

query I rowsort
SELECT ALL - 97 FROM tab0 AS cor0
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 + 50 col2 FROM tab0
----
-32
17
49

query I rowsort
SELECT DISTINCT - ( + tab1.col1 ) AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + - ( 79 ) FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3370
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3370
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL

query I rowsort
SELECT ALL col2 * 90 AS col2 FROM tab2
----
2340
2430
3420

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3372
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + - 62 * - col0 * + ( 16 ) FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3372
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + - 62 * - col0 * + ( 16 ) FROM tab0 cor0
----
NULL

query I rowsort
SELECT + + col2 * 40 AS col0 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT 85 AS col2 FROM tab1
----
85
85
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3375
SELECT DISTINCT + col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3375
SELECT DISTINCT + col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT cor0.col1 + + ( + col2 ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3377
SELECT + CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3377
SELECT + CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * col0 * - col2 AS col0 FROM tab2
----
-114076
-5103
-52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL col1 * tab0.col1 * - col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT + + cor0.col2 * - col1 + col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT - col2 * tab0.col2 AS col0 FROM tab0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 + col0 + 93 col1 FROM tab2 cor0
----
-117
-1171
-4431

query I rowsort
SELECT - 35 * - col0 + + 93 * cor0.col2 FROM tab1 AS cor0
----
11728
5127
7541

onlyif mysql # use DIV operator for integer division
query I rowsort label-3385
SELECT ALL - ( col1 ) DIV col1 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3385
SELECT ALL - ( col1 ) / col1 AS col2 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 68 col1 FROM tab1, tab0 cor0
----
68

query I rowsort
SELECT + cor0.col0 + + cor0.col2 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 0a9ba7ddbb78279db2d78308414e03c9

query I rowsort
SELECT - 2 - cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
-102
-171
-678

query I rowsort
SELECT ALL col0 * - col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - + col2 * col0 * - 53 - 16 FROM tab2 AS cor0
----
10001
107468
159090

onlyif mysql # use DIV operator for integer division
query I rowsort label-3391
SELECT + cor0.col0 DIV + col0 + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3391
SELECT + cor0.col0 / + col0 + col0 FROM tab1 AS cor0
----
4
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3392
SELECT - col2 + col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-3392
SELECT - col2 + col2 / + col0 AS col2 FROM tab2 AS cor0
----
-24
-26
-38

query I rowsort
SELECT DISTINCT 56 * col1 AS col2 FROM tab1 AS cor0
----
1456
560
728

query I rowsort
SELECT DISTINCT col2 * col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + - cor0.col0 * - col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * + col2 * ( - ( - tab1.col2 ) ) col1 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT + ( col1 + tab0.col1 ) AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT tab0.col1 * - col2 * 42 FROM tab0
----
-119196
-313404
-4074

query I rowsort
SELECT tab2.col0 * - col2 AS col0 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3400
SELECT col1 - + col2 DIV + 57 AS col0 FROM tab1
----
12
26
9

skipif mysql # not compatible
query I rowsort label-3400
SELECT col1 - + col2 / + 57 AS col0 FROM tab1
----
12
26
9

query I rowsort
SELECT DISTINCT + 23 FROM tab1
----
23

query I rowsort
SELECT ALL col2 + col0 - 43 AS col1 FROM tab0
----
-7
128
14

query I rowsort
SELECT col0 - col0 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 36 + + col0 * + col2 + + col2 FROM tab1
----
252
3741
7812

query I rowsort
SELECT col0 + + col1 + col1 * - col0 AS col0 FROM tab1 AS cor0
----
-49
-566
-947

query I rowsort
SELECT ALL - + col1 * 19 * col0 + cor0.col0 FROM tab0 AS cor0
----
-153792
-39192
-64470

query I rowsort
SELECT - col1 * 16 + col1 + - col2 * - col1 FROM tab1 AS cor0
----
1014
1053
420

onlyif mysql # use DIV operator for integer division
query I rowsort label-3408
SELECT DISTINCT + + col0 DIV CAST( col0 AS SIGNED ) + col0 FROM tab1 cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3408
SELECT DISTINCT + + col0 / CAST ( col0 AS INTEGER ) + col0 FROM tab1 cor0
----
4
65
81

query I rowsort
SELECT - - col0 - 73 FROM tab2 cor0
----
-66
5
6

query I rowsort
SELECT ALL + + cor0.col0 * - col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 * ( 12 ) FROM tab0 AS cor0
----
1068
288
420

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3412
SELECT DISTINCT cor0.col1 * - CAST( NULL AS SIGNED ) + - col0 * cor0.col2 + + ( - 73 * - col0 ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3412
SELECT DISTINCT cor0.col1 * - CAST ( NULL AS INTEGER ) + - col0 * cor0.col2 + + ( - 73 * - col0 ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col2 * 16 FROM tab2 AS cor0
----
416
432
608

query I rowsort
SELECT + col2 * 15 * col2 - col2 FROM tab2 AS cor0
----
10114
10908
21622

query I rowsort
SELECT + col2 * ( cor0.col0 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT col2 + col1 + + 75 * - cor0.col2 FROM tab1 AS cor0
----
-3970
-4208
-7091

onlyif mysql # use DIV operator for integer division
query I rowsort label-3417
SELECT + + col2 + - 68 DIV - ( - col1 ) + - 62 * + cor0.col0 FROM tab0 AS cor0
----
-1455
-2169
-5436

skipif mysql # not compatible
query I rowsort label-3417
SELECT + + col2 + - 68 / - ( - col1 ) + - 62 * + cor0.col0 FROM tab0 AS cor0
----
-1455
-2169
-5436

query I rowsort
SELECT + + col1 * col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + ( + 2 + col1 ) FROM tab0
----
88
93
99

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) FROM tab1, tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * - col0 col2 FROM tab0 AS cor0
----
-1260
-600
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3423
SELECT - - CAST( col1 AS SIGNED ) * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-3423
SELECT - - CAST ( col1 AS INTEGER ) * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 + col1 col0 FROM tab0 AS cor0
----
169
174
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3425
SELECT ALL - col2 + - col2 DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-3425
SELECT ALL - col2 + - col2 / col0 AS col1 FROM tab0 AS cor0
----
-1
-34
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - + cor0.col0 * - 86 + - col0 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT DISTINCT + ( ( + col0 ) ) + 29 AS col0 FROM tab2 cor0
----
107
108
36

query I rowsort
SELECT - col2 + cor0.col2 * - col0 * + cor0.col2 - cor0.col2 AS col2 FROM tab2 AS cor0
----
-114152
-5157
-52780

query I rowsort
SELECT DISTINCT - ( + col2 ) + col2 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col2 * - col0 + + col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3432
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3432
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 * col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - 35 * - col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT DISTINCT - 81 * - ( col1 ) + + ( col2 ) * - col1 FROM tab0 AS cor0
----
-91
4128
7760

query I rowsort
SELECT ALL + 98 AS col0 FROM tab1 AS cor0
----
98
98
98

query I rowsort
SELECT + col0 - - ( ( col2 ) ) FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3438
SELECT DISTINCT - tab2.col1 DIV - col1 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-3438
SELECT DISTINCT - tab2.col1 / - col1 FROM tab2
----
1

query I rowsort
SELECT - + ( - col0 ) * + col1 * - 33 AS col2 FROM tab2 AS cor0
----
-151866
-44319
-7161

query I rowsort
SELECT ALL + col2 * col1 - col2 AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL - col0 + cor0.col0 * col2 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3442
SELECT CAST( + 44 AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

skipif mysql # not compatible
query I rowsort label-3442
SELECT CAST ( + 44 AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT DISTINCT - col2 * - ( col0 + col0 ) * - 38 AS col2 FROM tab0
----
-2660
-554648
-60192

query I rowsort
SELECT 88 * col2 FROM tab2 AS cor0
----
2288
2376
3344

query I rowsort
SELECT tab2.col0 + tab2.col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + 97 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-1165
-2468
-913

query I rowsort
SELECT + 24 - col2 * col0 FROM tab1 AS cor0
----
-138
-3624
-7656

query I rowsort
SELECT DISTINCT 74 FROM tab0 AS cor0
----
74

query I rowsort
SELECT DISTINCT - + ( col2 ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - - cor0.col2 * col0 * col0 + + ( - col1 ) * - col1 AS col0 FROM tab2 AS cor0
----
161665
2284
237447

query I rowsort
SELECT ALL + + col0 * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT tab1.col0 * - col0 * - col1 + + col2 AS col0 FROM tab1
----
288
41017
83296

query I rowsort
SELECT col0 + + col0 * - col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT + 72 * cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 923ce748554f5aa7535b233559d7d16a

query I rowsort
SELECT + cor0.col2 * - cor0.col1 * 53 AS col1 FROM tab2 AS cor0
----
-34238
-44361
-81302

query I rowsort
SELECT DISTINCT - col2 * 53 + + col2 FROM tab0 cor0
----
-1716
-4264
-52

query I rowsort
SELECT ALL + col1 + - 20 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-109
-1501
-1563

query I rowsort
SELECT ALL ( col1 * col2 ) + - col1 * + col1 * + 6 FROM tab1
----
-2652
-30
234

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3459
SELECT ALL ( col2 * CAST( NULL AS SIGNED ) ) + + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3459
SELECT ALL ( col2 * CAST ( NULL AS INTEGER ) ) + + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * tab1.col0 AS col0 FROM tab1
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3461
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3461
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3462
SELECT DISTINCT - tab1.col2 DIV + col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-3462
SELECT DISTINCT - tab1.col2 / + col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT DISTINCT 25 - - 7 * + cor0.col1 FROM tab0, tab2 cor0
----
144
242
438

onlyif mysql # use DIV operator for integer division
query I rowsort label-3464
SELECT + col0 DIV 34 AS col1 FROM tab2 cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-3464
SELECT + col0 / 34 AS col1 FROM tab2 cor0
----
0
2
2

query I rowsort
SELECT - - col0 * ( col2 ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - cor0.col1 * - 15 FROM tab1 AS cor0
----
150
195
390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 - + 19 col0 FROM tab0, tab2 AS cor0
----
26

query I rowsort
SELECT DISTINCT - col1 * - 81 + col0 FROM tab2 cor0
----
1456
2518
4857

query I rowsort
SELECT DISTINCT + + col2 + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3470
SELECT - col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3470
SELECT - col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 * col2 + - cor0.col2 FROM tab0 AS cor0
----
-3396
-664200
-68145

query I rowsort
SELECT DISTINCT + - col0 * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3473
SELECT + CAST( + 3 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

skipif mysql # not compatible
query I rowsort label-3473
SELECT + CAST ( + 3 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT col1 * + 11 FROM tab0
----
1001
1067
946

query I rowsort
SELECT ALL - - 30 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT ALL - + col2 * 90 FROM tab0 AS cor0
----
-2970
-7380
-90

query I rowsort
SELECT DISTINCT - - cor0.col2 * col0 + col1 + col0 FROM tab0 AS cor0
----
167
7478
902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( - col2 ) + cor0.col0 col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + + ( 95 ) AS col0 FROM tab1 AS cor0
----
95
95
95

query I rowsort
SELECT DISTINCT + + col1 + 8 AS col1 FROM tab1 AS cor0
----
18
21
34

query I rowsort
SELECT ALL - + 88 * + col0 FROM tab1 cor0
----
-264
-5632
-7040

query I rowsort
SELECT 19 + 37 * col2 AS col2 FROM tab2 cor0
----
1018
1425
981

query I rowsort
SELECT + 11 AS col2 FROM tab1 AS cor0
----
11
11
11

query I rowsort
SELECT DISTINCT col0 * + 40 AS col2 FROM tab0 cor0
----
1400
3560
960

query I rowsort
SELECT DISTINCT 91 FROM tab1 AS cor0
----
91

query I rowsort
SELECT + + cor0.col1 + 95 FROM tab2 AS cor0
----
112
126
154

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3487
SELECT CAST( NULL AS SIGNED ) * 22 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3487
SELECT CAST ( NULL AS INTEGER ) * 22 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * + tab2.col1 + - col2 FROM tab2
----
251
3455
934

query I rowsort
SELECT cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + - 73 AS col0 FROM tab1 AS cor0
----
-73
-73
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3491
SELECT ALL - - cor0.col2 + + col1 DIV 6 AS col0 FROM tab0 AS cor0
----
17
47
97

skipif mysql # not compatible
query I rowsort label-3491
SELECT ALL - - cor0.col2 + + col1 / 6 AS col0 FROM tab0 AS cor0
----
17
47
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + col1 + - col0 FROM tab2 cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col2 + col0 * col1 * col0 col1 FROM tab0 AS cor0
----
118728
46698
713349

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col2 FROM tab2
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3496
SELECT ALL 10 DIV col0 AS col1 FROM tab1 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3496
SELECT ALL 10 / col0 AS col1 FROM tab1 AS cor0
----
0
0
3

query I rowsort
SELECT - + 48 * - col0 * - cor0.col2 AS col2 FROM tab2 cor0
----
-144096
-9072
-97344

query I rowsort
SELECT ALL - 5 AS col0 FROM tab0 AS cor0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab0 cor0
----
93

query I rowsort
SELECT ALL + - col1 + + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - + ( col2 ) * 77 + - 80 FROM tab1 AS cor0
----
-4238
-4469
-7472

query I rowsort
SELECT DISTINCT - col1 - col2 FROM tab0 cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3503
SELECT col0 * CAST( + col0 AS SIGNED ) * col2 + col1 + col2 FROM tab1 AS cor0
----
233539
566
614509

skipif mysql # not compatible
query I rowsort label-3503
SELECT col0 * CAST ( + col0 AS INTEGER ) * col2 + col1 + col2 FROM tab1 AS cor0
----
233539
566
614509

query I rowsort
SELECT - + col1 + ( ( col1 ) ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 + 58 * + cor0.col0 FROM tab0 cor0
----
1416
2065
5251

query I rowsort
SELECT ALL cor0.col1 * + ( 39 ) FROM tab0 AS cor0
----
3354
3549
3783

query I rowsort
SELECT ALL - - col2 - - 77 AS col0 FROM tab1 AS cor0
----
131
134
173

query I rowsort
SELECT - col0 * - ( - col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + col0 * - 26 col2 FROM tab0 AS cor0
----
-2223
-538
-813

query I rowsort
SELECT ALL + col2 * + 57 + cor0.col2 FROM tab1 AS cor0
----
3132
3306
5568

query I rowsort
SELECT DISTINCT col2 * - 75 AS col1 FROM tab0 cor0
----
-2475
-6150
-75

query I rowsort
SELECT DISTINCT - col0 - - 7 AS col2 FROM tab0 AS cor0
----
-17
-28
-82

query I rowsort
SELECT 40 + cor0.col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 5a60b1ccce09341b33dfae180bf88d3c

query I rowsort
SELECT tab2.col0 + + col1 AS col2 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3515
SELECT col1 * - col2 * + CAST( col2 AS SIGNED ) + col0 * ( col0 ) AS col1 FROM tab1
----
-113408
-28394
-75807

skipif mysql # not compatible
query I rowsort label-3515
SELECT col1 * - col2 * + CAST ( col2 AS INTEGER ) + col0 * ( col0 ) AS col1 FROM tab1
----
-113408
-28394
-75807

query I rowsort
SELECT 44 + + col0 FROM tab0
----
133
68
79

query I rowsort
SELECT DISTINCT 89 + col2 FROM tab2
----
115
116
127

query I rowsort
SELECT ALL - col1 * col0 + - col1 FROM tab0
----
-2150
-3492
-8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3519
SELECT DISTINCT CAST( cor1.col2 AS SIGNED ) FROM tab0, tab2 AS cor0, tab0 cor1
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3519
SELECT DISTINCT CAST ( cor1.col2 AS INTEGER ) FROM tab0, tab2 AS cor0, tab0 cor1
----
1
33
82

query I rowsort
SELECT ALL 15 + + cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 65511109e8abfe3dd58793f455108df9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3521
SELECT col2 DIV col1 + col0 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-3521
SELECT col2 / col1 + col0 FROM tab2 AS cor0
----
7
78
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3522
SELECT CAST( NULL AS SIGNED ) 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-3522
SELECT CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 17 FROM tab1 AS cor0
----
-17
-17
-17

query I rowsort
SELECT + col0 * + ( - col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - cor0.col1 + + 54 col1 FROM tab2 AS cor0
----
21
50
75

query I rowsort
SELECT + + col1 * + col2 + 61 * col2 FROM tab1 cor0
----
4047
4698
7104

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) + - 44 * 68 + col2 col2 FROM tab2 AS cor0
----
-2916
-2938
-2940

query I rowsort
SELECT - col2 * + ( - ( - col2 ) + col2 ) AS col0 FROM tab2 AS cor0
----
-1352
-1458
-2888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * col0 col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - cor1.col1 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT + col1 * 56 AS col0 FROM tab1
----
1456
560
728

query I rowsort
SELECT - ( col0 ) - col0 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT + 32 FROM tab2, tab1 AS cor0
----
32

query I rowsort
SELECT DISTINCT col1 * - 53 AS col1 FROM tab1 AS cor0
----
-1378
-530
-689

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 * + cor1.col1 col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 00f153c5d80e692faff5018d8701b92d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3536
SELECT - CAST( NULL AS SIGNED ) * 58 * + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3536
SELECT - CAST ( NULL AS INTEGER ) * 58 * + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3537
SELECT ALL + col0 * CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3537
SELECT ALL + col0 * CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - 33 * col0 AS col0 FROM tab0 AS cor0
----
-1155
-2937
-792

query I rowsort
SELECT DISTINCT + cor0.col1 + - col2 * col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - 82 FROM tab0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 26 AS col1 FROM tab0
----
26

query I rowsort
SELECT ALL - ( - col1 ) AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT + col2 * 24 AS col0 FROM tab0
----
1968
24
792

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab2 cor1, tab2 AS cor2
----
972 values hashing to 617c9545df26d6d983e3967864e8e9e4

query I rowsort
SELECT col0 + - 4 FROM tab0
----
20
31
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3547
SELECT DISTINCT CAST( - 55 AS SIGNED ) FROM tab2
----
-55

skipif mysql # not compatible
query I rowsort label-3547
SELECT DISTINCT CAST ( - 55 AS INTEGER ) FROM tab2
----
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-3548
SELECT + col0 - 5 DIV col0 AS col1 FROM tab1
----
2
64
80

skipif mysql # not compatible
query I rowsort label-3548
SELECT + col0 - 5 / col0 AS col1 FROM tab1
----
2
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 col1 FROM tab1
----
69
69
69

query I rowsort
SELECT + 58 - + col2 FROM tab2
----
20
31
32

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab2
----
25

query I rowsort
SELECT DISTINCT 37 AS col1 FROM tab2
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-3553
SELECT DISTINCT - col2 DIV col0 FROM tab2
----
-3
0

skipif mysql # not compatible
query I rowsort label-3553
SELECT DISTINCT - col2 / col0 FROM tab2
----
-3
0

query I rowsort
SELECT + 3 * + col0 * + 9 FROM tab0
----
2403
648
945

query I rowsort
SELECT DISTINCT - cor0.col2 * - 4 FROM tab2 AS cor0
----
104
108
152

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3556
SELECT DISTINCT - cor0.col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3556
SELECT DISTINCT - cor0.col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * - 56 col0 FROM tab0 AS cor0
----
-1848
-4592
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-3558
SELECT ALL + col2 + col2 DIV col1 col2 FROM tab1 AS cor0
----
103
56
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3558
SELECT ALL + col2 + col2 / col1 col2 FROM tab1 AS cor0
----
103
56
62

query I rowsort
SELECT - col2 + + ( - col0 ) * cor0.col0 * col2 FROM tab1 AS cor0
----
-233529
-540
-614496

query I rowsort
SELECT ALL 91 + - col0 + col1 AS col2 FROM tab0
----
153
153
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 + - col2 col2 FROM tab2
----
-57
-58
-69

query I rowsort
SELECT ALL col2 * tab2.col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT cor0.col2 FROM tab1, tab0 AS cor0, tab2, tab1 cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT - col2 * - col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-3565
SELECT + col0 + ( + col0 ) DIV - col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3565
SELECT + col0 + ( + col0 ) / - col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + - 26 AS col2 FROM tab1 AS cor0
----
-26

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col0 + + col0 * 24 AS col1 FROM tab1 AS cor0
----
1600
2000
75

query I rowsort
SELECT ALL - 34 * - col1 AS col1 FROM tab2 AS cor0
----
1054
2006
578

onlyif mysql # use DIV operator for integer division
query I rowsort label-3571
SELECT DISTINCT + 31 DIV - col2 + - col2 FROM tab0 AS cor0
----
-32
-33
-82

skipif mysql # not compatible
query I rowsort label-3571
SELECT DISTINCT + 31 / - col2 + - col2 FROM tab0 AS cor0
----
-32
-33
-82

query I rowsort
SELECT ALL - 17 AS col1 FROM tab2 cor0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT col2 * + cor0.col1 * 60 AS col2 FROM tab2 AS cor0
----
38760
50220
92040

query I rowsort
SELECT ALL + cor0.col1 + 15 * + cor0.col1 FROM tab2 cor0
----
272
496
944

query I rowsort
SELECT ALL + cor0.col1 + + col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-3576
SELECT DISTINCT cor0.col1 DIV col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3576
SELECT DISTINCT cor0.col1 / col2 FROM tab0 AS cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3577
SELECT + col0 DIV 16 AS col2 FROM tab2 AS cor0
----
0
4
4

skipif mysql # not compatible
query I rowsort label-3577
SELECT + col0 / 16 AS col2 FROM tab2 AS cor0
----
0
4
4

query I rowsort
SELECT DISTINCT - col1 + 44 FROM tab0 AS cor0
----
-42
-47
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3579
SELECT ALL + col2 * CAST( NULL AS SIGNED ) * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3579
SELECT ALL + col2 * CAST ( NULL AS INTEGER ) * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 + - 38 FROM tab2 AS cor0
----
-55
-69
-97

query I rowsort
SELECT DISTINCT + col2 + - 71 AS col2 FROM tab0 AS cor0
----
-38
-70
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3582
SELECT 85 * col0 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3582
SELECT 85 * col0 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 93 col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

query I rowsort
SELECT - cor0.col1 * + col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3586
SELECT DISTINCT - col1 DIV + tab0.col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-3586
SELECT DISTINCT - col1 / + tab0.col1 FROM tab0
----
-1

query I rowsort
SELECT - tab0.col2 * + tab0.col0 FROM tab1, tab2, tab0 AS cor0, tab0
----
81 values hashing to 6049db922cf615ac02010fbaffaf74d8

query I rowsort
SELECT - 83 AS col0 FROM tab2 AS cor0
----
-83
-83
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3589
SELECT CAST( NULL AS DECIMAL ) * 78 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3589
SELECT CAST ( NULL AS REAL ) * 78 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 52 ) col1 FROM tab2 AS cor0
----
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3591
SELECT ALL - col0 DIV cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3591
SELECT ALL - col0 / cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - 28 + cor0.col1 FROM tab0 AS cor0
----
58
63
69

query I rowsort
SELECT DISTINCT + ( 56 ) + col0 FROM tab1 AS cor0
----
120
136
59

query I rowsort
SELECT DISTINCT + - cor0.col0 + - col1 + col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + col0 * + 55 AS col2 FROM tab0
----
1320
1925
4895

query I rowsort
SELECT + col1 + + 63 * tab2.col2 + col0 * col2 FROM tab2
----
1921
3725
5413

query I rowsort
SELECT 13 * - col1 AS col1 FROM tab2 AS cor0
----
-221
-403
-767

query I rowsort
SELECT DISTINCT 98 FROM tab1 AS cor0
----
98

query I rowsort
SELECT DISTINCT - + col2 + col0 + + cor0.col1 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-1264
-1455
-563

query I rowsort
SELECT - col1 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3601
SELECT ALL + CAST( NULL AS DECIMAL ) * + col0 + + col2 * + CAST( + col1 AS SIGNED ) * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3601
SELECT ALL + CAST ( NULL AS REAL ) * + col0 + + col2 * + CAST ( + col1 AS INTEGER ) * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 52 * 35 + - cor0.col1 FROM tab1 cor0
----
1794
1807
1810

query I rowsort
SELECT ALL + + ( - col2 ) * + cor0.col0 + ( 39 + + col2 ) AS col2 FROM tab0 AS cor0
----
-7177
-720
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col0 ) * tab0.col1 + ( col1 ) col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT cor0.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - col0 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ( 71 ) + col1 AS col1 FROM tab1
----
81
84
97

query I rowsort
SELECT + cor0.col2 + + 67 AS col0 FROM tab0 AS cor0
----
100
149
68

query I rowsort
SELECT ALL - 1 + cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to c723f9b6c4a3597137513e4911245a77

query I rowsort
SELECT 80 * + col2 AS col0 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT col2 + cor0.col0 * col1 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-3612
SELECT DISTINCT 84 + - col1 * col0 DIV - col2 FROM tab0 AS cor0
----
146
182
3479

skipif mysql # not compatible
query I rowsort label-3612
SELECT DISTINCT 84 + - col1 * col0 / - col2 FROM tab0 AS cor0
----
146
182
3479

query I rowsort
SELECT - 45 + + col0 AS col1 FROM tab1 cor0
----
-42
19
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3614
SELECT DISTINCT ( col2 ) * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3614
SELECT DISTINCT ( col2 ) * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col2 + - col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3616
SELECT ALL col1 * - col1 + col2 * - CAST( + col2 AS SIGNED ) AS col2 FROM tab1
----
-3349
-3592
-9385

skipif mysql # not compatible
query I rowsort label-3616
SELECT ALL col1 * - col1 + col2 * - CAST ( + col2 AS INTEGER ) AS col2 FROM tab1
----
-3349
-3592
-9385

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + tab0.col2 + col0 col0 FROM tab0
----
260
71
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 + - col2 col1 FROM tab0
----
7363
8199
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-3619
SELECT 36 DIV + tab0.col2 + + col2 + - col0 AS col0 FROM tab0
----
-7
10
2

skipif mysql # not compatible
query I rowsort label-3619
SELECT 36 / + tab0.col2 + + col2 + - col0 AS col0 FROM tab0
----
-7
10
2

query I rowsort
SELECT DISTINCT 68 * - ( col1 ) + col0 FROM tab1
----
-1765
-616
-804

query I rowsort
SELECT ALL col1 + 51 * col2 * 39 FROM tab1
----
107432
113383
190957

query I rowsort
SELECT 43 + cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 9a431bbf3f7f7e55f66d0f165543700f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3623
SELECT ALL 99 + + col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
100
100
100

skipif mysql # not compatible
query I rowsort label-3623
SELECT ALL 99 + + col2 / cor0.col2 AS col0 FROM tab1 AS cor0
----
100
100
100

query I rowsort
SELECT - 27 AS col0 FROM tab0 AS cor0
----
-27
-27
-27

onlyif mysql # use DIV operator for integer division
query I rowsort label-3625
SELECT DISTINCT + cor0.col2 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-3625
SELECT DISTINCT + cor0.col2 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
-3
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3626
SELECT ALL + 1 + + col1 * CAST( - 84 + col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-181
-4385
-8050

skipif mysql # not compatible
query I rowsort label-3626
SELECT ALL + 1 + + col1 * CAST ( - 84 + col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-181
-4385
-8050

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3627
SELECT 55 * col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3627
SELECT 55 * col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + + col1 * - ( col0 ) AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + 15 * - col0 AS col2 FROM tab1 AS cor0
----
-1200
-45
-960

query I rowsort
SELECT DISTINCT + col0 + + col1 * - ( col1 + + col2 ) AS col2 FROM tab2 AS cor0
----
-1791
-4937
-856

query I rowsort
SELECT DISTINCT + + ( col2 ) * - ( - col1 ) FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - tab2.col0 + - col1 * col2 col0 FROM tab2
----
-1026
-3562
-3648

query I rowsort
SELECT tab2.col1 + 46 FROM tab2
----
105
63
77

query I rowsort
SELECT ALL + col1 - 11 * - ( - col1 ) FROM tab2
----
-170
-310
-590

query I rowsort
SELECT col0 * + col1 - - col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - - col1 + ( - col1 ) * col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 * - 95 AS col0 FROM tab0 AS cor0
----
-3049
-7699
2

query I rowsort
SELECT - col0 + + 41 FROM tab0
----
-48
17
6

query I rowsort
SELECT ALL + 8 * + col0 FROM tab2 AS cor0
----
56
624
632

query I rowsort
SELECT DISTINCT + - 63 - + ( - cor0.col1 ) FROM tab1 AS cor0
----
-37
-50
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3641
SELECT col2 + + ( col1 ) * + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3641
SELECT col2 + + ( col1 ) * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * - col2 AS col1 FROM tab2
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3643
SELECT + CAST( 66 AS SIGNED ) * - col2 * + 21 FROM tab1
----
-133056
-74844
-79002

skipif mysql # not compatible
query I rowsort label-3643
SELECT + CAST ( 66 AS INTEGER ) * - col2 * + 21 FROM tab1
----
-133056
-74844
-79002

query I rowsort
SELECT - ( col2 ) + col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + col2 * - col1 + cor0.col1 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - - col0 col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + col0 * - col2 + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - cor0.col0 + 30 * + 53 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 2a6df7f0e64af9933dbaf78df37555f0

query I rowsort
SELECT ALL - ( ( + col1 ) ) + + 43 AS col2 FROM tab2 AS cor0
----
-16
12
26

query I rowsort
SELECT 57 - + cor0.col0 AS col2 FROM tab1 cor0
----
-23
-7
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col0 FROM tab2, tab1 cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT + 27 AS col2 FROM tab2, tab2 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 092918b9163061e291041d594b1a402a

query I rowsort
SELECT 45 FROM tab0, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # use DIV operator for integer division
query I rowsort label-3654
SELECT + + col0 DIV 74 col1 FROM tab2 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3654
SELECT + + col0 / 74 col1 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT + 86 + tab0.col1 - - col2 * col2 FROM tab0
----
1261
184
6901

query I rowsort
SELECT ALL + col1 * 50 * - col0 + col1 - - ( + col1 ) FROM tab1
----
-31980
-3848
-51974

onlyif mysql # use DIV operator for integer division
query I rowsort label-3657
SELECT 23 * + 28 + + cor0.col1 * col0 DIV 73 FROM tab2 AS cor0
----
646
662
707

skipif mysql # not compatible
query I rowsort label-3657
SELECT 23 * + 28 + + cor0.col1 * col0 / 73 FROM tab2 AS cor0
----
646
662
707

query I rowsort
SELECT - + cor0.col0 * - 1 * col2 AS col0 FROM tab2 cor0
----
189
2028
3002

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 6156c969b7e054b8a333fdb86aee82f2

query I rowsort
SELECT DISTINCT + 5 AS col2 FROM tab2, tab0 cor0, tab1 AS cor1
----
5

query I rowsort
SELECT ALL - 23 AS col2 FROM tab1
----
-23
-23
-23

query I rowsort
SELECT DISTINCT - 35 FROM tab1
----
-35

query I rowsort
SELECT - ( - col2 ) * 95 + col0 AS col2 FROM tab2 cor0
----
2548
2572
3689

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 72 * cor0.col2 col0 FROM tab1 AS cor0
----
3888
4104
6912

query I rowsort
SELECT - - cor0.col0 + ( + 96 ) FROM tab2 AS cor0
----
103
174
175

query I rowsort
SELECT - - col1 * - ( + col1 ) * col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - col1 + - 49 AS col2 FROM tab1 cor0
----
-59
-62
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * + 22 col2 FROM tab0 AS cor0
----
1958
528
770

query I rowsort
SELECT - 93 * - col0 FROM tab2
----
651
7254
7347

onlyif mysql # use DIV operator for integer division
query I rowsort label-3671
SELECT DISTINCT tab1.col1 DIV col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-3671
SELECT DISTINCT tab1.col1 / col1 FROM tab1
----
1

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab1 cor1, tab0, tab0 cor2
----
3645 values hashing to d24b34b0673c90715a7101e7e630fa94

query I rowsort
SELECT + 90 FROM tab0, tab0 cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT DISTINCT - + col1 * cor0.col1 * col2 + col2 FROM tab1 AS cor0
----
-16128
-36450
-5643

query I rowsort
SELECT DISTINCT + col2 * col1 - col1 * col0 AS col1 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT - + 3 FROM tab1 cor0
----
-3
-3
-3

query I rowsort
SELECT ALL + 66 + - col2 AS col2 FROM tab1 AS cor0
----
-30
12
9

query I rowsort
SELECT DISTINCT - col2 * - 85 * - col1 + col0 FROM tab1 AS cor0
----
-106000
-119337
-48386

query I rowsort
SELECT DISTINCT - 68 + 71 FROM tab2 cor0
----
3

query I rowsort
SELECT ALL - cor0.col1 - - 5 * - col0 AS col1 FROM tab0 AS cor0
----
-206
-272
-536

query I rowsort
SELECT 14 AS col0 FROM tab1 cor0
----
14
14
14

query I rowsort
SELECT DISTINCT + 29 + - 43 * + cor0.col0 + tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 71863e1c11829ff2ad9538125d4c0afb

onlyif mysql # use DIV operator for integer division
query I rowsort label-3684
SELECT DISTINCT col1 + ( - ( + tab2.col1 ) ) DIV 61 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3684
SELECT DISTINCT col1 + ( - ( + tab2.col1 ) ) / 61 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3685
SELECT 6 DIV - 86 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-3685
SELECT 6 / - 86 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - 85 * tab2.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 7a4ea0d7f64bef1fe05e96bf2dd41774

query I rowsort
SELECT - ( col1 ) + 39 * col0 FROM tab0 AS cor0
----
1268
3380
850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3688
SELECT ALL - 41 * - col1 - CAST( 59 AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
-2183
-3964
858

skipif mysql # not compatible
query I rowsort label-3688
SELECT ALL - 41 * - col1 - CAST ( 59 AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
-2183
-3964
858

query I rowsort
SELECT + 11 + col1 FROM tab0 AS cor0
----
102
108
97

query I rowsort
SELECT + + col2 * col1 * col1 AS col2 FROM tab0 AS cor0
----
244068
679042
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 53 * tab2.col2 AS col0 FROM tab2
----
1378
1431
2014

query I rowsort
SELECT ALL cor0.col1 + + col2 * + 75 FROM tab0 AS cor0
----
172
2561
6241

query I rowsort
SELECT ALL 74 * - 85 AS col2 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 11ca520f631f732aea918ddd02b8e711

query I rowsort
SELECT ALL + 62 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + col1 * - col1 * - col0 + + col0 FROM tab2 AS cor0
----
22910
271596
6734

query I rowsort
SELECT - + 69 + col0 AS col2 FROM tab0 AS cor0
----
-34
-45
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-3699
SELECT DISTINCT 7 DIV col1 + + col2 * + 71 FROM tab1
----
3834
4047
6816

skipif mysql # not compatible
query I rowsort label-3699
SELECT DISTINCT 7 / col1 + + col2 * + 71 FROM tab1
----
3834
4047
6816

query I rowsort
SELECT ALL + col0 + col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 + + col2 col2 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT + tab0.col0 * col1 + col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - col0 + + col1 * col2 AS col2 FROM tab0
----
2814
62
7373

query I rowsort
SELECT - col0 - col0 FROM tab1
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3705
SELECT DISTINCT + col1 + col2 + - col1 DIV col0 AS col2 FROM tab1
----
109
67
72

skipif mysql # not compatible
query I rowsort label-3705
SELECT DISTINCT + col1 + col2 + - col1 / col0 AS col2 FROM tab1
----
109
67
72

query I rowsort
SELECT col0 + col1 * col1 * + col1 FROM tab1
----
1064
17579
2277

query I rowsort
SELECT ALL cor0.col0 * col0 + col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT col1 * tab0.col1 + col0 + + col1 * col1 FROM tab0
----
14816
16651
18853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col2 col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + + col2 * col1 + + cor0.col0 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + col1 + cor0.col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col1 * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3713
SELECT ALL - + col0 DIV + col0 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3713
SELECT ALL - + col0 / + col0 AS col0 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col2 * + col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3716
SELECT - + col0 DIV - col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3716
SELECT - + col0 / - col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL + col0 + col1 * - col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT col1 + col0 * - col2 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL + col1 + col0 + - col2 FROM tab2
----
11
111
58

query I rowsort
SELECT tab2.col0 * col1 + - col0 AS col0 FROM tab2
----
1264
210
4524

query I rowsort
SELECT col0 * cor0.col1 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - + col2 * col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT col0 + - cor0.col2 * col1 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-3724
SELECT DISTINCT + - col0 DIV - col0 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3724
SELECT DISTINCT + - col0 / - col0 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + col0 - + col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + - ( + col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3727
SELECT + - col0 DIV - col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3727
SELECT + - col0 / - col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT col1 + col1 + + col2 FROM tab1
----
106
122
77

query I rowsort
SELECT + cor1.col1 FROM tab0 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT 48 + col0 AS col0 FROM tab2
----
126
127
55

query I rowsort
SELECT + - 76 + col0 AS col0 FROM tab1 cor0
----
-12
-73
4

query I rowsort
SELECT - 67 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-102
-156
-91

query I rowsort
SELECT DISTINCT 72 * col1 AS col0 FROM tab1 AS cor0
----
1872
720
936

query I rowsort
SELECT ALL col0 * col2 - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT + col0 + - col2 * col0 FROM tab2 cor0
----
-182
-1950
-2923

query I rowsort
SELECT - ( + col0 ) - - col0 * cor0.col0 * col0 AS col1 FROM tab1 AS cor0
----
24
262080
511920

query I rowsort
SELECT ALL col2 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - ( + col2 ) + col2 * col0 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT col2 - - cor0.col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 + + col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT + - col2 + + col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + + col1 * + col1 + - col0 AS col1 FROM tab2 AS cor0
----
210
3403
954

onlyif mysql # use DIV operator for integer division
query I rowsort label-3744
SELECT DISTINCT + cor0.col1 - - col1 DIV + col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-3744
SELECT DISTINCT + cor0.col1 - - col1 / + col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT - 48 - col1 AS col2 FROM tab1
----
-58
-61
-74

query I rowsort
SELECT DISTINCT cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
86
91
97

query I rowsort
SELECT cor1.col2 + + cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to a451dbe509e87d1600234f39388c7bd3

query I rowsort
SELECT DISTINCT + 85 - - col2 * - tab2.col2 AS col0 FROM tab2
----
-1359
-591
-644

query I rowsort
SELECT + tab0.col1 + - tab0.col0 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL - col1 + - col1 FROM tab0
----
-172
-182
-194

query III rowsort
SELECT * FROM tab2 WHERE ( + col0 ) <= NULL
----

query I rowsort
SELECT + col1 * tab2.col2 FROM tab2 WHERE - col0 NOT IN ( + col2 )
----
1534
646
837

query I rowsort
SELECT + col1 * tab0.col0 + - col2 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT ALL col2 - col2 * tab1.col2 AS col0 FROM tab1 WHERE NOT ( col1 - col1 ) > col0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL - tab1.col0 + col2 * - col0 AS col2 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT + col2 - col1 FROM tab2
----
-33
-4
21

query III rowsort
SELECT * FROM tab1 WHERE NULL = NULL
----

query I rowsort
SELECT DISTINCT - tab0.col0 * + col1 + + col1 AS col2 FROM tab0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-3759
SELECT - col1 DIV col1 + + col0 AS col1 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-3759
SELECT - col1 / col1 + + col0 AS col1 FROM tab2
----
6
77
78

query I rowsort
SELECT DISTINCT col2 + col2 + col1 FROM tab1
----
124
134
205

onlyif mysql # use DIV operator for integer division
query I rowsort label-3761
SELECT ALL + col1 DIV + col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3761
SELECT ALL + col1 / + col1 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col1 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * tab2.col1 * tab2.col1 col2 FROM tab2 WHERE - col2 - - col2 NOT BETWEEN ( NULL ) AND ( col1 )
----

query I rowsort
SELECT ALL - col0 + + col0 - + col2 * - col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col2 * col0 + col0 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT + tab1.col2 * col1 * + col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT col2 + - col2 * col1 + col0 AS col1 FROM tab0
----
-2781
-61
-7291

query I rowsort
SELECT ALL + col1 * - col0 + + col0 + - col2 * + col2 AS col0 FROM tab1
----
-10176
-2991
-3825

onlyif mysql # use DIV operator for integer division
query I rowsort label-3769
SELECT DISTINCT col2 DIV col0 AS col1 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3769
SELECT DISTINCT col2 / col0 AS col1 FROM tab1
----
0
1
18

query I rowsort
SELECT col1 * col1 + col0 AS col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT col0 * col0 * + col0 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT col1 * + col1 AS col2 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL - col2 + - col2 AS col2 FROM tab1 WHERE NOT NULL = ( + col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 * + col0 col2 FROM tab0
----
3395
664118
68112

query III rowsort
SELECT * FROM tab2 WHERE NULL > ( NULL )
----

query I rowsort
SELECT DISTINCT + tab0.col1 * - col2 FROM tab0
----
-2838
-7462
-97

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 0cc433e09ad9e61562b7840dd1db6f57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3778
SELECT - col1 + + col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3778
SELECT - col1 + + col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query III rowsort
SELECT * FROM tab2 WHERE + col0 > NULL
----

query I rowsort
SELECT + col2 * col0 - - col2 * tab2.col2 AS col1 FROM tab2
----
2704
4446
918

query I rowsort
SELECT + col0 FROM tab2 WHERE NOT - col1 >= col2 + + col0 + col1
----
7
78
79

query I rowsort
SELECT DISTINCT + col1 * col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + tab0.col0 * - col1 * col1 + col1 AS col0 FROM tab0
----
-177418
-329218
-736918

query I rowsort
SELECT DISTINCT + col1 + + col0 * col0 AS col2 FROM tab1
----
35
4106
6413

query III rowsort
SELECT ALL * FROM tab1 WHERE + col0 NOT IN ( col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-3786
SELECT ALL col0 DIV col0 + col1 AS col1 FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-3786
SELECT ALL col0 / col0 + col1 AS col1 FROM tab2
----
18
32
60

query III rowsort
SELECT ALL * FROM tab1 cor0 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT ALL + col0 * col1 * - col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE NULL BETWEEN NULL AND col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col2 col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT - col2 * + col2 - col2 * col2 * col0 FROM tab2
----
-115520
-53404
-5832

query I rowsort
SELECT ALL col2 + + col2 * col0 AS col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL + tab0.col2 * - col1 AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + col1 * tab1.col1 * col1 AS col2 FROM tab1
----
1000
17576
2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-3795
SELECT col0 DIV tab2.col0 + - tab2.col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-3795
SELECT col0 / tab2.col0 + - tab2.col0 FROM tab2
----
-6
-77
-78

query I rowsort
SELECT col2 + + col1 + + col2 * tab2.col0 AS col0 FROM tab2
----
2113
247
3057

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + tab1.col1 + col1 col0 FROM tab1
----
106
55
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 + col1 + col1 * - col1 col1 FROM tab0
----
-7224
-8099
-9215

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( - col1 + - col1 )
----

query I rowsort
SELECT + col2 * col0 * - tab2.col0 AS col1 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT + tab1.col0 * - col2 * col2 AS col1 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT + col1 * col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col0 * col2 * col2 AS col1 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL + col1 + tab1.col1 * - col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL col2 * + col0 + - col0 AS col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL - cor0.col0 + - col2 * col2 AS col1 FROM tab0 cor0
----
-1113
-36
-6813

query I rowsort
SELECT - - 68 FROM tab0 cor0
----
68
68
68

query I rowsort
SELECT - 39 * + col1 * 98 FROM tab1 AS cor0
----
-38220
-49686
-99372

query I rowsort
SELECT - cor0.col2 * - col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + 64 AS col2 FROM tab2
----
64
64
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-3811
SELECT ALL - 82 DIV + col0 FROM tab0 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-3811
SELECT ALL - 82 / + col0 FROM tab0 AS cor0
----
-2
-3
0

query I rowsort
SELECT - tab0.col1 + 12 AS col0 FROM tab0
----
-74
-79
-85

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0, tab2 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT col1 * + 44 + 54 FROM tab2 cor0
----
1418
2650
802

query I rowsort
SELECT 60 AS col1 FROM tab0 cor0
----
60
60
60

query I rowsort
SELECT 17 FROM tab2
----
17
17
17

query I rowsort
SELECT ( - 93 ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to 1b40f6ebec12e55a9e5893620c5636c7

query I rowsort
SELECT ALL - ( + 45 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT ALL col2 * 57 * col0 FROM tab1
----
207936
437760
9234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 col2 FROM tab1
----
76
76
76

query I rowsort
SELECT DISTINCT + 40 * 78 FROM tab0
----
3120

query I rowsort
SELECT DISTINCT - 88 * - tab1.col2 AS col2 FROM tab1
----
4752
5016
8448

query I rowsort
SELECT + + 9 * 90 + col0 * + ( + col0 ) AS col2 FROM tab0 AS cor0
----
1386
2035
8731

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT col2 + + 85 AS col0 FROM tab2 AS cor0
----
111
112
123

onlyif mysql # use DIV operator for integer division
query I rowsort label-3827
SELECT - 41 + cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0
----
-40
-40
-40

skipif mysql # not compatible
query I rowsort label-3827
SELECT - 41 + cor0.col0 / + cor0.col0 FROM tab1 AS cor0
----
-40
-40
-40

query I rowsort
SELECT - + cor0.col0 * col1 - + col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT + col2 * 42 FROM tab1
----
2268
2394
4032

onlyif mysql # use DIV operator for integer division
query I rowsort label-3830
SELECT ALL + cor0.col0 + cor0.col2 DIV + col2 col0 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3830
SELECT ALL + cor0.col0 + cor0.col2 / + col2 col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + col0 + col2 * + ( + col0 ) FROM tab1
----
165
3712
7760

query I rowsort
SELECT ALL 50 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT - - 60 * - col0 AS col1 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT DISTINCT - + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col1 - + col0 FROM tab0 cor0
----
2
62

query I rowsort
SELECT ALL - col2 + cor0.col2 * - ( col1 ) * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-119904
-32547
-75870

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT DISTINCT + col2 * - ( - col2 ) - + col2 AS col1 FROM tab1
----
2862
3192
9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 * col0 col2 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT ALL col0 - tab1.col0 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - col2 + 93 FROM tab1 AS cor0
----
-3
36
39

query I rowsort
SELECT DISTINCT + col2 + 84 FROM tab1 AS cor0
----
138
141
180

query I rowsort
SELECT DISTINCT - col0 * - col1 * - col0 + ( + col0 ) * + col0 FROM tab2 AS cor0
----
-1470
-352872
-99856

query I rowsort
SELECT ALL + - 24 + + 96 * - col2 FROM tab2 cor0
----
-2520
-2616
-3672

query I rowsort
SELECT - + ( col1 ) + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 24 + col2 * - col2 col0 FROM tab0 AS cor0
----
-1065
-6700
23

query I rowsort
SELECT ALL 38 + - 36 AS col2 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT col0 * + col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + + ( col1 ) + - col2 * - col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + - cor0.col0 * 19 + col2 * - col2 * col0 AS col0 FROM tab0 AS cor0
----
-26592
-600127
-700

query I rowsort
SELECT - ( col2 ) * - col2 + 96 + col2 AS col0 FROM tab0 AS cor0
----
1218
6902
98

query I rowsort
SELECT DISTINCT - + col1 * - cor0.col2 + + col0 * + col1 * + col2 FROM tab0 AS cor0
----
3492
671580
70950

query I rowsort
SELECT - 32 + + 32 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col0 FROM tab0 AS cor0
----
30
30
30

query I rowsort
SELECT - col2 * 66 - col0 FROM tab2 AS cor0
----
-1789
-1794
-2587

query I rowsort
SELECT ALL - cor0.col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3857
SELECT DISTINCT + col2 DIV - col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3857
SELECT DISTINCT + col2 / - col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT ( + 26 ) FROM tab1, tab0, tab1 AS cor0, tab1 AS cor1
----
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3859
SELECT - col2 DIV + col2 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3859
SELECT - col2 / + col2 AS col1 FROM tab1
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3860
SELECT - col1 DIV col0 AS col2 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-3860
SELECT - col1 / col0 AS col2 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT + col2 * ( col0 ) * col2 FROM tab0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3862
SELECT DISTINCT col2 * CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3862
SELECT DISTINCT col2 * CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col0 * col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3864
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3864
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL col0 * ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col0 * + col2 - + 68 AS col2 FROM tab0 AS cor0
----
-103
-7366
-860

onlyif mysql # use DIV operator for integer division
query I rowsort label-3867
SELECT DISTINCT col0 * - tab2.col1 + + CAST( ( - col1 ) AS SIGNED ) DIV 25 AS col2 FROM tab2
----
-1343
-218
-4604

skipif mysql # not compatible
query I rowsort label-3867
SELECT DISTINCT col0 * - tab2.col1 + + CAST ( ( - col1 ) AS INTEGER ) / 25 AS col2 FROM tab2
----
-1343
-218
-4604

query I rowsort
SELECT 59 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT cor0.col2 * 96 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 19c7ed22afd5c2bc0716e97bd608270e

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL col1 * - col1 + + col2 FROM tab0
----
-7363
-8199
-9408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3872
SELECT ALL + + tab2.col2 + + CAST( NULL AS DECIMAL ) / - cor0.col1 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3872
SELECT ALL + + tab2.col2 + + CAST ( NULL AS REAL ) / - cor0.col1 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - col0 + col2 * col0 AS col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT - col2 * col1 + 16 FROM tab0 AS cor0
----
-2822
-7446
-81

query I rowsort
SELECT - col0 + - ( 66 ) * - col2 AS col2 FROM tab2 AS cor0
----
1638
1775
2429

query I rowsort
SELECT DISTINCT col0 * cor0.col1 + 96 FROM tab1 AS cor0
----
1136
174
736

query I rowsort
SELECT + + col0 + col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT col0 + + tab1.col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT col1 * ( 37 * col2 ) FROM tab2
----
23902
30969
56758

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2, tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3881
SELECT ( - col2 ) + + col2 DIV - col2 AS col0 FROM tab1
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-3881
SELECT ( - col2 ) + + col2 / - col2 AS col0 FROM tab1
----
-55
-58
-97

query I rowsort
SELECT 0 + col2 AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL - 71 * col2 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT - 64 + + col1 AS col2 FROM tab2 AS cor0
----
-33
-47
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3885
SELECT + CAST( + col1 AS SIGNED ) - + col0 DIV 87 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3885
SELECT + CAST ( + col1 AS INTEGER ) - + col0 / 87 AS col1 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 40 col2 FROM tab0
----
-40
-40
-40

query I rowsort
SELECT col0 + col1 * + col2 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL ( + col0 ) * + col0 AS col1 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 82 * + col0 ) + - col2 col1 FROM tab0
----
-2001
-2871
-7380

query I rowsort
SELECT ALL - col0 * - 93 FROM tab1
----
279
5952
7440

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3891
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3891
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + tab2.col1 + + tab2.col1 + - col2 AS col1 FROM tab2
----
-4
35
92

query I rowsort
SELECT tab1.col1 * col2 + ( 22 * + col2 ) + 63 AS col0 FROM tab1
----
1887
2655
3423

query I rowsort
SELECT + - col1 * col0 - col2 AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 col0 FROM tab1 AS cor0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col0 col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT ( + col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + cor0.col0 * + col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 97 - col2 AS col0 FROM tab1 AS cor0
----
1
40
43

query I rowsort
SELECT ALL cor0.col2 + + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
47

query I rowsort
SELECT ALL col2 + - col1 * col0 AS col1 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT - 90 * - col1 AS col0 FROM tab1
----
1170
2340
900

query I rowsort
SELECT DISTINCT 48 * - col2 + ( + col1 ) AS col1 FROM tab1 AS cor0
----
-2566
-2726
-4595

query I rowsort
SELECT 41 + col2 FROM tab0 cor0
----
123
42
74

query I rowsort
SELECT - col0 * + col2 * 55 FROM tab2 AS cor0
----
-10395
-111540
-165110

query I rowsort
SELECT ALL + - 9 AS col0 FROM tab2 cor0
----
-9
-9
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3908
SELECT ALL 75 * col1 DIV col1 FROM tab0 AS cor0
----
75
75
75

skipif mysql # not compatible
query I rowsort label-3908
SELECT ALL 75 * col1 / col1 FROM tab0 AS cor0
----
75
75
75

query I rowsort
SELECT - 34 * col1 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT ALL - 50 FROM tab1 AS cor0
----
-50
-50
-50

onlyif mysql # use DIV operator for integer division
query I rowsort label-3911
SELECT DISTINCT + 1 DIV + col2 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3911
SELECT DISTINCT + 1 / + col2 FROM tab1 cor0
----
0

query I rowsort
SELECT - - 51 + col0 FROM tab2 AS cor0
----
129
130
58

query I rowsort
SELECT ALL - col2 * + cor0.col2 * 31 + 81 * - col1 AS col1 FROM tab1 AS cor0
----
-101529
-286749
-92502

query I rowsort
SELECT 64 * - col1 AS col2 FROM tab2 AS cor0
----
-1088
-1984
-3776

onlyif mysql # use DIV operator for integer division
query I rowsort label-3915
SELECT DISTINCT + 55 DIV col2 col0 FROM tab1 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3915
SELECT DISTINCT + 55 / col2 col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - - col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - - col1 - - col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col1 * - col0 * col1 + 27 AS col1 FROM tab0
----
-177477
-329288
-736982

query I rowsort
SELECT - col1 * col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + - 15 FROM tab2 AS cor0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1, tab0, tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3922
SELECT col1 * col2 DIV + col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3922
SELECT col1 * col2 / + col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( - col1 ) * - cor0.col2 col2 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3924
SELECT col0 DIV + col0 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3924
SELECT col0 / + col0 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT col0 - 52 FROM tab1 AS cor0
----
-49
12
28

query I rowsort
SELECT col0 * + ( col2 ) + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + col1 + - col2 * ( + col0 ) + - ( col2 ) FROM tab1 AS cor0
----
-190
-3695
-7763

query I rowsort
SELECT ALL cor0.col0 * + 1 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col2 * + ( - col1 ) + - col1 AS col1 FROM tab0 cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT + col1 + 10 FROM tab2 AS cor0
----
27
41
69

query I rowsort
SELECT + col2 * - ( cor0.col2 ) + col2 + 52 AS col2 FROM tab1 AS cor0
----
-2810
-3140
-9068

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3932
SELECT - + cor0.col2 * - CAST( + col2 AS SIGNED ) AS col0 FROM tab0 cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-3932
SELECT - + cor0.col2 * - CAST ( + col2 AS INTEGER ) AS col0 FROM tab0 cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3933
SELECT ALL col1 DIV - col2 col1 FROM tab0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3933
SELECT ALL col1 / - col2 col1 FROM tab0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 82 col1 FROM tab0 cor0
----
1968
2870
7298

query I rowsort
SELECT + - col1 * - col0 + - 38 + - col0 FROM tab0 AS cor0
----
2002
3322
7972

query I rowsort
SELECT ALL cor0.col1 * + 9 - col2 FROM tab0 AS cor0
----
737
741
872

query I rowsort
SELECT DISTINCT + 88 AS col0 FROM tab1 AS cor0
----
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3938
SELECT - 21 + + col1 DIV col1 col1 FROM tab2 cor0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3938
SELECT - 21 + + col1 / col1 col1 FROM tab2 cor0
----
-20
-20
-20

query I rowsort
SELECT ALL cor0.col1 * + col0 * col0 + + col2 * 90 + cor0.col1 FROM tab2 cor0
----
109534
361355
3980

query I rowsort
SELECT ALL 86 + col1 AS col0 FROM tab1 AS cor0
----
112
96
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3941
SELECT ALL + + col1 + 91 * - col1 * + CAST( - col2 AS SIGNED ) FROM tab2 AS cor0
----
139653
58803
76198

skipif mysql # not compatible
query I rowsort label-3941
SELECT ALL + + col1 + 91 * - col1 * + CAST ( - col2 AS INTEGER ) FROM tab2 AS cor0
----
139653
58803
76198

query I rowsort
SELECT DISTINCT col0 * + col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ( + cor0.col2 ) + - col2 AS col2 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 * col0 - - col1 col2 FROM tab0 AS cor0
----
1310
1882
4630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3945
SELECT - CAST( col0 * - col0 + col0 AS SIGNED ) FROM tab0
----
1190
552
7832

skipif mysql # not compatible
query I rowsort label-3945
SELECT - CAST ( col0 * - col0 + col0 AS INTEGER ) FROM tab0
----
1190
552
7832

query I rowsort
SELECT ALL - col1 + + 33 FROM tab2 cor0
----
-26
16
2

query I rowsort
SELECT + + 34 * ( col1 * + col1 ) + - cor0.col0 * col1 FROM tab2 AS cor0
----
113752
32457
8483

onlyif mysql # use DIV operator for integer division
query I rowsort label-3948
SELECT ALL - cor0.col1 DIV col0 AS col1 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-3948
SELECT ALL - cor0.col1 / col0 AS col1 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT col1 * - 95 FROM tab2 AS cor0
----
-1615
-2945
-5605

query I rowsort
SELECT ALL col0 + - cor0.col1 * + col0 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3951
SELECT - + CAST( NULL AS SIGNED ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3951
SELECT - + CAST ( NULL AS INTEGER ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3952
SELECT DISTINCT - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3952
SELECT DISTINCT - CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + 77 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT 53 FROM tab2 AS cor0
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 42 col2 FROM tab2 AS cor0
----
101
59
73

query I rowsort
SELECT - col0 * - col1 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + 8 FROM tab1, tab1 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3958
SELECT - col0 * CAST( NULL AS SIGNED ) + + 13 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3958
SELECT - col0 * CAST ( NULL AS INTEGER ) + + 13 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3960
SELECT col1 DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-3960
SELECT col1 / - col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT cor0.col0 * 44 + col2 AS col1 FROM tab2 AS cor0
----
335
3458
3514

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3962
SELECT ALL CAST( NULL AS SIGNED ) + - cor0.col1 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3962
SELECT ALL CAST ( NULL AS INTEGER ) + - cor0.col1 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + 53 ) AS col2 FROM tab1 cor0
----
53
53
53

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to 2507aa9f48c3db94de9fec065edf3731

query I rowsort
SELECT + + col0 * col2 * - 98 - col1 * - cor0.col2 * ( ( + cor0.col2 ) ) FROM tab1 AS cor0
----
-325014
-632832
59940

query I rowsort
SELECT - 17 + + col0 * cor0.col2 - col0 FROM tab0 AS cor0
----
-17
7192
751

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + - col1 col1 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - tab1.col0 col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + col0 * - tab2.col0 AS col2 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT + 21 FROM tab2, tab1, tab0 AS cor0
----
21

query I rowsort
SELECT + col2 * col2 + - 26 FROM tab1
----
2890
3223
9190

query I rowsort
SELECT 59 AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT 92 AS col1 FROM tab1
----
92

query I rowsort
SELECT DISTINCT + tab2.col2 * 36 FROM tab2, tab2 AS cor0
----
1368
936
972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * col0 col0 FROM tab0 cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3977
SELECT + - col1 * ( - col0 * col2 + - CAST( NULL AS SIGNED ) ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3977
SELECT + - col1 * ( - col0 * col2 + - CAST ( NULL AS INTEGER ) ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 98 AS col2 FROM tab0
----
98

query I rowsort
SELECT ALL + col1 * - ( col2 ) + col2 * tab2.col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL col0 * + col2 + + 18 AS col1 FROM tab1
----
180
3666
7698

query I rowsort
SELECT + tab1.col1 * - 58 AS col0 FROM tab1
----
-1508
-580
-754

query I rowsort
SELECT ALL tab0.col0 - - col0 * + tab0.col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT - col2 - 59 FROM tab1 AS cor0
----
-113
-116
-155

query I rowsort
SELECT - col2 * - cor0.col0 + 36 * col2 FROM tab0 AS cor0
----
10250
1980
71

query I rowsort
SELECT cor0.col1 * + cor0.col1 * - col1 - col0 AS col2 FROM tab1 AS cor0
----
-1064
-17579
-2277

query I rowsort
SELECT DISTINCT col2 + ( col2 + + col2 ) FROM tab2
----
114
78
81

query I rowsort
SELECT cor0.col2 * - 54 * col2 - + col0 * col2 FROM tab0 AS cor0
----
-370394
-59598
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 70 col1 FROM tab0
----
70
70
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3989
SELECT - ( col0 ) + col0 DIV - col2 FROM tab1
----
-3
-65
-80

skipif mysql # not compatible
query I rowsort label-3989
SELECT - ( col0 ) + col0 / - col2 FROM tab1
----
-3
-65
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3990
SELECT ALL - col1 * + col1 DIV col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-3990
SELECT ALL - col1 * + col1 / col1 FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col2 FROM tab2
----
51
51
51

query I rowsort
SELECT ALL - 57 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT 33 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT ( 71 ) * col0 + + col0 FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT - ( ( + col0 ) * - col0 ) FROM tab2
----
49
6084
6241

query I rowsort
SELECT col0 + 74 FROM tab1
----
138
154
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3997
SELECT DISTINCT ( + ( col1 ) ) * - CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3997
SELECT DISTINCT ( + ( col1 ) ) * - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT ( + tab2.col2 ) AS col0 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3999
SELECT DISTINCT + col0 DIV 79 AS col1 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-3999
SELECT DISTINCT + col0 / 79 AS col1 FROM tab1
----
0
1

query I rowsort
SELECT DISTINCT ( 89 ) * col2 FROM tab1
----
4806
5073
8544

onlyif mysql # use DIV operator for integer division
query I rowsort label-4001
SELECT - col1 + - col2 DIV - 50 FROM tab0 AS cor0
----
-86
-90
-97

skipif mysql # not compatible
query I rowsort label-4001
SELECT - col1 + - col2 / - 50 FROM tab0 AS cor0
----
-86
-90
-97

query I rowsort
SELECT - + 4 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT col1 + - col1 * 55 AS col1 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT ALL + + col0 + col2 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT 37 * - 61 AS col2 FROM tab2
----
-2257

query I rowsort
SELECT DISTINCT col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - col0 * + col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - - col0 * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 26 * cor0.col2 + + col2 AS col0 FROM tab1 AS cor0
----
-1350
-1425
-2400

query I rowsort
SELECT + cor0.col2 + + col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT col1 + + col2 * - col0 - + col1 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + 94 * col1 * col2 AS col0 FROM tab1 AS cor0
----
117312
131976
53580

query I rowsort
SELECT 31 AS col1 FROM tab1 cor0
----
31
31
31

query I rowsort
SELECT ALL - 91 * + col1 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT DISTINCT col0 * + col2 + - col2 + - ( 19 ) * col2 * + col1 AS col0 FROM tab1 AS cor0
----
-16128
-26568
-7239

query I rowsort
SELECT - col0 + + 16 AS col2 FROM tab2
----
-62
-63
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4017
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + + ( - col1 ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4017
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + + ( - col1 ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 + + col2 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL - + col2 * col2 + - col2 AS col0 FROM tab2 AS cor0
----
-1482
-702
-756

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT ( ( - col2 ) * CAST ( 86 AS REAL ) ) - - col0 * col0 FROM tab1
----
-1856
-4635
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-4021
SELECT - col1 DIV + col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4021
SELECT - col1 / + col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT 8 + col2 FROM tab2 AS cor0
----
34
35
46

query I rowsort
SELECT ALL 91 FROM tab2 cor0
----
91
91
91

query I rowsort
SELECT + ( + col0 ) - col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT col2 + - col1 * - 88 FROM tab0 AS cor0
----
7601
8090
8537

query I rowsort
SELECT ( col0 ) + + col1 AS col2 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 * + cor0.col0 col1 FROM tab0, tab0 AS cor0
----
-1152
-1680
-4272

query I rowsort
SELECT ALL cor0.col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col1 + col1 * col1 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-4030
SELECT ALL - + col0 DIV - col1 col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4030
SELECT ALL - + col0 / - col1 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 14 * + tab2.col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 3a82cea9f444a50d3205ae9312acdd72

onlyif mysql # use DIV operator for integer division
query I rowsort label-4032
SELECT - + col1 DIV col1 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4032
SELECT - + col1 / col1 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * + col1 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + col0 + - cor0.col2 * ( - col2 ) AS col2 FROM tab1 cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + - col2 * col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col0 + - col1 * col2 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT + col2 * col2 + + ( col2 ) FROM tab1
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + tab1.col1 + - tab1.col0 AS col1 FROM tab1
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4039
SELECT CAST( NULL AS SIGNED ) * - 76 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4039
SELECT CAST ( NULL AS INTEGER ) * - 76 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * ( + 66 ) - col2 col0 FROM tab2 AS cor0
----
1084
2019
3868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4041
SELECT DISTINCT - + col1 + + ( col1 * col0 + CAST( col0 AS SIGNED ) ) FROM tab2 AS cor0
----
1405
193
4621

skipif mysql # not compatible
query I rowsort label-4041
SELECT DISTINCT - + col1 + + ( col1 * col0 + CAST ( col0 AS INTEGER ) ) FROM tab2 AS cor0
----
1405
193
4621

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + - col0 col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - + col2 + - 62 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-461
-4862
-4936

query I rowsort
SELECT ALL + cor0.col2 - - col0 * - 55 FROM tab2 AS cor0
----
-358
-4264
-4307

query I rowsort
SELECT DISTINCT + col1 + 99 + + col2 AS col2 FROM tab1 AS cor0
----
166
179
208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 * col0 - - 51 col2 FROM tab1 AS cor0
----
-111
-3597
-7629

query I rowsort
SELECT col1 * - col1 * - col0 + col1 * + 32 AS col2 FROM tab1
----
13936
2860
6720

query I rowsort
SELECT DISTINCT col1 * col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL 36 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 * col1 col1 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT col0 * 46 AS col0 FROM tab2
----
322
3588
3634

query I rowsort
SELECT DISTINCT - col1 * ( + col0 ) AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 0 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4054
SELECT - CAST( NULL AS SIGNED ) * - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4054
SELECT - CAST ( NULL AS INTEGER ) * - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab1 AS cor0
----
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-4057
SELECT ALL - col0 + - col0 DIV col1 col1 FROM tab1 AS cor0
----
-3
-70
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4057
SELECT ALL - col0 + - col0 / col1 col1 FROM tab1 AS cor0
----
-3
-70
-86

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 7e12d99d8ab63d9fd10e95cef9d78998

query I rowsort
SELECT + 63 * col0 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT + col0 + - col1 * + col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT + 95 * 39 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
318630
337155
359385

query I rowsort
SELECT DISTINCT + 75 * 48 - col1 AS col1 FROM tab0 AS cor0
----
3503
3509
3514

query I rowsort
SELECT DISTINCT + + col2 * cor0.col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + + col0 * - ( col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + col0 * + col1 * col0 FROM tab1 cor0
----
234
40960
83200

query I rowsort
SELECT - tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT ALL - 34 + - col1 * - col2 AS col2 FROM tab2 cor0
----
1500
612
803

query I rowsort
SELECT ALL col1 * + col2 + - col0 + + col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT col0 * + col2 + - 77 + - 91 FROM tab0 AS cor0
----
-133
624
7130

query I rowsort
SELECT ALL - col2 + + cor0.col0 FROM tab2 cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4071
SELECT cor0.col0 * - cor0.col0 + CAST( + ( + cor0.col2 ) * col2 + col0 * - col0 AS SIGNED ) FROM tab2 AS cor0
----
-11038
-11492
631

skipif mysql # not compatible
query I rowsort label-4071
SELECT cor0.col0 * - cor0.col0 + CAST ( + ( + cor0.col2 ) * col2 + col0 * - col0 AS INTEGER ) FROM tab2 AS cor0
----
-11038
-11492
631

skipif mysql # not compatible
query I rowsort
SELECT ALL ( + col2 ) * CAST ( - col0 AS REAL ) FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4073
SELECT - 19 + col0 DIV + ( col1 + + col2 ) AS col2 FROM tab1 AS cor0
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-4073
SELECT - 19 + col0 / + ( col1 + + col2 ) AS col2 FROM tab1 AS cor0
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 * 18 * col0 col2 FROM tab2 AS cor0
----
24212
3933
82862

query I rowsort
SELECT ALL 51 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT + + col1 + + col1 * col1 FROM tab2 AS cor0
----
306
3540
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * - 94 col2 FROM tab2 AS cor0
----
-2444
-2538
-3572

query I rowsort
SELECT + col1 * + col0 + + 28 FROM tab0 cor0
----
2092
3423
8127

query I rowsort
SELECT DISTINCT ( + 49 ) FROM tab0, tab0 AS cor0
----
49

query I rowsort
SELECT ALL col1 * 80 + - ( + col2 ) FROM tab2 AS cor0
----
1322
2453
4694

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
45

query I rowsort
SELECT col0 * - cor0.col2 + col2 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT ( col0 ) * - 6 * tab0.col2 FROM tab0
----
-210
-43788
-4752

query I rowsort
SELECT DISTINCT - col2 * + col0 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ( + tab1.col1 ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - 70 * col1 FROM tab2
----
-1190
-2170
-4130

onlyif mysql # use DIV operator for integer division
query I rowsort label-4087
SELECT + + col2 DIV + col2 + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4087
SELECT + + col2 / + col2 + col0 FROM tab1 AS cor0
----
4
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 + - col0 * col2 col1 FROM tab0
----
-7254
-748
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4089
SELECT - - ( cor0.col0 ) * cor0.col1 DIV col2 + col2 FROM tab1 AS cor0
----
106
55
68

skipif mysql # not compatible
query I rowsort label-4089
SELECT - - ( cor0.col0 ) * cor0.col1 / col2 + col2 FROM tab1 AS cor0
----
106
55
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-4090
SELECT ALL col2 DIV - col0 - - col0 AS col2 FROM tab0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-4090
SELECT ALL col2 / - col0 - - col0 AS col2 FROM tab0
----
23
35
89

query I rowsort
SELECT tab1.col0 + col0 AS col1 FROM tab1
----
128
160
6

query I rowsort
SELECT - - col1 * - cor0.col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4093
SELECT DISTINCT col0 DIV - col0 + + col0 AS col2 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-4093
SELECT DISTINCT col0 / - col0 + + col0 AS col2 FROM tab2
----
6
77
78

query I rowsort
SELECT DISTINCT + - col1 - + col1 AS col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - + col2 + - 93 FROM tab2 cor0
----
-119
-120
-131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4096
SELECT ALL - cor0.col2 + CAST( NULL AS SIGNED ) / + col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4096
SELECT ALL - cor0.col2 + CAST ( NULL AS INTEGER ) / + col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * + col1 - 9 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
1033
1162
613

query I rowsort
SELECT + - cor0.col2 + 92 AS col0 FROM tab1 AS cor0
----
-4
35
38

query I rowsort
SELECT + tab1.col2 + col0 * + col0 AS col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT ALL col0 + - col0 * - col1 AS col2 FROM tab2
----
1422
224
4680

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL IN ( - col2 * - col0 * - col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL <= NULL
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col1 * - col0 <= NULL
----

query I rowsort
SELECT col0 + + col0 * + tab1.col0 AS col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ALL - col0 FROM tab0 WHERE ( NULL ) BETWEEN col1 AND NULL
----

query I rowsort
SELECT - col1 * - col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 + col2 * + col1 FROM tab2
----
1456
567
830

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL < + col2
----

query III rowsort
SELECT * FROM tab2 WHERE col2 / - col2 BETWEEN col0 - - col1 AND NULL
----

query I rowsort
SELECT + col0 + + col0 + col0 FROM tab1
----
192
240
9

query I rowsort
SELECT ALL col0 * col0 * - col1 + col0 AS col1 FROM tab2
----
-106018
-1512
-358878

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT BETWEEN - col0 AND col1 / - col2
----

query I rowsort
SELECT + col1 * + col1 + - col2 + tab0.col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT col2 * tab1.col0 AS col0 FROM tab1
----
162
3648
7680

query III rowsort
SELECT * FROM tab2 WHERE NULL NOT IN ( col1 * + col0 )
----

query I rowsort
SELECT DISTINCT tab2.col1 + + col2 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL + col2 + - col2 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + tab2.col0 * col1 AS col2 FROM tab2
----
1343
217
4602

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL IN ( tab0.col0 )
----

query I rowsort
SELECT - 37 FROM tab0 AS cor0
----
-37
-37
-37

query I rowsort
SELECT + - col2 * - col1 + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - col0 + + col1 * - tab2.col0 AS col1 FROM tab2
----
-1422
-224
-4680

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 ) NOT IN ( + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT ALL * FROM tab0 WHERE col0 = ( + col1 + + col0 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL col2 FROM tab2 WHERE ( col2 ) IN ( + col1 / + col1 + col2 * - col2 + - tab2.col1 )
----

query I rowsort
SELECT ALL + - col0 * col0 - - col2 AS col2 FROM tab2 AS cor0
----
-22
-6058
-6203

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col1 * - col2 * + CAST ( col2 AS REAL ) FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT - col2 * col1 + + col2 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-4130
SELECT DISTINCT + ( + cor0.col0 ) DIV + col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4130
SELECT DISTINCT + ( + cor0.col0 ) / + col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL 16 + + col1 AS col2 FROM tab0 cor0
----
102
107
113

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col1 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL - cor0.col2 * col2 + col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT - cor0.col2 + col1 AS col1 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col0 + - col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + ( + col1 ) - col0 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-4138
SELECT ALL + col1 + + cor0.col1 DIV cor0.col2 FROM tab0 cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-4138
SELECT ALL + col1 + + cor0.col1 / cor0.col2 FROM tab0 cor0
----
194
88
92

query I rowsort
SELECT DISTINCT - col1 * col2 * col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col2 FROM tab2 AS cor0
----
52
52
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4141
SELECT ALL cor0.col1 + - col2 DIV col2 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-4141
SELECT ALL cor0.col1 + - col2 / col2 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT ALL + col1 + - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - 76 * - cor1.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 0cfe2a81f38f1a7ef61433888c440e10

query I rowsort
SELECT - cor0.col1 - col1 FROM tab0 AS cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - cor0.col0 col2 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 * col2 + + cor0.col0 * + col0 col1 FROM tab0 AS cor0
----
-216
1190
623

query I rowsort
SELECT ALL - 63 FROM tab0
----
-63
-63
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4148
SELECT ALL - CAST( - col2 AS SIGNED ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4148
SELECT ALL - CAST ( - col2 AS INTEGER ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + + col1 + col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + + col2 * col2 + - col2 FROM tab1 AS cor0
----
2862
3192
9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + col0 col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 13 + col0 FROM tab1 cor0
----
16
77
93

query I rowsort
SELECT + 42 FROM tab0, tab1 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT DISTINCT - 33 + col2 * col1 AS col2 FROM tab0
----
2805
64
7429

query I rowsort
SELECT ALL - ( - col0 * - col2 ) AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT cor0.col0 + col0 FROM tab2 cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 + col1 col1 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 * col0 * + col0 col1 FROM tab1
----
262154
512013
53

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab0
----
98

query I rowsort
SELECT ALL - 20 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT DISTINCT + 23 * cor0.col2 FROM tab1 AS cor0
----
1242
1311
2208

query I rowsort
SELECT DISTINCT + 24 FROM tab1 AS cor0
----
24

query I rowsort
SELECT - - 73 * col2 FROM tab0 cor0
----
2409
5986
73

query I rowsort
SELECT ALL 47 * col0 FROM tab1 AS cor0
----
141
3008
3760

query I rowsort
SELECT - 32 * - col1 FROM tab1 AS cor0
----
320
416
832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4166
SELECT + 6 + + col1 DIV col2 AS col0 FROM tab1 AS cor0
----
6
6
6

skipif mysql # not compatible
query I rowsort label-4166
SELECT + 6 + + col1 / col2 AS col0 FROM tab1 AS cor0
----
6
6
6

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 WHERE NULL <= NULL
----

query I rowsort
SELECT - col0 + + col2 * + col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2, tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - + cor0.col1 AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - + cor0.col0 + - cor0.col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT - - col0 * col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - + col2 * col0 * col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + + col2 + + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4175
SELECT - CAST( NULL AS SIGNED ) * + col1 + col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4175
SELECT - CAST ( NULL AS INTEGER ) * + col1 + col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 * - col1 + cor0.col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT DISTINCT - - 5 + + cor0.col1 * + col2 * col2 FROM tab1 AS cor0
----
119813
32495
75821

onlyif mysql # use DIV operator for integer division
query I rowsort label-4178
SELECT DISTINCT col2 DIV + 81 AS col0 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-4178
SELECT DISTINCT col2 / + 81 AS col0 FROM tab2
----
0

query I rowsort
SELECT DISTINCT + 77 FROM tab0
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 * + col2 col2 FROM tab0
----
-1683
-4182
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-4181
SELECT 5 + 57 DIV tab0.col1 FROM tab0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-4181
SELECT 5 + 57 / tab0.col1 FROM tab0
----
5
5
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4182
SELECT + CAST( + ( cor0.col0 ) AS SIGNED ) + col2 col1 FROM tab2 cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4182
SELECT + CAST ( + ( cor0.col0 ) AS INTEGER ) + col2 col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL + + ( - 59 ) + - col0 FROM tab0 AS cor0
----
-148
-83
-94

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( + 10 AS REAL ) AS col2 FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT ALL col2 + col2 * + col0 AS col1 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT ALL + 11 * + 24 - col1 FROM tab0 AS cor0
----
167
173
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 * cor0.col2 col0 FROM tab2 AS cor0
----
572
594
836

query I rowsort
SELECT ALL - col0 * - ( cor0.col2 * col1 ) AS col2 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT ALL - 14 AS col2 FROM tab2 AS cor0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + + 78 * col2 AS col1 FROM tab0 AS cor0
----
2574
6396
78

query I rowsort
SELECT - - cor0.col2 + + col1 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col0 * col2 * + cor0.col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL cor0.col2 + col1 * col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4194
SELECT ALL - col1 DIV col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4194
SELECT ALL - col1 / col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col0 * - col2 + + col1 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT + - col2 * col1 + col1 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 11 col1 FROM tab0
----
-1001
-1067
-946

query I rowsort
SELECT tab2.col0 + + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - cor0.col0 * cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 0cea1be551fb4bd88f4da0b7d676ee2f

query I rowsort
SELECT col0 * col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT tab1.col2 + col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT cor0.col2 * col1 * col1 FROM tab0 AS cor0
----
244068
679042
9409

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( col2 * col0 ) IN ( cor0.col0 )
----

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 WHERE NULL < ( NULL )
----

query I rowsort
SELECT col1 + - col2 * col1 * col0 FROM tab2
----
-119593
-51017
-5828

query I rowsort
SELECT DISTINCT col0 + col1 * - col2 FROM tab2
----
-1456
-567
-830

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 * col0 * + col1 BETWEEN + col1 AND NULL
----

query I rowsort
SELECT DISTINCT col2 * + col1 + + col1 AS col2 FROM tab0
----
194
2924
7553

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL < col2
----

query I rowsort
SELECT - col1 * col2 + + col2 AS col0 FROM tab1
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col2 + + col1 * col1 col1 FROM tab0
----
15579
8188
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-4212
SELECT - col0 DIV + col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4212
SELECT - col0 / + col1 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4213
SELECT + col2 DIV col1 AS col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-4213
SELECT + col2 / col1 AS col1 FROM tab2
----
0
0
2

query I rowsort
SELECT col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - cor0.col0 * col2 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + col2 * col2 + col1 AS col0 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - + col2 * col2 * + cor0.col2 FROM tab1 AS cor0
----
-157464
-185193
-884736

query I rowsort
SELECT - tab1.col1 * col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT + tab1.col0 * + col0 + + col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT DISTINCT col1 * - col1 + col2 + col1 FROM tab0
----
-7277
-8108
-9311

query I rowsort
SELECT DISTINCT col1 + col2 + + col1 FROM tab1
----
106
122
77

query I rowsort
SELECT ALL col1 + tab1.col2 AS col1 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT tab0.col1 * + tab0.col0 AS col1 FROM tab0 WHERE NULL NOT BETWEEN ( col2 * col1 ) AND col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4224
SELECT col1 + col2 * col1 DIV tab2.col0 AS col1 FROM tab2
----
150
25
78

skipif mysql # not compatible
query I rowsort label-4224
SELECT col1 + col2 * col1 / tab2.col0 AS col1 FROM tab2
----
150
25
78

query I rowsort
SELECT col2 * + cor0.col1 + - cor0.col0 * - col0 * cor0.col0 FROM tab1 AS cor0
----
1431
262714
513248

query I rowsort
SELECT - col1 - - col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + col0 - + cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col0 * + cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - col2 * - col1 - - col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - + col2 * col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - col0 * - 97 FROM tab0 AS cor0
----
2328
3395
8633

query I rowsort
SELECT DISTINCT - cor0.col0 * - 40 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT ALL + ( - col2 ) * - col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT ALL - - ( col2 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col2 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - 33 + col2 * - col2 AS col2 FROM tab1 cor0
----
-2949
-3282
-9249

onlyif mysql # use DIV operator for integer division
query I rowsort label-4237
SELECT DISTINCT + - ( col1 ) DIV cor0.col1 AS col2 FROM tab1 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4237
SELECT DISTINCT + - ( col1 ) / cor0.col1 AS col2 FROM tab1 cor0
----
-1

query I rowsort
SELECT - ( - ( - cor0.col1 ) ) AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ALL - + 46 * + col2 + col0 AS col0 FROM tab1 cor0
----
-2481
-2558
-4336

query I rowsort
SELECT DISTINCT + ( ( + tab2.col1 ) ) AS col0 FROM tab2, tab1 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT ALL - col2 * - col0 AS col2 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4243
SELECT + 1 DIV - col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4243
SELECT + 1 / - col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 + + col2 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4245
SELECT col0 * col1 DIV - 17 AS col2 FROM tab1 AS cor0
----
-37
-4
-61

skipif mysql # not compatible
query I rowsort label-4245
SELECT col0 * col1 / - 17 AS col2 FROM tab1 AS cor0
----
-37
-4
-61

query I rowsort
SELECT 44 * col1 FROM tab2
----
1364
2596
748

query I rowsort
SELECT ALL + - 16 FROM tab2 AS cor0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT 81 FROM tab1, tab2 AS cor0
----
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4249
SELECT + col1 DIV - col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4249
SELECT + col1 / - col0 AS col1 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT + col1 + - col2 * 17 AS col0 FROM tab2
----
-383
-428
-629

query I rowsort
SELECT + col1 * 53 FROM tab0 AS cor0
----
4558
4823
5141

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab1, tab0 AS cor0
----
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-4253
SELECT col1 DIV col0 AS col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4253
SELECT col1 / col0 AS col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT DISTINCT + col2 + 11 AS col1 FROM tab2
----
37
38
49

query I rowsort
SELECT - cor0.col0 + - 16 AS col0 FROM tab2 AS cor0
----
-23
-94
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-4256
SELECT + col0 + col0 DIV col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-4256
SELECT + col0 + col0 / col2 FROM tab0 AS cor0
----
24
70
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4257
SELECT - col1 DIV + CAST( + col0 AS SIGNED ) + - col1 FROM tab0 cor0
----
-89
-92
-99

skipif mysql # not compatible
query I rowsort label-4257
SELECT - col1 / + CAST ( + col0 AS INTEGER ) + - col1 FROM tab0 cor0
----
-89
-92
-99

query I rowsort
SELECT DISTINCT col1 * col2 * col1 + - cor0.col1 * col2 AS col0 FROM tab1 cor0
----
14976
35100
5130

query I rowsort
SELECT ALL + - col0 + + 66 AS col0 FROM tab0 AS cor0
----
-23
31
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 + + col1 * ( + col0 ) * cor0.col1 col0 FROM tab0 AS cor0
----
177471
329314
736927

query I rowsort
SELECT - + cor0.col1 * col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT col1 + col2 DIV 29 AS col2 FROM tab0 cor0
----
87
93
97

skipif mysql # not compatible
query I rowsort label-4262
SELECT col1 + col2 / 29 AS col2 FROM tab0 cor0
----
87
93
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4263
SELECT ALL - CAST( col2 AS SIGNED ) * + cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-4263
SELECT ALL - CAST ( col2 AS INTEGER ) * + cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT - + 30 FROM tab0 AS cor0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT 44 FROM tab2 AS cor0
----
44

query I rowsort
SELECT DISTINCT ( col2 ) * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + + 15 AS col1 FROM tab1 AS cor0
----
15
15
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4268
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + - col1 * - cor0.col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4268
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + - col1 * - cor0.col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT cor1.col2 + - 51 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7d192b7bae9dfd8ab3e4c91229ed7e72

query I rowsort
SELECT + 70 * + col1 FROM tab2 AS cor0
----
1190
2170
4130

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + 20 + + col2 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT + ( + col1 ) - 85 AS col2 FROM tab1 AS cor0
----
-59
-72
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 col1 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL - cor0.col2 * + col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + - cor0.col1 * cor0.col1 * col2 - - 55 FROM tab2 AS cor0
----
-10927
-25892
-90451

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4277
SELECT ALL + col1 * - col2 + CAST( NULL AS SIGNED ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4277
SELECT ALL + col1 * - col2 + CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - + col2 AS col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT 97 * cor0.col2 AS col2 FROM tab1 AS cor0
----
5238
5529
9312

query I rowsort
SELECT DISTINCT + col2 * col2 + col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-4281
SELECT DISTINCT - col0 + - col2 * col1 DIV col0 col1 FROM tab2 AS cor0
----
-126
-87
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4281
SELECT DISTINCT - col0 + - col2 * col1 / col0 col1 FROM tab2 AS cor0
----
-126
-87
-97

query I rowsort
SELECT 36 * col1 - + col2 FROM tab2 AS cor0
----
1089
2098
574

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 col0 FROM tab0
----
32
32
32

query I rowsort
SELECT ALL - col1 + + col2 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL - + col0 + + ( - col1 ) * - cor0.col1 AS col2 FROM tab0 AS cor0
----
7372
8192
9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4286
SELECT DISTINCT - + col1 + + CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-172
-182
-194

skipif mysql # not compatible
query I rowsort label-4286
SELECT DISTINCT - + col1 + + CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL col0 * 49 FROM tab1 AS cor0
----
147
3136
3920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4289
SELECT - cor0.col0 + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4289
SELECT - cor0.col0 + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + ( 31 + - col2 ) * - 16 col2 FROM tab2 AS cor0
----
-21
-33
129

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 * + col2 FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT ALL col1 + + col0 * + col0 AS col0 FROM tab2
----
6143
6258
80

query I rowsort
SELECT tab0.col0 * - tab0.col0 FROM tab0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-4294
SELECT ALL + tab2.col1 DIV col0 AS col1 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4294
SELECT ALL + tab2.col1 / col0 AS col1 FROM tab2
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4295
SELECT 54 DIV col2 - - 94 FROM tab0
----
148
94
95

skipif mysql # not compatible
query I rowsort label-4295
SELECT 54 / col2 - - 94 FROM tab0
----
148
94
95

query I rowsort
SELECT ALL + cor0.col0 - + cor0.col1 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to b4cba4f278386334ce9a7cc0fa9e286a

query I rowsort
SELECT DISTINCT + col1 + - col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT - 32 AS col1 FROM tab2, tab0 AS cor0
----
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4299
SELECT ALL col2 * tab0.col1 + - col0 + CAST( NULL AS SIGNED ) * - 43 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4299
SELECT ALL col2 * tab0.col1 + - col0 + CAST ( NULL AS INTEGER ) * - 43 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab1.col1 AS col0 FROM tab1, tab0 cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4301
SELECT DISTINCT + - 54 + cor0.col0 DIV + col0 AS col1 FROM tab0 AS cor0
----
-53

skipif mysql # not compatible
query I rowsort label-4301
SELECT DISTINCT + - 54 + cor0.col0 / + col0 AS col1 FROM tab0 AS cor0
----
-53

query I rowsort
SELECT col1 * tab2.col2 + col1 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
-17
-31
-59

query I rowsort
SELECT - tab2.col0 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT DISTINCT + cor0.col1 * + col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL 59 * - col1 FROM tab1 AS cor0
----
-1534
-590
-767

onlyif mysql # use DIV operator for integer division
query I rowsort label-4307
SELECT DISTINCT + col1 DIV cor0.col0 AS col0 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-4307
SELECT DISTINCT + col1 / cor0.col0 AS col0 FROM tab2 cor0
----
0
4

query I rowsort
SELECT ALL + - 29 + col0 AS col2 FROM tab1 AS cor0
----
-26
35
51

query I rowsort
SELECT + 15 * cor0.col2 AS col0 FROM tab0 cor0
----
1230
15
495

query I rowsort
SELECT DISTINCT - 60 FROM tab1 cor0
----
-60

query I rowsort
SELECT - col2 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 68 AS col1 FROM tab2 AS cor0
----
-68
-68
-68

query I rowsort
SELECT + - ( + col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4314
SELECT ALL tab2.col1 * + col1 + col0 DIV + col1 FROM tab2
----
293
3482
961

skipif mysql # not compatible
query I rowsort label-4314
SELECT ALL tab2.col1 * + col1 + col0 / + col1 FROM tab2
----
293
3482
961

query I rowsort
SELECT + + cor0.col2 + 44 AS col0 FROM tab2, tab1, tab1 cor0
----
27 values hashing to 500a50e88e9aca53ca7b5cd342789260

query I rowsort
SELECT + col1 + col2 * col0 + - col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col1 * cor0.col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT + + col1 - + col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4320
SELECT ALL - col0 DIV col0 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4320
SELECT ALL - col0 / col0 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col0 + cor0.col1 * col0 + - col2 AS col1 FROM tab2 AS cor0
----
1384
197
4654

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4322
SELECT ALL + col2 / ( ( col1 ) * - CAST( NULL AS SIGNED ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4322
SELECT ALL + col2 / ( ( col1 ) * - CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 83 * col2 AS col1 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT - ( + col0 ) * + col0 + + 44 + - 66 * - col1 FROM tab0 AS cor0
----
-1871
5144
5221

query I rowsort
SELECT DISTINCT ( ( cor0.col2 ) ) AS col1 FROM tab1 cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4326
SELECT + CAST( - col1 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-4326
SELECT + CAST ( - col1 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 1 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4328
SELECT ALL col1 DIV 56 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4328
SELECT ALL col1 / 56 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT + - col2 + ( - col2 ) * col2 FROM tab2 cor0
----
-1482
-702
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 25 col1 FROM tab1 cor0
----
1350
1425
2400

query I rowsort
SELECT ALL + ( cor0.col0 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 25 AS col0 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT + 57 * col2 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT + col2 + - col2 * - col0 + 53 AS col2 FROM tab0 cor0
----
7433
878
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4335
SELECT col0 + - 5 DIV 42 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4335
SELECT col0 + - 5 / 42 FROM tab1
----
3
64
80

query I rowsort
SELECT - 86 * ( col2 ) AS col0 FROM tab1 AS cor0
----
-4644
-4902
-8256

query I rowsort
SELECT - col2 * 34 FROM tab1 AS cor0
----
-1836
-1938
-3264

query I rowsort
SELECT DISTINCT + ( - col2 ) + cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
7363
8199
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-4339
SELECT + - col2 DIV 2 + col2 FROM tab1 AS cor0
----
27
29
48

skipif mysql # not compatible
query I rowsort label-4339
SELECT + - col2 / 2 + col2 FROM tab1 AS cor0
----
27
29
48

query I rowsort
SELECT - - col2 + - 49 AS col1 FROM tab1 AS cor0
----
47
5
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4341
SELECT - CAST( col2 AS SIGNED ) * + col0 + - col1 FROM tab0 AS cor0
----
-132
-7389
-878

skipif mysql # not compatible
query I rowsort label-4341
SELECT - CAST ( col2 AS INTEGER ) * + col0 + - col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT + + col2 + + 38 * col1 AS col2 FROM tab1 AS cor0
----
1042
437
590

query I rowsort
SELECT + 91 AS col0 FROM tab0 cor0
----
91
91
91

query I rowsort
SELECT + 10 * col2 + col1 AS col1 FROM tab0 AS cor0
----
107
416
911

query I rowsort
SELECT DISTINCT - - col1 * col0 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT col1 * + col0 + - col0 * + col1 * - col2 + + col0 FROM tab2 AS cor0
----
124332
52456
6083

query I rowsort
SELECT + 2 + + col0 FROM tab0 AS cor0
----
26
37
91

query I rowsort
SELECT ALL - - col1 - 2 AS col0 FROM tab0 AS cor0
----
84
89
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-4349
SELECT 94 DIV - 13 + - col1 FROM tab2 cor0
----
-24
-38
-66

skipif mysql # not compatible
query I rowsort label-4349
SELECT 94 / - 13 + - col1 FROM tab2 cor0
----
-24
-38
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 6 * 85 + - col2 * - col1 * col0 col2 FROM tab0 cor0
----
3905
664628
68622

query I rowsort
SELECT ( ( - col1 ) ) * col1 AS col1 FROM tab1
----
-100
-169
-676

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 2e3240e8d3c0c7c6ff427f9572ba362d

query I rowsort
SELECT col0 * 69 + - cor0.col1 + + 29 AS col2 FROM tab0 AS cor0
----
1599
2347
6079

onlyif mysql # use DIV operator for integer division
query I rowsort label-4354
SELECT - col0 DIV + col2 + - col0 * - 67 AS col0 FROM tab1 AS cor0
----
201
4287
5360

skipif mysql # not compatible
query I rowsort label-4354
SELECT - col0 / + col2 + - col0 * - 67 AS col0 FROM tab1 AS cor0
----
201
4287
5360

query I rowsort
SELECT + + col1 + + col2 + ( - col1 ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
-1945
-3297
-7926

onlyif mysql # use DIV operator for integer division
query I rowsort label-4356
SELECT - - 96 DIV + col0 FROM tab1 AS cor0
----
1
1
32

skipif mysql # not compatible
query I rowsort label-4356
SELECT - - 96 / + col0 FROM tab1 AS cor0
----
1
1
32

query I rowsort
SELECT - col2 + col1 * 21 + + col2 * - col2 FROM tab0 AS cor0
----
-4895
2035
684

query I rowsort
SELECT - col1 * - tab0.col1 FROM tab0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col0 AS REAL ) * col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT - 96 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT DISTINCT col2 * 2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL - col2 + col0 * - col1 * cor0.col0 FROM tab0 AS cor0
----
-118826
-49569
-720893

query I rowsort
SELECT DISTINCT col2 + + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4364
SELECT ALL cor0.col0 * - CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4364
SELECT ALL cor0.col0 * - CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * - ( - 10 ) FROM tab1 cor0
----
540
570
960

query I rowsort
SELECT ALL + col2 + ( + col1 ) + cor0.col2 AS col1 FROM tab0 AS cor0
----
152
255
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 - - ( + col2 ) col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + - col0 * ( + col1 ) AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + 69 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
69

query I rowsort
SELECT DISTINCT + ( + col2 ) AS col0 FROM tab2
----
26
27
38

query I rowsort
SELECT - 31 FROM tab0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT + 17 FROM tab1
----
17

query I rowsort
SELECT DISTINCT 35 - - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
115
38
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + - col2 col1 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4375
SELECT ALL + col0 DIV + CAST( + col0 AS SIGNED ) + - cor0.col1 * - 57 AS col2 FROM tab2 AS cor0
----
1768
3364
970

skipif mysql # not compatible
query I rowsort label-4375
SELECT ALL + col0 / + CAST ( + col0 AS INTEGER ) + - cor0.col1 * - 57 AS col2 FROM tab2 AS cor0
----
1768
3364
970

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - 90 col2 FROM tab2 AS cor0
----
-630
-7020
-7110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + 13 + col0 FROM tab1 AS cor0
----
16
77
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4379
SELECT 68 DIV cor0.col2 + - col1 FROM tab0 AS cor0
----
-29
-84
-91

skipif mysql # not compatible
query I rowsort label-4379
SELECT 68 / cor0.col2 + - col1 FROM tab0 AS cor0
----
-29
-84
-91

query I rowsort
SELECT col1 + - col2 * col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT + col0 * - col1 * 71 + - col2 FROM tab0
----
-146577
-241046
-575111

query I rowsort
SELECT DISTINCT - col0 * - col1 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab1
----
97

query I rowsort
SELECT DISTINCT - col0 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4385
SELECT + col0 DIV ( col2 ) FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4385
SELECT + col0 / ( col2 ) FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT DISTINCT + + cor0.col0 * col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4387
SELECT col2 DIV 90 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4387
SELECT col2 / 90 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT + col1 * 79 * col1 FROM tab1 AS cor0
----
13351
53404
7900

query I rowsort
SELECT ALL + - col1 * ( col1 ) AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + col2 + + ( 77 ) FROM tab0 AS cor0
----
110
159
78

query I rowsort
SELECT DISTINCT col0 + + ( + 21 ) * - col0 FROM tab1 AS cor0
----
-1280
-1600
-60

query I rowsort
SELECT ALL - col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4393
SELECT ALL - col1 DIV 29 + + cor0.col0 FROM tab0 cor0
----
22
32
86

skipif mysql # not compatible
query I rowsort label-4393
SELECT ALL - col1 / 29 + + cor0.col0 FROM tab0 cor0
----
22
32
86

query I rowsort
SELECT DISTINCT - col1 * + col1 AS col0 FROM tab1
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-4395
SELECT ALL col1 DIV + col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4395
SELECT ALL col1 / + col2 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT tab0.col1 * + col2 * - col2 + col0 AS col0 FROM tab0
----
-611795
-62
-93630

onlyif mysql # use DIV operator for integer division
query I rowsort label-4397
SELECT ALL + 85 DIV + col1 AS col1 FROM tab1
----
3
6
8

skipif mysql # not compatible
query I rowsort label-4397
SELECT ALL + 85 / + col1 AS col1 FROM tab1
----
3
6
8

query I rowsort
SELECT cor1.col1 * - 43 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to dc44bd51f61ac33a2a18a7ecd8df1c1c

query I rowsort
SELECT ALL + tab2.col2 * 39 FROM tab2, tab0 AS cor0
----
9 values hashing to 27777aa64a5558a690b2738e24f7749f

query I rowsort
SELECT + 23 AS col2 FROM tab1
----
23
23
23

query I rowsort
SELECT - col1 * 75 + - col0 AS col2 FROM tab0 AS cor0
----
-6474
-6914
-7310

onlyif mysql # use DIV operator for integer division
query I rowsort label-4402
SELECT DISTINCT col2 DIV 86 - - cor0.col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4402
SELECT DISTINCT col2 / 86 - - cor0.col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + - 41 + + col1 FROM tab2 AS cor0
----
-10
-24
18

query I rowsort
SELECT ALL - 90 * col1 AS col0 FROM tab0 AS cor0
----
-7740
-8190
-8730

query I rowsort
SELECT ( - col0 ) - col0 * col1 FROM tab1 cor0
----
-1120
-704
-81

query I rowsort
SELECT - 49 * col2 AS col1 FROM tab1 cor0
----
-2646
-2793
-4704

query I rowsort
SELECT + 99 - col2 FROM tab0 AS cor0
----
17
66
98

query I rowsort
SELECT 7 + - 77 FROM tab2, tab1 AS cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4409
SELECT ALL - CAST( NULL AS SIGNED ) + col1 + + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4409
SELECT ALL - CAST ( NULL AS INTEGER ) + col1 + + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4410
SELECT + col1 DIV col0 col2 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4410
SELECT + col1 / col0 col2 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 19 col2 FROM tab2 cor0
----
-12
59
60

query I rowsort
SELECT - + 19 + - col1 AS col0 FROM tab0 AS cor0
----
-105
-110
-116

onlyif mysql # use DIV operator for integer division
query I rowsort label-4413
SELECT + cor0.col2 * col2 + + col1 * 22 DIV + 85 col0 FROM tab2 cor0
----
1448
691
737

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4413
SELECT + cor0.col2 * col2 + + col1 * 22 / + 85 col0 FROM tab2 cor0
----
1448
691
737

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab1, tab2 cor1
----
3645 values hashing to 6193516da5556fc054f35e0d2f4e5372

query I rowsort
SELECT DISTINCT - 66 + 82 AS col2 FROM tab1
----
16

query I rowsort
SELECT DISTINCT col1 * col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col1 * col2 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - col0 + col1 * - col2 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT 23 - + ( - tab0.col0 ) * + ( col0 ) AS col0 FROM tab0
----
1248
599
7944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 col2 FROM tab1, tab0 cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT DISTINCT 76 FROM tab2, tab0, tab2 AS cor0
----
76

query I rowsort
SELECT DISTINCT 62 + + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-6022
-6179
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4423
SELECT DISTINCT + col0 * col1 + CAST( NULL AS SIGNED ) * - col2 / col0 + + col2 AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4423
SELECT DISTINCT + col0 * col1 + CAST ( NULL AS INTEGER ) * - col2 / col0 + + col2 AS col0 FROM tab1 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4424
SELECT ALL - + col0 DIV cor0.col1 - 76 FROM tab0 cor0
----
-76
-76
-76

skipif mysql # not compatible
query I rowsort label-4424
SELECT ALL - + col0 / cor0.col1 - 76 FROM tab0 cor0
----
-76
-76
-76

query I rowsort
SELECT + col2 * + col2 + 28 * ( col2 * - col1 ) FROM tab2 cor0
----
-16644
-22707
-42276

query I rowsort
SELECT ALL + + 87 * + col0 AS col2 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT DISTINCT cor0.col0 + col1 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - cor0.col2 - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4429
SELECT + col2 * - col0 + - ( col2 ) DIV col1 AS col1 FROM tab2 cor0
----
-189
-2028
-3004

skipif mysql # not compatible
query I rowsort label-4429
SELECT + col2 * - col0 + - ( col2 ) / col1 AS col1 FROM tab2 cor0
----
-189
-2028
-3004

onlyif mysql # use DIV operator for integer division
query I rowsort label-4430
SELECT ALL col0 + tab2.col1 * - col1 DIV - col1 AS col1 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-4430
SELECT ALL col0 + tab2.col1 * - col1 / - col1 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + col1 + col2 + - col0 * col1 AS col1 FROM tab1
----
-573
-931
2

query I rowsort
SELECT ALL + cor0.col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4433
SELECT ALL CAST( NULL AS SIGNED ) + + col2 * + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4433
SELECT ALL CAST ( NULL AS INTEGER ) + + col2 * + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab1.col0 + col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL - ( col1 ) * col0 + ( col0 ) FROM tab2
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-4436
SELECT ALL ( + col1 ) DIV - col1 + - 6 + - 53 AS col1 FROM tab2
----
-60
-60
-60

skipif mysql # not compatible
query I rowsort label-4436
SELECT ALL ( + col1 ) / - col1 + - 6 + - 53 AS col1 FROM tab2
----
-60
-60
-60

query I rowsort
SELECT ALL - 18 FROM tab2
----
-18
-18
-18

query I rowsort
SELECT ALL 95 * + col2 FROM tab1
----
5130
5415
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-4439
SELECT + col2 DIV + tab0.col2 + + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4439
SELECT + col2 / + tab0.col2 + + col0 FROM tab0
----
25
36
90

query I rowsort
SELECT ALL - col1 * + col0 * + col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT ALL col0 + col1 * - col2 * col2 + + col0 AS col1 FROM tab2 AS cor0
----
-22585
-24390
-39728

query I rowsort
SELECT ALL - + col2 * col2 + - cor0.col2 * + col2 FROM tab0 AS cor0
----
-13448
-2
-2178

query I rowsort
SELECT DISTINCT + col0 + + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + - col2 * + col1 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col2 * - col2 + + col0 * - ( + col1 + cor0.col1 ) * + col0 AS col2 FROM tab2 AS cor0
----
-210750
-2309
-717236

query I rowsort
SELECT DISTINCT - col2 - col1 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - + 8 + - col0 * col1 FROM tab0 AS cor0
----
-2072
-3403
-8107

query I rowsort
SELECT - col2 * col1 + col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - col0 * cor0.col0 + - 46 * - 57 + col2 FROM tab2 AS cor0
----
-3436
-3581
2600

onlyif mysql # use DIV operator for integer division
query I rowsort label-4450
SELECT DISTINCT - 16 * + col1 DIV + col1 FROM tab0 AS cor0
----
-16

skipif mysql # not compatible
query I rowsort label-4450
SELECT DISTINCT - 16 * + col1 / + col1 FROM tab0 AS cor0
----
-16

query I rowsort
SELECT ALL 80 AS col0 FROM tab0 cor0
----
80
80
80

query I rowsort
SELECT - + col2 * + col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT 29 FROM tab2, tab1 AS cor0
----
29

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 ( 92 ) - col2 AS col1 FROM tab1 cor0
----
-4
35
38

query I rowsort
SELECT ALL + - 82 AS col1 FROM tab2 AS cor0
----
-82
-82
-82

query I rowsort
SELECT ALL + + 65 + cor0.col2 FROM tab1 AS cor0
----
119
122
161

query I rowsort
SELECT ALL - col1 + + 6 FROM tab0 AS cor0
----
-80
-85
-91

query I rowsort
SELECT + 76 + col0 AS col0 FROM tab2 AS cor0
----
154
155
83

query I rowsort
SELECT DISTINCT + - col1 - - cor0.col1 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4461
SELECT - col1 DIV 92 - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-4461
SELECT - col1 / 92 - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - 57 + 79 FROM tab2, tab0 AS cor0
----
22

query I rowsort
SELECT + cor0.col2 * + col1 + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT col0 * col1 - - col0 * + col2 FROM tab1 cor0
----
240
4288
8720

query I rowsort
SELECT DISTINCT col1 + + ( + col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - ( col1 ) AS col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT + 17 * - 26 - col2 FROM tab1 AS cor0
----
-496
-499
-538

query I rowsort
SELECT DISTINCT - col0 * col1 + col1 * col0 FROM tab2 cor0
----
0

query I rowsort
SELECT DISTINCT + cor0.col1 * - ( + ( + col2 ) ) + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT + - col2 * col0 + 63 AS col2 FROM tab0 cor0
----
-7235
-729
28

query I rowsort
SELECT DISTINCT - + col1 + col1 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - col2 + - col0 + - 40 FROM tab2 AS cor0
----
-144
-157
-74

query I rowsort
SELECT + col2 + + 92 FROM tab0 AS cor0
----
125
174
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4474
SELECT col1 + - ( + cor0.col1 + - cor0.col1 ) / + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4474
SELECT col1 + - ( + cor0.col1 + - cor0.col1 ) / + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 + + cor0.col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT + cor0.col2 * col1 + + col0 * col2 FROM tab1 cor0
----
1566
4218
8928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4477
SELECT ALL cor0.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4477
SELECT ALL cor0.col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 - ( 15 ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
-1424
-384
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4479
SELECT ALL col1 / CAST( NULL AS DECIMAL ) + + ( - col0 + + col2 ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4479
SELECT ALL col1 / CAST ( NULL AS REAL ) + + ( - col0 + + col2 ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 65 * col1 + - ( + ( - col2 ) ) * tab0.col1 * tab0.col0 + col1 * col2 AS col2 FROM tab0
----
677495
76540
9797

query I rowsort
SELECT DISTINCT 66 FROM tab0, tab2, tab0 AS cor0
----
66

query I rowsort
SELECT + cor0.col1 + 55 * - 46 * - col2 FROM tab0 AS cor0
----
207551
2627
83576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4483
SELECT + - col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4483
SELECT + - col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + ( 65 * + col1 ) col2 FROM tab0
----
5566
5826
6270

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4485
SELECT - col2 + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4485
SELECT - col2 + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4486
SELECT + + 57 DIV col2 FROM tab0 AS cor0
----
0
1
57

skipif mysql # not compatible
query I rowsort label-4486
SELECT + + 57 / col2 FROM tab0 AS cor0
----
0
1
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4487
SELECT ALL col1 DIV - col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4487
SELECT ALL col1 / - col2 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT 85 - - tab0.col1 FROM tab0
----
171
176
182

query I rowsort
SELECT DISTINCT - tab2.col0 * + col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - ( - 37 ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4491
SELECT col2 + col1 + - CAST( col0 * - col0 AS SIGNED ) FROM tab0
----
1323
695
8094

skipif mysql # not compatible
query I rowsort label-4491
SELECT col2 + col1 + - CAST ( col0 * - col0 AS INTEGER ) FROM tab0
----
1323
695
8094

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 22 + col2 * - col1 col1 FROM tab0
----
-2816
-7440
-75

query I rowsort
SELECT DISTINCT + + col2 + - col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - - col1 + + col1 * + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT ALL - ( - col2 ) + ( - col0 ) AS col0 FROM tab0 cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4496
SELECT ALL - cor0.col0 * col1 + 21 DIV - 11 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-4496
SELECT ALL - cor0.col0 * col1 + 21 / - 11 FROM tab1 AS cor0
----
-1041
-641
-79

query I rowsort
SELECT + - col1 * - col2 + - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT + + 3 * + col1 * - ( 56 ) + + col0 + col2 AS col0 FROM tab0 AS cor0
----
-14391
-15117
-16260

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 * - col1 col0 FROM tab1 AS cor0
----
1222
2444
940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 28 + + col0 col1 FROM tab2 AS cor0
----
-21
50
51

query I rowsort
SELECT DISTINCT - 84 * 68 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-5712

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4503
SELECT col0 * CAST( NULL AS DECIMAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4503
SELECT col0 * CAST ( NULL AS REAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4504
SELECT col0 * col2 DIV ( col0 ) FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4504
SELECT col0 * col2 / ( col0 ) FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * 63 col2 FROM tab2
----
-1638
-1701
-2394

query I rowsort
SELECT + cor0.col1 - + cor0.col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4507
SELECT + col0 * CAST( NULL AS SIGNED ) + + col1 / col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4507
SELECT + col0 * CAST ( NULL AS INTEGER ) + + col1 / col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * cor0.col2 + - col2 * + cor0.col0 FROM tab2 AS cor0
----
-378
-4056
-6004

query I rowsort
SELECT DISTINCT + 25 * - 89 FROM tab2
----
-2225

query I rowsort
SELECT ALL 18 FROM tab0
----
18
18
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-4511
SELECT ALL - col0 DIV + ( col0 ) + + col0 AS col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-4511
SELECT ALL - col0 / + ( col0 ) + + col0 AS col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL - col1 * cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - col1 * + 89 FROM tab2
----
-1513
-2759
-5251

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-4516
SELECT - + col1 DIV col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4516
SELECT - + col1 / col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 10 AS col2 FROM tab1 AS cor0
----
-10

query I rowsort
SELECT - col1 * + 44 AS col1 FROM tab1 AS cor0
----
-1144
-440
-572

onlyif mysql # use DIV operator for integer division
query I rowsort label-4519
SELECT 3 + - col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-4519
SELECT 3 + - col1 / - col1 AS col2 FROM tab1 AS cor0
----
4
4
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4520
SELECT ALL col1 + - tab1.col1 * col2 DIV col1 + ( 65 ) * - col2 * - col1 AS col1 FROM tab1
----
37003
81037
91232

skipif mysql # not compatible
query I rowsort label-4520
SELECT ALL col1 + - tab1.col1 * col2 / col1 + ( 65 ) * - col2 * - col1 AS col1 FROM tab1
----
37003
81037
91232

onlyif mysql # use DIV operator for integer division
query I rowsort label-4521
SELECT ALL + col1 DIV - col0 + col1 AS col2 FROM tab0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-4521
SELECT ALL + col1 / - col0 + col1 AS col2 FROM tab0
----
83
90
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4522
SELECT ALL col1 + CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4522
SELECT ALL col1 + CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT + + col1 + - col2 - - col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT DISTINCT - 57 + col1 FROM tab1 AS cor0
----
-31
-44
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-4527
SELECT + col1 + col1 DIV + cor0.col0 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-4527
SELECT + col1 + col1 / + cor0.col0 FROM tab1 AS cor0
----
10
13
34

query I rowsort
SELECT ALL + 61 + col2 FROM tab0 AS cor0
----
143
62
94

query I rowsort
SELECT ALL + ( 6 ) FROM tab2 AS cor0
----
6
6
6

query I rowsort
SELECT - + col2 + col0 * - col0 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT + 5 + - col0 AS col0 FROM tab0 AS cor0
----
-19
-30
-84

query I rowsort
SELECT + tab1.col1 * + ( 62 * + tab1.col1 + col2 ) AS col0 FROM tab1
----
11726
43316
6770

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4533
SELECT ALL tab0.col2 * - ( + col1 + col2 ) * + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4533
SELECT ALL tab0.col2 * - ( + col1 + col2 ) * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * ( 55 ) AS col2 FROM tab1
----
165
3520
4400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 12 col1 FROM tab0
----
-12
-396
-984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4536
SELECT CAST( + col0 AS SIGNED ) + cor0.col0 * 72 AS col0 FROM tab1 AS cor0
----
219
4672
5840

skipif mysql # not compatible
query I rowsort label-4536
SELECT CAST ( + col0 AS INTEGER ) + cor0.col0 * 72 AS col0 FROM tab1 AS cor0
----
219
4672
5840

query I rowsort
SELECT ALL - ( 4 ) AS col2 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL - col2 + col1 + col0 AS col1 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT - ( - 92 ) + - col1 FROM tab1 cor0
----
66
79
82

query I rowsort
SELECT + cor0.col0 + - 40 AS col0 FROM tab0 AS cor0
----
-16
-5
49

query I rowsort
SELECT DISTINCT - 21 FROM tab1 AS cor0
----
-21

onlyif mysql # use DIV operator for integer division
query I rowsort label-4542
SELECT + col0 DIV col1 - + 16 FROM tab0 AS cor0
----
-16
-16
-16

skipif mysql # not compatible
query I rowsort label-4542
SELECT + col0 / col1 - + 16 FROM tab0 AS cor0
----
-16
-16
-16

query I rowsort
SELECT cor0.col2 + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - + col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - ( col0 ) + col2 * - col1 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL 44 * col0 + + 99 * col2 AS col0 FROM tab0 AS cor0
----
12034
1639
4323

query I rowsort
SELECT 57 + - col2 AS col1 FROM tab0
----
-25
24
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-4548
SELECT col0 DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-4548
SELECT col0 / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT ALL + 56 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT DISTINCT col2 + ( col0 ) + col1 AS col0 FROM tab0 AS cor0
----
133
143
262

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - tab2.col0 AS col0 FROM tab2, tab1 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + cor0.col1 + + 92 * ( col0 ) AS col0 FROM tab2 AS cor0
----
675
7235
7285

query I rowsort
SELECT DISTINCT col1 + col0 * - col1 - col0 * - col0 AS col2 FROM tab2 AS cor0
----
-137
1541
4915

query I rowsort
SELECT DISTINCT cor0.col0 - 22 FROM tab0 AS cor0
----
13
2
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 53 + - col2 col2 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT ALL - + col1 * col1 AS col0 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + col0 * col1 - - col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + col1 + + col0 * col0 AS col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT col2 * col1 - - 55 * col0 AS col0 FROM tab0 AS cor0
----
12357
2022
4158

query I rowsort
SELECT ALL + cor0.col1 + + 31 FROM tab1 AS cor0
----
41
44
57

query I rowsort
SELECT DISTINCT - + col2 * col2 * 54 FROM tab0 AS cor0
----
-363096
-54
-58806

query I rowsort
SELECT col1 - 58 * - 29 FROM tab0 AS cor0
----
1768
1773
1779

query I rowsort
SELECT ( col1 ) * ( col0 ) + col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT + 72 AS col2 FROM tab2
----
72

query I rowsort
SELECT DISTINCT col1 * 29 FROM tab0 AS cor0
----
2494
2639
2813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4567
SELECT ALL - - col2 * CAST( - 88 AS SIGNED ) + col1 FROM tab2 AS cor0
----
-2229
-2345
-3327

skipif mysql # not compatible
query I rowsort label-4567
SELECT ALL - - col2 * CAST ( - 88 AS INTEGER ) + col1 FROM tab2 AS cor0
----
-2229
-2345
-3327

query I rowsort
SELECT + col0 * 68 * 18 + + col0 FROM tab0 AS cor0
----
109025
29400
42875

query I rowsort
SELECT DISTINCT col1 * col2 * 50 AS col2 FROM tab1
----
28500
62400
70200

onlyif mysql # use DIV operator for integer division
query I rowsort label-4570
SELECT ALL col1 + + ( - col2 ) DIV + tab0.col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4570
SELECT ALL col1 + + ( - col2 ) / + tab0.col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT col0 * - 17 + + col2 * + tab2.col0 AS col2 FROM tab2
----
1659
70
702

query I rowsort
SELECT DISTINCT - + col2 * - col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + 29 + + col2 * col2 col2 FROM tab1 AS cor0
----
1350
1596
6432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4574
SELECT DISTINCT + + col1 * + CAST( NULL AS SIGNED ) + + col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4574
SELECT DISTINCT + + col1 * + CAST ( NULL AS INTEGER ) + + col2 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 * - 57 FROM tab2 AS cor0
----
-1482
-1539
-2166

query I rowsort
SELECT col0 * 32 FROM tab2
----
224
2496
2528

query I rowsort
SELECT DISTINCT + col0 + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT + tab2.col1 + 23 AS col2 FROM tab2
----
40
54
82

query I rowsort
SELECT ALL + cor0.col0 * col0 - + col2 * col1 AS col0 FROM tab2 AS cor0
----
-788
4550
5595

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4581
SELECT ALL + - 33 DIV + col0 AS col1 FROM tab1 AS cor0
----
-11
0
0

skipif mysql # not compatible
query I rowsort label-4581
SELECT ALL + - 33 / + col0 AS col1 FROM tab1 AS cor0
----
-11
0
0

query I rowsort
SELECT ( ( col2 ) ) * - col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ( + col0 ) * + col1 + col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT - col1 * col1 AS col0 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - cor0.col0 * - 33 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
2112
2640
99

query I rowsort
SELECT + 87 * col0 + + col0 * 27 FROM tab2
----
798
8892
9006

query I rowsort
SELECT ALL 53 AS col1 FROM tab1
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 66 + cor0.col0 * ( col1 ) + - col2 col1 FROM tab2 AS cor0
----
1371
256
4642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col0 FROM tab1 AS cor0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - - col0 + col1 * + 99 AS col0 FROM tab2 cor0
----
1762
3076
5919

onlyif mysql # use DIV operator for integer division
query I rowsort label-4592
SELECT ALL - col0 * ( - col0 ) + - cor0.col2 DIV + col2 col2 FROM tab0 AS cor0
----
1224
575
7920

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4592
SELECT ALL - col0 * ( - col0 ) + - cor0.col2 / + col2 col2 FROM tab0 AS cor0
----
1224
575
7920

query I rowsort
SELECT DISTINCT 97 AS col2 FROM tab2 cor0
----
97

query I rowsort
SELECT + - 19 AS col1 FROM tab1 AS cor0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - 22 AS col0 FROM tab1 AS cor0
----
-22

query I rowsort
SELECT ALL - 90 AS col1 FROM tab1 AS cor0
----
-90
-90
-90

query I rowsort
SELECT - cor0.col0 + 21 FROM tab0 AS cor0
----
-14
-3
-68

query I rowsort
SELECT tab1.col0 * - col2 * col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT col0 + col1 AS col0 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT + ( - col0 ) * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4601
SELECT 75 DIV - ( col1 ) AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4601
SELECT 75 / - ( col1 ) AS col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT - col2 + + col0 * col0 AS col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT ALL - - col2 * 78 AS col0 FROM tab2 cor0
----
2028
2106
2964

query I rowsort
SELECT col2 * - 28 FROM tab1 cor0
----
-1512
-1596
-2688

onlyif mysql # use DIV operator for integer division
query I rowsort label-4605
SELECT ALL + + 20 + 98 DIV col0 AS col0 FROM tab0 AS cor0
----
21
22
24

skipif mysql # not compatible
query I rowsort label-4605
SELECT ALL + + 20 + 98 / col0 AS col0 FROM tab0 AS cor0
----
21
22
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( + col2 ) col0 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 99 col1 FROM tab2 AS cor0
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 30 + cor0.col2 * col1 col2 FROM tab2 AS cor0
----
1564
676
867

query I rowsort
SELECT - cor0.col1 - col0 FROM tab1 AS cor0
----
-29
-74
-93

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 3e8bd9634a3f5947d8becd5f5799bb7f

query I rowsort
SELECT DISTINCT - col2 * col0 + col1 * col1 AS col0 FROM tab2
----
-2713
1453
772

onlyif mysql # use DIV operator for integer division
query I rowsort label-4612
SELECT DISTINCT + tab2.col2 + + col0 DIV col0 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-4612
SELECT DISTINCT + tab2.col2 + + col0 / col0 FROM tab2
----
27
28
39

query I rowsort
SELECT - col0 * - col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col1 col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4616
SELECT ALL + cor0.col1 DIV + col2 AS col2 FROM tab0 cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4616
SELECT ALL + cor0.col1 / + col2 AS col2 FROM tab0 cor0
----
1
2
97

query I rowsort
SELECT + col1 * - col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - col2 * + col1 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT + + col0 * 63 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT DISTINCT - 94 AS col1 FROM tab1, tab0 AS cor0
----
-94

query I rowsort
SELECT DISTINCT + 86 * col0 + ( col1 ) AS col0 FROM tab2
----
633
6767
6811

query I rowsort
SELECT ALL col0 + + 42 FROM tab1 AS cor0
----
106
122
45

query I rowsort
SELECT + col2 * + 72 FROM tab2 AS cor0
----
1872
1944
2736

onlyif mysql # use DIV operator for integer division
query I rowsort label-4624
SELECT col2 DIV - ( - ( col1 ) * 51 ) + tab1.col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4624
SELECT col2 / - ( - ( col1 ) * 51 ) + tab1.col0 FROM tab1
----
3
64
80

query I rowsort
SELECT + + 53 * - col0 FROM tab2 cor0
----
-371
-4134
-4187

onlyif mysql # use DIV operator for integer division
query I rowsort label-4626
SELECT ALL col1 DIV - ( - col2 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4626
SELECT ALL col1 / - ( - col2 ) FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4627
SELECT + col2 + + CAST( - col0 AS SIGNED ) col0 FROM tab1
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4627
SELECT + col2 + + CAST ( - col0 AS INTEGER ) col0 FROM tab1
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4628
SELECT col1 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4628
SELECT col1 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4629
SELECT - tab0.col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4629
SELECT - tab0.col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ( 3 ) + col1 * col2 FROM tab2 cor0
----
1537
649
840

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT - 65 AS col0 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT ALL ( - col1 + + col2 ) FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - - ( - col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + ( - 55 + col2 ) FROM tab2
----
-17
-28
-29

query I rowsort
SELECT DISTINCT col0 * - col1 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL col2 * col1 * col1 AS col2 FROM tab1
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-4638
SELECT DISTINCT - col2 DIV - col2 AS col0 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-4638
SELECT DISTINCT - col2 / - col2 AS col0 FROM tab0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4639
SELECT ALL - col2 + - col2 DIV ( col0 ) AS col0 FROM tab2
----
-26
-30
-38

skipif mysql # not compatible
query I rowsort label-4639
SELECT ALL - col2 + - col2 / ( col0 ) AS col0 FROM tab2
----
-26
-30
-38

query I rowsort
SELECT DISTINCT tab0.col1 + + tab0.col2 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 * - tab1.col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT cor0.col0 - + cor0.col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL cor0.col0 + col1 * col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab1 AS cor0
----
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4646
SELECT - col0 + col1 / + ( 24 ) + - col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4646
SELECT - col0 + col1 / + ( 24 ) + - col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4647
SELECT + col0 + - 47 DIV - col0 FROM tab2 AS cor0
----
13
78
79

skipif mysql # not compatible
query I rowsort label-4647
SELECT + col0 + - 47 / - col0 FROM tab2 AS cor0
----
13
78
79

query I rowsort
SELECT ALL - col2 * ( col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - 56 FROM tab1, tab1 AS cor0
----
-56

query I rowsort
SELECT + - cor0.col0 * cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a5747c01cc59c7dd6ac59c9369299556

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4651
SELECT ALL + cor0.col2 / - CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4651
SELECT ALL + cor0.col2 / - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4652
SELECT + col0 + + CAST( - ( col0 ) AS SIGNED ) AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4652
SELECT + col0 + + CAST ( - ( col0 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + col0 + col2 + 7 FROM tab2 AS cor0
----
111
124
41

query I rowsort
SELECT + col0 - ( + ( - col1 ) ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - col0 - 69 FROM tab1 AS cor0
----
-133
-149
-72

query I rowsort
SELECT ALL - col0 * + col1 + - col2 * + col1 AS col0 FROM tab0 cor0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT + tab0.col0 FROM tab0, tab2, tab1 AS cor0
----
24
35
89

query I rowsort
SELECT + col0 + - col2 AS col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT col2 * + tab2.col1 + col2 AS col1 FROM tab2
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4660
SELECT DISTINCT - col2 * col1 + + 71 DIV - col0 AS col0 FROM tab0 cor0
----
-2840
-7462
-99

skipif mysql # not compatible
query I rowsort label-4660
SELECT DISTINCT - col2 * col1 + + 71 / - col0 AS col0 FROM tab0 cor0
----
-2840
-7462
-99

query I rowsort
SELECT ALL col0 * col0 + col1 * cor0.col2 FROM tab0 cor0
----
1322
15383
3414

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4662
SELECT col1 + CAST( ( + col0 ) AS SIGNED ) FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-4662
SELECT col1 + CAST ( ( + col0 ) AS INTEGER ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + 69 * + col2 FROM tab0
----
2277
5658
69

query I rowsort
SELECT ALL + - cor0.col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 + - col2 * col2 col0 FROM tab1
----
-2874
-3207
-9174

query I rowsort
SELECT + - col2 * 9 AS col0 FROM tab2 AS cor0
----
-234
-243
-342

query I rowsort
SELECT ALL ( + tab2.col2 ) * col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT + col2 + cor0.col2 * + 15 FROM tab0 AS cor0
----
1312
16
528

query I rowsort
SELECT cor0.col1 * - col0 * col0 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + + cor0.col2 * - col0 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - cor0.col0 * col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4672
SELECT ALL + - col2 + col2 * 44 DIV 2 AS col1 FROM tab2 AS cor0
----
546
567
798

skipif mysql # not compatible
query I rowsort label-4672
SELECT ALL + - col2 + col2 * 44 / 2 AS col1 FROM tab2 AS cor0
----
546
567
798

onlyif mysql # use DIV operator for integer division
query I rowsort label-4673
SELECT DISTINCT + - ( cor0.col0 ) DIV cor0.col0 + - col0 * col0 + 0 DIV + col1 AS col2 FROM tab2 AS cor0
----
-50
-6085
-6242

skipif mysql # not compatible
query I rowsort label-4673
SELECT DISTINCT + - ( cor0.col0 ) / cor0.col0 + - col0 * col0 + 0 / + col1 AS col2 FROM tab2 AS cor0
----
-50
-6085
-6242

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4674
SELECT - cor0.col0 + col1 * - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4674
SELECT - cor0.col0 + col1 * - CAST ( NULL AS INTEGER ) col1 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 DISTINCT 76 FROM tab2 AS cor0
----
76

query I rowsort
SELECT + - 8 FROM tab0 AS cor0
----
-8
-8
-8

query I rowsort
SELECT ALL + - 14 AS col1 FROM tab2 cor0
----
-14
-14
-14

query I rowsort
SELECT ALL - 58 * + col1 FROM tab0 AS cor0
----
-4988
-5278
-5626

query I rowsort
SELECT + col1 + + col2 * 94 FROM tab2 AS cor0
----
2503
2569
3589

onlyif mysql # use DIV operator for integer division
query I rowsort label-4681
SELECT DISTINCT - tab0.col0 DIV + col1 AS col0 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4681
SELECT DISTINCT - tab0.col0 / + col1 AS col0 FROM tab0
----
0

query I rowsort
SELECT ALL + 67 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col2 FROM tab2 AS cor0
----
-74
-74
-74

query I rowsort
SELECT DISTINCT - tab1.col2 * - col1 AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4685
SELECT ALL ( tab2.col1 ) * CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4685
SELECT ALL ( tab2.col1 ) * CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( tab0.col2 ) AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT - - col0 + + col2 * ( cor0.col0 ) FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ( col0 ) + 27 * cor0.col2 FROM tab1 AS cor0
----
1461
1603
2672

query I rowsort
SELECT ALL + + 80 FROM tab2 cor0
----
80
80
80

query I rowsort
SELECT ALL + - col0 * - col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col2 * + col0 + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT + + col2 * - 82 AS col2 FROM tab0 AS cor0
----
-2706
-6724
-82

query I rowsort
SELECT ALL - col1 + + 48 FROM tab2 cor0
----
-11
17
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4694
SELECT + col0 DIV col2 AS col0 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4694
SELECT + col0 / col2 AS col0 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT - col2 * col0 * - col1 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL col2 * + ( col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - cor0.col1 + 42 * - col1 AS col1 FROM tab1 AS cor0
----
-1118
-430
-559

onlyif mysql # use DIV operator for integer division
query I rowsort label-4698
SELECT ALL col2 DIV cor0.col1 col1 FROM tab2 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4698
SELECT ALL col2 / cor0.col1 col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT - - col2 * + ( col0 ) - cor0.col0 AS col1 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT + col2 + - col1 * - col1 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT cor0.col2 * + ( col0 ) * - col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + - col0 + - ( col2 ) AS col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT col1 * ( col0 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 * col2 + ( col0 ) * col0 * col0 AS col2 FROM tab2
----
1180
476086
493685

onlyif mysql # use DIV operator for integer division
query I rowsort label-4705
SELECT ALL + tab2.col0 DIV + tab2.col1 AS col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4705
SELECT ALL + tab2.col0 / + tab2.col1 AS col1 FROM tab2
----
0
1
4

query I rowsort
SELECT col0 - col0 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ( + col2 ) - 74 * col2 AS col1 FROM tab2
----
-1898
-1971
-2774

query I rowsort
SELECT DISTINCT 17 AS col1 FROM tab0
----
17

query I rowsort
SELECT DISTINCT + 66 FROM tab0 AS cor0
----
66

query I rowsort
SELECT - 25 * - col2 + col0 * - col1 FROM tab1 AS cor0
----
1272
1360
785

query I rowsort
SELECT ALL - ( + 94 ) AS col0 FROM tab2 AS cor0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT - + 72 * col1 + - col2 FROM tab2 cor0
----
-1262
-2259
-4274

query I rowsort
SELECT DISTINCT - + ( col2 ) * col1 + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT + col0 + - col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( - col2 ) + + col1 * col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-4716
SELECT DISTINCT col2 DIV 93 + + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4716
SELECT DISTINCT col2 / 93 + + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - cor0.col2 + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + col1 + 78 FROM tab1 AS cor0
----
104
88
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4719
SELECT + col2 * + col1 DIV - col1 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4719
SELECT + col2 * + col1 / - col1 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - + col1 * - col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + col0 * + col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + + col0 * - 7 FROM tab2 AS cor0
----
-49
-546
-553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - col0 * - ( col2 ) AS col1 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4725
SELECT DISTINCT col1 DIV tab0.col2 AS col0 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4725
SELECT DISTINCT col1 / tab0.col2 AS col0 FROM tab0
----
1
2
97

query I rowsort
SELECT + col2 * 36 FROM tab0
----
1188
2952
36

query I rowsort
SELECT DISTINCT + + col0 * - col2 + - cor0.col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT + - ( ( col2 ) ) * - cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4729
SELECT ALL CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4729
SELECT ALL CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT ( - col2 ) + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT - 99 + - col1 AS col0 FROM tab2 AS cor0
----
-116
-130
-158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4732
SELECT ALL + + CAST( NULL AS DECIMAL ) - ( col2 * col2 + col0 * col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4732
SELECT ALL + + CAST ( NULL AS REAL ) - ( col2 * col2 + col0 * col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 33 + col1 * col2 FROM tab1 AS cor0
----
1215
1371
537

query I rowsort
SELECT DISTINCT - - cor0.col0 * + col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-4735
SELECT DISTINCT + col1 DIV + 24 AS col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4735
SELECT DISTINCT + col1 / + 24 AS col2 FROM tab1 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4736
SELECT ALL - cor0.col1 * col0 + + col1 DIV col1 AS col0 FROM tab1 AS cor0
----
-1039
-639
-77

skipif mysql # not compatible
query I rowsort label-4736
SELECT ALL - cor0.col1 * col0 + + col1 / col1 AS col0 FROM tab1 AS cor0
----
-1039
-639
-77

query I rowsort
SELECT ALL - 46 * - tab2.col0 * - ( - tab2.col0 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 32ed80b3c301ec98df4195f2a0a5e548

query I rowsort
SELECT - col0 - col2 AS col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT + + col2 * cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + cor1.col2 - - cor1.col0 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 651bd87d0835272922fb073806a0b5a0

query I rowsort
SELECT ALL + 44 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT ALL + 76 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 10 col2 FROM tab2 AS cor0
----
10
10
10

query I rowsort
SELECT + cor0.col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT 4 + tab1.col1 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 4042193f7ce10e9930b5a208d8ae9eda

query I rowsort
SELECT + 81 AS col0 FROM tab1
----
81
81
81

query I rowsort
SELECT ALL cor1.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - ( 30 ) + - col0 AS col2 FROM tab1 AS cor0
----
-110
-33
-94

query I rowsort
SELECT - + ( - col2 ) + + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL 15 * - col0 AS col2 FROM tab1 AS cor0
----
-1200
-45
-960

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 51 AS col1 FROM tab1
----
51
51
51

query I rowsort
SELECT + - 5 AS col2 FROM tab2 AS cor0
----
-5
-5
-5

query I rowsort
SELECT + col0 + 67 FROM tab2 AS cor0
----
145
146
74

query I rowsort
SELECT ALL + 69 - col2 FROM tab0 AS cor0
----
-13
36
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( ( - col0 ) ) * ( col1 ) + - col1 * col1 col0 FROM tab0 AS cor0
----
-182
-5332
-6014

query I rowsort
SELECT + + 24 + col2 FROM tab1 AS cor0
----
120
78
81

query I rowsort
SELECT DISTINCT col0 * col1 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT cor1.col2 AS col1 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - 35 + cor0.col0 FROM tab1 AS cor0
----
-32
29
45

query I rowsort
SELECT + - col1 * col0 * - col2 + col1 * - cor0.col0 FROM tab2 AS cor0
----
115050
49691
5642

onlyif mysql # use DIV operator for integer division
query I rowsort label-4762
SELECT DISTINCT - col0 + - col2 + 98 DIV col1 AS col2 FROM tab0 AS cor0
----
-170
-35
-56

skipif mysql # not compatible
query I rowsort label-4762
SELECT DISTINCT - col0 + - col2 + 98 / col1 AS col2 FROM tab0 AS cor0
----
-170
-35
-56

query I rowsort
SELECT DISTINCT + + 73 FROM tab2 AS cor0
----
73

query I rowsort
SELECT ALL + + col1 * cor0.col2 * col0 AS col0 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4765
SELECT DISTINCT - cor0.col1 DIV - col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4765
SELECT DISTINCT - cor0.col1 / - col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 26 + + col0 AS col1 FROM tab2 cor0
----
-19
52
53

query I rowsort
SELECT DISTINCT 92 + - cor0.col1 FROM tab0 AS cor0
----
-5
1
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4768
SELECT - - 71 + - col2 + - ( 33 ) DIV + cor0.col2 FROM tab1 AS cor0
----
-25
14
17

skipif mysql # not compatible
query I rowsort label-4768
SELECT - - 71 + - col2 + - ( 33 ) / + cor0.col2 FROM tab1 AS cor0
----
-25
14
17

query I rowsort
SELECT col2 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4770
SELECT DISTINCT - col1 * col1 DIV + col1 col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4770
SELECT DISTINCT - col1 * col1 / + col1 col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - - col2 - + ( - col1 ) FROM tab0 AS cor0
----
119
173
98

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 0 + - col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col1 + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

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-4776
SELECT + col1 DIV + col1 + 55 AS col2 FROM tab0 AS cor0
----
56
56
56

skipif mysql # not compatible
query I rowsort label-4776
SELECT + col1 / + col1 + 55 AS col2 FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT - 39 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col1 * col0 col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4779
SELECT - col2 DIV col1 + + col1 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-4779
SELECT - col2 / col1 + + col1 col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4780
SELECT + + cor0.col1 + - CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-4780
SELECT + + cor0.col1 + - CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + + col2 * ( 22 ) + - col0 FROM tab2 AS cor0
----
494
587
757

query I rowsort
SELECT DISTINCT + 69 FROM tab2 cor0
----
69

query I rowsort
SELECT DISTINCT 39 FROM tab2, tab1 cor0
----
39

query I rowsort
SELECT + - 0 + - col2 * col1 * + 3 FROM tab1 AS cor0
----
-1710
-3744
-4212

query I rowsort
SELECT ( col2 ) * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 51 - - col0 FROM tab0 AS cor0
----
-16
-27
38

query I rowsort
SELECT 21 - col1 FROM tab1 cor0
----
-5
11
8

query I rowsort
SELECT + tab1.col1 * + col2 AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-4789
SELECT ALL + 6 DIV col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4789
SELECT ALL + 6 / col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + + col1 + col1 AS col2 FROM tab1 cor0
----
20
26
52

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab2 AS cor1, tab2 cor2
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query I rowsort
SELECT 32 * - tab0.col2 FROM tab0
----
-1056
-2624
-32

query I rowsort
SELECT DISTINCT + + tab1.col1 FROM tab1, tab2, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 83 * tab2.col1 + - 55 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 24ad991bd2309b71f6f0f35fc5d0d8fd

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 + col1 FROM tab0 cor0
----
-7310
-8190
-9312

query I rowsort
SELECT - 42 AS col1 FROM tab1 AS cor0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 + col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL + 92 + + col2 FROM tab0 AS cor0
----
125
174
93

query I rowsort
SELECT ALL - + cor0.col2 * + cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 86c8e75d83d283b29460c020ab5988af

query I rowsort
SELECT + col0 * 72 AS col0 FROM tab1 AS cor0
----
216
4608
5760

query I rowsort
SELECT ALL - col1 * col0 * col0 + - 46 * 31 AS col2 FROM tab0 AS cor0
----
-120251
-50962
-722237

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT 6 AS col2 FROM tab1
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4804
SELECT 6 * + col0 DIV - col0 FROM tab0
----
-6
-6
-6

skipif mysql # not compatible
query I rowsort label-4804
SELECT 6 * + col0 / - col0 FROM tab0
----
-6
-6
-6

query I rowsort
SELECT + col2 * + 62 AS col1 FROM tab2
----
1612
1674
2356

query I rowsort
SELECT ALL + ( - 68 ) - col1 AS col1 FROM tab1
----
-78
-81
-94

query I rowsort
SELECT DISTINCT col2 - - 13 FROM tab1
----
109
67
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4808
SELECT DISTINCT + cor0.col2 * + col2 + + CAST( + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
2970
3306
9312

skipif mysql # not compatible
query I rowsort label-4808
SELECT DISTINCT + cor0.col2 * + col2 + + CAST ( + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL - ( col2 ) * col1 * - col0 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4810
SELECT ALL col2 DIV 61 AS col1 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4810
SELECT ALL col2 / 61 AS col1 FROM tab1
----
0
0
1

query I rowsort
SELECT ALL + col2 * - tab2.col2 * col0 AS col0 FROM tab2
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-4812
SELECT + 49 DIV 25 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

skipif mysql # not compatible
query I rowsort label-4812
SELECT + 49 / 25 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 * tab0.col2 col1 FROM tab0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 * - tab1.col0 + col2 col2 FROM tab1
----
-1223
-1504
-6

query I rowsort
SELECT + 59 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT DISTINCT - col2 * - col1 + - 57 FROM tab0 cor0
----
2781
40
7405

onlyif mysql # use DIV operator for integer division
query I rowsort label-4817
SELECT ALL + - col2 + 87 DIV + 24 FROM tab0 AS cor0
----
-30
-79
2

skipif mysql # not compatible
query I rowsort label-4817
SELECT ALL + - col2 + 87 / + 24 FROM tab0 AS cor0
----
-30
-79
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4818
SELECT col2 + + col0 DIV 6 FROM tab1 cor0
----
109
54
67

skipif mysql # not compatible
query I rowsort label-4818
SELECT col2 + + col0 / 6 FROM tab1 cor0
----
109
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col1 + col1 AS col1 FROM tab1 cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL - col0 + ( col2 ) FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + 19 col0 FROM tab0 AS cor0
----
-67
-72
-78

query I rowsort
SELECT ALL - col2 + + col0 * 36 FROM tab0
----
1259
3122
831

query I rowsort
SELECT ALL - col2 + + col1 FROM tab1
----
-28
-47
-83

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab2 cor0, tab2 cor1
----
972 values hashing to f9adf26f20dc8fcc43c2de18a5fd4859

query I rowsort
SELECT ALL 5 + - tab2.col1 FROM tab2
----
-12
-26
-54

query I rowsort
SELECT - 62 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

query I rowsort
SELECT DISTINCT ( col2 ) * + col2 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4830
SELECT 23 DIV + cor0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-4830
SELECT 23 / + cor0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 col2 FROM tab2
----
97
97
97

query I rowsort
SELECT ALL - col1 + - tab2.col0 * + col0 FROM tab2
----
-6143
-6258
-80

query I rowsort
SELECT ALL - col2 + - col0 * + tab0.col1 FROM tab0
----
-2097
-3396
-8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4834
SELECT ALL + col0 * + CAST( - 85 AS SIGNED ) FROM tab1 cor0
----
-255
-5440
-6800

skipif mysql # not compatible
query I rowsort label-4834
SELECT ALL + col0 * + CAST ( - 85 AS INTEGER ) FROM tab1 cor0
----
-255
-5440
-6800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4835
SELECT ALL - col0 * - CAST( + 20 + + cor0.col2 AS SIGNED ) FROM tab2 AS cor0
----
329
3588
4582

skipif mysql # not compatible
query I rowsort label-4835
SELECT ALL - col0 * - CAST ( + 20 + + cor0.col2 AS INTEGER ) FROM tab2 AS cor0
----
329
3588
4582

query I rowsort
SELECT DISTINCT col0 * + ( col1 ) AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col2 * - col0 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4839
SELECT col2 + CAST( + col2 * col1 AS SIGNED ) FROM tab1
----
1344
1458
627

skipif mysql # not compatible
query I rowsort label-4839
SELECT col2 + CAST ( + col2 * col1 AS INTEGER ) FROM tab1
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4840
SELECT ALL - col2 * col1 DIV col1 AS col1 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4840
SELECT ALL - col2 * col1 / col1 AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - tab1.col0 + + 5 * + 59 AS col0 FROM tab1
----
215
231
292

query I rowsort
SELECT DISTINCT + - cor0.col0 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT ALL + ( 39 ) AS col0 FROM tab2 AS cor0
----
39
39
39

query I rowsort
SELECT DISTINCT 73 * + col2 FROM tab0 AS cor0
----
2409
5986
73

query I rowsort
SELECT + cor0.col2 * col2 * - cor0.col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL 33 * + col2 FROM tab1 AS cor0
----
1782
1881
3168

query I rowsort
SELECT + 18 * col2 AS col2 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT ALL - - ( + ( + col0 ) ) * 45 FROM tab2 cor0
----
315
3510
3555

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * col1 col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + 29 + col1 FROM tab2 AS cor0
----
-12
2
30

query I rowsort
SELECT DISTINCT - - 92 + + col0 FROM tab0 AS cor0
----
116
127
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 53 - + col0 col2 FROM tab0 AS cor0
----
-36
18
29

query I rowsort
SELECT DISTINCT col0 * 91 + col2 FROM tab0 cor0
----
2217
3186
8181

query I rowsort
SELECT col2 + + col0 * - col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL - + 1 * - col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col2 - - 7 FROM tab2 AS cor0
----
-19
-20
-31

query I rowsort
SELECT + + 38 + col2 * + col1 AS col0 FROM tab0 AS cor0
----
135
2876
7500

query I rowsort
SELECT DISTINCT col1 * - 93 FROM tab0 AS cor0
----
-7998
-8463
-9021

query I rowsort
SELECT ( ( - col2 ) ) * - col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + + col1 * col0 * + col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT 19 * 33 * col0 FROM tab0 AS cor0
----
15048
21945
55803

query I rowsort
SELECT + 35 * col1 + - col0 * 83 FROM tab2 AS cor0
----
-4409
-5962
504

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4863
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) * + cor0.col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4863
SELECT DISTINCT + + CAST ( NULL AS REAL ) * + cor0.col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col1 + col2 * + col2 col1 FROM tab1 cor0
----
2945
3323
9309

query I rowsort
SELECT + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + col1 + - tab2.col0 + col2 * col2 AS col1 FROM tab2
----
1382
657
753

query I rowsort
SELECT ALL + cor0.col1 + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + + col0 * + col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + cor0.col1 * col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - - col0 + - cor0.col0 FROM tab0 cor0
----
0

query I rowsort
SELECT ALL - col0 + col0 * col0 AS col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT 42 AS col2 FROM tab1 cor0
----
42
42
42

query I rowsort
SELECT ALL + col2 + col1 * + col1 + - 13 AS col0 FROM tab2 AS cor0
----
314
3494
975

query I rowsort
SELECT + - 73 + + col2 * 87 AS col1 FROM tab1 AS cor0
----
4625
4886
8279

query I rowsort
SELECT ALL + col0 + col1 * - col2 * 24 + col2 AS col2 FROM tab1 AS cor0
----
-13559
-29776
-33639

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + - col1 + + col1 + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4878
SELECT ALL col0 * + col2 + + CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
2054
216
3040

skipif mysql # not compatible
query I rowsort label-4878
SELECT ALL col0 * + col2 + + CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + + cor0.col0 - + cor0.col2 * + 67 AS col1 FROM tab2 AS cor0
----
-1664
-1802
-2467

query I rowsort
SELECT ALL - - col2 * + col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4881
SELECT DISTINCT col2 * CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4881
SELECT DISTINCT col2 * CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 773bb916e463ebc075d701108532badb

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 * cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to a1fb94131b1f27d9b7852cfe82d130ab

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4884
SELECT + cor0.col2 * + CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-4884
SELECT + cor0.col2 * + CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4885
SELECT ALL - col2 DIV + col0 AS col2 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4885
SELECT ALL - col2 / + col0 AS col2 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT - + cor0.col1 * + col1 + + col1 + col0 AS col2 FROM tab1 cor0
----
-26
-647
-76

query I rowsort
SELECT ALL 51 + col1 * - col1 AS col1 FROM tab1
----
-118
-49
-625

query I rowsort
SELECT ALL tab2.col0 + - tab2.col1 * col0 AS col2 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT - 72 FROM tab0, tab1 AS cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT ALL 82 * - col1 AS col2 FROM tab1
----
-1066
-2132
-820

onlyif mysql # use DIV operator for integer division
query I rowsort label-4891
SELECT DISTINCT + 25 + - col1 DIV 47 AS col1 FROM tab0
----
23
24

skipif mysql # not compatible
query I rowsort label-4891
SELECT DISTINCT + 25 + - col1 / 47 AS col1 FROM tab0
----
23
24

query I rowsort
SELECT - - col0 * + col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + + col0 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT 71 AS col1 FROM tab0
----
71
71
71

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 ALL ( + col0 ) col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col0 + col0 * + 99 AS col2 FROM tab1 cor0
----
294
6272
7840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col2 * col1 col1 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + + col2 + col1 + - 40 FROM tab1 AS cor0
----
27
40
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-4900
SELECT DISTINCT col2 + col1 + 24 DIV cor0.col1 FROM tab1 AS cor0
----
110
69
80

skipif mysql # not compatible
query I rowsort label-4900
SELECT DISTINCT col2 + col1 + 24 / cor0.col1 FROM tab1 AS cor0
----
110
69
80

query I rowsort
SELECT + 67 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT DISTINCT 91 AS col2 FROM tab2
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4904
SELECT ALL + col0 - - col0 * + col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-4904
SELECT ALL + col0 - - col0 * + col0 / + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 cor1
----
243 values hashing to 70c6a01760d7239f3003db4da92180a4

query I rowsort
SELECT DISTINCT 89 FROM tab0, tab0 AS cor0
----
89

query I rowsort
SELECT + 27 * + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to ff6162e0ec52b9f9437b6969c2ae51dc

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to b050f98b2d07c1b092b73ecf6b5b347c

query I rowsort
SELECT tab0.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col1 - col1 * col2 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + - col2 * 21 + col1 * col1 AS col2 FROM tab2 AS cor0
----
-509
2935
394

query I rowsort
SELECT DISTINCT - - col2 - + col0 * col1 * + col1 FROM tab2 AS cor0
----
-22793
-271492
-6700

query I rowsort
SELECT ALL - col0 + - cor0.col1 * col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT cor0.col2 * col1 + col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4915
SELECT DISTINCT + col1 - + cor0.col2 * col0 DIV col2 AS col1 FROM tab0 cor0
----
2
62

skipif mysql # not compatible
query I rowsort label-4915
SELECT DISTINCT + col1 - + cor0.col2 * col0 / col2 AS col1 FROM tab0 cor0
----
2
62

query I rowsort
SELECT ALL - col0 + col2 AS col1 FROM tab1
----
-7
16
51

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab2, tab1 cor1
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 ) - col2 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 61 FROM tab2
----
61

query I rowsort
SELECT ALL - ( 21 ) - - col2 FROM tab0 cor0
----
-20
12
61

query I rowsort
SELECT - 69 + - col0 FROM tab2 AS cor0
----
-147
-148
-76

query I rowsort
SELECT ALL 73 + + 5 + col2 FROM tab0 AS cor0
----
111
160
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4923
SELECT + CAST( NULL AS SIGNED ) * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4923
SELECT + CAST ( NULL AS INTEGER ) * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 17 + col2 AS col2 FROM tab1 AS cor0
----
113
71
74

query I rowsort
SELECT col2 * 33 FROM tab0
----
1089
2706
33

query I rowsort
SELECT + ( 91 ) AS col2 FROM tab1
----
91
91
91

query I rowsort
SELECT 38 * + 91 FROM tab0
----
3458
3458
3458

query I rowsort
SELECT + ( - 13 ) FROM tab2 AS cor0
----
-13
-13
-13

query I rowsort
SELECT - + 94 * col1 + col0 AS col2 FROM tab0 AS cor0
----
-8060
-8465
-9083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4930
SELECT ALL - + CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4930
SELECT ALL - + CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - col0 * col0 + - 2 AS col0 FROM tab2 AS cor0
----
-106099
-1521
-358958

query I rowsort
SELECT - cor0.col0 * + 48 + col0 FROM tab0 AS cor0
----
-1128
-1645
-4183

query I rowsort
SELECT ALL + 23 AS col0 FROM tab0 AS cor0
----
23
23
23

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab0, tab2 cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT col2 * col2 + col0 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - col1 * 17 AS col2 FROM tab0 AS cor0
----
-1462
-1547
-1649

query I rowsort
SELECT col1 - 13 * - col1 FROM tab2 AS cor0
----
238
434
826

onlyif mysql # use DIV operator for integer division
query I rowsort label-4939
SELECT + 77 - - 14 DIV col0 AS col2 FROM tab0 AS cor0
----
77
77
77

skipif mysql # not compatible
query I rowsort label-4939
SELECT + 77 - - 14 / col0 AS col2 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT col1 * + col2 + - col1 AS col0 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + 82 FROM tab2
----
82
82
82

query I rowsort
SELECT + col2 + col0 * - col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT + col1 * + col0 + - col1 AS col1 FROM tab0 cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 50 col2 FROM tab1 AS cor0
----
60
63
76

query I rowsort
SELECT ALL 70 FROM tab2, tab0 cor0, tab0 cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

onlyif mysql # use DIV operator for integer division
query I rowsort label-4946
SELECT DISTINCT - tab0.col1 DIV - tab0.col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4946
SELECT DISTINCT - tab0.col1 / - tab0.col0 FROM tab0
----
1
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4947
SELECT - + cor0.col0 * CAST( 11 AS SIGNED ) AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 8535eee14ee2aa95591f56f755bb678d

skipif mysql # not compatible
query I rowsort label-4947
SELECT - + cor0.col0 * CAST ( 11 AS INTEGER ) AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 8535eee14ee2aa95591f56f755bb678d

query I rowsort
SELECT DISTINCT + col0 + - col0 * - col1 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - + col2 * + 65 * - col0 AS col1 FROM tab1 cor0
----
10530
237120
499200

onlyif mysql # use DIV operator for integer division
query I rowsort label-4950
SELECT + 14 DIV - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4950
SELECT + 14 / - col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 63 col2 FROM tab2
----
1071
1953
3717

onlyif mysql # use DIV operator for integer division
query I rowsort label-4952
SELECT - ( col2 ) DIV col1 - cor0.col2 * 74 col0 FROM tab1 AS cor0
----
-3998
-4223
-7111

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4952
SELECT - ( col2 ) / col1 - cor0.col2 * 74 col0 FROM tab1 AS cor0
----
-3998
-4223
-7111

query I rowsort
SELECT 58 * col2 + - col1 FROM tab2 AS cor0
----
1449
1535
2187

onlyif mysql # use DIV operator for integer division
query I rowsort label-4954
SELECT - ( - 44 ) + col1 DIV col1 + - col0 AS col2 FROM tab1 AS cor0
----
-19
-35
42

skipif mysql # not compatible
query I rowsort label-4954
SELECT - ( - 44 ) + col1 / col1 + - col0 AS col2 FROM tab1 AS cor0
----
-19
-35
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4955
SELECT + - CAST( NULL AS SIGNED ) * - col0 - + col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4955
SELECT + - CAST ( NULL AS INTEGER ) * - col0 - + col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab2, tab2 AS cor0
----
56

query I rowsort
SELECT 7 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4958
SELECT + + col0 DIV + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4958
SELECT + + col0 / + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col1 * ( cor0.col1 + - col1 ) col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4961
SELECT - 98 DIV - col2 FROM tab0 AS cor0
----
1
2
98

skipif mysql # not compatible
query I rowsort label-4961
SELECT - 98 / - col2 FROM tab0 AS cor0
----
1
2
98

query I rowsort
SELECT DISTINCT col1 + - col1 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + col1 + - cor0.col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL + 26 + + col2 AS col0 FROM tab0 AS cor0
----
108
27
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4965
SELECT DISTINCT - ( col0 ) * - CAST( 73 AS SIGNED ) + - col1 FROM tab0 AS cor0
----
1666
2458
6406

skipif mysql # not compatible
query I rowsort label-4965
SELECT DISTINCT - ( col0 ) * - CAST ( 73 AS INTEGER ) + - col1 FROM tab0 AS cor0
----
1666
2458
6406

query I rowsort
SELECT - + 92 FROM tab0 cor0
----
-92
-92
-92

query I rowsort
SELECT ALL - + cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4968
SELECT col0 + - col0 DIV 95 AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4968
SELECT col0 + - col0 / 95 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col2 * cor0.col2 * 55 + - col0 FROM tab0 cor0
----
20
369731
59871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 15 col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-15

query I rowsort
SELECT cor0.col1 + 10 FROM tab0, tab1 AS cor0
----
9 values hashing to a8b4b708baa7ef8a92ad6433dc9c3e8e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4972
SELECT ALL + col1 * CAST( NULL AS SIGNED ) * + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4972
SELECT ALL + col1 * CAST ( NULL AS INTEGER ) * + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - 27 + 90 col1 FROM tab0 AS cor0
----
145
64
96

query I rowsort
SELECT DISTINCT - - cor0.col2 * + 57 AS col1 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT 77 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT ALL - col1 + - 32 AS col0 FROM tab0 AS cor0
----
-118
-123
-129

query I rowsort
SELECT + + col0 + 33 * col0 * col1 FROM tab2 AS cor0
----
151944
44398
7168

query I rowsort
SELECT ALL 63 FROM tab1, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT + 73 + col1 * - col1 * col1 + col1 FROM tab2 AS cor0
----
-205247
-29687
-4823

query I rowsort
SELECT ALL - 84 * col0 FROM tab1 AS cor0
----
-252
-5376
-6720

query I rowsort
SELECT + 26 * col0 + - col0 + - 8 AS col2 FROM tab1 cor0
----
1592
1992
67

query I rowsort
SELECT col0 * - 40 + + col1 + - 77 AS col1 FROM tab1 AS cor0
----
-171
-2627
-3264

query I rowsort
SELECT DISTINCT + - ( + col0 ) * col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ( cor0.col0 ) * cor0.col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + 50 AS col2 FROM tab0 cor0
----
50
50
50

query I rowsort
SELECT DISTINCT - + 79 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
-72
0

query I rowsort
SELECT + col1 - + col2 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT 47 * col1 FROM tab0
----
4042
4277
4559

query I rowsort
SELECT DISTINCT + 10 AS col1 FROM tab1, tab0 AS cor0
----
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-4990
SELECT DISTINCT col1 DIV - col2 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-4990
SELECT DISTINCT col1 / - col2 AS col1 FROM tab1
----
0

query I rowsort
SELECT col0 * + col2 AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + 29 + - col0 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-160
-1999
-2973

query I rowsort
SELECT DISTINCT + + 82 + col1 * col1 FROM tab0 AS cor0
----
7478
8363
9491

onlyif mysql # use DIV operator for integer division
query I rowsort label-4994
SELECT ALL - + col1 + cor0.col1 DIV ( col1 ) FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-4994
SELECT ALL - + col1 + cor0.col1 / ( col1 ) FROM tab1 AS cor0
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - cor0.col0 col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + + 9 AS col2 FROM tab2 AS cor0
----
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4997
SELECT ALL col1 DIV col0 + col1 AS col0 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-4997
SELECT ALL col1 / col0 + col1 AS col0 FROM tab0
----
89
92
99

query I rowsort
SELECT + 11 + - ( + col2 ) AS col1 FROM tab2
----
-15
-16
-27

query I rowsort
SELECT ALL 40 * col1 FROM tab2
----
1240
2360
680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) col2 FROM tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5001
SELECT DISTINCT + + 21 DIV - col2 + - col0 * - 11 FROM tab1 AS cor0
----
33
704
880

skipif mysql # not compatible
query I rowsort label-5001
SELECT DISTINCT + + 21 / - col2 + - col0 * - 11 FROM tab1 AS cor0
----
33
704
880

query I rowsort
SELECT DISTINCT + - ( col1 ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col0 * - col2 + + ( - col2 * + col0 ) FROM tab2 AS cor0
----
-378
-4056
-6004

query I rowsort
SELECT 0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT col2 + - tab1.col2 + col0 FROM tab1
----
3
64
80

query I rowsort
SELECT + 55 * col2 FROM tab1
----
2970
3135
5280

query I rowsort
SELECT ALL ( - col1 ) * 87 + ( col1 ) AS col0 FROM tab1
----
-1118
-2236
-860

query I rowsort
SELECT DISTINCT 60 FROM tab1, tab2, tab2 AS cor0
----
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5010
SELECT ALL + 82 + - tab2.col1 * + col1 DIV - col1 + - col2 AS col0 FROM tab2
----
115
61
86

skipif mysql # not compatible
query I rowsort label-5010
SELECT ALL + 82 + - tab2.col1 * + col1 / - col1 + - col2 AS col0 FROM tab2
----
115
61
86

query I rowsort
SELECT ALL 39 * - col0 + 50 + tab2.col2 * - col0 * + col1 AS col1 FROM tab2
----
-122644
-54065
-6082

onlyif mysql # use DIV operator for integer division
query I rowsort label-5012
SELECT ALL + + col2 DIV + col2 + ( + col1 ) * - col2 AS col1 FROM tab1 cor0
----
-1247
-1403
-569

skipif mysql # not compatible
query I rowsort label-5012
SELECT ALL + + col2 / + col2 + ( + col1 ) * - col2 AS col1 FROM tab1 cor0
----
-1247
-1403
-569

query I rowsort
SELECT ALL col1 * + col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col2 * tab1.col1 + - ( 51 ) AS col2 FROM tab1
----
-1299
-1455
-621

query I rowsort
SELECT - col2 * + col0 AS col2 FROM tab0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5016
SELECT DISTINCT + col0 * + CAST( - 87 * col0 AS SIGNED ) FROM tab2
----
-4263
-529308
-542967

skipif mysql # not compatible
query I rowsort label-5016
SELECT DISTINCT + col0 * + CAST ( - 87 * col0 AS INTEGER ) FROM tab2
----
-4263
-529308
-542967

onlyif mysql # use DIV operator for integer division
query I rowsort label-5017
SELECT tab0.col1 DIV col0 + col1 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-5017
SELECT tab0.col1 / col0 + col1 FROM tab0
----
89
92
99

query I rowsort
SELECT col0 * 94 - col0 FROM tab0
----
2232
3255
8277

query I rowsort
SELECT ALL 30 + - col0 + col2 * + col0 AS col0 FROM tab1 AS cor0
----
189
3614
7630

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5021
SELECT ALL - - cor0.col0 DIV + col1 + col1 FROM tab1 AS cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-5021
SELECT ALL - - cor0.col0 / + col1 + col1 FROM tab1 AS cor0
----
16
19
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 92 col0 FROM tab1 AS cor0
----
-92
-92
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5023
SELECT DISTINCT + col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5023
SELECT DISTINCT + col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT + col1 * - 18 * - col2 FROM tab1 AS cor0
----
10260
22464
25272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 - + col2 col0 FROM tab0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT - col1 * + 97 FROM tab2
----
-1649
-3007
-5723

query I rowsort
SELECT ALL 16 FROM tab1, tab1 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT + col2 - + 66 * cor0.col2 FROM tab0 AS cor0
----
-2145
-5330
-65

query I rowsort
SELECT DISTINCT - col2 * + col1 + col2 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT ( - 41 ) + col1 - + col1 * col2 AS col0 FROM tab1 AS cor0
----
-1276
-1419
-601

query I rowsort
SELECT + ( - col2 ) + col0 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + + col0 * + col0 - cor0.col0 AS col1 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT + - col2 + cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5034
SELECT ALL + CAST( 72 AS SIGNED ) FROM tab0 AS cor0
----
72
72
72

skipif mysql # not compatible
query I rowsort label-5034
SELECT ALL + CAST ( 72 AS INTEGER ) FROM tab0 AS cor0
----
72
72
72

query I rowsort
SELECT ALL + 69 + 27 * - col1 AS col1 FROM tab2
----
-1524
-390
-768

query I rowsort
SELECT DISTINCT - tab0.col1 + col0 FROM tab0
----
-2
-62

query I rowsort
SELECT DISTINCT - 96 + tab2.col2 * tab2.col0 FROM tab2
----
1932
2906
93

query I rowsort
SELECT - tab0.col1 * col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col1 * 44 + + col1 FROM tab2 AS cor0
----
1395
2655
765

query I rowsort
SELECT DISTINCT 57 * + ( cor0.col2 ) FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT ALL - col2 + cor0.col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + cor0.col1 + - col0 AS col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT - + col0 * + 95 + col0 FROM tab2 cor0
----
-658
-7332
-7426

query I rowsort
SELECT + col2 + col1 * col2 * + 77 AS col2 FROM tab1 AS cor0
----
108162
43947
96192

query I rowsort
SELECT DISTINCT ( 23 ) AS col2 FROM tab0 AS cor0
----
23

query I rowsort
SELECT DISTINCT - + 97 * - col0 + cor0.col2 AS col1 FROM tab0 AS cor0
----
2361
3396
8715

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5047
SELECT ALL - CAST( - col1 AS SIGNED ) FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5047
SELECT ALL - CAST ( - col1 AS INTEGER ) FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT col2 + 22 + - col0 FROM tab1 AS cor0
----
15
38
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5049
SELECT DISTINCT cor0.col2 * + ( + 12 ) + col2 * CAST( col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1053
1900
988

skipif mysql # not compatible
query I rowsort label-5049
SELECT DISTINCT cor0.col2 * + ( + 12 ) + col2 * CAST ( col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1053
1900
988

query I rowsort
SELECT ALL - col0 * col1 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col1 * - col0 * col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT col2 * 36 AS col1 FROM tab2
----
1368
936
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-5053
SELECT col1 DIV - 31 AS col1 FROM tab0
----
-2
-2
-3

skipif mysql # not compatible
query I rowsort label-5053
SELECT col1 / - 31 AS col1 FROM tab0
----
-2
-2
-3

query I rowsort
SELECT col1 - + col2 * 20 FROM tab0 AS cor0
----
-1549
-574
77

query I rowsort
SELECT - col2 + col0 - - col1 AS col2 FROM tab2 AS cor0
----
11
111
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5056
SELECT CAST( - col2 AS SIGNED ) AS col0 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5056
SELECT CAST ( - col2 AS INTEGER ) AS col0 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - col1 * ( - col0 ) + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - cor0.col2 * + 26 FROM tab2 AS cor0
----
-676
-702
-988

query I rowsort
SELECT + + 46 + col2 AS col1 FROM tab1 AS cor0
----
100
103
142

query I rowsort
SELECT - - col0 * col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-5061
SELECT + 43 * - col1 * col2 + - ( - col1 ) * col1 DIV 67 FROM tab1 AS cor0
----
-24509
-53662
-60362

skipif mysql # not compatible
query I rowsort label-5061
SELECT + 43 * - col1 * col2 + - ( - col1 ) * col1 / 67 FROM tab1 AS cor0
----
-24509
-53662
-60362

onlyif mysql # use DIV operator for integer division
query I rowsort label-5062
SELECT DISTINCT col2 DIV + tab1.col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5062
SELECT DISTINCT col2 / + tab1.col0 FROM tab1
----
0
1
18

query I rowsort
SELECT col2 * 21 FROM tab0
----
1722
21
693

query I rowsort
SELECT DISTINCT + 43 FROM tab1, tab1 cor0
----
43

query I rowsort
SELECT ALL + col0 * - 82 * + 99 FROM tab1
----
-24354
-519552
-649440

query I rowsort
SELECT DISTINCT - col1 * col1 AS col2 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT - + 58 AS col0 FROM tab1 AS cor0
----
-58
-58
-58

query I rowsort
SELECT ALL + 45 * col0 * col0 AS col0 FROM tab0 AS cor0
----
25920
356445
55125

query I rowsort
SELECT DISTINCT + + 57 AS col0 FROM tab0 AS cor0
----
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5070
SELECT DISTINCT - 92 + col0 DIV col0 FROM tab2 AS cor0
----
-91

skipif mysql # not compatible
query I rowsort label-5070
SELECT DISTINCT - 92 + col0 / col0 FROM tab2 AS cor0
----
-91

query I rowsort
SELECT - 45 FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT ALL - 34 AS col1 FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT + ( 93 ) * + col0 + + ( - col0 ) FROM tab1
----
276
5888
7360

query I rowsort
SELECT + col0 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5075
SELECT ( ( - col2 ) ) + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5075
SELECT ( ( - col2 ) ) + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 - + cor0.col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + 52 AS col2 FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT + col0 * col1 + + 58 FROM tab0 cor0
----
2122
3453
8157

query I rowsort
SELECT - - cor0.col2 * 62 AS col0 FROM tab1 AS cor0
----
3348
3534
5952

onlyif mysql # use DIV operator for integer division
query I rowsort label-5080
SELECT DISTINCT col0 + - cor0.col1 * - col2 DIV + col2 AS col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-5080
SELECT DISTINCT col0 + - cor0.col1 * - col2 / + col2 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + cor0.col0 * - ( + col0 * cor0.col1 ) + col1 FROM tab1 AS cor0
----
-208
-40950
-83187

query I rowsort
SELECT ALL col1 + + 76 AS col1 FROM tab0 AS cor0
----
162
167
173

skipif mysql # not compatible
query I rowsort
SELECT ALL + col1 * - CAST ( col1 AS REAL ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5084
SELECT DISTINCT col0 * + col0 + + col0 + col1 DIV 56 AS col1 FROM tab0 AS cor0
----
1261
601
8011

skipif mysql # not compatible
query I rowsort label-5084
SELECT DISTINCT col0 * + col0 + + col0 + col1 / 56 AS col1 FROM tab0 AS cor0
----
1261
601
8011

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1, tab2 AS cor0
----
3
64
80

query I rowsort
SELECT + 59 AS col0 FROM tab2
----
59
59
59

query I rowsort
SELECT - col1 * 23 AS col0 FROM tab2
----
-1357
-391
-713

query I rowsort
SELECT - col0 * + col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + + col1 * cor0.col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + col2 - + col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5091
SELECT - - col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5091
SELECT - - col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + col2 ) + col0 + 41 * col2 FROM tab2 AS cor0
----
1141
1170
1675

query I rowsort
SELECT - col1 + + 44 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1443
3825
970

query I rowsort
SELECT ALL - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - + col0 * - col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + col0 * + cor0.col0 + - ( - 74 ) * col1 FROM tab0 AS cor0
----
14655
6940
8403

query I rowsort
SELECT - 60 * - col2 AS col0 FROM tab1 AS cor0
----
3240
3420
5760

query I rowsort
SELECT ALL - col0 * col0 AS col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT - col1 + + col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL tab0.col2 * + col0 + - col2 + + tab0.col2 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT col1 AS col0 FROM tab0 WHERE + col2 + + col1 * - col1 BETWEEN - col1 AND ( NULL )
----

query I rowsort
SELECT DISTINCT col0 + - col0 + + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT + col0 * - col2 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT tab2.col1 * - col0 * col1 + col2 * - col1 AS col1 FROM tab2
----
-23477
-273052
-7564

query I rowsort
SELECT DISTINCT col2 * col0 * col0 + col1 FROM tab0
----
1322
19094
649613

query I rowsort
SELECT - col2 + col0 - + col2 AS col1 FROM tab1
----
-105
-112
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col2 col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 WHERE NOT col1 * + col0 + col1 <> col1 * col0
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT IN ( tab1.col2 - col2 )
----

query I rowsort
SELECT ALL tab0.col0 * - col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 * col2 * col1 AS col0 FROM tab0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5112
SELECT col0 * col1 + col1 DIV + col0 AS col0 FROM tab0
----
2067
3397
8100

skipif mysql # not compatible
query I rowsort label-5112
SELECT col0 * col1 + col1 / + col0 AS col0 FROM tab0
----
2067
3397
8100

query I rowsort
SELECT ALL + col1 + col0 + - col0 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT + col1 * + col1 * col1 AS col0 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT ALL - col2 * - col0 + col2 FROM tab2 WHERE NOT NULL NOT IN ( col2 * + col0 * - tab2.col0 + + col0 )
----

query I rowsort
SELECT DISTINCT + col0 * + col2 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + col0 FROM tab0 WHERE NULL IN ( col1 - col1 * - col1 )
----

query I rowsort
SELECT + col1 * + cor0.col1 + + ( col2 ) * col2 FROM tab1 AS cor0
----
3349
3592
9385

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col1 col1 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT 99 FROM tab0, tab1, tab2 AS cor0
----
99

query I rowsort
SELECT DISTINCT col0 * col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 57 * col2 AS col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

query I rowsort
SELECT - + col1 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 760e91273f37834612f88abef6e165f8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5125
SELECT - CAST( NULL AS SIGNED ) + 23 + cor1.col0 col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5125
SELECT - CAST ( NULL AS INTEGER ) + 23 + cor1.col0 col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

onlyif mysql # use DIV operator for integer division
query I rowsort label-5127
SELECT DISTINCT - col2 DIV tab0.col1 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5127
SELECT DISTINCT - col2 / tab0.col1 AS col1 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5128
SELECT col0 * tab0.col1 DIV + col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5128
SELECT col0 * tab0.col1 / + col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 * - cor0.col0 col0 FROM tab2 AS cor0
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-5130
SELECT - col0 * col1 DIV - tab1.col2 AS col0 FROM tab1
----
1
10
11

skipif mysql # not compatible
query I rowsort label-5130
SELECT - col0 * col1 / - tab1.col2 AS col0 FROM tab1
----
1
10
11

query I rowsort
SELECT DISTINCT col2 + + col1 + - col0 FROM tab1
----
29
3
77

query I rowsort
SELECT ALL - col1 + col0 + col2 AS col1 FROM tab0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5133
SELECT DISTINCT + col0 DIV tab0.col1 AS col2 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5133
SELECT DISTINCT + col0 / tab0.col1 AS col2 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - tab1.col2 col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5135
SELECT - col2 * col1 DIV + col2 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5135
SELECT - col2 * col1 / + col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL - col1 * + col1 + col1 * col0 * tab1.col2 + + col2 FROM tab1
----
3590
36437
99767

query I rowsort
SELECT + col0 * - col2 * tab0.col2 AS col0 FROM tab0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-5138
SELECT ALL - col1 DIV - tab2.col0 AS col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5138
SELECT ALL - col1 / - tab2.col0 AS col0 FROM tab2
----
0
0
4

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT DISTINCT col1 * + col0 * col0 FROM tab2 AS cor0
----
106097
1519
358956

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 WHERE NULL >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5142
SELECT + col2 DIV - col2 + col1 * tab1.col1 * - col1 col2 FROM tab1
----
-1001
-17577
-2198

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5142
SELECT + col2 / - col2 + col1 * tab1.col1 * - col1 col2 FROM tab1
----
-1001
-17577
-2198

onlyif mysql # use DIV operator for integer division
query I rowsort label-5143
SELECT ALL + col2 + col2 DIV col1 col1 FROM tab1
----
103
56
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5143
SELECT ALL + col2 + col2 / col1 col1 FROM tab1
----
103
56
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5144
SELECT col1 * + col0 + col0 DIV col0 AS col0 FROM tab2
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-5144
SELECT col1 * + col0 + col0 / col0 AS col0 FROM tab2
----
1344
218
4603

query I rowsort
SELECT col0 * col0 + - tab1.col0 AS col2 FROM tab1
----
4032
6
6320

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 WHERE NOT NULL >= ( NULL )
----

query I rowsort
SELECT DISTINCT - col0 + col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT - col1 * + col0 * col2 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + col0 + - col2 AS col0 FROM tab0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 - - col1 col2 FROM tab1
----
104
1053
650

query I rowsort
SELECT tab0.col0 * col1 + col2 FROM tab0
----
2097
3396
8181

query III rowsort
SELECT * FROM tab2 WHERE NOT ( + col1 ) NOT BETWEEN ( NULL ) AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab2 WHERE NOT NULL NOT BETWEEN - col0 * col1 + - col2 AND NULL
----

query I rowsort
SELECT col1 * - tab1.col1 - col0 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT DISTINCT + col0 + tab1.col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT - col1 * col2 + col0 * col0 * tab0.col2 FROM tab0
----
1128
16170
642060

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5157
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-5157
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT - cor0.col2 * 64 FROM tab2 cor0
----
-1664
-1728
-2432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( ( col2 ) ) + - col1 * cor0.col0 + col0 col2 FROM tab1 AS cor0
----
-21
-519
-864

query I rowsort
SELECT - + 35 + - col1 * + col0 + - col1 * + col0 AS col2 FROM tab2 AS cor0
----
-2721
-469
-9239

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5161
SELECT ALL - + CAST( NULL AS SIGNED ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5161
SELECT ALL - + CAST ( NULL AS INTEGER ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 54 + col0 AS col2 FROM tab2
----
132
133
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-5163
SELECT ALL - col2 + 73 DIV col1 FROM tab1
----
-50
-52
-91

skipif mysql # not compatible
query I rowsort label-5163
SELECT ALL - col2 + 73 / col1 FROM tab1
----
-50
-52
-91

query I rowsort
SELECT DISTINCT + 85 + + col1 FROM tab1 AS cor0
----
111
95
98

query I rowsort
SELECT + - col0 + + col2 * col1 * + col2 + - col1 * col2 FROM tab0 AS cor0
----
-35
604333
90792

query I rowsort
SELECT DISTINCT - - col2 + col2 AS col0 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL col2 + - col1 * cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + 66 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5169
SELECT DISTINCT + cor0.col0 DIV - 16 + col0 * col0 * ( - cor0.col0 ) FROM tab2 AS cor0
----
-343
-474556
-493043

skipif mysql # not compatible
query I rowsort label-5169
SELECT DISTINCT + cor0.col0 / - 16 + col0 * col0 * ( - cor0.col0 ) FROM tab2 AS cor0
----
-343
-474556
-493043

query I rowsort
SELECT - ( + col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col0 + + 83 + + col2 AS col1 FROM tab0 AS cor0
----
119
140
254

onlyif mysql # use DIV operator for integer division
query I rowsort label-5172
SELECT DISTINCT - + col0 * 94 DIV col1 + col0 DIV - col0 FROM tab1 AS cor0
----
-11
-579
-602

skipif mysql # not compatible
query I rowsort label-5172
SELECT DISTINCT - + col0 * 94 / col1 + col0 / - col0 FROM tab1 AS cor0
----
-11
-579
-602

query I rowsort
SELECT + 58 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT + col1 + col1 + 71 FROM tab0 cor0
----
243
253
265

query I rowsort
SELECT ALL + 70 FROM tab2, tab2 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - cor0.col2 + col1 + + col0 col0 FROM tab2 AS cor0
----
2165
227
3098

query I rowsort
SELECT + 54 FROM tab2 AS cor0
----
54
54
54

query I rowsort
SELECT col2 + - col1 * - col2 - - col2 FROM tab0 cor0
----
2904
7626
99

query I rowsort
SELECT + - col0 * cor0.col0 + col0 + + col0 AS col2 FROM tab2 AS cor0
----
-35
-5928
-6083

query I rowsort
SELECT col0 + + col2 + + tab2.col1 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL ( col1 ) * - col2 + ( col0 * col2 ) FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT - col0 * col1 * tab2.col0 FROM tab2
----
-106097
-1519
-358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 + - 78 col2 FROM tab1
----
-52
-65
-68

query I rowsort
SELECT ALL - col0 + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5185
SELECT ALL col1 DIV - col1 + col2 AS col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-5185
SELECT ALL col1 / - col1 + col2 AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL - col2 - ( 57 ) FROM tab0 AS cor0
----
-139
-58
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - col2 col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - + col2 * + col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5189
SELECT DISTINCT + col2 DIV - 73 + + cor0.col1 FROM tab1 AS cor0
----
10
12
26

skipif mysql # not compatible
query I rowsort label-5189
SELECT DISTINCT + col2 / - 73 + + cor0.col1 FROM tab1 AS cor0
----
10
12
26

query I rowsort
SELECT ALL cor0.col0 * col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col2 * - ( - 0 ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5192
SELECT DISTINCT - col2 * CAST( NULL AS SIGNED ) + - col2 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5192
SELECT DISTINCT - col2 * CAST ( NULL AS INTEGER ) + - col2 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - + ( tab0.col1 ) + 41 FROM tab0, tab2, tab2 AS cor0
----
-45
-50
-56

query I rowsort
SELECT col0 + + col2 AS col1 FROM tab0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5195
SELECT DISTINCT cor0.col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5195
SELECT DISTINCT cor0.col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL ( + col2 ) + - 96 AS col1 FROM tab1
----
-39
-42
0

query I rowsort
SELECT ALL col0 * col0 + col0 AS col2 FROM tab0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5198
SELECT CAST( - 90 AS SIGNED ) col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5198
SELECT CAST ( - 90 AS INTEGER ) col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5199
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) + - 31 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5199
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) + - 31 AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5200
SELECT DISTINCT + - col1 - 20 DIV col2 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5200
SELECT DISTINCT + - col1 - 20 / col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - cor0.col1 * 92 + col2 * - col0 + - 54 AS col0 FROM tab1 AS cor0
----
-2608
-4622
-8930

query I rowsort
SELECT DISTINCT - - col1 * 35 + + cor0.col1 FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT DISTINCT - col0 + 97 * - 26 FROM tab1 AS cor0
----
-2525
-2586
-2602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5204
SELECT ALL col0 DIV col0 + - 1 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5204
SELECT ALL col0 / col0 + - 1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 - ( col0 ) AS col2 FROM tab1 cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5206
SELECT ALL + col0 * CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5206
SELECT ALL + col0 * CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 14 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT ALL + 58 AS col0 FROM tab0
----
58
58
58

query I rowsort
SELECT DISTINCT - 59 * - col2 FROM tab0
----
1947
4838
59

query I rowsort
SELECT DISTINCT col1 * - col1 + + col0 AS col2 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL + 17 + 23 * - col0 AS col0 FROM tab2
----
-144
-1777
-1800

query I rowsort
SELECT - 46 * - col1 FROM tab1
----
1196
460
598

query I rowsort
SELECT ALL col2 + - tab0.col0 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 86 * + cor0.col1 col2 FROM tab2 AS cor0
----
-1462
-2666
-5074

query I rowsort
SELECT DISTINCT + ( + col1 ) + - cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - 12 FROM tab1 AS cor0
----
-12

query I rowsort
SELECT ALL + + 34 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT 84 * col1 AS col2 FROM tab0 AS cor0
----
7224
7644
8148

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5219
SELECT DISTINCT CAST( col0 AS SIGNED ) AS col2 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5219
SELECT DISTINCT CAST ( col0 AS INTEGER ) AS col2 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT col2 + - 49 FROM tab0 AS cor0
----
-16
-48
33

query I rowsort
SELECT + 87 * col2 - - col1 AS col1 FROM tab0 cor0
----
184
2957
7225

query I rowsort
SELECT + cor0.col1 + col0 * - col1 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 + - col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - 20 * col2 AS col2 FROM tab2 AS cor0
----
-520
-540
-760

query I rowsort
SELECT col0 * col2 + col1 + col1 FROM tab0
----
229
7480
964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 + ( col2 ) + col0 col0 FROM tab0
----
179
44
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5227
SELECT 42 - - col1 DIV - col2 FROM tab0 cor0
----
-55
40
41

skipif mysql # not compatible
query I rowsort label-5227
SELECT 42 - - col1 / - col2 FROM tab0 cor0
----
-55
40
41

query I rowsort
SELECT + - 4 * + col0 + col1 * - col0 FROM tab1 AS cor0
----
-1360
-896
-90

query I rowsort
SELECT cor0.col0 * - cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT - ( col2 ) * + col2 + col1 FROM tab0 cor0
----
-1003
-6633
96

query I rowsort
SELECT col2 + - col2 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 * - col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5233
SELECT col1 DIV - cor0.col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5233
SELECT col1 / - cor0.col1 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5234
SELECT ALL - cor0.col2 DIV ( col1 + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5234
SELECT ALL - cor0.col2 / ( col1 + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - 0 + col1 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab0, tab2 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL + + col1 * col2 * + col1 AS col2 FROM tab2 cor0
----
10982
25947
90506

query I rowsort
SELECT col1 * ( 7 ) AS col1 FROM tab0 cor0
----
602
637
679

query I rowsort
SELECT - col0 + cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 * 86 AS col2 FROM tab2 cor0
----
1462
2666
5074

query I rowsort
SELECT - col0 + + 37 AS col0 FROM tab2 AS cor0
----
-41
-42
30

query I rowsort
SELECT DISTINCT col0 + - cor0.col1 * + ( - col0 + + col0 ) * - col1 AS col0 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5243
SELECT - col1 DIV 32 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5243
SELECT - col1 / 32 FROM tab2 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5244
SELECT DISTINCT - col0 DIV - col1 + 25 * - col1 + - col1 col0 FROM tab2 AS cor0
----
-1533
-438
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5244
SELECT DISTINCT - col0 / - col1 + 25 * - col1 + - col1 col0 FROM tab2 AS cor0
----
-1533
-438
-806

query I rowsort
SELECT col1 * 68 AS col0 FROM tab0 AS cor0
----
5848
6188
6596

onlyif mysql # use DIV operator for integer division
query I rowsort label-5246
SELECT - + 57 DIV - col1 AS col0 FROM tab1 AS cor0
----
2
4
5

skipif mysql # not compatible
query I rowsort label-5246
SELECT - + 57 / - col1 AS col0 FROM tab1 AS cor0
----
2
4
5

query I rowsort
SELECT DISTINCT tab1.col1 * col1 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5248
SELECT 76 DIV + cor1.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2911f43dd03c90c754b435021664f2fc

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5248
SELECT 76 / + cor1.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2911f43dd03c90c754b435021664f2fc

onlyif mysql # use DIV operator for integer division
query I rowsort label-5249
SELECT DISTINCT col0 DIV 84 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-5249
SELECT DISTINCT col0 / 84 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5250
SELECT ALL + tab0.col2 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5250
SELECT ALL + tab0.col2 / col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 + - col1 col1 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT + - cor0.col1 * - col1 * - col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col1 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - - col1 * col1 + + col2 AS col0 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + col2 * col0 * col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT col0 * + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT + - col0 * col0 * col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + ( - col0 ) AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + ( col2 * - col2 ) AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - tab1.col1 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 + - col1 col2 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT + + col0 * - col1 + - 93 FROM tab2 AS cor0
----
-1436
-310
-4695

query I rowsort
SELECT + col2 + cor0.col2 + - 2 FROM tab0 cor0
----
0
162
64

query I rowsort
SELECT col0 * + ( 10 ) FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT DISTINCT + - col2 * ( - col1 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + cor0.col2 + ( + 53 ) FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT - col2 + - ( 4 ) + col1 FROM tab2 cor0
----
-25
0
29

query I rowsort
SELECT DISTINCT + + col2 + - col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + - col1 + col2 * 58 AS col2 FROM tab2 AS cor0
----
1449
1535
2187

query I rowsort
SELECT DISTINCT col1 + ( ( cor0.col1 ) ) * - ( + ( col1 ) ) FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT - col1 * + ( col2 ) * col1 + col2 - col1 FROM tab2 AS cor0
----
-10961
-25951
-90539

query I rowsort
SELECT ALL - col0 * + ( + col0 ) FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 * - ( - col2 ) col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL col0 - col2 * - 95 FROM tab0
----
130
3159
7879

query I rowsort
SELECT 70 * tab1.col0 AS col0 FROM tab1
----
210
4480
5600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 21 col2 FROM tab0
----
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + ( - ( + col1 ) + + col2 ) * 66 col0 FROM tab0 AS cor0
----
-3412
-503
-6239

query I rowsort
SELECT ALL col2 + cor0.col0 AS col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5282
SELECT ALL - col0 + col0 DIV - col2 FROM tab0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-5282
SELECT ALL - col0 + col0 / - col2 FROM tab0
----
-24
-70
-90

query I rowsort
SELECT DISTINCT col1 * 38 + col1 FROM tab2 AS cor0
----
1209
2301
663

query I rowsort
SELECT ALL + col2 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5285
SELECT - col2 / CAST( NULL AS SIGNED ) + + col0 / col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5285
SELECT - col2 / CAST ( NULL AS INTEGER ) + + col0 / col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + cor0.col2 + col1 + 60 * - col2 AS col1 FROM tab0 AS cor0
----
-1927
-4911
36

query I rowsort
SELECT col1 * - tab0.col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 66 * + 52 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 cor1
----
27 values hashing to a3aded1c99fb2d0c8de5b35e53e30d10

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 19a23ac6b759f8988954bf75ba7c431a

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 6 col2 FROM tab2 AS cor0
----
6
6
6

query I rowsort
SELECT DISTINCT + ( + col0 ) + 5 AS col2 FROM tab2 AS cor0
----
12
83
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 + + cor0.col0 col0 FROM tab2, tab0 cor0
----
9 values hashing to a2f6e2dede0e5618df35bee9c606a24c

query I rowsort
SELECT col1 * - 94 + col2 AS col2 FROM tab0
----
-8051
-8472
-9117

query I rowsort
SELECT + 7 * - cor0.col1 * cor0.col2 FROM tab2 cor0
----
-10738
-4522
-5859

query I rowsort
SELECT ALL - tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5297
SELECT ( + tab0.col1 ) * col0 + 87 DIV + col1 AS col2 FROM tab0
----
2065
3395
8099

skipif mysql # not compatible
query I rowsort label-5297
SELECT ( + tab0.col1 ) * col0 + 87 / + col1 AS col2 FROM tab0
----
2065
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5298
SELECT + col0 DIV col1 + + col1 DIV - tab2.col1 FROM tab2
----
-1
0
3

skipif mysql # not compatible
query I rowsort label-5298
SELECT + col0 / col1 + + col1 / - tab2.col1 FROM tab2
----
-1
0
3

query I rowsort
SELECT DISTINCT - col0 + + cor0.col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - + col2 + col0 AS col2 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT + 10 AS col1 FROM tab2 cor0
----
10
10
10

query I rowsort
SELECT DISTINCT - col0 * + col2 - - ( 48 + col1 ) FROM tab2 AS cor0
----
-110
-1921
-2937

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col2 col2 FROM tab0, tab2 AS cor0, tab1, tab1 cor1
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

query I rowsort
SELECT - + col2 * + col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab0 cor0
----
-96

query I rowsort
SELECT ALL + col1 * - col0 * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - col0 + - col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - 32 * cor0.col1 FROM tab1 AS cor0
----
-320
-416
-832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5310
SELECT ALL ( - col0 ) + - CAST( - col0 AS SIGNED ) col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5310
SELECT ALL ( - col0 ) + - CAST ( - col0 AS INTEGER ) col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 + - col1 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col1 + 3 FROM tab1 AS cor0
----
-10
-23
-7

query I rowsort
SELECT DISTINCT - 28 FROM tab0, tab1 AS cor0
----
-28

query I rowsort
SELECT + 66 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT ALL - - col0 + - col0 * + 1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5316
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) + col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5316
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) + col2 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col0 + - col0 AS col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT - + col1 + + 11 AS col1 FROM tab1 AS cor0
----
-15
-2
1

query I rowsort
SELECT DISTINCT - ( 11 ) - + cor0.col2 FROM tab2, tab0 AS cor0
----
-12
-44
-93

query I rowsort
SELECT - - col0 * 36 AS col1 FROM tab2 cor0
----
252
2808
2844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + col2 col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + cor0.col0 + col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT ALL 81 * + col1 AS col1 FROM tab0 AS cor0
----
6966
7371
7857

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5324
SELECT CAST( col2 AS SIGNED ) * col2 FROM tab0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-5324
SELECT CAST ( col2 AS INTEGER ) * col2 FROM tab0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5325
SELECT + + CAST( NULL AS SIGNED ) / 23 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-5325
SELECT + + CAST ( NULL AS INTEGER ) / 23 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 98 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT ALL col0 + 24 FROM tab0 cor0
----
113
48
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5328
SELECT + ( - col1 ) DIV col1 col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5328
SELECT + ( - col1 ) / col1 col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + 89 * + col0 FROM tab1 AS cor0
----
267
5696
7120

onlyif mysql # use DIV operator for integer division
query I rowsort label-5330
SELECT DISTINCT - 89 DIV 80 AS col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5330
SELECT DISTINCT - 89 / 80 AS col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT DISTINCT ( col1 ) AS col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5332
SELECT DISTINCT - col0 * + 57 + col0 DIV - 2 FROM tab0 AS cor0
----
-1380
-2012
-5117

skipif mysql # not compatible
query I rowsort label-5332
SELECT DISTINCT - col0 * + 57 + col0 / - 2 FROM tab0 AS cor0
----
-1380
-2012
-5117

onlyif mysql # use DIV operator for integer division
query I rowsort label-5333
SELECT - ( 39 ) DIV 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-5333
SELECT - ( 39 ) / col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + + 58 + + col0 + - 82 FROM tab1 AS cor0
----
-21
40
56

query I rowsort
SELECT ALL - cor0.col1 * col1 - col0 * - ( + col1 ) FROM tab1 cor0
----
-598
540
871

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 + + 35 + + col0 AS col1 FROM tab2 AS cor0
----
113
114
42

query I rowsort
SELECT DISTINCT - 89 - - col1 FROM tab0 AS cor0
----
-3
2
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 1 - + col2 * ( 74 ) col0 FROM tab1 AS cor0
----
-3997
-4219
-7105

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - ( - col0 ) * - col1 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL tab2.col1 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5344
SELECT ALL - 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-5344
SELECT ALL - CAST ( NULL AS INTEGER ) col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 78 FROM tab0, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT ALL - col0 * - 99 FROM tab2
----
693
7722
7821

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT - + ( 78 ) AS col2 FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT - col2 + - ( col0 ) * - 91 FROM tab2 cor0
----
610
7072
7151

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - + tab1.col0 - cor0.col0 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 7a1558f8810c9941232f7752946f1eee

query I rowsort
SELECT cor1.col0 + + 66 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to fa5abea9703325e238e45516f04d8fa5

query I rowsort
SELECT col2 * - col2 * + 63 AS col0 FROM tab1
----
-183708
-204687
-580608

query I rowsort
SELECT ALL col2 * tab2.col1 + - 44 AS col0 FROM tab2
----
1490
602
793

query I rowsort
SELECT - + 96 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

query I rowsort
SELECT - tab1.col2 * - col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - col0 * col0 * + col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT ALL - 76 AS col1 FROM tab1 AS cor0
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * - col2 col0 FROM tab1
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5360
SELECT DISTINCT 91 DIV + cor1.col1 FROM tab0, tab2 AS cor0, tab2 cor1
----
1
2
5

skipif mysql # not compatible
query I rowsort label-5360
SELECT DISTINCT 91 / + cor1.col1 FROM tab0, tab2 AS cor0, tab2 cor1
----
1
2
5

query I rowsort
SELECT DISTINCT + 15 FROM tab1
----
15

query I rowsort
SELECT + col0 * 55 + col0 FROM tab2 cor0
----
392
4368
4424

query I rowsort
SELECT ALL + - col1 + - col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT - col0 * col2 * col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT cor0.col2 + + 49 * - 50 FROM tab1 AS cor0
----
-2354
-2393
-2396

query I rowsort
SELECT + cor0.col0 + + 4 AS col0 FROM tab0 AS cor0
----
28
39
93

query I rowsort
SELECT - + cor0.col0 + 15 AS col1 FROM tab0 AS cor0
----
-20
-74
-9

query I rowsort
SELECT col2 + - ( col0 ) FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL tab1.col1 * - 58 + + col2 FROM tab1
----
-1454
-523
-658

query I rowsort
SELECT col2 * + tab1.col2 * + col1 AS col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT - 44 FROM tab0, tab1 AS cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT ALL ( + 89 ) FROM tab1, tab0 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT + tab2.col1 * - ( col2 ) FROM tab2
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab0, tab0 AS cor0
----
-1
-33
-82

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 61c64d7c972af4105004f57e1913df08

query I rowsort
SELECT + col2 + + ( - 8 ) + - col0 FROM tab1 AS cor0
----
-15
43
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 * + col1 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + - col0 * col0 * col1 FROM tab0 AS cor0
----
-118922
-49622
-720902

query I rowsort
SELECT DISTINCT - - col1 + - 42 * col1 AS col2 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT + + ( - col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT cor0.col0 * 64 FROM tab0 AS cor0
----
1536
2240
5696

query I rowsort
SELECT ALL col2 * col0 - - cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - col0 + - cor0.col0 * + col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL + - cor0.col2 * - 50 + cor0.col0 AS col1 FROM tab0 AS cor0
----
1674
4189
85

query I rowsort
SELECT + 47 AS col2 FROM tab1 AS cor0
----
47
47
47

query I rowsort
SELECT ALL - - ( 18 ) FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT ( + col1 ) + - col0 * col1 * - col0 FROM tab0 AS cor0
----
118922
49622
720902

query I rowsort
SELECT DISTINCT + + col2 * 76 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT DISTINCT + - 52 * + 57 AS col2 FROM tab2 AS cor0
----
-2964

query I rowsort
SELECT + 50 + col0 * col0 FROM tab1 AS cor0
----
4146
59
6450

query I rowsort
SELECT + col1 - cor0.col0 * 63 AS col2 FROM tab2 AS cor0
----
-410
-4855
-4960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 * + col0 + 83 * 2 + - cor0.col1 col0 FROM tab0 AS cor0
----
-1264
-1891
-4909

query I rowsort
SELECT - - col0 * + col2 * + col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT col0 - col0 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + - col1 + + col0 + ( 23 * - col2 ) FROM tab0 AS cor0
----
-1888
-821
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5397
SELECT - col1 + cor0.col2 * CAST( - 79 AS SIGNED ) + cor0.col2 FROM tab1 AS cor0
----
-4238
-4456
-7501

skipif mysql # not compatible
query I rowsort label-5397
SELECT - col1 + cor0.col2 * CAST ( - 79 AS INTEGER ) + cor0.col2 FROM tab1 AS cor0
----
-4238
-4456
-7501

query I rowsort
SELECT ALL + ( col1 ) * 8 + ( col0 ) AS col1 FROM tab0 AS cor0
----
712
811
817

query I rowsort
SELECT DISTINCT - col0 * col0 * 32 + col0 FROM tab0 cor0
----
-18408
-253383
-39165

query I rowsort
SELECT DISTINCT 22 + + col0 AS col1 FROM tab2 AS cor0
----
100
101
29

query I rowsort
SELECT + 8 AS col0 FROM tab0 AS cor0
----
8
8
8

query I rowsort
SELECT - ( col0 ) + + col2 * col0 FROM tab1
----
159
3584
7600

query I rowsort
SELECT ALL - cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ( - col1 ) + col0 + + col1 * col2 AS col1 FROM tab0 AS cor0
----
2776
35
7460

query I rowsort
SELECT - + col2 * cor0.col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5406
SELECT 59 DIV - col1 FROM tab2 AS cor0
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-5406
SELECT 59 / - col1 FROM tab2 AS cor0
----
-1
-1
-3

query I rowsort
SELECT ALL - ( col0 ) * - col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 63 AS col0 FROM tab2 AS cor0
----
-63

query I rowsort
SELECT + 35 * 22 FROM tab0 AS cor0
----
770
770
770

query I rowsort
SELECT + - ( + col0 ) + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( - col0 ) AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - ( + col2 ) AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - + ( 26 ) * col0 + col2 FROM tab0 AS cor0
----
-2232
-591
-909

query I rowsort
SELECT ALL ( - 28 ) * + col1 AS col2 FROM tab0 AS cor0
----
-2408
-2548
-2716

query I rowsort
SELECT col1 * 47 AS col0 FROM tab2 AS cor0
----
1457
2773
799

query I rowsort
SELECT DISTINCT - ( col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + col1 + col1 AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL 62 + col0 AS col2 FROM tab2 AS cor0
----
140
141
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-5419
SELECT ALL - - col0 DIV + 66 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5419
SELECT ALL - - col0 / + 66 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT 37 + cor0.col1 * + col1 FROM tab0 cor0
----
7433
8318
9446

query I rowsort
SELECT ALL + + 67 + + col1 FROM tab2 AS cor0
----
126
84
98

query I rowsort
SELECT DISTINCT - + col1 * + ( - col0 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT ( + col1 ) * col2 + 37 FROM tab0 AS cor0
----
134
2875
7499

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5425
SELECT - + CAST( NULL AS SIGNED ) * cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5425
SELECT - + CAST ( NULL AS INTEGER ) * cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 12 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT - - col2 * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ( - tab1.col2 ) + col1 AS col1 FROM tab1
----
-28
-47
-83

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2
----
3645 values hashing to f8426cd4d01ba96a72d7348574fbbc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5431
SELECT + CAST( 98 AS SIGNED ) * col2 DIV - tab1.col1 - col1 col1 FROM tab1
----
-229
-568
-736

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5431
SELECT + CAST ( 98 AS INTEGER ) * col2 / - tab1.col1 - col1 col1 FROM tab1
----
-229
-568
-736

query I rowsort
SELECT - ( col1 ) - col1 FROM tab0 cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - 85 * col0 FROM tab2 cor0
----
-595
-6630
-6715

query I rowsort
SELECT ALL + 63 FROM tab2, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT ALL + col2 * - 51 AS col0 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT - - col1 + col1 * 14 FROM tab1 AS cor0
----
150
195
390

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 FROM tab1 cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * col1 * + col2 col0 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT ALL + col0 * + 7 FROM tab2
----
49
546
553

onlyif mysql # use DIV operator for integer division
query I rowsort label-5440
SELECT ALL col2 DIV + col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5440
SELECT ALL col2 / + col2 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT col2 * + tab0.col1 + 85 * + col1 AS col2 FROM tab0
----
10148
15197
8342

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT ALL tab1.col1 + col1 * + col1 * - col0 AS col1 FROM tab1
----
-13507
-2002
-6390

query I rowsort
SELECT ( + 4 ) + col1 FROM tab2 AS cor0
----
21
35
63

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT 9 AS col2 FROM tab0, tab0 cor0
----
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + + ( + col1 ) * tab2.col1 + - col2 col1 FROM tab2
----
1123
3253
5483

query I rowsort
SELECT col0 * col1 + + col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT - 10 FROM tab2
----
-10
-10
-10

query I rowsort
SELECT + - 36 AS col2 FROM tab1 AS cor0
----
-36
-36
-36

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab2 AS cor0
----
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5453
SELECT - 56 DIV + tab2.col1 + + col0 FROM tab2
----
6
76
78

skipif mysql # not compatible
query I rowsort label-5453
SELECT - 56 / + tab2.col1 + + col0 FROM tab2
----
6
76
78

query I rowsort
SELECT 0 + + col1 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5455
SELECT ALL col2 DIV - col2 col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5455
SELECT ALL col2 / - col2 col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 + 6 FROM tab2 AS cor0
----
23
37
65

query I rowsort
SELECT ALL - col1 + col2 * col2 AS col0 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT - + 22 + col1 FROM tab0 cor0
----
64
69
75

query I rowsort
SELECT ALL 47 + col1 FROM tab1 AS cor0
----
57
60
73

query I rowsort
SELECT + 33 AS col1 FROM tab2 cor0
----
33
33
33

query I rowsort
SELECT ALL + col0 + + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL col0 + col0 * ( ( col1 ) ) FROM tab0
----
2088
3430
8188

query I rowsort
SELECT ALL + col1 * - col1 + + col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT ALL + 59 + col0 FROM tab0
----
148
83
94

query I rowsort
SELECT tab1.col2 * tab1.col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT col1 * col0 + + ( col2 * col2 ) FROM tab2
----
2787
5278
946

query I rowsort
SELECT 54 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT ( + col1 ) + - col1 + + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col2 + - col2 * cor0.col1 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - + ( col1 ) + + 36 FROM tab2 AS cor0
----
-23
19
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5471
SELECT + col2 * col1 DIV - col2 + cor0.col0 * - cor0.col1 * + col2 FROM tab1 AS cor0
----
-36490
-4238
-99853

skipif mysql # not compatible
query I rowsort label-5471
SELECT + col2 * col1 / - col2 + cor0.col0 * - cor0.col1 * + col2 FROM tab1 AS cor0
----
-36490
-4238
-99853

query I rowsort
SELECT DISTINCT - + 37 - cor0.col1 AS col0 FROM tab0 AS cor0
----
-123
-128
-134

query I rowsort
SELECT ALL - col0 + - col2 + 14 * col0 FROM tab2
----
64
988
989

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * + col1 col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - col1 + + col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + 49 + + col0 AS col1 FROM tab2 AS cor0
----
127
128
56

query I rowsort
SELECT DISTINCT col0 + + col1 * col1 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + col2 col0 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * cor0.col1 + cor0.col0 * - col0 col2 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT ALL + - col1 * - col1 - + col1 * - col2 AS col2 FROM tab2 AS cor0
----
1798
5015
935

query I rowsort
SELECT DISTINCT col2 + ( - col2 ) AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5482
SELECT DISTINCT + + col0 + - cor0.col2 DIV 73 col1 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5482
SELECT DISTINCT + + col0 + - cor0.col2 / 73 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + col2 + + ( col1 * + col2 ) AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - + col1 + - col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL + - col0 * + 12 - col0 AS col0 FROM tab1 AS cor0
----
-1040
-39
-832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + ( col0 ) col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5487
SELECT DISTINCT col0 * - CAST( col0 + + col1 AS SIGNED ) FROM tab0 AS cor0
----
-16020
-2640
-4620

skipif mysql # not compatible
query I rowsort label-5487
SELECT DISTINCT col0 * - CAST ( col0 + + col1 AS INTEGER ) FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT + + col2 + - col1 + 26 * col2 * ( col0 ) AS col1 FROM tab1 AS cor0
----
199763
4240
94895

query I rowsort
SELECT ALL - col2 * ( 27 ) * col0 FROM tab1 AS cor0
----
-207360
-4374
-98496

onlyif mysql # use DIV operator for integer division
query I rowsort label-5490
SELECT - + col0 DIV + ( col2 ) + col0 + + ( 27 ) * col2 AS col0 FROM tab1 AS cor0
----
1461
1602
2672

skipif mysql # not compatible
query I rowsort label-5490
SELECT - + col0 / + ( col2 ) + col0 + + ( 27 ) * col2 AS col0 FROM tab1 AS cor0
----
1461
1602
2672

query I rowsort
SELECT ALL + + col1 * ( + cor0.col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - cor0.col2 + 53 FROM tab0 cor0
----
-29
20
52

query I rowsort
SELECT - + col0 + 45 FROM tab0 AS cor0
----
-44
10
21

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-5495
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5495
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 73 * - col0 FROM tab2 AS cor0
----
-511
-5694
-5767

query I rowsort
SELECT - cor0.col1 + - col2 * col1 * - col0 FROM tab1 AS cor0
----
36470
4186
99827

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5498
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-5498
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL

query I rowsort
SELECT - + 28 + cor0.col2 FROM tab0 AS cor0
----
-27
5
54

query I rowsort
SELECT 3 AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT DISTINCT 0 * + col0 FROM tab1
----
0

query I rowsort
SELECT cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + 14 * - tab1.col0 FROM tab1
----
-1120
-42
-896

query I rowsort
SELECT ALL - 5 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 4f346dd2f65047c836c6957f80f0ef9e

query I rowsort
SELECT - 31 - 25 FROM tab1 cor0
----
-56
-56
-56

query I rowsort
SELECT - + col2 * - col2 + - col0 * 61 AS col1 FROM tab2 AS cor0
----
-3375
-4082
302

query I rowsort
SELECT - 6 * + col2 + + cor0.col2 FROM tab1 AS cor0
----
-270
-285
-480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - 63 * + col1 col0 FROM tab2 AS cor0
----
-1054
-1922
-3658

query I rowsort
SELECT DISTINCT - ( + ( cor0.col1 ) ) FROM tab1, tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL col2 * 93 AS col0 FROM tab1
----
5022
5301
8928

query I rowsort
SELECT DISTINCT + col0 + tab0.col2 FROM tab0
----
171
36
57

query I rowsort
SELECT col0 * ( 28 * tab2.col2 ) AS col1 FROM tab2
----
5292
56784
84056

onlyif mysql # use DIV operator for integer division
query I rowsort label-5513
SELECT ALL + tab1.col0 DIV col0 + ( + col2 ) * + tab1.col2 AS col2 FROM tab1
----
2917
3250
9217

skipif mysql # not compatible
query I rowsort label-5513
SELECT ALL + tab1.col0 / col0 + ( + col2 ) * + tab1.col2 AS col2 FROM tab1
----
2917
3250
9217

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5514
SELECT ALL - col2 + + CAST( col2 AS SIGNED ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5514
SELECT ALL - col2 + + CAST ( col2 AS INTEGER ) FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 2 * 38 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - col2 * tab0.col0 AS col2 FROM tab0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5518
SELECT ALL + CAST( col1 AS SIGNED ) + + col0 AS col0 FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-5518
SELECT ALL + CAST ( col1 AS INTEGER ) + + col0 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - 97 AS col2 FROM tab1 AS cor0
----
-97
-97
-97

query I rowsort
SELECT 4 - cor0.col2 FROM tab2 AS cor0
----
-22
-23
-34

query I rowsort
SELECT + cor0.col0 + - 92 * col1 AS col2 FROM tab2 AS cor0
----
-1485
-2845
-5350

query I rowsort
SELECT DISTINCT - col1 * - 86 + - cor0.col0 FROM tab1 AS cor0
----
1038
2233
796

query I rowsort
SELECT - - col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL - + col1 + + col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - + cor0.col2 * col1 + col2 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT + - 34 + col1 AS col2 FROM tab2 AS cor0
----
-17
-3
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5527
SELECT CAST( col1 AS SIGNED ) * col0 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-5527
SELECT CAST ( col1 AS INTEGER ) * col0 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * + col1 * - col2 + - col2 * cor0.col0 * ( cor0.col0 + + col2 * + ( + 34 ) ) col1 FROM tab2 AS cor0
----
-197424
-1990820
-4140290

query I rowsort
SELECT - 98 + col1 * cor0.col1 AS col1 FROM tab1 cor0
----
2
578
71

query I rowsort
SELECT ( + col1 ) + + tab0.col2 + ( + col0 ) FROM tab0
----
133
143
262

query I rowsort
SELECT + 65 + col1 FROM tab1
----
75
78
91

query I rowsort
SELECT col2 * col1 + - col2 AS col1 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) - + 45 FROM tab2
----
-2073
-234
-3047

query I rowsort
SELECT + 24 * + ( - col2 ) AS col0 FROM tab2
----
-624
-648
-912

query I rowsort
SELECT DISTINCT tab1.col2 AS col1 FROM tab1, tab2 AS cor0
----
54
57
96

query I rowsort
SELECT - 89 * - tab1.col2 + + col2 + ( - col2 + col2 ) FROM tab1
----
4860
5130
8640

query I rowsort
SELECT col2 + - col2 + tab0.col0 * 80 FROM tab0
----
1920
2800
7120

query I rowsort
SELECT + col0 + + col2 * col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - 61 * + col0 AS col0 FROM tab1 AS cor0
----
-183
-3904
-4880

query I rowsort
SELECT DISTINCT + 11 AS col2 FROM tab2 AS cor0
----
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5541
SELECT + 24 + col2 * CAST( 87 + + col2 AS SIGNED ) * CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
197988
228408
82104

skipif mysql # not compatible
query I rowsort label-5541
SELECT + 24 + col2 * CAST ( 87 + + col2 AS INTEGER ) * CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
197988
228408
82104

query I rowsort
SELECT DISTINCT col0 + + col1 * - 22 FROM tab2 AS cor0
----
-1220
-295
-675

query I rowsort
SELECT DISTINCT - 19 + col0 * 53 AS col1 FROM tab1 AS cor0
----
140
3373
4221

query I rowsort
SELECT DISTINCT - + 89 * - col0 FROM tab1 AS cor0
----
267
5696
7120

query I rowsort
SELECT - + ( cor0.col0 ) * col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT 13 * col2 FROM tab1 AS cor0
----
1248
702
741

query I rowsort
SELECT DISTINCT 88 * + col0 AS col0 FROM tab2 AS cor0
----
616
6864
6952

query I rowsort
SELECT + + col0 * col2 + - ( + col1 ) FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT + + col1 + col0 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - 42 + + col1 AS col0 FROM tab2 AS cor0
----
-11
-25
17

query I rowsort
SELECT tab0.col2 - col2 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + 62 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
62

query I rowsort
SELECT - col0 * 6 * cor0.col2 AS col2 FROM tab1 cor0
----
-21888
-46080
-972

onlyif mysql # use DIV operator for integer division
query I rowsort label-5554
SELECT cor0.col1 DIV - col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5554
SELECT cor0.col1 / - col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col2 * - 66 * col2 FROM tab0 cor0
----
-443784
-66
-71874

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - 74 col2 FROM tab1 AS cor0
----
222
4736
5920

query I rowsort
SELECT DISTINCT + cor1.col0 + 4 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
28
39
93

query I rowsort
SELECT - - ( - cor0.col0 ) * col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT 10 + + ( col1 ) * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-1238
-1394
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 95 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT DISTINCT + - 66 + col0 * - col1 FROM tab0 AS cor0
----
-2130
-3461
-8165

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5562
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5562
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT cor1.col1 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT ALL + col0 * tab1.col1 + - col0 AS col2 FROM tab1
----
576
75
960

query I rowsort
SELECT + col0 * col0 * - col1 + - col1 FROM tab0
----
-118922
-49622
-720902

query I rowsort
SELECT ALL col1 + col0 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL col0 + col1 * + tab0.col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-5568
SELECT col1 DIV - tab1.col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5568
SELECT col1 / - tab1.col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 WHERE col2 = NULL
----

query I rowsort
SELECT + tab1.col2 FROM tab1 WHERE NOT NULL <> - col0 * + col0 + - col1 + tab1.col0
----

query I rowsort
SELECT ALL - col1 + - col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT cor0.col1 * col0 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5573
SELECT - col0 + - col1 DIV col1 FROM tab0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-5573
SELECT - col0 + - col1 / col1 FROM tab0
----
-25
-36
-90

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( col1 ) < + col2
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT - col0 - - col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col2 + - col1 AS col2 FROM tab2
----
-33
-4
21

query III rowsort
SELECT ALL * FROM tab1 WHERE ( col0 ) IN ( col2 + + col1 )
----

query I rowsort
SELECT DISTINCT + col0 * + col2 + + col1 AS col0 FROM tab0
----
132
7389
878

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) > col0 * col0 + - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5580
SELECT ALL col0 DIV - col2 + col1 AS col2 FROM tab1
----
13
26
9

skipif mysql # not compatible
query I rowsort label-5580
SELECT ALL col0 / - col2 + col1 AS col2 FROM tab1
----
13
26
9

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) = NULL
----

query I rowsort
SELECT + tab0.col2 * - col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT col2 * + col2 / - tab0.col1 AS col1 FROM tab0 WHERE ( tab0.col1 * col0 ) IN ( - col0 + tab0.col1 )
----

query I rowsort
SELECT + col0 * + col0 FROM tab0 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5585
SELECT ALL col2 DIV + col2 + col0 AS col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-5585
SELECT ALL col2 / + col2 + col0 AS col0 FROM tab1
----
4
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5586
SELECT ALL + col0 DIV col1 + tab0.col1 * + col0 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-5586
SELECT ALL + col0 / col1 + tab0.col1 * + col0 FROM tab0
----
2064
3395
8099

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL > - col0 / - col0 + col2
----

query I rowsort
SELECT ALL - col0 + + col2 * col0 AS col0 FROM tab2
----
182
1950
2923

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE col0 = NULL
----

query I rowsort
SELECT - tab1.col2 + - col2 FROM tab1
----
-108
-114
-192

query III rowsort
SELECT * FROM tab2 WHERE NOT ( col2 ) >= ( NULL )
----

query III rowsort
SELECT * FROM tab1 WHERE - col2 <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5593
SELECT col0 DIV - col2 AS col1 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5593
SELECT col0 / - col2 AS col1 FROM tab1
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5594
SELECT ALL - + col0 + col1 DIV - col1 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-5594
SELECT ALL - + col0 + col1 / - col1 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT + col2 + - tab1.col1 * - tab1.col0 * col2 FROM tab1
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-5596
SELECT ALL - tab1.col1 DIV col2 + - col1 + - col0 col1 FROM tab1
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5596
SELECT ALL - tab1.col1 / col2 + - col1 + - col0 col1 FROM tab1
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 + + col2 col2 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT - cor0.col1 + col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + + col1 * cor0.col0 + col1 * col1 AS col0 FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT - col2 + - cor0.col1 + + col0 AS col1 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT col0 * col1 - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL - + col0 * cor0.col1 + col0 FROM tab2 cor0
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-5603
SELECT col2 + - col2 DIV - col2 + + col0 DIV + col2 FROM tab0 AS cor0
----
34
37
84

skipif mysql # not compatible
query I rowsort label-5603
SELECT col2 + - col2 / - col2 + + col0 / + col2 FROM tab0 AS cor0
----
34
37
84

query I rowsort
SELECT ALL - col1 * + col1 * col0 AS col0 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + cor0.col2 + + col1 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 * col2 / - col2 - + col0 * col1 col0 FROM tab0 AS cor0 WHERE NOT NULL < ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col2 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col0 + + col0 + - col1 FROM tab2
----
-17
141
97

query I rowsort
SELECT col2 * + col2 * - col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT tab1.col2 + - col1 + col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT col0 * col2 + + col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL + col2 + tab1.col2 AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT + + col1 + ( col1 ) * col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + col2 + + 42 * - col1 AS col1 FROM tab0 AS cor0
----
-3579
-3740
-4073

onlyif mysql # use DIV operator for integer division
query I rowsort label-5615
SELECT - col2 DIV col2 + + col1 * col2 FROM tab0 AS cor0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-5615
SELECT - col2 / col2 + + col1 * col2 FROM tab0 AS cor0
----
2837
7461
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5616
SELECT col1 DIV - col2 + + ( col2 ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5616
SELECT col1 / - col2 + + ( col2 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col1 + tab2.col0 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5618
SELECT ALL - ( col1 ) DIV ( + 88 ) + - tab0.col0 AS col1 FROM tab0
----
-24
-36
-90

skipif mysql # not compatible
query I rowsort label-5618
SELECT ALL - ( col1 ) / ( + 88 ) + - tab0.col0 AS col1 FROM tab0
----
-24
-36
-90

query I rowsort
SELECT col0 * col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col0 + col0 + col1 AS col0 FROM tab1 cor0
----
138
173
32

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

onlyif mysql # use DIV operator for integer division
query I rowsort label-5622
SELECT ALL col2 DIV 13 AS col0 FROM tab2
----
2
2
2

skipif mysql # not compatible
query I rowsort label-5622
SELECT ALL col2 / 13 AS col0 FROM tab2
----
2
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5623
SELECT + - col2 DIV col0 AS col2 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5623
SELECT + - col2 / col0 AS col2 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT + col2 * tab2.col0 * + col0 + + tab2.col1 + - col2 * tab2.col1 FROM tab2
----
156709
236529
517

onlyif mysql # use DIV operator for integer division
query I rowsort label-5625
SELECT ALL - ( - col1 ) + - col0 DIV col1 FROM tab1 AS cor0
----
26
4
7

skipif mysql # not compatible
query I rowsort label-5625
SELECT ALL - ( - col1 ) + - col0 / col1 FROM tab1 AS cor0
----
26
4
7

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab0 AS cor0
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col2 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT col1 + + tab1.col1 FROM tab1
----
20
26
52

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( col1 / + col0 )
----

query I rowsort
SELECT - col2 AS col0 FROM tab1 WHERE NOT NULL IN ( + tab1.col0 )
----

query I rowsort
SELECT DISTINCT - col0 + col2 * col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT col1 + - col0 * col0 + col1 * col1 FROM tab0
----
451
6906
8281

query I rowsort
SELECT ( - col2 ) * - tab1.col0 * tab1.col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL + ( + tab0.col1 ) + + tab0.col1 * col0 + col0 FROM tab0
----
2174
3527
8279

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 * - 44 + col1 * - col2 * + col2 col0 FROM tab2
----
-129116
-156636
-30915

onlyif mysql # use DIV operator for integer division
query I rowsort label-5636
SELECT col0 * + tab0.col2 DIV col2 AS col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5636
SELECT col0 * + tab0.col2 / col2 AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT - tab2.col2 AS col2 FROM tab2, tab1, tab0 cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 + col2 + + col0 col2 FROM tab2 AS cor0
----
113
126
43

query I rowsort
SELECT ALL 50 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1300
-1350
-1900

query I rowsort
SELECT cor1.col1 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT + - col2 - - col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - + col1 + - col1 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT + 59 + col1 FROM tab0 AS cor0
----
145
150
156

query I rowsort
SELECT - - 86 FROM tab0 AS cor0
----
86
86
86

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL 69 * + col0 + col2 + + col0 * col2 AS col2 FROM tab1
----
13296
423
8121

query I rowsort
SELECT - cor0.col2 + - 38 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 37554ac19884e901e519170b9739c54f

query I rowsort
SELECT ALL - col2 + + col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - 35 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT col0 * - 76 * + tab2.col1 FROM tab2
----
-102068
-16492
-349752

query I rowsort
SELECT DISTINCT col2 * + col1 * col2 AS col0 FROM tab0
----
611884
93654
97

query I rowsort
SELECT + col1 * - ( 32 ) * - col1 FROM tab1 AS cor0
----
21632
3200
5408

query I rowsort
SELECT col1 + ( - col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * ( - col1 ) FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - col2 * ( col1 ) AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + + col2 * 66 + col1 AS col1 FROM tab0 AS cor0
----
163
2264
5503

onlyif mysql # use DIV operator for integer division
query I rowsort label-5657
SELECT cor0.col2 * + 93 + + 24 + + col1 DIV - col0 FROM tab1 AS cor0
----
5038
5325
8952

skipif mysql # not compatible
query I rowsort label-5657
SELECT cor0.col2 * + 93 + + 24 + + col1 / - col0 FROM tab1 AS cor0
----
5038
5325
8952

query I rowsort
SELECT - - 84 AS col2 FROM tab1 AS cor0
----
84
84
84

query I rowsort
SELECT + 36 FROM tab0, tab1 cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT - - 64 * 98 + col2 FROM tab2 AS cor0
----
6298
6299
6310

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5661
SELECT ALL - CAST( NULL AS SIGNED ) * + col1 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5661
SELECT ALL - CAST ( NULL AS INTEGER ) * + col1 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab0, tab0 cor0, tab1 cor1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT cor0.col2 + col2 + - col0 * col1 FROM tab1 AS cor0
----
-526
-848
30

query I rowsort
SELECT 75 * - cor0.col1 FROM tab2 AS cor0
----
-1275
-2325
-4425

query I rowsort
SELECT ALL + 80 FROM tab2
----
80
80
80

query I rowsort
SELECT ALL tab1.col1 + 86 - - 49 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to fbd153ac500269ad9dcdf76c487afe62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 * col1 col0 FROM tab1 cor0
----
370
481
962

query I rowsort
SELECT + col0 * - cor0.col1 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col2 * + ( 1 + col1 ) AS col1 FROM tab2 cor0
----
-1560
-684
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col2 col1 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL - ( cor0.col1 ) AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT - tab1.col1 * col2 + - 38 AS col0 FROM tab1
----
-1286
-1442
-608

query I rowsort
SELECT col1 - 91 * + ( - col2 ) FROM tab1 AS cor0
----
4940
5197
8749

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5674
SELECT col1 * + CAST( 73 AS SIGNED ) FROM tab1 AS cor0
----
1898
730
949

skipif mysql # not compatible
query I rowsort label-5674
SELECT col1 * + CAST ( 73 AS INTEGER ) FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT - col2 + - 8 * - col1 AS col0 FROM tab1 AS cor0
----
154
23
8

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + 30 + - col2 AS col2 FROM tab2
----
-8
3
4

query I rowsort
SELECT cor0.col0 * - col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col1 + cor0.col0 AS col1 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT - col0 - tab0.col1 * col2 AS col2 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT - col2 + + tab2.col2 * tab2.col1 - col0 AS col2 FROM tab2
----
1430
529
803

query I rowsort
SELECT DISTINCT col2 * col2 - - col2 AS col0 FROM tab0
----
1122
2
6806

query I rowsort
SELECT ALL col1 - - col2 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5684
SELECT - col0 DIV + col2 AS col1 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5684
SELECT - col0 / + col2 AS col1 FROM tab1
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * - col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + + col1 * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - col1 + tab0.col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT col0 * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col1 * tab1.col1 + col0 * - col1 - col1 FROM tab1
----
-1222
-750
-780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 - - col1 col0 FROM tab1
----
106
122
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5691
SELECT - col1 DIV col0 + - col2 DIV col1 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5691
SELECT - col1 / col0 + - col2 / col1 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT + tab1.col1 + - col0 * - tab1.col2 AS col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT DISTINCT + col2 + col2 - col2 AS col0 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5694
SELECT + col2 + + tab0.col0 + + tab0.col0 DIV col0 AS col0 FROM tab0
----
172
37
58

skipif mysql # not compatible
query I rowsort label-5694
SELECT + col2 + + tab0.col0 + + tab0.col0 / col0 AS col0 FROM tab0
----
172
37
58

query I rowsort
SELECT DISTINCT + 82 FROM tab1
----
82

query I rowsort
SELECT ALL + + 38 * col0 + col1 FROM tab1 AS cor0
----
140
2442
3053

onlyif mysql # use DIV operator for integer division
query I rowsort label-5697
SELECT DISTINCT - 52 + col2 * col0 DIV + col2 col2 FROM tab0 AS cor0
----
-17
-28
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5697
SELECT DISTINCT - 52 + col2 * col0 / + col2 col2 FROM tab0 AS cor0
----
-17
-28
37

query I rowsort
SELECT - col0 + - cor0.col2 * - col2 * + col1 AS col0 FROM tab0 AS cor0
----
611795
62
93630

query I rowsort
SELECT - 2 AS col1 FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT ALL col2 * - col2 AS col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + ( - col1 * col0 ) + tab2.col1 FROM tab2
----
-1326
-186
-4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5702
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5702
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5703
SELECT - CAST( - col0 AS SIGNED ) AS col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5703
SELECT - CAST ( - col0 AS INTEGER ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL 16 AS col2 FROM tab2
----
16
16
16

query I rowsort
SELECT - ( - ( - col2 ) ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - 36 * cor0.col1 + - col1 * col1 FROM tab0 AS cor0
----
-10492
-11557
-12901

query I rowsort
SELECT - 95 + + col0 AS col2 FROM tab2 AS cor0
----
-16
-17
-88

query I rowsort
SELECT DISTINCT 33 AS col0 FROM tab0 AS cor0
----
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 99 col2 FROM tab0 AS cor0
----
-99
-99
-99

query I rowsort
SELECT - 15 * - col0 FROM tab0 AS cor0
----
1335
360
525

query I rowsort
SELECT DISTINCT 46 * + col2 + col2 FROM tab0
----
1551
3854
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-5712
SELECT col2 + + col2 DIV - col1 FROM tab2
----
26
27
36

skipif mysql # not compatible
query I rowsort label-5712
SELECT col2 + + col2 / - col1 FROM tab2
----
26
27
36

query I rowsort
SELECT col1 + col2 * - col0 - - 17 FROM tab0
----
-689
-7190
79

query I rowsort
SELECT 5 - col1 AS col0 FROM tab2
----
-12
-26
-54

query I rowsort
SELECT ALL col0 + - col2 * - 25 + col0 FROM tab0 AS cor0
----
2228
873
95

query I rowsort
SELECT ALL + col0 * col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5717
SELECT + + ( + cor0.col2 ) DIV col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5717
SELECT + + ( + cor0.col2 ) / col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT DISTINCT - + col1 * col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col2 * cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-5720
SELECT ALL col2 DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5720
SELECT ALL col2 / col0 AS col1 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT 13 AS col2 FROM tab0 AS cor0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 23 * cor0.col1 + + col0 col1 FROM tab2 AS cor0
----
1435
470
720

query I rowsort
SELECT 36 + + col1 + col1 AS col1 FROM tab2
----
154
70
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5724
SELECT ALL col2 DIV - col1 + - col2 FROM tab1
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-5724
SELECT ALL col2 / - col1 + - col2 FROM tab1
----
-103
-56
-62

query I rowsort
SELECT tab0.col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT 52 * col2 + - col2 AS col1 FROM tab1
----
2754
2907
4896

query I rowsort
SELECT DISTINCT - 61 + - tab1.col2 AS col1 FROM tab1
----
-115
-118
-157

query I rowsort
SELECT - 15 + 79 FROM tab2
----
64
64
64

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5730
SELECT CAST( NULL AS SIGNED ) * 75 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5730
SELECT CAST ( NULL AS INTEGER ) * 75 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL 49 - col0 * col1 FROM tab2 AS cor0
----
-1294
-168
-4553

query I rowsort
SELECT DISTINCT + + col0 * col0 * col0 AS col2 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT DISTINCT - + 20 AS col0 FROM tab1 AS cor0
----
-20

query I rowsort
SELECT ALL col0 * col1 + + 65 AS col0 FROM tab2 AS cor0
----
1408
282
4667

query I rowsort
SELECT ALL 31 * col0 - 58 AS col0 FROM tab2 AS cor0
----
159
2360
2391

onlyif mysql # use DIV operator for integer division
query I rowsort label-5736
SELECT DISTINCT + - col2 * - col1 + + col1 DIV 50 FROM tab2 AS cor0
----
1535
646
837

skipif mysql # not compatible
query I rowsort label-5736
SELECT DISTINCT + - col2 * - col1 + + col1 / 50 FROM tab2 AS cor0
----
1535
646
837

query I rowsort
SELECT ALL + 49 * - col0 FROM tab2 AS cor0
----
-343
-3822
-3871

query I rowsort
SELECT DISTINCT 39 + - col1 FROM tab0 AS cor0
----
-47
-52
-58

query I rowsort
SELECT ALL + 53 + col1 AS col2 FROM tab0 AS cor0
----
139
144
150

query I rowsort
SELECT - + col2 + col1 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT cor0.col1 + 93 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 cor2
----
81 values hashing to d99c88e42164790d054cb954d8dc5c06

onlyif mysql # use DIV operator for integer division
query I rowsort label-5742
SELECT DISTINCT - col2 + 65 DIV + 56 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-5742
SELECT DISTINCT - col2 + 65 / + 56 FROM tab1 AS cor0
----
-53
-56
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5743
SELECT - + col1 DIV + col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-5743
SELECT - + col1 / + col0 FROM tab1 AS cor0
----
-8
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5744
SELECT - col2 DIV - ( - 80 + - col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5744
SELECT - col2 / - ( - 80 + - col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col2 AS col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT - col2 + ( col1 ) * - ( - cor0.col0 ) AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT + col1 * col2 - + col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - + col0 - col2 * - col1 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + + cor0.col1 * + cor0.col2 col0 FROM tab1, tab2 cor0
----
9 values hashing to 6106604065a8090bb601eec1374c1712

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab2 cor1, tab0 cor2
----
972 values hashing to 63ccb67e72ebac679a0221202c067b9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5751
SELECT ALL + col0 * 51 + col1 DIV ( + cor0.col1 ) col1 FROM tab0 AS cor0
----
1225
1786
4540

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5751
SELECT ALL + col0 * 51 + col1 / ( + cor0.col1 ) col1 FROM tab0 AS cor0
----
1225
1786
4540

query I rowsort
SELECT ALL - 6 + - 58 AS col2 FROM tab2 AS cor0
----
-64
-64
-64

query I rowsort
SELECT ALL - - ( - cor0.col2 ) * col2 + col1 * 86 FROM tab1 AS cor0
----
-2389
-680
-8098

query I rowsort
SELECT - 27 FROM tab2, tab0 cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5755
SELECT - CAST( NULL AS SIGNED ) * 57 * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5755
SELECT - CAST ( NULL AS INTEGER ) * 57 * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + col2 ) * - cor0.col0 + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT - cor0.col1 * + 9 - col0 FROM tab0 AS cor0
----
-798
-908

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT 44 FROM tab2, tab2 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ALL - - col2 - col2 * col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-5761
SELECT DISTINCT + 25 DIV + ( + col1 ) AS col2 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5761
SELECT DISTINCT + 25 / + ( + col1 ) AS col2 FROM tab2 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col2 ) * - col2 * + cor0.col0 col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT - col0 - 60 FROM tab1 AS cor0
----
-124
-140
-63

query I rowsort
SELECT ALL - 56 AS col2 FROM tab0 AS cor0
----
-56
-56
-56

query I rowsort
SELECT - + ( - col0 ) * + col2 FROM tab1 AS cor0
----
162
3648
7680

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 col1 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL - cor1.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT DISTINCT col1 + 3 FROM tab0 AS cor0
----
100
89
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-5770
SELECT + col2 DIV col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5770
SELECT + col2 / col1 FROM tab2 cor0
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5771
SELECT - 69 DIV - 20 AS col1 FROM tab2 cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-5771
SELECT - 69 / - 20 AS col1 FROM tab2 cor0
----
3
3
3

query I rowsort
SELECT ALL + + 43 + col0 FROM tab1 AS cor0
----
107
123
46

query I rowsort
SELECT 27 * - 28 AS col0 FROM tab0 AS cor0
----
-756
-756
-756

query I rowsort
SELECT ALL - 92 + 12 AS col0 FROM tab2 AS cor0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - 93 * + col0 FROM tab0 cor0
----
-2232
-3255
-8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 23 * - cor0.col1 col2 FROM tab2 AS cor0
----
-1357
-391
-713

query I rowsort
SELECT ALL 63 * - col1 FROM tab1 AS cor0
----
-1638
-630
-819

query I rowsort
SELECT - - 46 * col1 FROM tab0 AS cor0
----
3956
4186
4462

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 73edaf471aef3f42e9a0b0be98b79374

query I rowsort
SELECT ALL - + 6 * - col0 - col1 FROM tab1 AS cor0
----
-8
374
467

query I rowsort
SELECT ALL - 34 * 80 + col1 * + ( col1 ) FROM tab1
----
-2044
-2551
-2620

query I rowsort
SELECT ALL 59 * + col0 + col0 * ( tab2.col2 ) FROM tab2
----
602
6630
7663

query I rowsort
SELECT ALL - 54 * + 70 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 9326c766fc15f93be1bb2b65f2fa4de1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5784
SELECT DISTINCT + CAST( - tab0.col0 AS SIGNED ) AS col0 FROM tab0, tab1 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5784
SELECT DISTINCT + CAST ( - tab0.col0 AS INTEGER ) AS col0 FROM tab0, tab1 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - 94 col0 FROM tab1 AS cor0
----
-68
-81
-84

query I rowsort
SELECT - col1 + ( 38 ) AS col0 FROM tab0 AS cor0
----
-48
-53
-59

query I rowsort
SELECT ALL - + col2 * - 64 AS col1 FROM tab2 AS cor0
----
1664
1728
2432

query I rowsort
SELECT DISTINCT col0 + + col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + col2 * col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT 72 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT - 61 AS col2 FROM tab0 AS cor0
----
-61
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT - col2 + + 8 * col2 * - col2 FROM tab0
----
-53874
-8745
-9

query I rowsort
SELECT 90 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT ALL - tab2.col0 * col0 AS col1 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT DISTINCT tab1.col0 DIV col2 AS col0 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-5796
SELECT DISTINCT tab1.col0 / col2 AS col0 FROM tab1
----
0
1

query I rowsort
SELECT + - col1 * col0 - col2 * - col1 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT ALL + 28 AS col0 FROM tab1
----
28
28
28

query I rowsort
SELECT col1 + col2 * + col0 + + col2 * col2 AS col1 FROM tab0
----
133
14113
1967

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 - + CAST ( col2 AS REAL ) col2 FROM tab1
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5801
SELECT + cor0.col2 DIV ( col1 ) - col0 FROM tab1 AS cor0
----
-1
-59
-73

skipif mysql # not compatible
query I rowsort label-5801
SELECT + cor0.col2 / ( col1 ) - col0 FROM tab1 AS cor0
----
-1
-59
-73

query I rowsort
SELECT ALL tab1.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT - col1 - col2 * cor0.col0 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT - col2 * + col0 * - 73 - col0 FROM tab2 AS cor0
----
13790
147966
219067

query I rowsort
SELECT + cor0.col2 + - ( + col0 * + cor0.col1 ) FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + 98 FROM tab1
----
98
98
98

query I rowsort
SELECT DISTINCT ( - 62 ) * + col2 AS col1 FROM tab2
----
-1612
-1674
-2356

query I rowsort
SELECT 95 AS col2 FROM tab2
----
95
95
95

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 73edaf471aef3f42e9a0b0be98b79374

query I rowsort
SELECT + ( 74 ) AS col0 FROM tab1 AS cor0
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 56 col2 FROM tab1 AS cor0
----
56
56
56

query I rowsort
SELECT - - 57 * col0 * col1 AS col1 FROM tab1 AS cor0
----
36480
4446
59280

query I rowsort
SELECT DISTINCT + + ( 30 ) * col2 AS col1 FROM tab2 AS cor0
----
1140
780
810

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - cor0.col2 AS REAL ) * - col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + 39 FROM tab2 cor0
----
39
39
39

query I rowsort
SELECT + ( col0 ) FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - 70 FROM tab0
----
-70

query I rowsort
SELECT + tab2.col2 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT - ( 96 * col0 ) FROM tab0
----
-2304
-3360
-8544

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 42 * - 23 col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to d191b19b5f1f158ed9022e9668969c26

query I rowsort
SELECT - + 30 * cor0.col1 * - col2 AS col1 FROM tab1 AS cor0
----
17100
37440
42120

query I rowsort
SELECT DISTINCT - 66 FROM tab0, tab2 AS cor0
----
-66

query I rowsort
SELECT ALL 94 FROM tab2
----
94
94
94

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab1 cor1, tab1, tab2 AS cor2
----
3645 values hashing to dd5ce24448edb4b3ab62c251475d6548

query I rowsort
SELECT DISTINCT - + 86 * + col0 FROM tab0 cor0
----
-2064
-3010
-7654

onlyif mysql # use DIV operator for integer division
query I rowsort label-5826
SELECT - cor0.col1 * col2 DIV - 66 FROM tab0 AS cor0
----
1
113
43

skipif mysql # not compatible
query I rowsort label-5826
SELECT - cor0.col1 * col2 / - 66 FROM tab0 AS cor0
----
1
113
43

query I rowsort
SELECT DISTINCT + 81 * col0 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT + - 34 * - col0 FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT ALL + col0 + + col2 + col2 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT DISTINCT - col1 * - col1 - col1 * col2 * col2 AS col2 FROM tab2 AS cor0
----
-21638
-24259
-36403

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * 92 col1 FROM tab1 cor0
----
-276
-5888
-7360

query I rowsort
SELECT cor0.col2 * - 27 FROM tab2 AS cor0
----
-1026
-702
-729

query I rowsort
SELECT ALL + - col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT col1 * - 73 AS col2 FROM tab2 AS cor0
----
-1241
-2263
-4307

query I rowsort
SELECT cor0.col0 * ( col1 ) * - col2 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + col1 * 89 + - col0 AS col2 FROM tab2 AS cor0
----
1434
2752
5173

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5837
SELECT ALL col1 * - CAST( + 99 AS SIGNED ) - - col2 AS col1 FROM tab0 AS cor0
----
-8481
-8927
-9602

skipif mysql # not compatible
query I rowsort label-5837
SELECT ALL col1 * - CAST ( + 99 AS INTEGER ) - - col2 AS col1 FROM tab0 AS cor0
----
-8481
-8927
-9602

query I rowsort
SELECT + col1 * ( - col1 ) + - col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5839
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab1, tab1 AS cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5839
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab1, tab1 AS cor0, tab2 AS cor1
----
NULL

query I rowsort
SELECT ALL col2 * - tab0.col1 * - 84 FROM tab0
----
238392
626808
8148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 59 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 9b5ba014968f631979fc3cf03b41203a

onlyif mysql # use DIV operator for integer division
query I rowsort label-5842
SELECT DISTINCT - col0 DIV - col2 + + col1 * cor0.col1 FROM tab0 cor0
----
7396
8282
9444

skipif mysql # not compatible
query I rowsort label-5842
SELECT DISTINCT - col0 / - col2 + + col1 * cor0.col1 FROM tab0 cor0
----
7396
8282
9444

query I rowsort
SELECT + 13 + + col1 * - col0 * 82 FROM tab1 AS cor0
----
-52467
-6383
-85267

onlyif mysql # use DIV operator for integer division
query I rowsort label-5844
SELECT ALL - col1 DIV - col1 col2 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5844
SELECT ALL - col1 / - col1 col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + col1 * col0 + col0 * - col0 + - col0 FROM tab0 AS cor0
----
1464
2135
89

query I rowsort
SELECT - ( col1 ) * - cor0.col0 + col0 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + ( 57 ) + - col0 AS col2 FROM tab1 AS cor0
----
-121
-137
-60

query I rowsort
SELECT - 9 * col2 + cor0.col2 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-54
1794
2660

onlyif mysql # use DIV operator for integer division
query I rowsort label-5849
SELECT + - col0 DIV 4 AS col2 FROM tab2 AS cor0
----
-1
-19
-19

skipif mysql # not compatible
query I rowsort label-5849
SELECT + - col0 / 4 AS col2 FROM tab2 AS cor0
----
-1
-19
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5850
SELECT + CAST( - col1 AS SIGNED ) * col2 + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif mysql # not compatible
query I rowsort label-5850
SELECT + CAST ( - col1 AS INTEGER ) * col2 + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - + 87 * - col0 AS col0 FROM tab0 AS cor0
----
2088
3045
7743

onlyif mysql # use DIV operator for integer division
query I rowsort label-5852
SELECT + col2 * tab2.col1 DIV + 88 AS col1 FROM tab2
----
17
7
9

skipif mysql # not compatible
query I rowsort label-5852
SELECT + col2 * tab2.col1 / + 88 AS col1 FROM tab2
----
17
7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5853
SELECT ALL - CAST( NULL AS SIGNED ) * ( col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5853
SELECT ALL - CAST ( NULL AS INTEGER ) * ( col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + ( col0 ) FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL - col1 * + col0 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + 74 AS col1 FROM tab2 cor0
----
74
74
74

query I rowsort
SELECT col0 + col0 * col0 AS col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT col0 - col0 * + col1 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT ALL tab1.col0 + col0 AS col1 FROM tab1
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5860
SELECT ALL - - col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5860
SELECT ALL - - col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 + 49 AS col1 FROM tab1 AS cor0
----
-15
-31
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-5862
SELECT DISTINCT col0 DIV - col1 + col0 + - col0 * ( col1 ) FROM tab1 AS cor0
----
-582
-75
-966

skipif mysql # not compatible
query I rowsort label-5862
SELECT DISTINCT col0 / - col1 + col0 + - col0 * ( col1 ) FROM tab1 AS cor0
----
-582
-75
-966

query I rowsort
SELECT col2 * - 25 - + cor0.col0 FROM tab0 AS cor0
----
-2139
-60
-849

query I rowsort
SELECT - - col2 - - ( 10 ) AS col2 FROM tab2 AS cor0
----
36
37
48

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col0 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col0 * cor0.col0 - - 58 FROM tab2 AS cor0
----
107
6142
6299

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - + col0 col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT + col0 * tab2.col0 * - col1 - + tab2.col2 AS col2 FROM tab2
----
-106135
-1546
-358982

query I rowsort
SELECT DISTINCT col2 + - col0 * col1 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT DISTINCT col1 * col2 * + col1 + col2 * 92 FROM tab0
----
247104
686586
9501

onlyif mysql # use DIV operator for integer division
query I rowsort label-5872
SELECT DISTINCT + col1 * 48 DIV col0 + col1 AS col0 FROM tab0
----
140
230
258

skipif mysql # not compatible
query I rowsort label-5872
SELECT DISTINCT + col1 * 48 / col0 + col1 AS col0 FROM tab0
----
140
230
258

query I rowsort
SELECT + - 47 * + ( - col2 ) FROM tab2 AS cor0
----
1222
1269
1786

query I rowsort
SELECT DISTINCT ( col1 ) * col1 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( col0 AS REAL ) FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - cor0.col0 col0 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-5877
SELECT col2 + col0 + 57 DIV - col2 AS col1 FROM tab1
----
120
176
56

skipif mysql # not compatible
query I rowsort label-5877
SELECT col2 + col0 + 57 / - col2 AS col1 FROM tab1
----
120
176
56

query I rowsort
SELECT DISTINCT + ( cor1.col0 ) * 80 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
240
5120
6400

query I rowsort
SELECT + col0 + + 55 * col1 * tab2.col1 AS col2 FROM tab2
----
15974
191533
52862

onlyif mysql # use DIV operator for integer division
query I rowsort label-5880
SELECT - col0 DIV CAST( - 19 AS SIGNED ) + + col2 * - ( + col1 ) * col1 + CAST( 78 + col0 AS SIGNED ) * 25 FROM tab0
----
-241517
-6583
-674863

skipif mysql # not compatible
query I rowsort label-5880
SELECT - col0 / CAST ( - 19 AS INTEGER ) + + col2 * - ( + col1 ) * col1 + CAST ( 78 + col0 AS INTEGER ) * 25 FROM tab0
----
-241517
-6583
-674863

query I rowsort
SELECT - col0 * - col2 + - tab2.col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT col1 + 74 AS col2 FROM tab2
----
105
133
91

query I rowsort
SELECT - + col1 * - cor0.col1 FROM tab1 cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * col0 col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - - cor0.col1 + col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5886
SELECT - 34 DIV + col1 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5886
SELECT - 34 / + col1 FROM tab1 AS cor0
----
-1
-2
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5887
SELECT ALL + col1 + - col0 * CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
2150
3492
8190

skipif mysql # not compatible
query I rowsort label-5887
SELECT ALL + col1 + - col0 * CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL 95 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5889
SELECT DISTINCT - 19 DIV - col2 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-5889
SELECT DISTINCT - 19 / - col2 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT 98 AS col1 FROM tab1 AS cor0
----
98

query I rowsort
SELECT - - col0 + + col0 AS col1 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL 77 * col2 + - col2 FROM tab2 AS cor0
----
1976
2052
2888

query I rowsort
SELECT 15 + col0 AS col0 FROM tab2 AS cor0
----
22
93
94

query I rowsort
SELECT DISTINCT - - 43 + - cor0.col2 * col1 FROM tab1 cor0
----
-1205
-1361
-527

query I rowsort
SELECT DISTINCT + col1 + col0 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - 79 FROM tab1 AS cor0
----
-79
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT 26 AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT - col0 * - tab1.col2 * col2 + - ( col0 ) FROM tab1
----
207872
737200
8745

query I rowsort
SELECT - 97 * + col1 AS col2 FROM tab1 AS cor0
----
-1261
-2522
-970

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab0 AS cor0
----
26

query I rowsort
SELECT ALL + col2 * col1 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT + ( + col1 ) + - cor0.col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 + + col1 col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-5905
SELECT DISTINCT 93 DIV + col2 FROM tab0 AS cor0
----
1
2
93

skipif mysql # not compatible
query I rowsort label-5905
SELECT DISTINCT 93 / + col2 FROM tab0 AS cor0
----
1
2
93

query I rowsort
SELECT + col2 * col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 47 * + col2 FROM tab0 AS cor0
----
-1551
-3854
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 + col2 col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT tab0.col2 + - col0 AS col0 FROM tab0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort
SELECT col0 * - col1 + CAST ( + col0 AS REAL ) FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab1, tab2, tab0 AS cor0
----
10

query I rowsort
SELECT - ( - col2 ) AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL - + 60 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 1a0b29f8e6f82c54623a665ba4af8fd1

query I rowsort
SELECT DISTINCT 45 AS col0 FROM tab2
----
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 col1 FROM tab0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT - + col2 * cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col2 * - ( + col1 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT cor0.col2 + ( + col0 ) * cor0.col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5919
SELECT ALL + col2 * 66 DIV + col1 + col1 AS col2 FROM tab1 AS cor0
----
163
386
500

skipif mysql # not compatible
query I rowsort label-5919
SELECT ALL + col2 * 66 / + col1 + col1 AS col2 FROM tab1 AS cor0
----
163
386
500

query I rowsort
SELECT - col1 * + 27 FROM tab0 AS cor0
----
-2322
-2457
-2619

query I rowsort
SELECT ALL 62 FROM tab1, tab2 cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT cor0.col2 + - cor0.col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col2 + - col2 + + col1 * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL 16 + + col1 FROM tab1 AS cor0
----
26
29
42

query I rowsort
SELECT DISTINCT 15 FROM tab0 AS cor0
----
15

query I rowsort
SELECT ALL + ( - col2 ) * + col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - ( + col2 ) * col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col2 + - col1 + col1 FROM tab1 cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5929
SELECT ALL + 81 + col0 DIV - col1 FROM tab2 AS cor0
----
77
80
81

skipif mysql # not compatible
query I rowsort label-5929
SELECT ALL + 81 + col0 / - col1 FROM tab2 AS cor0
----
77
80
81

query I rowsort
SELECT DISTINCT + + cor0.col2 * - ( col1 ) - + col0 AS col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT - 34 + + col1 - col1 AS col2 FROM tab0 AS cor0
----
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5932
SELECT ALL + CAST( col0 AS SIGNED ) + - col2 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-5932
SELECT ALL + CAST ( col0 AS INTEGER ) + - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL 46 AS col1 FROM tab2 AS cor0
----
46
46
46

query I rowsort
SELECT DISTINCT cor1.col2 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5935
SELECT DISTINCT - - 9 * cor0.col2 DIV 91 AS col1 FROM tab0 AS cor0
----
0
3
8

skipif mysql # not compatible
query I rowsort label-5935
SELECT DISTINCT - - 9 * cor0.col2 / 91 AS col1 FROM tab0 AS cor0
----
0
3
8

query I rowsort
SELECT DISTINCT + 38 FROM tab2, tab0 AS cor0
----
38

query I rowsort
SELECT ALL - 54 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

onlyif mysql # use DIV operator for integer division
query I rowsort label-5938
SELECT - cor0.col1 * 82 DIV col1 FROM tab2 AS cor0
----
-82
-82
-82

skipif mysql # not compatible
query I rowsort label-5938
SELECT - cor0.col1 * 82 / col1 FROM tab2 AS cor0
----
-82
-82
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5939
SELECT CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5939
SELECT CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 82 AS col2 FROM tab1 AS cor0
----
82
82
82

query I rowsort
SELECT - + cor0.col1 * - 43 FROM tab2 AS cor0
----
1333
2537
731

query I rowsort
SELECT ALL 82 * col1 AS col0 FROM tab1 AS cor0
----
1066
2132
820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5943
SELECT ALL CAST( NULL AS SIGNED ) + + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5943
SELECT ALL CAST ( NULL AS INTEGER ) + + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 12 FROM tab1 AS cor0
----
12

query I rowsort
SELECT col0 * col0 * + 15 AS col1 FROM tab0 AS cor0
----
118815
18375
8640

query I rowsort
SELECT ALL - - 96 AS col0 FROM tab2 cor0
----
96
96
96

query I rowsort
SELECT - 81 * col2 FROM tab2 AS cor0
----
-2106
-2187
-3078

query I rowsort
SELECT DISTINCT + 39 FROM tab2 AS cor0
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 57 col1 FROM tab2, tab0 AS cor0
----
-57

query I rowsort
SELECT 52 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) FROM tab2, tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT 78 * + col0 AS col1 FROM tab2
----
546
6084
6162

query I rowsort
SELECT ALL - tab0.col0 + ( + tab0.col0 ) FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5954
SELECT ALL - tab0.col2 * col1 + - col1 + col1 * - CAST( ( - col2 ) AS SIGNED ) AS col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5954
SELECT ALL - tab0.col2 * col1 + - col1 + col1 * - CAST ( ( - col2 ) AS INTEGER ) AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + col2 + 99 * 32 FROM tab1
----
3222
3225
3264

query I rowsort
SELECT - col2 - col0 AS col0 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT - col1 * 35 FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT 22 + 49 FROM tab2, tab1 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT DISTINCT 90 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 AS cor2, tab1 AS cor3
----
90

query I rowsort
SELECT col2 * ( col1 ) + - tab1.col2 + 80 * col2 FROM tab1
----
5073
5670
8832

query I rowsort
SELECT DISTINCT + 7 + 37 AS col1 FROM tab2 AS cor0
----
44

query I rowsort
SELECT - tab1.col0 * ( col1 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + - col0 + 32 * col2 * 97 AS col1 FROM tab0 cor0
----
102408
254439
3069

query I rowsort
SELECT DISTINCT ( cor0.col0 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - + col0 + 48 FROM tab2 cor0
----
-30
-31
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5967
SELECT ALL CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5967
SELECT ALL CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col2 - col1 FROM tab0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5969
SELECT col1 * col2 + - ( 83 ) DIV + col2 - col0 AS col0 FROM tab0
----
-21
2812
7372

skipif mysql # not compatible
query I rowsort label-5969
SELECT col1 * col2 + - ( 83 ) / + col2 - col0 AS col0 FROM tab0
----
-21
2812
7372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col1 - - tab1.col2 * 94 col0 FROM tab1
----
5099
5304
8957

query I rowsort
SELECT DISTINCT + tab0.col2 - col1 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - col1 * col2 * + ( + cor0.col0 * - col2 ) - - 78 * - 4 FROM tab1 AS cor0
----
2079048
227136
9584328

query I rowsort
SELECT 90 AS col0 FROM tab1 AS cor0
----
90
90
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5974
SELECT - col1 * + CAST( NULL AS DECIMAL ) - + col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5974
SELECT - col1 * + CAST ( NULL AS REAL ) - + col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col0 * col1 + 62 * col1 FROM tab0 AS cor0
----
13741
7396
9409

query I rowsort
SELECT col0 * - col2 + + cor0.col1 * + col1 AS col2 FROM tab1 cor0
----
-3548
-7511
514

query I rowsort
SELECT DISTINCT col0 - col2 * col1 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT - col1 - + col1 * 23 AS col0 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 * + col2 FROM tab0 cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + - col1 * col1 * col1 FROM tab1 cor0
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-5981
SELECT ALL - col2 DIV + 13 FROM tab2 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-5981
SELECT ALL - col2 / + 13 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT col2 * - 80 AS col1 FROM tab0 AS cor0
----
-2640
-6560
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col0 - 45 col1 FROM tab2 AS cor0
----
-1388
-262
-4647

query I rowsort
SELECT ALL + + 8 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT + 44 * col2 AS col2 FROM tab2
----
1144
1188
1672

query I rowsort
SELECT ALL 36 - col0 * + col1 AS col1 FROM tab2
----
-1307
-181
-4566

query I rowsort
SELECT col0 * + col2 - + col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT - col0 * + col2 * + col2 + + col1 FROM tab2 AS cor0
----
-114059
-5072
-52669

query I rowsort
SELECT col2 * - col0 + ( col0 ) * col1 * - col2 FROM tab1 cor0
----
-107520
-40128
-4374

query I rowsort
SELECT + 71 AS col1 FROM tab1
----
71
71
71

query I rowsort
SELECT ALL - 56 FROM tab1
----
-56
-56
-56

query I rowsort
SELECT DISTINCT + cor0.col1 + 83 AS col0 FROM tab1 AS cor0
----
109
93
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5993
SELECT DISTINCT CAST( - 65 AS SIGNED ) AS col1 FROM tab1
----
-65

skipif mysql # not compatible
query I rowsort label-5993
SELECT DISTINCT CAST ( - 65 AS INTEGER ) AS col1 FROM tab1
----
-65

query I rowsort
SELECT ALL + 93 * + 96 FROM tab2 AS cor0
----
8928
8928
8928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5995
SELECT CAST( NULL AS SIGNED ) * + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5995
SELECT CAST ( NULL AS INTEGER ) * + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - ( + col2 ) * - col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col1 + 48 * + col0 AS col0 FROM tab0 AS cor0
----
1066
1583
4181

query I rowsort
SELECT ALL + + col0 * + col0 * + col0 + col0 AS col2 FROM tab1 AS cor0
----
262208
30
512080

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * + col0 col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT col2 * - col1 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - col0 - + cor0.col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT - + cor0.col1 - col2 * 41 AS col0 FROM tab2 AS cor0
----
-1125
-1138
-1575

query I rowsort
SELECT ALL + 26 * col1 FROM tab0 AS cor0
----
2236
2366
2522

query I rowsort
SELECT + + col1 - - col2 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL + cor0.col1 + col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6008
SELECT DISTINCT + col0 DIV col0 AS col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6008
SELECT DISTINCT + col0 / col0 AS col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT 17 * tab0.col2 AS col0 FROM tab0
----
1394
17
561

query I rowsort
SELECT ( - col0 ) * - tab2.col1 + col1 AS col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - 55 + - col1 * col1 AS col2 FROM tab2
----
-1016
-344
-3536

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6012
SELECT ALL - col1 * + CAST( NULL AS SIGNED ) + ( + col1 ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6012
SELECT ALL - col1 * + CAST ( NULL AS INTEGER ) + ( + col1 ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 + + col1 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6014
SELECT DISTINCT col1 + - col2 * col2 DIV col1 FROM tab2 AS cor0
----
-67
48
8

skipif mysql # not compatible
query I rowsort label-6014
SELECT DISTINCT col1 + - col2 * col2 / col1 FROM tab2 AS cor0
----
-67
48
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6015
SELECT - col0 * - CAST( col1 AS SIGNED ) + - cor0.col0 AS col1 FROM tab1 AS cor0
----
576
75
960

skipif mysql # not compatible
query I rowsort label-6015
SELECT - col0 * - CAST ( col1 AS INTEGER ) + - cor0.col0 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL - col2 * + 7 * + col2 AS col0 FROM tab1 AS cor0
----
-20412
-22743
-64512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6017
SELECT + cor0.col1 + CAST( col1 AS SIGNED ) * col2 AS col2 FROM tab2 cor0
----
1593
663
868

skipif mysql # not compatible
query I rowsort label-6017
SELECT + cor0.col1 + CAST ( col1 AS INTEGER ) * col2 AS col2 FROM tab2 cor0
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6018
SELECT - + cor0.col0 * - CAST( - col0 AS SIGNED ) + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

skipif mysql # not compatible
query I rowsort label-6018
SELECT - + cor0.col0 * - CAST ( - col0 AS INTEGER ) + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL col2 + - 8 FROM tab1 AS cor0
----
46
49
88

query I rowsort
SELECT + tab0.col1 - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col1 * - col2 * + col1 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6022
SELECT ALL - col0 * CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6022
SELECT ALL - col0 * CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 * col1 * cor0.col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - + col0 + col0 * ( col2 ) AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL - col0 * col1 + col2 AS col2 FROM tab0 cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-6026
SELECT cor0.col1 DIV - ( + col2 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6026
SELECT cor0.col1 / - ( + col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + 24 FROM tab1, tab1 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

onlyif mysql # use DIV operator for integer division
query I rowsort label-6028
SELECT + 29 + + ( + col1 ) DIV cor0.col0 col0 FROM tab2 AS cor0
----
29
29
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6028
SELECT + 29 + + ( + col1 ) / cor0.col0 col0 FROM tab2 AS cor0
----
29
29
33

query I rowsort
SELECT DISTINCT - - cor0.col2 AS col0 FROM tab2 cor0
----
26
27
38

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT + col0 + 21 FROM tab1
----
101
24
85

query I rowsort
SELECT - 49 + - col1 * col2 FROM tab1 AS cor0
----
-1297
-1453
-619

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6033
SELECT - CAST( - col0 AS SIGNED ) + + col1 * col2 FROM tab0 AS cor0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-6033
SELECT - CAST ( - col0 AS INTEGER ) + + col1 * col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col1 + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - - cor0.col0 * ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT col2 * - col2 + 14 * col2 FROM tab0
----
-5576
-627
13

query I rowsort
SELECT + 30 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT DISTINCT col2 + 46 * col1 * col1 FROM tab0
----
340249
381008
432815

query I rowsort
SELECT - col0 + tab0.col2 AS col1 FROM tab0
----
-34
-7
9

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT ALL + 71 + - cor0.col1 + col2 FROM tab1 AS cor0
----
118
154
99

query I rowsort
SELECT ALL - ( - col0 ) * col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + col0 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - ( col0 ) * + col1 + - 30 AS col1 FROM tab1 AS cor0
----
-1070
-108
-670

query I rowsort
SELECT + col2 * + col1 - 68 FROM tab0 AS cor0
----
2770
29
7394

query I rowsort
SELECT DISTINCT + + ( col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL 88 + - col2 FROM tab1 AS cor0
----
-8
31
34

query I rowsort
SELECT 71 + col2 * 31 FROM tab2 AS cor0
----
1249
877
908

query I rowsort
SELECT - + 73 * col2 FROM tab0 AS cor0
----
-2409
-5986
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6050
SELECT col0 * - col0 + + 39 * - col0 + col2 DIV 52 FROM tab1
----
-125
-6591
-9519

skipif mysql # not compatible
query I rowsort label-6050
SELECT col0 * - col0 + + 39 * - col0 + col2 / 52 FROM tab1
----
-125
-6591
-9519

query I rowsort
SELECT - col2 * 9 + - col0 FROM tab0 AS cor0
----
-321
-44
-827

query I rowsort
SELECT DISTINCT - - col2 * col2 + - col0 FROM tab1 AS cor0
----
2913
3185
9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-6053
SELECT DISTINCT + - col0 DIV - 63 + col1 * cor0.col1 FROM tab1 AS cor0
----
101
170
676

skipif mysql # not compatible
query I rowsort label-6053
SELECT DISTINCT + - col0 / - 63 + col1 * cor0.col1 FROM tab1 AS cor0
----
101
170
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6054
SELECT - col2 DIV col1 + 91 * col2 FROM tab2 AS cor0
----
2366
2457
3456

skipif mysql # not compatible
query I rowsort label-6054
SELECT - col2 / col1 + 91 * col2 FROM tab2 AS cor0
----
2366
2457
3456

query I rowsort
SELECT + tab0.col0 + + col2 FROM tab0
----
171
36
57

query I rowsort
SELECT + tab0.col0 * + 58 AS col2 FROM tab0
----
1392
2030
5162

query I rowsort
SELECT ALL - col1 * ( col0 ) FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + 82 col0 FROM tab1
----
246
5248
6560

query I rowsort
SELECT + ( + cor0.col0 ) * cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e1120e7b687b32270ef70393236e7341

query I rowsort
SELECT + - cor0.col2 + 99 AS col2 FROM tab0 AS cor0
----
17
66
98

query I rowsort
SELECT ALL - col1 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6062
SELECT + - col0 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6062
SELECT + - col0 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - col0 + - col0 col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT col0 * col1 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT col1 * + col0 - 43 FROM tab1
----
35
597
997

query I rowsort
SELECT DISTINCT col1 * col0 * - 65 + tab2.col2 + col2 FROM tab2
----
-14051
-299078
-87219

query I rowsort
SELECT col0 + cor0.col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6068
SELECT 47 DIV col1 AS col2 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6068
SELECT 47 / col1 AS col2 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT + cor0.col0 + col0 + col0 AS col1 FROM tab1 AS cor0
----
192
240
9

query I rowsort
SELECT ALL + - 15 AS col0 FROM tab1 AS cor0
----
-15
-15
-15

query I rowsort
SELECT - col0 * - col0 * - col0 AS col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT + col2 * col0 + cor0.col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6073
SELECT - cor0.col1 * + col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6073
SELECT - cor0.col1 * + col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6074
SELECT - cor0.col0 * - col0 * + col0 + - col1 DIV col0 + - col0 FROM tab1 AS cor0
----
16
262080
511920

skipif mysql # not compatible
query I rowsort label-6074
SELECT - cor0.col0 * - col0 * + col0 + - col1 / col0 + - col0 FROM tab1 AS cor0
----
16
262080
511920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6075
SELECT + col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6075
SELECT + col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6076
SELECT ALL - + col1 DIV - ( col1 ) AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6076
SELECT ALL - + col1 / - ( col1 ) AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + - col2 + cor0.col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT col0 * + 13 AS col0 FROM tab0 AS cor0
----
1157
312
455

query I rowsort
SELECT DISTINCT - col1 * ( - col1 ) + - col0 AS col1 FROM tab2 AS cor0
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 - + col1 * ( col1 ) col2 FROM tab0 cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-6081
SELECT + col1 DIV 95 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6081
SELECT + col1 / 95 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + tab0.col1 * - 90 FROM tab0, tab1 AS cor0
----
9 values hashing to 0d6a6fb5abdc2517b93f3ab186a9e2f6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6083
SELECT - col1 * col1 DIV cor0.col1 + col1 + - col2 col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6083
SELECT - col1 * col1 / cor0.col1 + col1 + - col2 col0 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6084
SELECT - - col1 * + 37 + cor0.col2 DIV cor0.col1 col0 FROM tab1 AS cor0
----
375
488
964

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6084
SELECT - - col1 * + 37 + cor0.col2 / cor0.col1 col0 FROM tab1 AS cor0
----
375
488
964

query I rowsort
SELECT - ( - 35 ) + - col2 + + col1 FROM tab0 AS cor0
----
131
44
88

query I rowsort
SELECT DISTINCT - tab1.col1 * ( col2 ) + + col0 * - 9 FROM tab1
----
-1146
-1431
-1968

query I rowsort
SELECT - col2 * - 12 AS col1 FROM tab1
----
1152
648
684

query I rowsort
SELECT DISTINCT ( 6 ) FROM tab0
----
6

query I rowsort
SELECT - 47 AS col0 FROM tab2
----
-47
-47
-47

query I rowsort
SELECT ALL - + col0 + col0 * col0 + - 87 * - col2 AS col1 FROM tab2 cor0
----
2391
8268
9468

query I rowsort
SELECT ALL + 93 + tab0.col2 * 31 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 848dc42ee2301e102b69d73718547595

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6092
SELECT ALL CAST( NULL AS SIGNED ) * + col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6092
SELECT ALL CAST ( NULL AS INTEGER ) * + col1 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 97 * + 15 AS col2 FROM tab0
----
1455

onlyif mysql # use DIV operator for integer division
query I rowsort label-6094
SELECT - col1 DIV + 72 + - col1 - col1 AS col0 FROM tab1 cor0
----
-20
-26
-52

skipif mysql # not compatible
query I rowsort label-6094
SELECT - col1 / + 72 + - col1 - col1 AS col0 FROM tab1 cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 71 col1 FROM tab0
----
71

query I rowsort
SELECT + - col2 + + col2 * + col0 + col1 AS col1 FROM tab2 AS cor0
----
193
2061
2981

query I rowsort
SELECT DISTINCT ( - 27 ) FROM tab2
----
-27

query I rowsort
SELECT - col1 * + col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - + cor0.col1 + cor0.col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + cor0.col2 * col1 + - 3 * + 46 - - cor0.col1 * + col1 * col1 FROM tab0 AS cor0
----
638756
760895
912632

onlyif mysql # use DIV operator for integer division
query I rowsort label-6101
SELECT DISTINCT col2 DIV - cor0.col0 + - 58 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-192
-3712
-4641

skipif mysql # not compatible
query I rowsort label-6101
SELECT DISTINCT col2 / - cor0.col0 + - 58 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-192
-3712
-4641

query I rowsort
SELECT ALL + ( - col0 ) * - ( - col1 ) + col1 * cor0.col2 - - col2 AS col0 FROM tab2 cor0
----
-3042
-659
647

query I rowsort
SELECT ALL col0 - + 12 * col2 AS col2 FROM tab2
----
-234
-317
-377

query I rowsort
SELECT ALL col1 + col0 + 3 AS col1 FROM tab1
----
32
77
96

query I rowsort
SELECT 66 + + col0 FROM tab2
----
144
145
73

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 AS col1 FROM tab0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-6107
SELECT DISTINCT + ( + col0 ) + ( - col0 ) * col2 DIV col0 + col0 AS col2 FROM tab0
----
15
69
96

skipif mysql # not compatible
query I rowsort label-6107
SELECT DISTINCT + ( + col0 ) + ( - col0 ) * col2 / col0 + col0 AS col2 FROM tab0
----
15
69
96

query I rowsort
SELECT 51 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT + 16 * - col2 - + col0 AS col0 FROM tab1 AS cor0
----
-1616
-867
-976

query I rowsort
SELECT ALL + col1 + col1 * - col2 * + col0 FROM tab0 AS cor0
----
-3298
-664027
-68026

onlyif mysql # use DIV operator for integer division
query I rowsort label-6111
SELECT DISTINCT - - col2 + + col1 + - col1 DIV + col2 AS col1 FROM tab0 AS cor0
----
1
117
172

skipif mysql # not compatible
query I rowsort label-6111
SELECT DISTINCT - - col2 + + col1 + - col1 / + col2 AS col1 FROM tab0 AS cor0
----
1
117
172

query I rowsort
SELECT DISTINCT - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6113
SELECT DISTINCT col0 + col1 * - CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
-36
-673
-89

skipif mysql # not compatible
query I rowsort label-6113
SELECT DISTINCT col0 + col1 * - CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT + 41 * - col0 + + col1 AS col0 FROM tab0 AS cor0
----
-1338
-3558
-898

query I rowsort
SELECT ALL + ( + col1 ) + 57 + 22 FROM tab0
----
165
170
176

query I rowsort
SELECT ALL ( + col2 * + col0 ) + + tab0.col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT DISTINCT - col2 * 34 AS col1 FROM tab1
----
-1836
-1938
-3264

query I rowsort
SELECT + col2 * + 99 FROM tab0 cor0
----
3267
8118
99

query I rowsort
SELECT - - ( ( - col1 ) ) * col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + ( 96 ) FROM tab2 AS cor0
----
-96
-96
-96

query I rowsort
SELECT + ( col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6122
SELECT ALL - CAST( NULL AS SIGNED ) + + col1 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-6122
SELECT ALL - CAST ( NULL AS INTEGER ) + + col1 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 - col2 AS col2 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - + col0 + - 59 * - col2 AS col0 FROM tab0 AS cor0
----
1923
24
4749

query I rowsort
SELECT DISTINCT + col1 + + col2 + + col1 FROM tab0 AS cor0
----
195
205
264

query I rowsort
SELECT DISTINCT col0 + 42 * + col1 FROM tab0 AS cor0
----
3636
3911
4109

query I rowsort
SELECT + + 58 * col2 FROM tab1 cor0
----
3132
3306
5568

query I rowsort
SELECT ALL - col2 - 65 AS col2 FROM tab0 AS cor0
----
-147
-66
-98

query I rowsort
SELECT DISTINCT - col0 + col2 * col1 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL - + col0 - + ( col2 ) FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + - col0 * + col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT col2 * col2 + - 32 FROM tab1
----
2884
3217
9184

query I rowsort
SELECT DISTINCT 65 AS col1 FROM tab1, tab2 AS cor0
----
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6134
SELECT - col1 * CAST( - 73 AS SIGNED ) FROM tab1
----
1898
730
949

skipif mysql # not compatible
query I rowsort label-6134
SELECT - col1 * CAST ( - 73 AS INTEGER ) FROM tab1
----
1898
730
949

query I rowsort
SELECT 29 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 col2 FROM tab1
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 * 82 + - col1 col2 FROM tab2
----
-1575
-1589
-1617

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( - col1 + + 23 ) * + 15 col0 FROM tab0
----
-1075
-921
-931

query I rowsort
SELECT DISTINCT + + col0 * col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT 89 + + col0 * tab0.col0 + + col1 * col2 FROM tab0
----
1411
15472
3503

query I rowsort
SELECT ALL ( col1 ) * col1 - col2 AS col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT col0 * + col2 - 81 * + 56 * cor0.col0 FROM tab1 AS cor0
----
-13446
-286656
-355200

query I rowsort
SELECT ALL - col0 * + col2 * 9 + col0 AS col2 FROM tab0 AS cor0
----
-280
-65593
-7104

query I rowsort
SELECT DISTINCT + cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL col0 + - col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - - 26 * cor0.col2 * + 54 + + cor0.col1 * col2 AS col2 FROM tab1 cor0
----
136032
77220
80598

query I rowsort
SELECT DISTINCT - - cor0.col0 * 19 - 1 FROM tab1 AS cor0
----
1215
1519
56

query I rowsort
SELECT - cor0.col0 + - col2 * - col1 AS col1 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + 94 * + col1 col1 FROM tab1 AS cor0
----
1235
2470
950

query I rowsort
SELECT + col2 + + ( + col1 ) * - col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT + cor0.col2 + + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( 21 ) + col2 * - col0 col1 FROM tab2 AS cor0
----
-2645
-789
462

query I rowsort
SELECT ALL + + col1 + col0 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT col2 + cor0.col1 * 16 FROM tab1 AS cor0
----
217
304
470

query I rowsort
SELECT DISTINCT - col0 - col0 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
159
3584
7600

skipif mysql # not compatible
query I rowsort
SELECT + + col0 + - CAST ( - col1 AS REAL ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - + col2 + cor0.col1 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col0 + 31 * col1 AS col2 FROM tab2 AS cor0
----
1907
606
968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6161
SELECT + col2 * + CAST( ( - col1 ) AS SIGNED ) + + col1 * + 67 * - cor0.col2 FROM tab0 AS cor0
----
-192984
-507416
-6596

skipif mysql # not compatible
query I rowsort label-6161
SELECT + col2 * + CAST ( ( - col1 ) AS INTEGER ) + + col1 * + 67 * - cor0.col2 FROM tab0 AS cor0
----
-192984
-507416
-6596

query I rowsort
SELECT col1 + - col1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6163
SELECT - col1 + col1 DIV + 28 AS col0 FROM tab0 AS cor0
----
-83
-88
-94

skipif mysql # not compatible
query I rowsort label-6163
SELECT - col1 + col1 / + 28 AS col0 FROM tab0 AS cor0
----
-83
-88
-94

query I rowsort
SELECT DISTINCT - 9 AS col0 FROM tab0, tab0 AS cor0
----
-9

query I rowsort
SELECT ALL col1 - 55 AS col0 FROM tab1 AS cor0
----
-29
-42
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 - col1 col2 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT + 98 AS col0 FROM tab1, tab2 AS cor0
----
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6168
SELECT DISTINCT - col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6168
SELECT DISTINCT - col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

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 + - col0 - + col2 * col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT + - col2 * - 29 AS col0 FROM tab1 AS cor0
----
1566
1653
2784

query I rowsort
SELECT + col1 + 45 AS col2 FROM tab2 AS cor0
----
104
62
76

query I rowsort
SELECT + + ( - 43 ) FROM tab1 AS cor0
----
-43
-43
-43

onlyif mysql # use DIV operator for integer division
query I rowsort label-6174
SELECT + col0 * 6 + col1 DIV col0 + col1 FROM tab0 cor0
----
233
309
626

skipif mysql # not compatible
query I rowsort label-6174
SELECT + col0 * 6 + col1 / col0 + col1 FROM tab0 cor0
----
233
309
626

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + col2 * col2 col2 FROM tab0 AS cor0
----
0
1056
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + tab2.col1 * 29 AS col0 FROM tab2
----
1711
493
899

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6178
SELECT CAST( NULL AS SIGNED ) * 46 + col0 col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6178
SELECT CAST ( NULL AS INTEGER ) * 46 + col0 col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 18 + - col2 AS col2 FROM tab1 AS cor0
----
-36
-39
-78

query I rowsort
SELECT cor0.col2 * col0 * col1 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-6181
SELECT + + col2 DIV - col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6181
SELECT + + col2 / - col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col0 + col2 col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT - + col2 * col1 * - 41 AS col0 FROM tab2 AS cor0
----
26486
34317
62894

query I rowsort
SELECT DISTINCT - + 75 * col0 AS col2 FROM tab2 AS cor0
----
-525
-5850
-5925

query I rowsort
SELECT ALL col1 * + ( tab2.col0 + + col2 ) FROM tab2
----
1054
1989
6136

query I rowsort
SELECT - ( col1 ) + col0 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-6187
SELECT DISTINCT - 49 DIV tab1.col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-6187
SELECT DISTINCT - 49 / tab1.col2 FROM tab1
----
0

query I rowsort
SELECT 89 * + cor0.col1 FROM tab1 AS cor0
----
1157
2314
890

query I rowsort
SELECT + + col1 * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - - cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL 95 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6192
SELECT + tab1.col2 * + tab1.col0 + CAST( col1 AS SIGNED ) FROM tab1
----
188
3658
7693

skipif mysql # not compatible
query I rowsort label-6192
SELECT + tab1.col2 * + tab1.col0 + CAST ( col1 AS INTEGER ) FROM tab1
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - + col1 * - col0 col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - col0 * - 22 * - col1 AS col2 FROM tab2 AS cor0
----
-101244
-29546
-4774

query I rowsort
SELECT ALL + 24 AS col1 FROM tab2 AS cor0
----
24
24
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-6196
SELECT - 30 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6196
SELECT - 30 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 14 * tab0.col2 AS col1 FROM tab0
----
1148
14
462

query I rowsort
SELECT DISTINCT - col2 * tab1.col2 AS col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - col0 * tab1.col0 AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab2, tab1 AS cor0
----
46

query I rowsort
SELECT ( ( tab0.col0 ) ) FROM tab0
----
24
35
89

query I rowsort
SELECT ALL + col2 + col2 * 30 FROM tab2 AS cor0
----
1178
806
837

query I rowsort
SELECT - - 99 * + col2 + 93 AS col0 FROM tab1 AS cor0
----
5439
5736
9597

query I rowsort
SELECT ALL + col1 + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - + col1 - cor0.col1 * - col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - 87 AS col0 FROM tab0, tab1 AS cor0
----
-87

query I rowsort
SELECT 17 AS col1 FROM tab1
----
17
17
17

query I rowsort
SELECT DISTINCT 21 * col1 - col0 FROM tab2
----
1161
278
644

query I rowsort
SELECT - 35 - col1 FROM tab2 AS cor0
----
-52
-66
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 col1 FROM tab2
----
34
34
34

query I rowsort
SELECT DISTINCT - col2 - ( + tab0.col2 ) * col0 AS col0 FROM tab0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 67 * - col0 + - col2 col0 FROM tab2
----
-496
-5252
-5331

query I rowsort
SELECT - ( - cor0.col1 ) + - 19 AS col2 FROM tab2 AS cor0
----
-2
12
40

query I rowsort
SELECT - - ( col2 ) + ( - col1 * col2 ) AS col0 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT - 50 + col2 FROM tab2
----
-12
-23
-24

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab0, tab1 cor1
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

onlyif mysql # use DIV operator for integer division
query I rowsort label-6217
SELECT 77 + + col2 DIV + tab1.col2 + - tab1.col2 DIV + col1 AS col0 FROM tab1
----
71
73
76

skipif mysql # not compatible
query I rowsort label-6217
SELECT 77 + + col2 / + tab1.col2 + - tab1.col2 / + col1 AS col0 FROM tab1
----
71
73
76

query I rowsort
SELECT 63 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT ALL + col2 + - col0 * - col1 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-180
-40903
-83104

query I rowsort
SELECT + + 60 - - col1 FROM tab1 AS cor0
----
70
73
86

query I rowsort
SELECT ALL + cor0.col0 * - col1 + + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + 9 + col2 * 5 AS col1 FROM tab2 AS cor0
----
139
144
199

onlyif mysql # use DIV operator for integer division
query I rowsort label-6223
SELECT DISTINCT - col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-6223
SELECT DISTINCT - col2 / + col0 AS col2 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT DISTINCT + 52 AS col2 FROM tab1 AS cor0
----
52

query I rowsort
SELECT DISTINCT - col1 + + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
156
650
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6226
SELECT - - col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6226
SELECT - - col1 / + col1 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - + col1 * - col2 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * cor0.col1 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - - 73 AS col2 FROM tab1 AS cor0
----
73
73
73

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + cor1.col1 + 16 AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 11746ce346d203cf167af0ba83e21ffa

onlyif mysql # use DIV operator for integer division
query I rowsort label-6232
SELECT + + ( + col0 ) + col0 DIV 9 AS col1 FROM tab2 AS cor0
----
7
86
87

skipif mysql # not compatible
query I rowsort label-6232
SELECT + + ( + col0 ) + col0 / 9 AS col1 FROM tab2 AS cor0
----
7
86
87

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2, tab2 cor2
----
3645 values hashing to c670882ff9ea3f0bb08fc55ec569be96

query I rowsort
SELECT - - 56 - - col2 AS col1 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT 22 + + ( - col0 ) * - col2 AS col0 FROM tab2 cor0
----
2050
211
3024

query I rowsort
SELECT ALL - + col2 * + col2 * col1 + ( - col0 ) * col1 FROM tab1 AS cor0
----
-120848
-33130
-75894

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6237
SELECT DISTINCT - CAST( col1 AS SIGNED ) * - col1 * - col0 AS col2 FROM tab0 cor0
----
-177504
-329315
-737009

skipif mysql # not compatible
query I rowsort label-6237
SELECT DISTINCT - CAST ( col1 AS INTEGER ) * - col1 * - col0 AS col2 FROM tab0 cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ( + 87 ) * + col2 AS col1 FROM tab2 AS cor0
----
2262
2349
3306

query I rowsort
SELECT + - ( + col0 ) * + col2 * ( + col2 ) AS col1 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + 85 * + col1 + cor0.col2 FROM tab0 AS cor0
----
7343
7817
8246

query I rowsort
SELECT DISTINCT 3 * col1 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT ALL - 7 * - col0 + col1 AS col1 FROM tab2 AS cor0
----
570
605
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6243
SELECT CAST( + 58 AS SIGNED ) FROM tab0 AS cor0
----
58
58
58

skipif mysql # not compatible
query I rowsort label-6243
SELECT CAST ( + 58 AS INTEGER ) FROM tab0 AS cor0
----
58
58
58

query I rowsort
SELECT - + 30 * + col2 FROM tab1 AS cor0
----
-1620
-1710
-2880

query I rowsort
SELECT DISTINCT 8 * - col0 FROM tab0 AS cor0
----
-192
-280
-712

query I rowsort
SELECT + - 29 * col2 FROM tab0 AS cor0
----
-2378
-29
-957

query I rowsort
SELECT DISTINCT - ( - col2 ) + col1 * ( col1 ) FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-6248
SELECT ALL + 49 DIV - col1 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6248
SELECT ALL + 49 / - col1 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT 85 + + 63 AS col2 FROM tab0 AS cor0
----
148
148
148

query I rowsort
SELECT ALL + ( + cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + + ( - col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 + + col0 col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT 29 + col1 - col0 AS col1 FROM tab0 AS cor0
----
31
91

query I rowsort
SELECT ALL - ( + 19 ) AS col0 FROM tab0 AS cor0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + 46 * col1 FROM tab0 AS cor0
----
3956
4186
4462

query I rowsort
SELECT + cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + 81 FROM tab0 AS cor0
----
81

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

onlyif mysql # use DIV operator for integer division
query I rowsort label-6259
SELECT ALL cor0.col1 DIV + 93 FROM tab2, tab0 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-6259
SELECT ALL cor0.col1 / + 93 FROM tab2, tab0 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

query I rowsort
SELECT + + 99 + col2 FROM tab1 AS cor0
----
153
156
195

query I rowsort
SELECT ALL - + 47 * cor0.col2 * - ( + cor0.col2 ) AS col2 FROM tab0 cor0
----
316028
47
51183

onlyif mysql # use DIV operator for integer division
query I rowsort label-6262
SELECT DISTINCT tab2.col1 DIV + tab2.col0 - col0 FROM tab2
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-6262
SELECT DISTINCT tab2.col1 / + tab2.col0 - col0 FROM tab2
----
-3
-78
-79

query I rowsort
SELECT ALL - 72 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 cor2
----
81 values hashing to 95a1a68628dd064d94b4fe1543a3419f

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - col0 + + col0 * 96 FROM tab0 AS cor0
----
2280
3325
8455

query I rowsort
SELECT DISTINCT 9 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
297
738
9

query I rowsort
SELECT ALL + col1 * col2 + + 79 AS col2 FROM tab2 AS cor0
----
1613
725
916

query I rowsort
SELECT - 94 - col2 AS col1 FROM tab0 cor0
----
-127
-176
-95

query I rowsort
SELECT - 75 + col2 * col2 FROM tab1
----
2841
3174
9141

query I rowsort
SELECT ALL + col0 * col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - col2 * col0 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6272
SELECT ALL col2 DIV cor0.col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6272
SELECT ALL col2 / cor0.col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT 32 * cor0.col1 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f1e78eb019f09ee3a571c513a080b656

query I rowsort
SELECT DISTINCT col2 + + col1 AS col2 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort
SELECT - col1 + + CAST ( 15 AS REAL ) AS col2 FROM tab2 AS cor0
----
-16
-2
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + 98 col1 FROM tab1 AS cor0
----
101
162
178

query I rowsort
SELECT ALL col2 * - ( 37 ) AS col1 FROM tab2 AS cor0
----
-1406
-962
-999

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6279
SELECT - - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6279
SELECT - - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 80 * - col1 FROM tab1
----
-1040
-2080
-800

query I rowsort
SELECT + col1 + 23 AS col2 FROM tab2
----
40
54
82

query I rowsort
SELECT 66 FROM tab0, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT col2 - ( 82 ) AS col1 FROM tab1
----
-25
-28
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-6284
SELECT ALL - col2 * col0 DIV - col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6284
SELECT ALL - col2 * col0 / - col0 FROM tab1
----
54
57
96

query I rowsort
SELECT + col2 * - col1 * col1 AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + col2 + col1 * + col1 AS col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT col1 * - ( 53 ) FROM tab0
----
-4558
-4823
-5141

onlyif mysql # use DIV operator for integer division
query I rowsort label-6288
SELECT ALL - 93 + col2 DIV cor0.col2 + + cor0.col2 FROM tab1 AS cor0
----
-35
-38
4

skipif mysql # not compatible
query I rowsort label-6288
SELECT ALL - 93 + col2 / cor0.col2 + + cor0.col2 FROM tab1 AS cor0
----
-35
-38
4

query I rowsort
SELECT DISTINCT col0 * 72 + - col1 + - ( col2 ) * col0 * col0 FROM tab2
----
-152627
-231487
-850

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to 8d4d13f65f86e1b26b6004a6bdc662b3

query I rowsort
SELECT tab2.col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT tab0.col2 * col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL + 57 FROM tab1
----
57
57
57

query I rowsort
SELECT DISTINCT col1 * cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - - 11 * + col1 FROM tab1 AS cor0
----
110
143
286

onlyif mysql # use DIV operator for integer division
query I rowsort label-6296
SELECT DISTINCT col2 + + col2 DIV + col0 + - 31 AS col1 FROM tab2 AS cor0
----
-1
-5
7

skipif mysql # not compatible
query I rowsort label-6296
SELECT DISTINCT col2 + + col2 / + col0 + - 31 AS col1 FROM tab2 AS cor0
----
-1
-5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6297
SELECT ALL - + col0 * col0 DIV - ( col1 ) AS col1 FROM tab2 AS cor0
----
1
103
367

skipif mysql # not compatible
query I rowsort label-6297
SELECT ALL - + col0 * col0 / - ( col1 ) AS col1 FROM tab2 AS cor0
----
1
103
367

query I rowsort
SELECT - col1 + col0 * ( col2 ) + col0 AS col0 FROM tab1 AS cor0
----
139
3702
7747

query I rowsort
SELECT DISTINCT + col1 * + col2 + - col2 * + col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + col2 + + ( + col1 * + col0 ) - - ( tab0.col2 ) FROM tab0
----
2130
3397
8263

query I rowsort
SELECT - tab1.col2 + - col0 AS col1 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT col0 + ( + col2 ) FROM tab1
----
121
176
57

query I rowsort
SELECT + 86 * + 84 * - col0 FROM tab0
----
-173376
-252840
-642936

query I rowsort
SELECT col1 + + tab1.col1 + col1 * ( col1 ) AS col0 FROM tab1
----
120
195
728

query I rowsort
SELECT cor1.col0 + + 58 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6031a1dfdbe205b5b8e489d97b4bff30

query I rowsort
SELECT ALL - + 99 FROM tab0 AS cor0
----
-99
-99
-99

query I rowsort
SELECT ( 72 ) + + cor0.col0 - - ( - col0 ) * col1 * col0 AS col1 FROM tab1 cor0
----
-159
-40824
-83048

query I rowsort
SELECT ALL + ( + col2 ) + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT col1 + 32 + col2 FROM tab0 AS cor0
----
130
151
205

query I rowsort
SELECT DISTINCT + + col0 + cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col1 - 21 * col2 AS col1 FROM tab2 AS cor0
----
-598
-605
-815

query I rowsort
SELECT ALL ( col0 ) + - col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + + 40 FROM tab1 AS cor0
----
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6314
SELECT - - CAST( 22 AS SIGNED ) - - cor0.col1 * + col0 AS col1 FROM tab1 AS cor0
----
100
1062
662

skipif mysql # not compatible
query I rowsort label-6314
SELECT - - CAST ( 22 AS INTEGER ) - - cor0.col1 * + col0 AS col1 FROM tab1 AS cor0
----
100
1062
662

query I rowsort
SELECT DISTINCT + + 57 + 71 FROM tab2 AS cor0
----
128

onlyif mysql # use DIV operator for integer division
query I rowsort label-6316
SELECT DISTINCT + - col2 DIV col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
24
5
6

skipif mysql # not compatible
query I rowsort label-6316
SELECT DISTINCT + - col2 / col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
24
5
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 * - cor0.col2 + - col2 * ( col0 ) col0 FROM tab0 AS cor0
----
-2952
18
957

query I rowsort
SELECT - ( col0 ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - 96 FROM tab0 AS cor0
----
-96
-96
-96

query I rowsort
SELECT 0 * 80 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 14 + col1 AS col1 FROM tab1 AS cor0
----
24
27
40

query I rowsort
SELECT 64 * - col2 + + col2 * + col1 AS col1 FROM tab0 AS cor0
----
2214
33
726

query I rowsort
SELECT ALL 60 AS col1 FROM tab1 AS cor0
----
60
60
60

query I rowsort
SELECT - 78 * - 79 - col1 * + col1 AS col1 FROM tab1 AS cor0
----
5486
5993
6062

query I rowsort
SELECT ALL - 71 FROM tab2 cor0
----
-71
-71
-71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6326
SELECT DISTINCT CAST( NULL AS SIGNED ) * ( + col2 ) / 93 + + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6326
SELECT DISTINCT CAST ( NULL AS INTEGER ) * ( + col2 ) / 93 + + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 21 FROM tab2, tab0 AS cor0
----
-21

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0, tab0 cor0, tab1 cor1
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT - 21 * - 64 FROM tab0
----
1344
1344
1344

query I rowsort
SELECT ALL + ( 81 ) + - tab0.col2 AS col0 FROM tab0
----
-1
48
80

query I rowsort
SELECT ALL - - col2 + col2 * + col2 * + col0 FROM tab0 AS cor0
----
26169
36
598518

query I rowsort
SELECT cor0.col1 * + 66 FROM tab2 AS cor0
----
1122
2046
3894

query I rowsort
SELECT - 42 + + col2 AS col1 FROM tab0 AS cor0
----
-41
-9
40

query I rowsort
SELECT - col2 - + col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT col1 + col0 * - col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - - 54 + cor0.col2 AS col2 FROM tab0 AS cor0
----
136
55
87

query I rowsort
SELECT + + cor0.col2 * + col1 - 67 * + col1 AS col1 FROM tab1 AS cor0
----
-100
-338
377

query I rowsort
SELECT + 53 * - col2 AS col0 FROM tab2 AS cor0
----
-1378
-1431
-2014

query I rowsort
SELECT DISTINCT + + col0 - - 5 * + 77 * col0 AS col0 FROM tab0 AS cor0
----
13510
34354
9264

onlyif mysql # use DIV operator for integer division
query I rowsort label-6340
SELECT DISTINCT col0 DIV - 70 FROM tab2 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6340
SELECT DISTINCT col0 / - 70 FROM tab2 cor0
----
-1
0

query I rowsort
SELECT ALL + col2 * ( col1 ) AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col0 * 23 FROM tab1 cor0
----
1472
1840
69

query I rowsort
SELECT DISTINCT + col0 * - col1 * + col0 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - col1 * - cor0.col1 * 76 FROM tab1 AS cor0
----
12844
51376
7600

query I rowsort
SELECT + + col0 * col2 * - 99 FROM tab2 AS cor0
----
-18711
-200772
-297198

query I rowsort
SELECT + col2 + - col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * + ( col2 * cor0.col0 + col2 ) AS col1 FROM tab2 AS cor0
----
1512
160212
240160

query I rowsort
SELECT col2 + col0 * + 85 * + col1 FROM tab2 AS cor0
----
114193
18472
391196

query I rowsort
SELECT col0 + 75 * col0 AS col2 FROM tab1 cor0
----
228
4864
6080

query I rowsort
SELECT + col2 * 73 FROM tab2 AS cor0
----
1898
1971
2774

query I rowsort
SELECT - ( + col0 ) * - col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + col2 * + 90 AS col1 FROM tab2 AS cor0
----
-2340
-2430
-3420

query I rowsort
SELECT DISTINCT - col2 * 0 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * col2 + 5 FROM tab0 AS cor0
----
-30
-7293
-787

query I rowsort
SELECT DISTINCT + + col1 * col2 * - cor0.col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6357
SELECT ALL - + col0 DIV - 3 FROM tab2 AS cor0
----
2
26
26

skipif mysql # not compatible
query I rowsort label-6357
SELECT ALL - + col0 / - 3 FROM tab2 AS cor0
----
2
26
26

query I rowsort
SELECT DISTINCT col2 * ( - col2 * + col1 ) FROM tab2 cor0
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6359
SELECT - + col2 DIV 15 AS col2 FROM tab1 AS cor0
----
-3
-3
-6

skipif mysql # not compatible
query I rowsort label-6359
SELECT - + col2 / 15 AS col2 FROM tab1 AS cor0
----
-3
-3
-6

query I rowsort
SELECT DISTINCT - col1 * 94 FROM tab0 AS cor0
----
-8084
-8554
-9118

query I rowsort
SELECT - - cor0.col0 * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL + col0 + - ( + col0 * col2 ) FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 + 59 * col2 col0 FROM tab2 AS cor0
----
1456
1586
2163

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6365
SELECT - CAST( - 29 AS SIGNED ) AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

skipif mysql # not compatible
query I rowsort label-6365
SELECT - CAST ( - 29 AS INTEGER ) AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT ALL col2 * tab2.col0 AS col2 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6367
SELECT col1 * CAST( 7 AS SIGNED ) DIV - col0 - col2 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
16
7291
767

skipif mysql # not compatible
query I rowsort label-6367
SELECT col1 * CAST ( 7 AS INTEGER ) / - col0 - col2 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
16
7291
767

query I rowsort
SELECT - - cor0.col0 + - ( 19 ) FROM tab1 AS cor0
----
-16
45
61

query I rowsort
SELECT - col2 + + ( ( col1 ) ) AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT cor0.col2 - + col0 * col2 AS col1 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL ( 73 ) * - tab2.col2 FROM tab2
----
-1898
-1971
-2774

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-17
-31
-59

query I rowsort
SELECT 22 FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 cor1
----
81 values hashing to c6f049334398e3533dd6996714479a2f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 64 * col0 col1 FROM tab1
----
192
4096
5120

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1, tab0 cor1
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

query I rowsort
SELECT + ( col0 ) + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + col2 + col0 * - col0 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 657f80f7cefb261863e79af7b6b59ddd

query I rowsort
SELECT - 63 AS col0 FROM tab1
----
-63
-63
-63

query I rowsort
SELECT + 48 + - col2 * col1 FROM tab1 AS cor0
----
-1200
-1356
-522

query I rowsort
SELECT 38 * + cor0.col0 FROM tab1 AS cor0
----
114
2432
3040

query I rowsort
SELECT DISTINCT + col1 + - col2 AS col1 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT + - 53 + + col2 AS col2 FROM tab1 AS cor0
----
1
4
43

query I rowsort
SELECT ALL - - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT 4 - col0 FROM tab2
----
-3
-74
-75

query I rowsort
SELECT - col0 + + cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - - col0 + col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + ( col1 ) * col2 * + 59 AS col0 FROM tab0 AS cor0
----
167442
440258
5723

onlyif mysql # use DIV operator for integer division
query I rowsort label-6390
SELECT DISTINCT + cor0.col1 + cor0.col0 DIV - col0 - + cor0.col1 col1 FROM tab1 cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6390
SELECT DISTINCT + cor0.col1 + cor0.col0 / - col0 - + cor0.col1 col1 FROM tab1 cor0
----
-1

query I rowsort
SELECT ALL col0 + ( + 75 ) * - col1 FROM tab1 cor0
----
-1947
-686
-895

query I rowsort
SELECT DISTINCT - cor0.col0 * - 41 + col0 FROM tab0 AS cor0
----
1008
1470
3738

onlyif mysql # use DIV operator for integer division
query I rowsort label-6393
SELECT DISTINCT + col2 DIV cor0.col0 + col2 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-6393
SELECT DISTINCT + col2 / cor0.col0 + col2 FROM tab0 AS cor0
----
1
34
82

query I rowsort
SELECT DISTINCT col2 + - col2 + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - col0 + - ( col1 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + - cor0.col1 * ( + cor0.col1 + col1 ) FROM tab0 AS cor0
----
-14792
-16562
-18818

query I rowsort
SELECT ALL - col1 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL - col0 * - 0 * 37 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - cor0.col0 * - 8 + cor0.col1 + + cor0.col0 FROM tab0 AS cor0
----
302
412
892

query I rowsort
SELECT ALL - 6 * cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 0a14a4a014d05c3add40443ff29b2715

query I rowsort
SELECT ALL cor1.col1 AS col1 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 49 * + 20 col1 FROM tab2 cor0
----
980
980
980

query I rowsort
SELECT 18 AS col2 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT + - 93 + - col0 FROM tab1 AS cor0
----
-157
-173
-96

query I rowsort
SELECT DISTINCT - ( + col0 ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - + 34 * + 54 AS col2 FROM tab1 AS cor0
----
-1836

query I rowsort
SELECT - - 96 - - col2 * - cor0.col2 FROM tab2 AS cor0
----
-1348
-580
-633

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col0 + + col2 col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + 49 FROM tab2 cor0
----
49

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 * col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL + + col0 + + col2 * + col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ( + col1 ) + - col2 AS col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + col1 * - tab2.col2 + - tab2.col1 * col1 FROM tab2
----
-1798
-5015
-935

query I rowsort
SELECT ALL col0 + col2 + + col0 AS col0 FROM tab0
----
260
71
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 32 * col0 + - col1 col2 FROM tab1
----
2038
2547
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6417
SELECT - col2 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6417
SELECT - col2 / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 35 * - cor0.col0 + + tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 3f8b6f4a5dcefe4307d45e89ad85d52a

query I rowsort
SELECT + col0 + - 32 AS col2 FROM tab1 AS cor0
----
-29
32
48

query I rowsort
SELECT DISTINCT - col0 * - col2 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + col1 * - 96 + - col1 FROM tab1 AS cor0
----
-1261
-2522
-970

onlyif mysql # use DIV operator for integer division
query I rowsort label-6422
SELECT DISTINCT + + col0 * 53 DIV col1 + + cor0.col2 FROM tab1 AS cor0
----
396
422
60

skipif mysql # not compatible
query I rowsort label-6422
SELECT DISTINCT + + col0 * 53 / col1 + + cor0.col2 FROM tab1 AS cor0
----
396
422
60

query I rowsort
SELECT + col2 * - col0 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - + col2 * 64 + 91 * col1 FROM tab1 AS cor0
----
-1090
-2738
-4961

query I rowsort
SELECT ALL cor0.col1 - + col0 * - col0 AS col1 FROM tab1 cor0
----
35
4106
6413

query I rowsort
SELECT + col1 * + 99 AS col1 FROM tab1 AS cor0
----
1287
2574
990

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6427
SELECT - + col2 * + CAST( NULL AS SIGNED ) - + col0 / col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6427
SELECT - + col2 * + CAST ( NULL AS INTEGER ) - + col0 / col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * col0 + + col2 * - col2 FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT ALL + col2 * + col2 * - ( col0 ) - col1 FROM tab1 cor0
----
-207946
-737293
-8774

query I rowsort
SELECT + - cor0.col1 + - col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6431
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) + 30 col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6431
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) + 30 col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col2 + - 58 * col0 FROM tab1 AS cor0
----
-120
-3655
-4544

query I rowsort
SELECT DISTINCT + + col2 + + col2 * - col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 + + col1 * col2 col1 FROM tab1 AS cor0
----
1172
1328
494

query I rowsort
SELECT - 87 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
2262
2349
3306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * + col0 - col2 col1 FROM tab1 cor0
----
108
3591
7584

query I rowsort
SELECT - - 42 - col0 FROM tab1 AS cor0
----
-22
-38
39

query I rowsort
SELECT col2 + - tab1.col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL - col1 + col1 AS col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col0 col1 FROM tab2
----
137
38
96

query I rowsort
SELECT - col0 * + col0 * - col0 AS col0 FROM tab0 AS cor0
----
13824
42875
704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - 13 * col0 FROM tab0 AS cor0
----
-1157
-312
-455

query I rowsort
SELECT - cor0.col2 + col0 * - 13 AS col1 FROM tab1 AS cor0
----
-1136
-889
-93

query I rowsort
SELECT DISTINCT 84 + + col1 * + 75 AS col1 FROM tab0 AS cor0
----
6534
6909
7359

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6446
SELECT ( col0 ) * - CAST( col2 AS SIGNED ) * + col0 + + ( col0 + tab0.col0 ) * tab0.col0 FROM tab0
----
-17856
-633680
1225

skipif mysql # not compatible
query I rowsort label-6446
SELECT ( col0 ) * - CAST ( col2 AS INTEGER ) * + col0 + + ( col0 + tab0.col0 ) * tab0.col0 FROM tab0
----
-17856
-633680
1225

query I rowsort
SELECT ALL + 38 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query I rowsort
SELECT DISTINCT - ( + col2 ) * 11 AS col1 FROM tab2
----
-286
-297
-418

query I rowsort
SELECT + col2 * + col1 * col1 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT + - col0 * 68 FROM tab0 AS cor0
----
-1632
-2380
-6052

query I rowsort
SELECT cor0.col1 FROM tab2, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT - 56 + - cor0.col1 AS col0 FROM tab2, tab1, tab2 cor0
----
-115
-73
-87

query I rowsort
SELECT 87 + + col2 AS col2 FROM tab0
----
120
169
88

query I rowsort
SELECT ALL 49 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT - + col0 * ( cor0.col2 * col0 ) FROM tab0 cor0
----
-1225
-19008
-649522

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to f23c9ebf4a57b11b108cf933fe3c62aa

onlyif mysql # use DIV operator for integer division
query I rowsort label-6457
SELECT DISTINCT 49 DIV - col0 AS col2 FROM tab1
----
-16
0

skipif mysql # not compatible
query I rowsort label-6457
SELECT DISTINCT 49 / - col0 AS col2 FROM tab1
----
-16
0

query I rowsort
SELECT + + cor0.col1 + + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col2 * ( - 89 + - col1 ) * + col0 FROM tab1
----
-18630
-361152
-783360

query I rowsort
SELECT + cor0.col2 * col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL 40 FROM tab0
----
40
40
40

query I rowsort
SELECT tab1.col2 * col0 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL + cor0.col0 - + col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + 86 + 56 FROM tab2 AS cor0
----
142
142
142

query I rowsort
SELECT ( - col1 * col0 ) FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + - col1 * col2 + - col1 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

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-6470
SELECT + 55 DIV cor0.col0 FROM tab1 cor0
----
0
0
18

skipif mysql # not compatible
query I rowsort label-6470
SELECT + 55 / cor0.col0 FROM tab1 cor0
----
0
0
18

query I rowsort
SELECT ALL 99 FROM tab1
----
99
99
99

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
17
31
59

query I rowsort
SELECT - - 86 * + col2 + - ( 78 ) FROM tab0 AS cor0
----
2760
6974
8

query I rowsort
SELECT - col0 + col2 AS col1 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6475
SELECT + col0 DIV + col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6475
SELECT + col0 / + col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - col0 + + col1 + + 37 FROM tab2 cor0
----
-25
18
61

query I rowsort
SELECT 77 * cor0.col0 FROM tab2 AS cor0
----
539
6006
6083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6478
SELECT CAST( NULL AS SIGNED ) + + cor0.col0 * - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6478
SELECT CAST ( NULL AS INTEGER ) + + cor0.col0 * - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to b62c1ebc681aca72d13feadb888b3be7

query I rowsort
SELECT ( 20 ) FROM tab0
----
20
20
20

query I rowsort
SELECT ALL + 68 * + col0 AS col0 FROM tab2
----
476
5304
5372

query I rowsort
SELECT DISTINCT + col0 + ( + col0 ) AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

query I rowsort
SELECT + + 81 + + ( cor0.col2 ) FROM tab0 AS cor0
----
114
163
82

query I rowsort
SELECT ALL - 14 * col2 + + col1 * 55 FROM tab0 AS cor0
----
3857
4268
5321

onlyif mysql # use DIV operator for integer division
query I rowsort label-6487
SELECT DISTINCT + col1 DIV col0 col2 FROM tab1 AS cor0
----
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6487
SELECT DISTINCT + col1 / col0 col2 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT ALL - - ( col1 ) * col0 + + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - cor0.col1 * - col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * - col2 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - + cor0.col0 * cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + cor0.col1 + + col1 * col2 * - col0 AS col0 FROM tab2 AS cor0
----
-119593
-51017
-5828

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 23 + + col2 * + col0 - col2 col2 FROM tab2 AS cor0
----
139
1979
2941

query I rowsort
SELECT 40 AS col0 FROM tab1 AS cor0
----
40
40
40

query I rowsort
SELECT ALL - col2 * + col2 - - col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 31 + - col2 col1 FROM tab0 AS cor0
----
-113
-32
-64

query I rowsort
SELECT DISTINCT - col0 * col2 + col2 * 31 + + col2 FROM tab1 AS cor0
----
-1824
-4608
1566

query I rowsort
SELECT DISTINCT 41 * + col0 AS col2 FROM tab2 AS cor0
----
287
3198
3239

query I rowsort
SELECT DISTINCT - 84 + - col1 AS col0 FROM tab2 AS cor0
----
-101
-115
-143

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6500
SELECT ALL + CAST( 6 AS SIGNED ) AS col2 FROM tab1
----
6
6
6

skipif mysql # not compatible
query I rowsort label-6500
SELECT ALL + CAST ( 6 AS INTEGER ) AS col2 FROM tab1
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6501
SELECT col2 DIV cor0.col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6501
SELECT col2 / cor0.col2 FROM tab1 cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6502
SELECT DISTINCT - col2 * + CAST( NULL AS SIGNED ) * col0 + col0 * col2 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6502
SELECT DISTINCT - col2 * + CAST ( NULL AS INTEGER ) * col0 + col0 * col2 AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col0 + col2 AS col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT + col1 * - 51 AS col0 FROM tab1 cor0
----
-1326
-510
-663

query I rowsort
SELECT cor0.col0 + ( + col0 ) FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + col2 * tab2.col2 * - 4 FROM tab2
----
-2704
-2916
-5776

query I rowsort
SELECT DISTINCT + col2 * + col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col1 * + 82 AS col2 FROM tab2 AS cor0
----
-1394
-2542
-4838

query I rowsort
SELECT ALL - col0 * - ( col0 ) AS col1 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT ALL + tab0.col1 * col2 AS col2 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6511
SELECT DISTINCT + col0 DIV CAST( + col0 * col0 AS SIGNED ) FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-6511
SELECT DISTINCT + col0 / CAST ( + col0 * col0 AS INTEGER ) FROM tab2
----
0

query I rowsort
SELECT ALL - col2 * + ( + 33 ) AS col0 FROM tab0
----
-1089
-2706
-33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6513
SELECT col2 + - CAST( + col2 + - col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6513
SELECT col2 + - CAST ( + col2 + - col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + - cor0.col0 * 74 * - 74 + col0 AS col1 FROM tab2 cor0
----
38339
427206
432683

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 86 + col1 col1 FROM tab2
----
2295
2353
3285

query I rowsort
SELECT DISTINCT - col1 + 69 AS col2 FROM tab2
----
10
38
52

query I rowsort
SELECT col2 * col2 - + 76 * - col1 FROM tab0
----
13640
7373
7625

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6518
SELECT - CAST( NULL AS DECIMAL ) + ( col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6518
SELECT - CAST ( NULL AS REAL ) + ( col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 84 * - ( col2 ) + - 62 AS col1 FROM tab1 cor0
----
-4598
-4850
-8126

query I rowsort
SELECT DISTINCT + + cor0.col2 + col1 * + col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT + + col0 + cor0.col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - tab2.col1 * ( 91 ) FROM tab2
----
-1547
-2821
-5369

query I rowsort
SELECT col1 * col2 * col2 + - col0 * - col0 AS col2 FROM tab2
----
22648
30789
45968

onlyif mysql # use DIV operator for integer division
query I rowsort label-6524
SELECT DISTINCT col2 DIV ( - col1 ) + + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6524
SELECT DISTINCT col2 / ( - col1 ) + + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT col1 + - col0 * col1 AS col2 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - - col1 * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ( + cor0.col0 ) * + col1 * col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + + col2 + + col1 AS col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL col1 * + col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + ( cor0.col0 ) * col0 + - 46 FROM tab1 AS cor0
----
-37
4050
6354

onlyif mysql # use DIV operator for integer division
query I rowsort label-6531
SELECT + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6531
SELECT + col0 / col0 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + + col1 * + col0 AS col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + + col1 * col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - 56 + - 82 + - cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to efdd72c166f79771d62b69c0e3454164

query I rowsort
SELECT ALL + col2 - + col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - - col2 * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + col1 + + col1 + col1 AS col1 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT DISTINCT + + col1 - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + cor0.col1 + - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - 75 - + col1 FROM tab1 cor0
----
-101
-85
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6541
SELECT ALL - - col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6541
SELECT ALL - - col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 - - col2 AS col0 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + - cor0.col2 col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col1 + + 10 AS col0 FROM tab2
----
-21
-49
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6545
SELECT ALL - + col0 + + CAST( NULL AS SIGNED ) * - col1 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6545
SELECT ALL - + col0 + + CAST ( NULL AS INTEGER ) * - col1 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6546
SELECT - col0 + 21 DIV + 5 FROM tab2 AS cor0
----
-3
-74
-75

skipif mysql # not compatible
query I rowsort label-6546
SELECT - col0 + 21 / + 5 FROM tab2 AS cor0
----
-3
-74
-75

query I rowsort
SELECT ALL + col1 + - 60 AS col2 FROM tab2 AS cor0
----
-1
-29
-43

query I rowsort
SELECT DISTINCT - + col2 + 37 * col0 AS col2 FROM tab1 AS cor0
----
2311
2864
57

query I rowsort
SELECT - col0 + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col0 + - 97 * + 59 FROM tab2 AS cor0
----
-5644
-5645
-5716

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6551
SELECT ALL + col2 * - CAST( NULL AS SIGNED ) + col2 + - col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6551
SELECT ALL + col2 * - CAST ( NULL AS INTEGER ) + col2 + - col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + col2 AS col1 FROM tab0 WHERE NULL = NULL
----

query I rowsort
SELECT DISTINCT - + cor0.col0 + - col2 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE col0 * + col0 * + col1 + - col1 IN ( + col2 ) OR ( NULL ) BETWEEN col2 * - col1 - col2 AND NULL
----

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 * + col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + col0 col2 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6557
SELECT ALL col0 + col1 DIV + cor0.col0 FROM tab1 cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-6557
SELECT ALL col0 + col1 / + cor0.col0 FROM tab1 cor0
----
11
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * cor0.col2 + - col1 col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT DISTINCT - col2 - + col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT - + col2 + col1 FROM tab1 AS cor0
----
-28
-47
-83

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE NULL NOT IN ( + col0 )
----

query I rowsort
SELECT ALL - col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab1 cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT + col0 * + col1 + + cor0.col1 AS col1 FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN ( + col1 ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6565
SELECT col1 DIV + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6565
SELECT col1 / + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * + col1 + col1 * col0 * + col0 AS col2 FROM tab0
----
118922
52374
728273

query I rowsort
SELECT - col0 + col0 * col0 FROM tab0
----
1190
552
7832

query I rowsort
SELECT ALL col1 * col0 + + tab1.col0 AS col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT - col0 + - tab0.col0 AS col1 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT col1 AS col1 FROM tab0 AS cor0 WHERE NOT - col0 * col2 >= - col0
----
86
91

query I rowsort
SELECT + col2 + + col1 + + col1 FROM tab0 AS cor0
----
195
205
264

onlyif mysql # use DIV operator for integer division
query I rowsort label-6572
SELECT DISTINCT + + col2 + col2 DIV + col0 AS col2 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-6572
SELECT DISTINCT + + col2 + col2 / + col0 AS col2 FROM tab1 AS cor0
----
57
72
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6573
SELECT DISTINCT - - col0 + - col0 DIV col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-6573
SELECT DISTINCT - - col0 + - col0 / col1 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT ALL col2 * - col1 - col1 FROM tab0 AS cor0
----
-194
-2924
-7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab2, tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6576
SELECT DISTINCT + - col1 + col2 DIV - col0 AS col0 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-6576
SELECT DISTINCT + - col1 + col2 / - col0 AS col0 FROM tab0 AS cor0
----
-87
-91
-97

query I rowsort
SELECT DISTINCT - - col0 + - col0 * col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL + col2 + - col0 * col0 FROM tab1 cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL cor0.col2 - col1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6580
SELECT DISTINCT - col0 DIV col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6580
SELECT DISTINCT - col0 / col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + + col0 + col1 * - col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT col1 * + col0 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - col1 * - col2 * col2 AS col1 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT + col2 * tab0.col1 + col0 * + col0 AS col1 FROM tab0
----
1322
15383
3414

query I rowsort
SELECT + col2 + - tab1.col2 * - col2 * - col1 FROM tab1
----
-119712
-32433
-75762

onlyif mysql # use DIV operator for integer division
query I rowsort label-6586
SELECT col1 DIV - col1 + + col1 AS col0 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-6586
SELECT col1 / - col1 + + col1 AS col0 FROM tab1
----
12
25
9

query I rowsort
SELECT tab1.col1 * col1 + + col1 * col1 FROM tab1
----
1352
200
338

query I rowsort
SELECT ( + col2 ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + 74 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT + 59 FROM tab2
----
59
59
59

query I rowsort
SELECT ALL 15 FROM tab0
----
15
15
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6592
SELECT + col2 * + CAST( NULL AS SIGNED ) * 89 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6592
SELECT + col2 * + CAST ( NULL AS INTEGER ) * 89 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col1 * + col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 * + 15 AS col1 FROM tab0 AS cor0
----
1335
360
525

query I rowsort
SELECT DISTINCT + col2 * - col1 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6596
SELECT col2 + - tab1.col0 * col1 DIV - tab1.col1 AS col1 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6596
SELECT col2 + - tab1.col0 * col1 / - tab1.col1 AS col1 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6597
SELECT + col2 * col0 DIV - col0 + + col0 * + col1 AS col2 FROM tab0
----
2031
3394
8017

skipif mysql # not compatible
query I rowsort label-6597
SELECT + col2 * col0 / - col0 + + col0 * + col1 AS col2 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT tab1.col0 * + col2 * + tab1.col0 - - col1 * col2 AS col0 FROM tab1
----
1890
234042
615648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col1 col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT - tab2.col1 * + col1 FROM tab2
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-6601
SELECT - col2 DIV col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6601
SELECT - col2 / col1 FROM tab2
----
-2
0
0

query III rowsort
SELECT * FROM tab2 WHERE NULL <> ( NULL )
----

query I rowsort
SELECT DISTINCT + col0 + + col0 + tab1.col0 FROM tab1
----
192
240
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col0 + + col0 col2 FROM tab2
----
-17
141
97

query III rowsort
SELECT * FROM tab0 WHERE NOT - col2 + + col0 * - col1 * col0 + col1 > NULL
----

query I rowsort
SELECT - col2 + col2 * col1 FROM tab2
----
1508
608
810

query I rowsort
SELECT ALL tab0.col0 * col0 AS col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT col0 * - col2 FROM tab1 WHERE NOT col0 NOT BETWEEN - col2 + + col2 + - col2 * + col0 AND + col0
----
-162
-3648
-7680

query I rowsort
SELECT + col0 * - col0 * col1 AS col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT - col0 AS col2 FROM tab0 WHERE NOT NULL IN ( - col1 )
----

query I rowsort
SELECT col1 * - col1 * col1 AS col0 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT ALL col2 + - col2 AS col1 FROM tab2
----
0
0
0

query III rowsort
SELECT * FROM tab1 WHERE NOT + col1 * - col0 + tab1.col2 + col2 NOT BETWEEN ( NULL ) AND col1 * col2
----

query I rowsort
SELECT DISTINCT col2 + col0 * - col2 * col1 FROM tab2
----
-119626
-50996
-5832

query I rowsort
SELECT ALL col2 * col0 + col2 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT - col2 * - col0 * col2 AS col1 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT col0 + + col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT - col1 FROM tab2 WHERE NULL NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL BETWEEN + col2 + + col1 + - col2 AND + col0 * col0
----

query III rowsort
SELECT * FROM tab0 WHERE col1 * col1 = ( + col1 )
----

query I rowsort
SELECT + col2 * col1 - col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT col2 + col0 * tab0.col2 FROM tab0
----
36
7380
825

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT ALL + col0 + - col0 * col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL col1 + - col2 * col2 + - col0 FROM tab1
----
-2893
-3303
-9283

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + tab0.col1 + col0 + col2 col0 FROM tab0
----
2121
3431
8270

onlyif mysql # use DIV operator for integer division
query I rowsort label-6627
SELECT ALL + col2 * col2 DIV - col0 AS col1 FROM tab1
----
-115
-50
-972

skipif mysql # not compatible
query I rowsort label-6627
SELECT ALL + col2 * col2 / - col0 AS col1 FROM tab1
----
-115
-50
-972

query I rowsort
SELECT + col0 + - col0 + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT + tab2.col2 + col0 * col0 + - col1 AS col2 FROM tab2 WHERE col1 IN ( + col1 * + col0 )
----

query I rowsort
SELECT + 38 + + col2 FROM tab2
----
64
65
76

query I rowsort
SELECT ALL 81 + - col1 AS col2 FROM tab0
----
-10
-16
-5

query I rowsort
SELECT col0 * + tab1.col0 * - col2 AS col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT ALL tab1.col0 * - col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT tab2.col1 - + col1 * + ( 66 + col2 ) * + col2 AS col0 FROM tab2
----
-141069
-67167
-77810

query I rowsort
SELECT - 40 - tab1.col0 FROM tab1
----
-104
-120
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 23 * - col0 col2 FROM tab2 cor0
----
161
1794
1817

query I rowsort
SELECT + col0 + - col0 AS col0 FROM tab0 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6638
SELECT + col1 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6638
SELECT + col1 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + + 33 AS col1 FROM tab1 AS cor0
----
20
23
7

query I rowsort
SELECT ALL + col2 * ( - 40 ) + + cor0.col0 + + cor0.col1 FROM tab0 AS cor0
----
-1210
-3100
92

query I rowsort
SELECT DISTINCT - col0 + 60 AS col1 FROM tab1 AS cor0
----
-20
-4
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col2 * + ( 92 ) + - col1 ) col0 FROM tab2
----
2333
2453
3479

query I rowsort
SELECT + col0 + - 11 FROM tab1 AS cor0
----
-8
53
69

query I rowsort
SELECT - 50 AS col0 FROM tab2
----
-50
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + col1 col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT - col2 + cor0.col2 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 * - ( - col1 * - col2 ) AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + - col2 + col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - + 76 - - col1 * + col0 FROM tab1 AS cor0
----
2
564
964

query I rowsort
SELECT + 83 * col1 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT - 33 * cor0.col0 FROM tab2 cor0
----
-231
-2574
-2607

query I rowsort
SELECT - - col0 * - col0 + - col1 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT ALL - 53 * - col1 * + col2 FROM tab0 AS cor0
----
150414
395486
5141

query I rowsort
SELECT cor0.col2 * + ( col1 * - col1 ) - + col1 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-16055
-35828
-5600

query I rowsort
SELECT DISTINCT + + 26 + - cor0.col1 * col0 AS col1 FROM tab0 AS cor0
----
-2038
-3369
-8073

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6656
SELECT ALL CAST( ( col1 ) AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6656
SELECT ALL CAST ( ( col1 ) AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col1 * - ( col0 ) FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6658
SELECT - CAST( 19 AS SIGNED ) * col1 - cor0.col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-1635
-1730
-1844

skipif mysql # not compatible
query I rowsort label-6658
SELECT - CAST ( 19 AS INTEGER ) * col1 - cor0.col0 / col0 AS col1 FROM tab0 AS cor0
----
-1635
-1730
-1844

query I rowsort
SELECT col2 + + col0 * + col1 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6660
SELECT col1 DIV + col0 - - col1 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-6660
SELECT col1 / + col0 - - col1 FROM tab1 AS cor0
----
10
13
34

query I rowsort
SELECT + + col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + - 27 * cor0.col1 FROM tab0 cor0
----
-2322
-2457
-2619

query I rowsort
SELECT col0 + - col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL 3 FROM tab0, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
1
33
82

query I rowsort
SELECT ALL - 11 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 col2 FROM tab0
----
46
46
46

query I rowsort
SELECT + - col0 - - col1 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT col1 * col0 * col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT - - col0 + + col1 AS col2 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6671
SELECT - cor0.col1 DIV + col0 - col2 * + col0 AS col1 FROM tab2 cor0
----
-193
-2028
-3002

skipif mysql # not compatible
query I rowsort label-6671
SELECT - cor0.col1 / + col0 - col2 * + col0 AS col1 FROM tab2 cor0
----
-193
-2028
-3002

query I rowsort
SELECT ALL - col1 + + col0 * col1 * col0 FROM tab0 AS cor0
----
118728
49450
720720

query I rowsort
SELECT + + col0 * col2 * col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - + cor0.col2 + col0 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6675
SELECT ( + col1 ) DIV - col0 + - col2 * col2 + + col2 * col1 col1 FROM tab2 cor0
----
-798
104
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6675
SELECT ( + col1 ) / - col0 + - col2 * col2 + + col2 * col1 col1 FROM tab2 cor0
----
-798
104
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col0 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + - col2 * + col2 * col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT DISTINCT - 36 + col1 * col1 FROM tab0 cor0
----
7360
8245
9373

query I rowsort
SELECT 85 * col1 + col0 AS col0 FROM tab2
----
1524
2642
5093

query I rowsort
SELECT ALL - col0 - - col1 * - col2 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT - col0 + + tab1.col2 - - col0 * + tab1.col2 FROM tab1
----
213
3641
7696

onlyif mysql # use DIV operator for integer division
query I rowsort label-6682
SELECT ALL col1 DIV - cor0.col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6682
SELECT ALL col1 / - cor0.col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col1 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + + ( col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL ( + col0 ) - + col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL + 17 * - col2 FROM tab1 AS cor0
----
-1632
-918
-969

query I rowsort
SELECT + col0 * - tab0.col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6688
SELECT DISTINCT + 45 + + col1 DIV + col1 FROM tab2 AS cor0
----
46

skipif mysql # not compatible
query I rowsort label-6688
SELECT DISTINCT + 45 + + col1 / + col1 FROM tab2 AS cor0
----
46

query I rowsort
SELECT + - 5 * col2 + - col2 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-231
-574
-7

query I rowsort
SELECT ALL + + 42 + cor0.col1 AS col0 FROM tab0 AS cor0
----
128
133
139

query I rowsort
SELECT DISTINCT + 28 FROM tab0 cor0
----
28

query I rowsort
SELECT DISTINCT + tab1.col1 + col0 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL col2 + + cor0.col1 * + col2 + + cor0.col0 * + col1 * col0 FROM tab1 cor0
----
1692
41587
84544

query I rowsort
SELECT ALL + col0 * + col1 + - col2 AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT col1 + tab2.col1 AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT + ( col2 * - col2 + - col0 * col0 ) AS col2 FROM tab2
----
-6760
-7685
-778

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col1 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-6698
SELECT DISTINCT 33 DIV col2 - col1 * col1 FROM tab0
----
-7395
-8281
-9376

skipif mysql # not compatible
query I rowsort label-6698
SELECT DISTINCT 33 / col2 - col1 * col1 FROM tab0
----
-7395
-8281
-9376

query I rowsort
SELECT 18 * - col2 * col2 + col0 AS col2 FROM tab0
----
-120943
-19578
17

query I rowsort
SELECT - + 33 * + col1 + - col1 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT DISTINCT - 67 AS col2 FROM tab2 AS cor0
----
-67

query I rowsort
SELECT ALL + 77 FROM tab0 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col1 * cor0.col2 col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + cor0.col2 + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-6705
SELECT + cor0.col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6705
SELECT + cor0.col0 / + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL - col1 * - 54 FROM tab0
----
4644
4914
5238

query I rowsort
SELECT DISTINCT - ( - cor0.col2 + cor0.col1 ) FROM tab2, tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + 64 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-6709
SELECT ALL - col2 DIV + 99 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6709
SELECT ALL - col2 / + 99 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT 31 FROM tab2, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT 98 FROM tab0, tab2 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 972d282d6d92f451c90dc8ca51a18f3e

query I rowsort
SELECT 62 + - 67 AS col1 FROM tab1 AS cor0
----
-5
-5
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6714
SELECT ALL + CAST( NULL AS DECIMAL ) / + col1 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6714
SELECT ALL + CAST ( NULL AS REAL ) / + col1 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col2 * col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6716
SELECT DISTINCT + - 67 DIV + 93 col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6716
SELECT DISTINCT + - 67 / + 93 col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
0

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2, tab0 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 col1 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 21 col0 FROM tab2 AS cor0
----
-21
-21
-21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6720
SELECT + ( + col0 ) - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6720
SELECT + ( + col0 ) - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( col0 ) + - col0 * col0 AS col2 FROM tab0 cor0
----
-1190
-552
-7832

query I rowsort
SELECT - col1 * - col0 + tab2.col0 + - col1 * + tab2.col2 AS col2 FROM tab2
----
-613
3146
776

query I rowsort
SELECT + 68 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT ALL cor0.col0 + ( - col0 ) + - cor0.col0 * 86 AS col1 FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT DISTINCT - - col2 + col0 * col0 AS col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT DISTINCT - col2 * ( tab1.col0 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT - tab1.col2 * col2 AS col2 FROM tab1
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6728
SELECT + col1 DIV col1 AS col1 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6728
SELECT + col1 / col1 AS col1 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT - col0 + - col0 * - col2 - cor0.col1 AS col0 FROM tab1 cor0
----
133
3574
7587

query I rowsort
SELECT ALL - + col0 * 64 AS col2 FROM tab1 AS cor0
----
-192
-4096
-5120

onlyif mysql # use DIV operator for integer division
query I rowsort label-6731
SELECT ALL - - col0 DIV - 83 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6731
SELECT ALL - - col0 / - 83 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 92 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT DISTINCT - - col1 * col2 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6734
SELECT - cor0.col1 + - ( 44 ) DIV - col0 FROM tab1 cor0
----
-10
-12
-13

skipif mysql # not compatible
query I rowsort label-6734
SELECT - cor0.col1 + - ( 44 ) / - col0 FROM tab1 cor0
----
-10
-12
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-6735
SELECT col2 + col0 - - 34 DIV - cor0.col0 AS col1 FROM tab0 AS cor0
----
171
36
56

skipif mysql # not compatible
query I rowsort label-6735
SELECT col2 + col0 - - 34 / - cor0.col0 AS col1 FROM tab0 AS cor0
----
171
36
56

query I rowsort
SELECT col2 * - col2 AS col2 FROM tab0
----
-1
-1089
-6724

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT 33 FROM tab0, tab0 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT 40 * cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 64f3ea7789613fe9445277e8480f6b00

query I rowsort
SELECT col0 * + 59 FROM tab0 AS cor0
----
1416
2065
5251

query I rowsort
SELECT ALL + col1 - 25 FROM tab2
----
-8
34
6

query I rowsort
SELECT ALL col2 - + tab2.col0 * 89 AS col0 FROM tab2
----
-596
-6916
-6993

query I rowsort
SELECT + - col0 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - + col1 + cor0.col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + col1 * - ( + col1 ) + - col1 FROM tab2 cor0
----
-306
-3540
-992

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT + + cor0.col2 AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - 36 FROM tab1, tab1 AS cor0
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

query I rowsort
SELECT ALL col2 * + col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - 67 + col0 AS col1 FROM tab2 AS cor0
----
-60
11
12

query I rowsort
SELECT DISTINCT - col1 + - ( col0 ) * - col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL + 24 FROM tab1
----
24
24
24

query I rowsort
SELECT + + 46 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT - col1 + cor0.col1 * col0 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT col0 * - tab2.col1 AS col2 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6756
SELECT - - cor0.col0 DIV - col0 + col0 * - col0 FROM tab2 AS cor0
----
-50
-6085
-6242

skipif mysql # not compatible
query I rowsort label-6756
SELECT - - cor0.col0 / - col0 + col0 * - col0 FROM tab2 AS cor0
----
-50
-6085
-6242

query I rowsort
SELECT + col1 + 54 AS col2 FROM tab1 AS cor0
----
64
67
80

query I rowsort
SELECT ALL + cor0.col2 * + col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT cor0.col0 + - col1 AS col2 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT col0 - + 43 * 60 FROM tab1 AS cor0
----
-2500
-2516
-2577

query I rowsort
SELECT + col2 * + col0 + col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT col1 * cor0.col2 - col1 FROM tab1 cor0
----
1235
1378
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-6763
SELECT 88 DIV col0 col1 FROM tab2
----
1
1
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6763
SELECT 88 / col0 col1 FROM tab2
----
1
1
12

query I rowsort
SELECT 53 * col2 + + 69 + - tab1.col1 * + col0 AS col0 FROM tab1
----
2450
2853
4117

onlyif mysql # use DIV operator for integer division
query I rowsort label-6765
SELECT + tab1.col1 DIV col0 AS col1 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6765
SELECT + tab1.col1 / col0 AS col1 FROM tab1
----
0
0
8

query I rowsort
SELECT DISTINCT - - col0 + - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - - cor0.col1 * col1 + - 37 * col0 FROM tab0 AS cor0
----
4988
6508
8114

query I rowsort
SELECT - col1 + cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 AS col0 FROM tab2, tab0 AS cor0
----
2064
3395
8099

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 + col2 + 78 * - col1 FROM tab0
----
-6675
-7016
-7565

query I rowsort
SELECT ALL 83 * - ( - col1 ) - - ( col2 ) AS col2 FROM tab0
----
7171
7635
8052

query I rowsort
SELECT DISTINCT col0 + + col1 * 74 AS col1 FROM tab2
----
1337
2301
4444

query I rowsort
SELECT - ( col0 ) * + 41 FROM tab1
----
-123
-2624
-3280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 col0 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT 16 + + col1 FROM tab0
----
102
107
113

query I rowsort
SELECT tab1.col0 * tab1.col2 - 11 FROM tab1
----
151
3637
7669

query I rowsort
SELECT ( col0 ) - - col2 * tab0.col2 AS col2 FROM tab0
----
1113
36
6813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 * col0 + tab0.col1 col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab2 AS cor0
----
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6781
SELECT + - col0 + + col2 + + CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6781
SELECT + - col0 + + col2 + + CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 74 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT DISTINCT col2 + + col1 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - + cor0.col2 * col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT cor0.col0 + col0 * cor0.col2 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-6786
SELECT ALL col2 DIV tab0.col0 + 37 + + 87 AS col1 FROM tab0
----
124
124
125

skipif mysql # not compatible
query I rowsort label-6786
SELECT ALL col2 / tab0.col0 + 37 + + 87 AS col1 FROM tab0
----
124
124
125

query I rowsort
SELECT ALL col1 * col0 + col2 + + ( - col2 ) * ( col0 ) FROM tab0
----
1305
3361
883

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col0 * - cor0.col1 col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL + col0 * + col1 + + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT cor0.col2 * tab1.col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to b875995d19e2a126dd81a380aa7231ba

query I rowsort
SELECT ALL - 82 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

query I rowsort
SELECT - 98 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT ALL + 32 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1, tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( ( col0 ) ) * - ( - col2 ) + cor0.col2 col2 FROM tab0 cor0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 31 col1 FROM tab2 AS cor0
----
-31
-31
-31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6797
SELECT + CAST( NULL AS DECIMAL ) * - 12 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6797
SELECT + CAST ( NULL AS REAL ) * - 12 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 72 + col1 * col1 AS col2 FROM tab0 AS cor0
----
7468
8353
9481

onlyif mysql # use DIV operator for integer division
query I rowsort label-6799
SELECT + + 22 DIV cor0.col1 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6799
SELECT + + 22 / cor0.col1 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT ALL 62 * - col1 AS col1 FROM tab0 cor0
----
-5332
-5642
-6014

query I rowsort
SELECT ALL - + col1 * 26 AS col0 FROM tab1 AS cor0
----
-260
-338
-676

query I rowsort
SELECT DISTINCT + + 4 * + 7 FROM tab2 AS cor0
----
28

query I rowsort
SELECT ALL 72 * + ( - cor0.col0 ) FROM tab2 AS cor0
----
-504
-5616
-5688

query I rowsort
SELECT - ( col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT + cor0.col0 + + 81 FROM tab2 AS cor0
----
159
160
88

query I rowsort
SELECT - 26 AS col1 FROM tab1 AS cor0
----
-26
-26
-26

query I rowsort
SELECT ALL - ( col0 ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + + 62 * ( + col2 ) * + col2 FROM tab0 AS cor0
----
416888
62
67518

query I rowsort
SELECT + + col0 * 45 AS col0 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT + + 18 * cor0.col2 AS col1 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT DISTINCT - + 94 + - col0 AS col0 FROM tab2 AS cor0
----
-101
-172
-173

query I rowsort
SELECT 93 + col2 FROM tab2
----
119
120
131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * cor0.col0 col1 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6815
SELECT DISTINCT cor1.col1 + CAST( NULL AS SIGNED ) FROM tab0, tab1 cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6815
SELECT DISTINCT cor1.col1 + CAST ( NULL AS INTEGER ) FROM tab0, tab1 cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT col1 + 32 * col1 FROM tab2
----
1023
1947
561

query I rowsort
SELECT + col0 * - 59 + + col0 AS col0 FROM tab1
----
-174
-3712
-4640

query I rowsort
SELECT col0 + + ( col1 + - col0 ) FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6819
SELECT + CAST( 73 AS SIGNED ) FROM tab1 AS cor0
----
73
73
73

skipif mysql # not compatible
query I rowsort label-6819
SELECT + CAST ( 73 AS INTEGER ) FROM tab1 AS cor0
----
73
73
73

query I rowsort
SELECT ALL 99 + - 52 FROM tab2 cor0
----
47
47
47

query I rowsort
SELECT DISTINCT 58 * col0 AS col2 FROM tab1 AS cor0
----
174
3712
4640

onlyif mysql # use DIV operator for integer division
query I rowsort label-6822
SELECT ALL + ( - cor0.col2 ) DIV cor0.col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6822
SELECT ALL + ( - cor0.col2 ) / cor0.col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT - ( ( col1 ) ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + col2 * - cor0.col0 * - col0 + col1 * + 8 + col1 AS col1 FROM tab2 AS cor0
----
158715
1602
237311

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col1 + + ( col0 ) col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6826
SELECT ALL ( - col0 ) + + CAST( + col0 AS SIGNED ) + + col0 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6826
SELECT ALL ( - col0 ) + + CAST ( + col0 AS INTEGER ) + + col0 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - - 15 AS col1 FROM tab0 cor0
----
15
15
15

query I rowsort
SELECT DISTINCT - col0 * - col0 * col0 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT DISTINCT - + col2 * col0 + col2 * + 95 + col0 AS col2 FROM tab2 AS cor0
----
2383
520
687

query I rowsort
SELECT col0 * - col2 + col2 AS col1 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + + cor0.col0 AS col2 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6832
SELECT DISTINCT - cor0.col1 + - col2 DIV + ( 18 ) FROM tab0 AS cor0
----
-87
-95
-97

skipif mysql # not compatible
query I rowsort label-6832
SELECT DISTINCT - cor0.col1 + - col2 / + ( 18 ) FROM tab0 AS cor0
----
-87
-95
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6833
SELECT + col2 + + col0 * + CAST( + 37 AS SIGNED ) * + col1 FROM tab2 AS cor0
----
170300
49729
8056

skipif mysql # not compatible
query I rowsort label-6833
SELECT + col2 + + col0 * + CAST ( + 37 AS INTEGER ) * + col1 FROM tab2 AS cor0
----
170300
49729
8056

query I rowsort
SELECT ALL + - col1 + cor0.col2 * - ( - 76 ) FROM tab2 AS cor0
----
1917
2021
2871

onlyif mysql # use DIV operator for integer division
query I rowsort label-6835
SELECT + - 36 + col1 DIV - cor0.col0 AS col0 FROM tab0 cor0
----
-37
-38
-39

skipif mysql # not compatible
query I rowsort label-6835
SELECT + - 36 + col1 / - cor0.col0 AS col0 FROM tab0 cor0
----
-37
-38
-39

query I rowsort
SELECT DISTINCT - - 73 AS col1 FROM tab2 AS cor0
----
73

query I rowsort
SELECT col1 + + 11 AS col2 FROM tab2
----
28
42
70

query I rowsort
SELECT 28 FROM tab0, tab2 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT + 0 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6840
SELECT + 94 + + col0 * ( 22 ) + - col2 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6840
SELECT + 94 + + col0 * ( 22 ) + - col2 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 * ( 98 ) FROM tab0 AS cor0
----
8428
8918
9506

query I rowsort
SELECT - col1 * col1 * col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6843
SELECT ALL + col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6843
SELECT ALL + col2 + 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 + col1 * + 80 col2 FROM tab0 AS cor0
----
6880
7280
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6845
SELECT - + col0 DIV + ( - col1 ) + col0 col2 FROM tab1 AS cor0
----
3
70
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6845
SELECT - + col0 / + ( - col1 ) + col0 col2 FROM tab1 AS cor0
----
3
70
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + col1 + + col1 * 67 AS col0 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT ALL + col2 + - col0 * + col2 FROM tab2 cor0
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + col1 + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-6851
SELECT DISTINCT + col0 + + 66 DIV 13 FROM tab1 AS cor0
----
69
8
85

skipif mysql # not compatible
query I rowsort label-6851
SELECT DISTINCT + col0 + + 66 / 13 FROM tab1 AS cor0
----
69
8
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6852
SELECT + col1 + + CAST( NULL AS SIGNED ) * 59 * + cor0.col1 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6852
SELECT + col1 + + CAST ( NULL AS INTEGER ) * 59 * + cor0.col1 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + col1 ) + 60 FROM tab1
----
34
47
50

query I rowsort
SELECT ALL - col2 * - col1 - - 83 * - col2 AS col0 FROM tab0 AS cor0
----
14
656
99

query I rowsort
SELECT ALL + - col2 * + ( 80 ) + col2 * 44 AS col1 FROM tab1 AS cor0
----
-1944
-2052
-3456

query I rowsort
SELECT ALL + cor0.col0 * - col0 + cor0.col0 FROM tab0 cor0
----
-1190
-552
-7832

query I rowsort
SELECT + + col1 * - 83 FROM tab1 cor0
----
-1079
-2158
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-6858
SELECT ALL - col0 - col2 DIV col2 AS col1 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-6858
SELECT ALL - col0 - col2 / col2 AS col1 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT DISTINCT + ( + ( col0 ) ) * + col1 - 20 FROM tab1 AS cor0
----
1020
58
620

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col1 * + col1 col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - 82 AS col1 FROM tab0, tab0 AS cor0
----
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6862
SELECT DISTINCT + col2 DIV + col1 + + col1 + + col1 DIV + 17 AS col1 FROM tab1 AS cor0
----
15
20
29

skipif mysql # not compatible
query I rowsort label-6862
SELECT DISTINCT + col2 / + col1 + + col1 + + col1 / + 17 AS col1 FROM tab1 AS cor0
----
15
20
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-6863
SELECT DISTINCT + ( - col1 ) + col0 DIV col1 + + ( col1 ) FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6863
SELECT DISTINCT + ( - col1 ) + col0 / col1 + + ( col1 ) FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT - col0 - 9 AS col2 FROM tab2
----
-16
-87
-88

query I rowsort
SELECT ALL 81 * + 48 FROM tab0, tab1 AS cor0
----
9 values hashing to bc1cf2f615e757e731cdcb79bd545693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6866
SELECT tab2.col2 + + CAST( + col0 AS SIGNED ) FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-6866
SELECT tab2.col2 + + CAST ( + col0 AS INTEGER ) FROM tab2
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - + col2 + - col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + - 82 * col0 FROM tab2 AS cor0
----
-574
-6396
-6478

query I rowsort
SELECT 0 * - 29 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL + col2 * col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL + + 11 * - col2 FROM tab0 AS cor0
----
-11
-363
-902

query I rowsort
SELECT - col2 * - col1 * col0 + ( + col1 ) AS col0 FROM tab0 AS cor0
----
3492
664209
68198

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 * 65 - + cor0.col2 col2 FROM tab2 AS cor0
----
3158
395434
405627

query I rowsort
SELECT + cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT tab2.col2 + 43 AS col0 FROM tab2
----
69
70
81

query I rowsort
SELECT ALL - col0 + + col2 + - col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + col2 * + col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + ( - col0 + - col1 ) * + col0 * + col2 FROM tab0
----
-1313640
-4620
-87120

query I rowsort
SELECT + 74 * col0 * tab1.col2 FROM tab1
----
11988
269952
568320

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) + cor0.col2 * + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6d968389ee13a3999222711178d0dd77

query I rowsort
SELECT - + col2 + 20 * col1 AS col1 FROM tab0 AS cor0
----
1687
1738
1939

query I rowsort
SELECT ( - col1 ) * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col2 * - col2 + - col2 AS col1 FROM tab0 cor0
----
-1122
-2
-6806

query I rowsort
SELECT - ( 58 ) * cor0.col1 FROM tab1 AS cor0
----
-1508
-580
-754

query I rowsort
SELECT - col2 * 97 FROM tab0 AS cor0
----
-3201
-7954
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6887
SELECT col1 + + ( 89 + - col1 ) DIV + col2 AS col2 FROM tab0
----
86
89
91

skipif mysql # not compatible
query I rowsort label-6887
SELECT col1 + + ( 89 + - col1 ) / + col2 AS col2 FROM tab0
----
86
89
91

query I rowsort
SELECT ALL 35 + + 63 * - col0 FROM tab1
----
-154
-3997
-5005

onlyif mysql # use DIV operator for integer division
query I rowsort label-6889
SELECT 22 DIV - tab1.col0 AS col0 FROM tab1
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-6889
SELECT 22 / - tab1.col0 AS col0 FROM tab1
----
-7
0
0

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT + 45 * col2 * + col2 FROM tab0
----
302580
45
49005

query I rowsort
SELECT DISTINCT col1 + + col0 * col0 * + 21 + + 71 FROM tab2
----
1131
127894
131149

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + tab0.col1 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 AS col2 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + 68 * 42 - + col1 * - col1 FROM tab0 AS cor0
----
10252
11137
12265

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6896
SELECT col2 + + ( - col2 ) + + CAST( - col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6896
SELECT col2 + + ( - col2 ) + + CAST ( - col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + - 44 FROM tab2, tab0, tab2 AS cor0
----
-44

query I rowsort
SELECT col0 * - cor0.col2 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6899
SELECT DISTINCT CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6899
SELECT DISTINCT CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col2 * + col2 - col1 AS col0 FROM tab2
----
1427
617
698

query I rowsort
SELECT DISTINCT + ( - col0 + col0 ) FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) col0 FROM tab0
----
24
35
89

query I rowsort
SELECT ( - tab2.col0 + col1 ) FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL 22 AS col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT DISTINCT 2 * col2 FROM tab1
----
108
114
192

query I rowsort
SELECT col0 * col1 * + col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT 54 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
54

query I rowsort
SELECT + cor0.col1 + + col1 - + cor0.col0 AS col2 FROM tab0 AS cor0
----
148
159
93

query I rowsort
SELECT - col0 - - col2 * col0 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6910
SELECT col2 + col0 * 44 DIV col1 + col1 FROM tab0 AS cor0
----
113
131
216

skipif mysql # not compatible
query I rowsort label-6910
SELECT col2 + col0 * 44 / col1 + col1 FROM tab0 AS cor0
----
113
131
216

query I rowsort
SELECT DISTINCT 25 * + 18 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
450

query I rowsort
SELECT + + 41 - - col1 FROM tab0 AS cor0
----
127
132
138

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab1, tab1 AS cor0
----
3

query I rowsort
SELECT DISTINCT - 96 FROM tab2, tab2 AS cor0
----
-96

query I rowsort
SELECT DISTINCT 92 + - cor1.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1, tab1 cor2
----
12
28
89

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - - col0 * 81 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT - ( - col0 ) * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - 27 + col1 FROM tab2 cor0
----
-10
32
4

query I rowsort
SELECT - 14 * col2 AS col1 FROM tab1 AS cor0
----
-1344
-756
-798

query I rowsort
SELECT + + col1 * - 35 * - col1 AS col0 FROM tab1 cor0
----
23660
3500
5915

query I rowsort
SELECT ALL - cor0.col2 + 12 + col2 AS col1 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT col0 * cor0.col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL + - col1 + col0 * - col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT DISTINCT col2 + + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + 87 - - col2 * + col0 col0 FROM tab0 AS cor0
----
219
7476
965

query I rowsort
SELECT col1 + + col2 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6928
SELECT tab0.col0 + + CAST( NULL AS SIGNED ) + + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6928
SELECT tab0.col0 + + CAST ( NULL AS INTEGER ) + + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * col0 * - tab1.col0 - + col1 AS col0 FROM tab1
----
-233482
-512
-614413

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1, tab2 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - col1 * col1 + col0 AS col0 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL col2 - + col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL - ( col1 ) * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL col2 * + col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col1 - + 2 AS col0 FROM tab2
----
-19
-33
-61

query I rowsort
SELECT DISTINCT 28 * + 50 AS col1 FROM tab1, tab2 AS cor0
----
1400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6937
SELECT ALL col2 + - CAST( tab0.col1 AS SIGNED ) AS col1 FROM tab0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-6937
SELECT ALL col2 + - CAST ( tab0.col1 AS INTEGER ) AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - col2 + + 59 AS col1 FROM tab1 cor0
----
-37
2
5

query I rowsort
SELECT + 88 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT DISTINCT col2 - + ( 58 ) FROM tab1
----
-1
-4
38

query I rowsort
SELECT DISTINCT + 20 AS col0 FROM tab1
----
20

query I rowsort
SELECT DISTINCT - 51 AS col0 FROM tab2, tab1 AS cor0
----
-51

query I rowsort
SELECT DISTINCT + col2 * col2 * + col0 + - col2 + cor0.col1 FROM tab0 cor0
----
131
26189
598445

query I rowsort
SELECT ALL + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - ( - col1 ) + - col2 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT - - ( col2 ) * + col2 + + col2 * + col0 AS col1 FROM tab2 AS cor0
----
2704
4446
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-6947
SELECT + + col1 DIV col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6947
SELECT + + col1 / col0 FROM tab0 AS cor0
----
1
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6948
SELECT DISTINCT - col2 / - cor0.col0 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6948
SELECT DISTINCT - col2 / - cor0.col0 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - ( + col0 ) + col1 AS col0 FROM tab2
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6950
SELECT + CAST( col0 + + col1 AS SIGNED ) AS col1 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-6950
SELECT + CAST ( col0 + + col1 AS INTEGER ) AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT + tab1.col1 * col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab0, tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + 8 AS col0 FROM tab0
----
8
8
8

query I rowsort
SELECT - 42 + col2 * - tab2.col0 AS col1 FROM tab2
----
-2070
-231
-3044

query I rowsort
SELECT - col2 - col1 AS col2 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT 45 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT ALL - cor0.col0 + cor0.col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT + 68 * cor0.col1 AS col2 FROM tab1 cor0
----
1768
680
884

query I rowsort
SELECT - ( + 92 ) - cor1.col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to feb3e75eb0bfdc49c714c21e4b6f44dc

query I rowsort
SELECT ALL + ( col0 ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab1, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - - 0 + col2 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + + col2 + - col2 + 29 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT DISTINCT + - 91 AS col1 FROM tab1 AS cor0
----
-91

query I rowsort
SELECT - col2 + ( col1 ) FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6966
SELECT ALL col0 DIV col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6966
SELECT ALL col0 / col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT + col1 + + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + + 89 FROM tab0 AS cor0
----
2153
3484
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6969
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) + + col2 * cor0.col0 * 85 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6969
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) + + col2 * cor0.col0 * 85 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6970
SELECT DISTINCT - - cor0.col2 * - ( cor0.col2 ) * col0 + + 99 DIV + 32 FROM tab2 AS cor0
----
-114073
-5100
-52725

skipif mysql # not compatible
query I rowsort label-6970
SELECT DISTINCT - - cor0.col2 * - ( cor0.col2 ) * col0 + + 99 / + 32 FROM tab2 AS cor0
----
-114073
-5100
-52725

query I rowsort
SELECT ALL - col1 + ( col2 ) - col1 AS col2 FROM tab2 cor0
----
-35
-92
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 16 col2 FROM tab1 cor0
----
1536
864
912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 29 col2 FROM tab2
----
1102
754
783

query I rowsort
SELECT + 35 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab2, tab1 AS cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT DISTINCT - + col1 * 9 FROM tab2 AS cor0
----
-153
-279
-531

query I rowsort
SELECT ALL col0 + ( col0 ) * - col2 FROM tab0 AS cor0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 91 col2 FROM tab2 AS cor0
----
-2366
-2457
-3458

query I rowsort
SELECT ALL + cor0.col0 + col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6980
SELECT col0 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6980
SELECT col0 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - - cor0.col1 + - 72 * col0 AS col1 FROM tab2 AS cor0
----
-473
-5557
-5671

query I rowsort
SELECT - cor0.col0 * ( col2 ) + + 15 + col2 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-384
1551
2769

query I rowsort
SELECT - col2 * col1 * col0 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 97 col2 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT ( 35 ) * + col0 + col0 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT DISTINCT 11 * + col1 FROM tab1 AS cor0
----
110
143
286

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 ( cor0.col2 ) * + col2 * 82 + col2 FROM tab1 AS cor0
----
239166
266475
755808

query I rowsort
SELECT ALL + col2 - - col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT 68 + - col1 * + col0 FROM tab1 AS cor0
----
-10
-572
-972

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6991
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6991
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + - col0 * 93 - col0 FROM tab0 cor0
----
-2256
-3290
-8366

onlyif mysql # use DIV operator for integer division
query I rowsort label-6993
SELECT ALL - - 26 + col2 DIV col2 AS col2 FROM tab1 AS cor0
----
27
27
27

skipif mysql # not compatible
query I rowsort label-6993
SELECT ALL - - 26 + col2 / col2 AS col2 FROM tab1 AS cor0
----
27
27
27

query I rowsort
SELECT DISTINCT + + col0 + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT 82 * - 93 + + col2 * col0 FROM tab2 AS cor0
----
-4624
-5598
-7437

query I rowsort
SELECT ALL 47 * col1 FROM tab2 AS cor0
----
1457
2773
799

onlyif mysql # use DIV operator for integer division
query I rowsort label-6997
SELECT - col1 - cor0.col1 DIV col0 FROM tab1 AS cor0
----
-10
-13
-34

skipif mysql # not compatible
query I rowsort label-6997
SELECT - col1 - cor0.col1 / col0 FROM tab1 AS cor0
----
-10
-13
-34

query I rowsort
SELECT DISTINCT ( col0 ) * - col1 + col0 + + cor0.col1 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-2990
-618
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6999
SELECT DISTINCT col0 DIV col0 - col0 AS col2 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-6999
SELECT DISTINCT col0 / col0 - col0 AS col2 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT col2 + 25 FROM tab1 AS cor0
----
121
79
82

query I rowsort
SELECT DISTINCT 57 + - 32 FROM tab1 cor0
----
25

query I rowsort
SELECT + - 88 + + col1 AS col0 FROM tab2 cor0
----
-29
-57
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7003
SELECT ALL + 38 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
12

skipif mysql # not compatible
query I rowsort label-7003
SELECT ALL + 38 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
12

query I rowsort
SELECT ALL ( + col0 ) * - ( + col0 ) + + col2 AS col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL - + col2 + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 + - ( col1 ) col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT ALL + 29 FROM tab2 AS cor0
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col1 col1 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL col2 + + col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT col2 + - col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL - col2 + tab0.col0 FROM tab0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 col0 FROM tab1
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7014
SELECT ALL col0 DIV - col0 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-7014
SELECT ALL col0 / - col0 col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col0 - col0 * cor0.col0 AS col0 FROM tab0 cor0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-7016
SELECT DISTINCT + col1 * + tab0.col1 DIV + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7016
SELECT DISTINCT + col1 * + tab0.col1 / + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT - col2 + - col0 * - cor0.col1 + col2 * col2 AS col1 FROM tab1 AS cor0
----
10160
2940
3832

query I rowsort
SELECT col1 FROM tab1 AS cor0 WHERE ( NULL ) BETWEEN NULL AND ( NULL ) OR NULL IN ( + col1 * - col2 )
----

query I rowsort
SELECT + col2 + col2 * col2 - - col2 FROM tab0 AS cor0
----
1155
3
6888

query I rowsort
SELECT + col2 * col1 * - tab1.col0 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT - col2 + + col2 + - col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col0 + col2 * + col1 + - tab2.col0 * - col1 AS col1 FROM tab2
----
1061
2068
6214

query I rowsort
SELECT col1 - - cor0.col0 * + col0 * + col0 FROM tab1 AS cor0
----
262154
512013
53

query I rowsort
SELECT ALL - + col2 + + col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - ( col0 ) AS col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - col2 - - col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7027
SELECT DISTINCT + ( - col0 ) DIV + col1 AS col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7027
SELECT DISTINCT + ( - col0 ) / + col1 AS col1 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT ALL 72 + + col0 FROM tab1 AS cor0
----
136
152
75

query I rowsort
SELECT ALL 11 - col0 FROM tab0 AS cor0
----
-13
-24
-78

query I rowsort
SELECT - - 29 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT DISTINCT - - col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + col0 + + col1 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT cor0.col2 * col2 + col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT 4 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
11
82
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7036
SELECT ALL - col2 + col0 DIV col2 col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7036
SELECT ALL - col2 + col0 / col2 col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col0 col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + 36 * col2 FROM tab2
----
1368
936
972

query I rowsort
SELECT + tab2.col1 * - cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 737dbb26f65dd374aa3c71dabdd3903c

onlyif mysql # use DIV operator for integer division
query I rowsort label-7040
SELECT col1 - + col0 DIV col2 FROM tab0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-7040
SELECT col1 - + col0 / col2 FROM tab0
----
62
86
90

query I rowsort
SELECT ALL - tab1.col2 * col2 * tab1.col2 + - col0 FROM tab1
----
-157467
-185257
-884816

query I rowsort
SELECT ALL col2 + + col1 AS col2 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7043
SELECT ALL + col0 DIV + col1 + + col1 AS col0 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-7043
SELECT ALL + col0 / + col1 + + col1 AS col0 FROM tab1
----
16
19
26

query I rowsort
SELECT DISTINCT tab0.col1 + col1 FROM tab0
----
172
182
194

query I rowsort
SELECT - col0 FROM tab1 WHERE NOT NULL < + col1
----

query I rowsort
SELECT DISTINCT col2 + col2 * tab0.col0 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT - col1 / + col0 FROM tab0 WHERE + col1 <= - col0 * col1
----

query I rowsort
SELECT + col2 + col1 * col1 AS col1 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab2 WHERE NOT ( NULL ) BETWEEN NULL AND col1
----

query I rowsort
SELECT col1 + col2 * col0 FROM tab1
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col1 col2 FROM tab1
----
109
67
80

query I rowsort
SELECT + cor0.col2 + + cor0.col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7053
SELECT ALL tab1.col1 DIV + col0 + + col0 * col1 DIV col2 FROM tab1
----
10
11
9

skipif mysql # not compatible
query I rowsort label-7053
SELECT ALL tab1.col1 / + col0 + + col0 * col1 / col2 FROM tab1
----
10
11
9

query I rowsort
SELECT + col1 + - col1 + + col1 AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT tab0.col0 * col2 FROM tab0
----
35
7298
792

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) NOT IN ( + tab0.col2 + - col1 )
----

query I rowsort
SELECT DISTINCT + tab2.col0 * - col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL col0 * - col1 FROM tab2 cor0 WHERE col0 + col0 >= NULL
----

query I rowsort
SELECT ALL - col0 * col2 AS col1 FROM tab0
----
-35
-7298
-792

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL NOT BETWEEN ( NULL ) AND col2
----

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT tab0.col0 * col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL - col2 + col0 * col0 * + col2 AS col0 FROM tab2
----
1296
158158
237120

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL IN ( - col0 )
----

query I rowsort
SELECT col0 + tab2.col2 FROM tab2 WHERE NULL NOT IN ( + tab2.col1 * + col1 + - col1 * col2 + col2 )
----

query I rowsort
SELECT col2 * + col2 + + col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL - col1 - col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT ALL col2 + + col0 AS col1 FROM tab0
----
171
36
57

query III rowsort
SELECT * FROM tab0 WHERE ( + col0 ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 + - col2 * + col1 FROM tab2
----
-1456
-567
-830

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( - col2 ) NOT IN ( col1 )
----

query I rowsort
SELECT DISTINCT + tab2.col0 + col0 * + col0 AS col1 FROM tab2
----
56
6162
6320

query I rowsort
SELECT col1 - tab2.col0 FROM tab2
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7074
SELECT CAST( 10 AS SIGNED ) AS col0 FROM tab0
----
10
10
10

skipif mysql # not compatible
query I rowsort label-7074
SELECT CAST ( 10 AS INTEGER ) AS col0 FROM tab0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 + col1 * + col2 * + col0 col1 FROM tab2
----
119690
51072
5897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - col1 + - col0 col2 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT ALL + 31 * col0 + + col0 AS col0 FROM tab2 AS cor0
----
224
2496
2528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col2 FROM tab0 AS cor0
----
-86
-86
-86

query I rowsort
SELECT ALL - + 70 + + col1 FROM tab0 AS cor0
----
16
21
27

query I rowsort
SELECT - 69 FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT + 15 AS col2 FROM tab0 cor0
----
15
15
15

query I rowsort
SELECT + + col1 + 36 + col2 FROM tab2 AS cor0
----
121
91
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7083
SELECT DISTINCT + CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7083
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT 54 + col2 * - col0 FROM tab2 AS cor0
----
-135
-1974
-2948

query I rowsort
SELECT DISTINCT + - col0 + col0 * col1 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT - - 94 * - col0 FROM tab2 AS cor0
----
-658
-7332
-7426

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col2 ) + - col1 * col1 col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT - - ( - col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7089
SELECT ALL + cor0.col0 + col0 DIV col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-7089
SELECT ALL + cor0.col0 + col0 / col2 FROM tab0 AS cor0
----
24
70
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 + - col0 col1 FROM tab0 AS cor0
----
-105
-159
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-7091
SELECT + - col0 * + col0 DIV - col0 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7091
SELECT + - col0 * + col0 / - col0 AS col2 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7092
SELECT DISTINCT - col0 DIV - col1 col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7092
SELECT DISTINCT - col0 / - col1 col2 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7093
SELECT DISTINCT + col1 * + cor0.col2 + - CAST( - col1 AS SIGNED ) * col2 AS col2 FROM tab1 AS cor0
----
1140
2496
2808

skipif mysql # not compatible
query I rowsort label-7093
SELECT DISTINCT + col1 * + cor0.col2 + - CAST ( - col1 AS INTEGER ) * col2 AS col2 FROM tab1 AS cor0
----
1140
2496
2808

query I rowsort
SELECT DISTINCT - col0 + col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - 44 AS col1 FROM tab0 AS cor0
----
-44

query I rowsort
SELECT - 86 * + col1 AS col0 FROM tab2 AS cor0
----
-1462
-2666
-5074

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col2 col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - - col0 + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + cor0.col0 + + col1 * + col1 * col0 AS col2 FROM tab2 AS cor0
----
22910
271596
6734

query I rowsort
SELECT DISTINCT - + ( + 51 ) - col1 AS col2 FROM tab2 AS cor0
----
-110
-68
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7101
SELECT col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7101
SELECT col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * col1 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + col1 + + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL col1 + - 44 FROM tab2 cor0
----
-13
-27
15

query I rowsort
SELECT ALL + - col0 * - col1 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + + col1 - 95 AS col1 FROM tab0 AS cor0
----
-4
-9
2

query I rowsort
SELECT DISTINCT - col1 + - 50 FROM tab1
----
-60
-63
-76

query I rowsort
SELECT ALL + col2 + + tab1.col0 FROM tab1
----
121
176
57

query I rowsort
SELECT col0 * + col0 * - col0 AS col0 FROM tab0
----
-13824
-42875
-704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-7110
SELECT col2 + tab0.col2 DIV - col0 FROM tab0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-7110
SELECT col2 + tab0.col2 / - col0 FROM tab0
----
1
32
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7111
SELECT tab0.col0 + col2 DIV col0 AS col0 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-7111
SELECT tab0.col0 + col2 / col0 AS col0 FROM tab0
----
25
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 + col1 * + col1 col2 FROM tab2
----
272
3422
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-7113
SELECT col1 DIV + col0 + - col1 + - col2 FROM tab2 AS cor0
----
-54
-55
-85

skipif mysql # not compatible
query I rowsort label-7113
SELECT col1 / + col0 + - col1 + - col2 FROM tab2 AS cor0
----
-54
-55
-85

query I rowsort
SELECT ALL - col1 * - col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 cor2
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT + tab2.col1 * + col1 + 51 + + col1 FROM tab2
----
1043
357
3591

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2, tab1, tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL 50 * + ( - col2 ) AS col0 FROM tab1
----
-2700
-2850
-4800

query I rowsort
SELECT 3 AS col0 FROM tab2
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 * tab2.col2 col2 FROM tab2
----
234
243
342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 53 col1 FROM tab0
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 23 - + col0 col1 FROM tab2 AS cor0
----
154
1716
1738

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 * + col0 col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - 77 FROM tab0 AS cor0
----
-77
-77
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7125
SELECT - - col1 + - ( col2 ) DIV + col1 AS col2 FROM tab2 AS cor0
----
15
31
59

skipif mysql # not compatible
query I rowsort label-7125
SELECT - - col1 + - ( col2 ) / + col1 AS col2 FROM tab2 AS cor0
----
15
31
59

query I rowsort
SELECT DISTINCT + col2 * - 98 - + col1 FROM tab1 AS cor0
----
-5318
-5596
-9421

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7127
SELECT + CAST( + col1 AS SIGNED ) * + col2 * col0 FROM tab2
----
119652
51034
5859

skipif mysql # not compatible
query I rowsort label-7127
SELECT + CAST ( + col1 AS INTEGER ) * + col2 * col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + - col1 * - col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7129
SELECT - col0 * col1 + + col0 DIV cor0.col2 + + col0 AS col2 FROM tab0 cor0
----
-2040
-3325
-8009

skipif mysql # not compatible
query I rowsort label-7129
SELECT - col0 * col1 + + col0 / cor0.col2 + + col0 AS col2 FROM tab0 cor0
----
-2040
-3325
-8009

onlyif mysql # use DIV operator for integer division
query I rowsort label-7130
SELECT col1 DIV - col0 - - col0 * + col0 FROM tab0
----
1223
573
7920

skipif mysql # not compatible
query I rowsort label-7130
SELECT col1 / - col0 - - col0 * + col0 FROM tab0
----
1223
573
7920

onlyif mysql # use DIV operator for integer division
query I rowsort label-7131
SELECT DISTINCT 73 DIV - col2 AS col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7131
SELECT DISTINCT 73 / - col2 AS col2 FROM tab1 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7132
SELECT - - 17 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7132
SELECT - - 17 / + col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 col0 FROM tab0
----
178
48
70

query I rowsort
SELECT - 92 AS col0 FROM tab1
----
-92
-92
-92

query I rowsort
SELECT col0 * col1 - + ( col1 ) * col2 AS col2 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT ALL + + col1 AS col0 FROM tab1 cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7137
SELECT + col2 * CAST( NULL AS DECIMAL ) + + 20 + + col2 * col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7137
SELECT + col2 * CAST ( NULL AS REAL ) + + 20 + + col2 * col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col0 * ( 52 ) + + col1 AS col1 FROM tab1
----
182
3338
4173

query I rowsort
SELECT + col1 * 73 + + col0 + + col0 FROM tab1 AS cor0
----
1109
1904
858

query I rowsort
SELECT - - col2 - - 47 AS col1 FROM tab1 cor0
----
101
104
143

onlyif mysql # use DIV operator for integer division
query I rowsort label-7141
SELECT DISTINCT + - col1 DIV col1 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7141
SELECT DISTINCT + - col1 / col1 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT DISTINCT + + col1 * + 73 AS col2 FROM tab2 AS cor0
----
1241
2263
4307

onlyif mysql # use DIV operator for integer division
query I rowsort label-7143
SELECT - - col1 + ( + 71 ) DIV + col2 + - col2 FROM tab1 AS cor0
----
-27
-46
-83

skipif mysql # not compatible
query I rowsort label-7143
SELECT - - col1 + ( + 71 ) / + col2 + - col2 FROM tab1 AS cor0
----
-27
-46
-83

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - col1 * + 64 FROM tab1 AS cor0
----
-1664
-640
-832

query I rowsort
SELECT DISTINCT + - col0 + col0 + 5 AS col2 FROM tab1 AS cor0
----
5

query I rowsort
SELECT - col0 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT cor0.col1 + 5 FROM tab2 AS cor0
----
22
36
64

query I rowsort
SELECT DISTINCT - col0 * col2 + - col2 AS col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT tab2.col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL 70 FROM tab1
----
70
70
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7152
SELECT + col0 DIV + 62 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7152
SELECT + col0 / + 62 AS col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - tab2.col2 * col2 AS col0 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT - 58 + - col2 AS col2 FROM tab0
----
-140
-59
-91

query I rowsort
SELECT DISTINCT 37 AS col2 FROM tab1, tab2 AS cor0, tab2, tab0 cor1
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-7156
SELECT + col1 DIV + col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7156
SELECT + col1 / + col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7157
SELECT + col0 DIV - 7 AS col1 FROM tab1 AS cor0
----
-11
-9
0

skipif mysql # not compatible
query I rowsort label-7157
SELECT + col0 / - 7 AS col1 FROM tab1 AS cor0
----
-11
-9
0

query I rowsort
SELECT col1 * 10 * col2 FROM tab1 AS cor0
----
12480
14040
5700

query I rowsort
SELECT - col1 + - ( col0 ) AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + col2 * ( col1 ) FROM tab2
----
1534
646
837

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT DISTINCT - col1 + col2 * col1 * 15 + ( + col1 ) AS col0 FROM tab2 AS cor0
----
12555
23010
9690

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 44 + - 28 * - col1 col1 FROM tab2 AS cor0
----
1608
432
824

query I rowsort
SELECT - + 94 + + col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
582
6
75

query I rowsort
SELECT DISTINCT + - col2 * col1 * col0 AS col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL + + col0 * ( col2 ) + + cor0.col1 * - col0 * col1 + 9 AS col2 FROM tab0 AS cor0
----
-176703
-329271
-729702

query I rowsort
SELECT - + 10 AS col0 FROM tab1 AS cor0
----
-10
-10
-10

query I rowsort
SELECT ALL + + 68 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
1768
680
884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7169
SELECT DISTINCT + col1 + + 94 + col1 * CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
-1232
-4449
-92

skipif mysql # not compatible
query I rowsort label-7169
SELECT DISTINCT + col1 + + 94 + col1 * CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
-1232
-4449
-92

query I rowsort
SELECT ALL 42 AS col2 FROM tab2 AS cor0
----
42
42
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7171
SELECT DISTINCT + + CAST( - col1 AS SIGNED ) FROM tab0 cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7171
SELECT DISTINCT + + CAST ( - col1 AS INTEGER ) FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + + col0 + - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 11 AS col1 FROM tab0 AS cor0
----
-11

query I rowsort
SELECT ALL col0 + + cor0.col0 AS col0 FROM tab2 cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 * + col2 col0 FROM tab2 AS cor0
----
-17576
-19683
-54872

onlyif mysql # use DIV operator for integer division
query I rowsort label-7176
SELECT ALL ( 9 ) DIV tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7176
SELECT ALL ( 9 ) / tab0.col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + 58 AS col2 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT - 46 + - col2 AS col0 FROM tab2 AS cor0
----
-72
-73
-84

query I rowsort
SELECT - col1 * - col0 * col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL ( - tab2.col2 ) + 18 AS col0 FROM tab2
----
-20
-8
-9

query I rowsort
SELECT - + 31 * - cor0.col0 * + 6 + + col0 FROM tab1 AS cor0
----
11968
14960
561

query I rowsort
SELECT + cor0.col1 + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col0 * col0 + + 53 * col1 FROM tab2 AS cor0
----
-2957
-5340
1594

query I rowsort
SELECT + col2 + col2 * - col2 * + 55 FROM tab2 AS cor0
----
-37154
-40068
-79382

query I rowsort
SELECT ALL cor0.col0 + + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-7186
SELECT DISTINCT - - col0 + 16 * 12 DIV col1 AS col0 FROM tab2 AS cor0
----
13
81
90

skipif mysql # not compatible
query I rowsort label-7186
SELECT DISTINCT - - col0 + 16 * 12 / col1 AS col0 FROM tab2 AS cor0
----
13
81
90

query I rowsort
SELECT ALL + cor0.col0 * - col2 + - col0 * cor0.col0 FROM tab0 AS cor0
----
-1260
-1368
-15219

query I rowsort
SELECT DISTINCT col2 - + col0 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + 43 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
43

query I rowsort
SELECT ALL - 1 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + - 84 + + col0 FROM tab2 AS cor0
----
-5
-6
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7193
SELECT cor1.col0 + CAST( NULL AS SIGNED ) FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7193
SELECT cor1.col0 + CAST ( NULL AS INTEGER ) FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7194
SELECT + CAST( NULL AS SIGNED ) * col0 - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7194
SELECT + CAST ( NULL AS INTEGER ) * col0 - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 43 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT ( + col1 ) * col0 - col1 * - col1 AS col0 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT ALL 21 AS col0 FROM tab1
----
21
21
21

query I rowsort
SELECT DISTINCT + + col0 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col1 - - cor0.col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + - col0 * + col2 * ( - col0 ) + col2 FROM tab2 AS cor0
----
1350
158210
237196

query I rowsort
SELECT DISTINCT 15 * + col2 AS col0 FROM tab2
----
390
405
570

query I rowsort
SELECT DISTINCT + col2 - - tab0.col2 * col0 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT - col0 + + col1 AS col2 FROM tab1 cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-7204
SELECT col2 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7204
SELECT col2 / col1 AS col2 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7205
SELECT ALL + CAST( + col0 + col1 AS SIGNED ) AS col1 FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-7205
SELECT ALL + CAST ( + col0 + col1 AS INTEGER ) AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT + 43 + 46 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL 4 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-216
-228
-384

query I rowsort
SELECT DISTINCT - 77 FROM tab2, tab0 AS cor0
----
-77

query I rowsort
SELECT ALL col2 + + 25 AS col1 FROM tab0
----
107
26
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-7210
SELECT + col1 + - col2 DIV 1 AS col1 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-7210
SELECT + col1 + - col2 / 1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab0, tab1 AS cor0
----
27

query I rowsort
SELECT DISTINCT + col0 + 73 * col0 FROM tab2 AS cor0
----
518
5772
5846

query I rowsort
SELECT ( col1 * col2 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT + 24 * 63 FROM tab2
----
1512
1512
1512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7215
SELECT + CAST( NULL AS SIGNED ) / col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7215
SELECT + CAST ( NULL AS INTEGER ) / col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col0 + - cor0.col2 * + col2 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT - - 25 * + col1 AS col1 FROM tab0 AS cor0
----
2150
2275
2425

query I rowsort
SELECT ALL - - ( 74 ) * + cor0.col2 AS col2 FROM tab0 AS cor0
----
2442
6068
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7219
SELECT + + CAST( + col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7219
SELECT + + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT ( col2 ) AS col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL + - 12 AS col1 FROM tab1 AS cor0
----
-12
-12
-12

query I rowsort
SELECT DISTINCT - ( col2 ) * col0 * + 96 AS col1 FROM tab1 AS cor0
----
-15552
-350208
-737280

query I rowsort
SELECT ALL 73 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT DISTINCT col2 * - tab1.col1 - + col1 FROM tab1
----
-1261
-1430
-580

onlyif mysql # use DIV operator for integer division
query I rowsort label-7226
SELECT + col0 DIV - col1 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7226
SELECT + col0 / - col1 FROM tab2
----
-1
-4
0

query I rowsort
SELECT 45 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT DISTINCT col1 * col2 - - tab0.col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT col0 - col0 AS col2 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7230
SELECT col0 + tab1.col1 DIV 64 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7230
SELECT col0 + tab1.col1 / 64 FROM tab1
----
3
64
80

query I rowsort
SELECT + tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - 72 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

onlyif mysql # use DIV operator for integer division
query I rowsort label-7233
SELECT + tab1.col1 * - col0 + 72 + + ( col0 ) DIV + col0 FROM tab1
----
-5
-567
-967

skipif mysql # not compatible
query I rowsort label-7233
SELECT + tab1.col1 * - col0 + 72 + + ( col0 ) / + col0 FROM tab1
----
-5
-567
-967

query I rowsort
SELECT + 26 AS col1 FROM tab0 AS cor0
----
26
26
26

query I rowsort
SELECT DISTINCT + col2 - - cor0.col0 AS col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7236
SELECT + col1 * col2 - + CAST( col1 * + col2 + col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-7236
SELECT + col1 * col2 - + CAST ( col1 * + col2 + col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7237
SELECT - + ( cor0.col0 ) + + CAST( 97 * col0 AS SIGNED ) FROM tab2 AS cor0
----
672
7488
7584

skipif mysql # not compatible
query I rowsort label-7237
SELECT - + ( cor0.col0 ) + + CAST ( 97 * col0 AS INTEGER ) FROM tab2 AS cor0
----
672
7488
7584

query I rowsort
SELECT ALL - + cor0.col1 * - cor0.col0 - + 82 AS col1 FROM tab0 AS cor0
----
1982
3313
8017

query I rowsort
SELECT ALL + - col2 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7240
SELECT + + col2 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7240
SELECT + + col2 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 - - ( + cor0.col0 * + col2 ) FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - cor0.col0 * 72 FROM tab0 AS cor0
----
-1728
-2520
-6408

query I rowsort
SELECT ALL - + col2 * + 45 + + cor0.col0 FROM tab0 AS cor0
----
-10
-1461
-3601

query I rowsort
SELECT DISTINCT + cor0.col2 * - 21 AS col2 FROM tab0 AS cor0
----
-1722
-21
-693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 * 35 AS col1 FROM tab1 AS cor0
----
-1836
-1938
-3264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7247
SELECT + col2 * - CAST( col1 AS SIGNED ) + + col2 FROM tab0 cor0
----
-2805
-7380
-96

skipif mysql # not compatible
query I rowsort label-7247
SELECT + col2 * - CAST ( col1 AS INTEGER ) + + col2 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL - + col2 * 32 AS col0 FROM tab2 AS cor0
----
-1216
-832
-864

query I rowsort
SELECT + col0 * + 69 + col2 * - cor0.col0 FROM tab0 AS cor0
----
-1157
2380
864

query I rowsort
SELECT DISTINCT + - col0 + 59 FROM tab2 cor0
----
-19
-20
52

query I rowsort
SELECT DISTINCT - cor0.col2 - col1 FROM tab2 cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7252
SELECT ALL - cor0.col1 * 86 + + col0 DIV - col0 AS col1 FROM tab0 AS cor0
----
-7397
-7827
-8343

skipif mysql # not compatible
query I rowsort label-7252
SELECT ALL - cor0.col1 * 86 + + col0 / - col0 AS col1 FROM tab0 AS cor0
----
-7397
-7827
-8343

query I rowsort
SELECT ALL - 34 FROM tab2
----
-34
-34
-34

query I rowsort
SELECT DISTINCT + col0 * - col2 * - 14 FROM tab2 AS cor0
----
2646
28392
42028

query I rowsort
SELECT col2 + + cor0.col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT 90 FROM tab0, tab2 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT DISTINCT - - cor0.col1 * + 89 AS col2 FROM tab1 AS cor0
----
1157
2314
890

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 731e4a6549b312ba21c2e61ca9bede27

query I rowsort
SELECT ALL + tab0.col0 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - - col1 * col0 - 31 * + col0 AS col1 FROM tab2 AS cor0
----
-1106
0
2184

query I rowsort
SELECT ALL + col2 + - 38 AS col1 FROM tab1 AS cor0
----
16
19
58

query I rowsort
SELECT ALL col2 * col1 * + col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT - + col1 + col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7264
SELECT ALL col1 DIV - 25 - col0 * - col0 AS col0 FROM tab1 cor0
----
4096
6400
8

skipif mysql # not compatible
query I rowsort label-7264
SELECT ALL col1 / - 25 - col0 * - col0 AS col0 FROM tab1 cor0
----
4096
6400
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - col0 * + 65 col2 FROM tab2 AS cor0
----
-482
-5096
-5173

onlyif mysql # use DIV operator for integer division
query I rowsort label-7266
SELECT cor0.col2 * col2 - + cor0.col1 DIV col0 AS col1 FROM tab1 cor0
----
2908
3249
9216

skipif mysql # not compatible
query I rowsort label-7266
SELECT cor0.col2 * col2 - + cor0.col1 / col0 AS col1 FROM tab1 cor0
----
2908
3249
9216

query I rowsort
SELECT DISTINCT + + col1 + + ( - col1 ) AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + col1 + - col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - col0 + 83 + col2 * col0 FROM tab0
----
7292
83
851

query I rowsort
SELECT 60 AS col0 FROM tab2 AS cor0
----
60
60
60

query I rowsort
SELECT - - ( + cor0.col0 ) + cor0.col1 * 12 AS col1 FROM tab0 cor0
----
1056
1181
1199

query I rowsort
SELECT DISTINCT 58 AS col2 FROM tab0, tab0 AS cor0
----
58

query I rowsort
SELECT col0 * ( - ( + tab2.col0 ) ) AS col2 FROM tab2
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col0 * - col0 + tab1.col0 col0 FROM tab1
----
-233408
-483
-614320

query I rowsort
SELECT col2 + - col2 + col1 * - tab2.col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - col0 + - ( + 48 ) FROM tab1
----
-112
-128
-51

query I rowsort
SELECT - col2 * - col0 + + col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT - 2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7279
SELECT col2 * - col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-7279
SELECT col2 * - col0 / cor0.col0 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + + col2 + - cor0.col1 * + 75 FROM tab1 AS cor0
----
-1896
-693
-879

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab2 AS cor0
----
57

query I rowsort
SELECT - - ( cor0.col0 ) + ( 42 ) * - col2 AS col1 FROM tab0 AS cor0
----
-1362
-3355
-7

query I rowsort
SELECT ALL - col1 + col0 AS col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT + - 38 AS col0 FROM tab1 cor0
----
-38
-38
-38

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 DISTINCT + col0 + + col0 * + col0 AS col2 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT - col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + + tab2.col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - 58 FROM tab2, tab0 cor0
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT ALL + 88 AS col0 FROM tab1
----
88
88
88

query I rowsort
SELECT DISTINCT - col0 * col2 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col1 * + col1 * + col0 AS col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 + - 35 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT DISTINCT + col0 * - col2 + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT + - col2 * ( col2 ) FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT 84 FROM tab1, tab2 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT - cor0.col0 * 37 FROM tab0 AS cor0
----
-1295
-3293
-888

query I rowsort
SELECT + ( - cor0.col0 ) + col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 2 AS col2 FROM tab1
----
2

query I rowsort
SELECT - ( - col0 * col2 ) AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT 86 FROM tab2, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-7303
SELECT DISTINCT + - cor0.col2 DIV + col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7303
SELECT DISTINCT + - cor0.col2 / + col0 FROM tab0 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7304
SELECT ALL + col0 DIV - col1 + + col1 * + col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-7304
SELECT ALL + col0 / - col1 + + col1 * + col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 63 col1 FROM tab0 AS cor0
----
-63
-63
-63

query I rowsort
SELECT ALL + col2 * + col0 - + col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL cor1.col2 * 13 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to cfbf6626f06fcc4e0c3acb42c813e056

query I rowsort
SELECT - 63 AS col0 FROM tab0
----
-63
-63
-63

query I rowsort
SELECT + col2 - 13 AS col1 FROM tab1
----
41
44
83

query I rowsort
SELECT ( col0 + col1 * 43 ) AS col2 FROM tab0
----
3722
4002
4206

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - col1 * col2 col0 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT tab0.col0 + col1 + col2 FROM tab0
----
133
143
262

query I rowsort
SELECT + col2 * + col0 * + 8 FROM tab1
----
1296
29184
61440

query I rowsort
SELECT tab1.col2 + - tab1.col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - - col0 + 94 FROM tab1 AS cor0
----
158
174
97

query I rowsort
SELECT - 60 + col2 + - col1 * + ( col2 ) * + col0 AS col1 FROM tab0
----
-3454
-664096
-68139

query I rowsort
SELECT DISTINCT + tab1.col0 AS col0 FROM tab1, tab0, tab2 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT col2 + col1 + - 2 * + col2 AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + 47 * col0 AS col0 FROM tab1
----
141
3008
3760

query I rowsort
SELECT + col0 * 27 FROM tab2
----
189
2106
2133

query I rowsort
SELECT + col2 * + col2 + - col1 AS col0 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT col1 * - cor0.col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - col1 + 51 + col1 FROM tab0 AS cor0
----
51
51
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7325
SELECT DISTINCT + col1 + col0 DIV col0 AS col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-7325
SELECT DISTINCT + col1 + col0 / col0 AS col1 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-7326
SELECT - col1 + + col0 DIV col1 FROM tab1 AS cor0
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-7326
SELECT - col1 + + col0 / col1 FROM tab1 AS cor0
----
-26
-4
-7

query I rowsort
SELECT col2 + + 50 AS col1 FROM tab2
----
76
77
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col1 col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - col0 * + ( + col1 ) + + col1 - col0 AS col2 FROM tab0 AS cor0
----
-2002
-3333
-8097

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7330
SELECT col0 * - CAST( 16 AS SIGNED ) FROM tab0
----
-1424
-384
-560

skipif mysql # not compatible
query I rowsort label-7330
SELECT col0 * - CAST ( 16 AS INTEGER ) FROM tab0
----
-1424
-384
-560

query I rowsort
SELECT ALL tab1.col2 - col0 AS col1 FROM tab1
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7332
SELECT - col2 + - col1 DIV cor0.col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7332
SELECT - col2 + - col1 / cor0.col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - col1 + 46 AS col2 FROM tab2 AS cor0
----
-13
15
29

query I rowsort
SELECT ALL + 48 FROM tab1 AS cor0
----
48
48
48

query I rowsort
SELECT DISTINCT - 18 AS col1 FROM tab2 AS cor0
----
-18

query I rowsort
SELECT + col2 + + 11 FROM tab1 cor0
----
107
65
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7337
SELECT ALL + CAST( col1 AS SIGNED ) + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7337
SELECT ALL + CAST ( col1 AS INTEGER ) + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 0 + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 75 col1 FROM tab1 AS cor0
----
1950
750
975

query I rowsort
SELECT + + 78 + col0 * + cor0.col1 * + cor0.col0 + + cor0.col0 FROM tab2 AS cor0
----
106254
1604
359112

query I rowsort
SELECT - ( cor0.col0 ) * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - col0 * + col2 + - col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT + 19 * 11 AS col0 FROM tab1 AS cor0
----
209
209
209

query I rowsort
SELECT + ( col2 ) * col0 + + cor0.col0 * - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col2 * 89 FROM tab1 AS cor0
----
-4806
-5073
-8544

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + col2 * ( col2 ) col1 FROM tab1 AS cor0
----
2862
3192
9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7348
SELECT + col2 - + CAST( - col0 AS SIGNED ) FROM tab0 cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-7348
SELECT + col2 - + CAST ( - col0 AS INTEGER ) FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT - col1 * - col0 AS col0 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7350
SELECT DISTINCT col0 + 28 DIV 94 + col2 FROM tab1 cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-7350
SELECT DISTINCT col0 + 28 / 94 + col2 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7351
SELECT + col1 * col0 * 93 + col0 * 24 DIV - 85 + col0 * + ( - 42 * col0 ) AS col1 FROM tab1 AS cor0
----
-112530
-172102
6876

skipif mysql # not compatible
query I rowsort label-7351
SELECT + col1 * col0 * 93 + col0 * 24 / - 85 + col0 * + ( - 42 * col0 ) AS col1 FROM tab1 AS cor0
----
-112530
-172102
6876

query I rowsort
SELECT + - col2 - 64 * col0 FROM tab1 AS cor0
----
-246
-4153
-5216

query I rowsort
SELECT ALL + - col0 + + cor0.col1 * col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ( - col0 ) - - ( + 27 ) * col0 FROM tab0 AS cor0
----
2314
624
910

query I rowsort
SELECT col1 * col1 + col2 * 96 FROM tab2 AS cor0
----
3553
3937
5977

onlyif mysql # use DIV operator for integer division
query I rowsort label-7356
SELECT ALL ( - col0 ) DIV col2 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7356
SELECT ALL ( - col0 ) / col2 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT - - 61 + col0 + col0 AS col2 FROM tab0 AS cor0
----
109
131
239

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 * + col0 + - 34 + col2 col1 FROM tab0 AS cor0
----
1192
575
7969

query I rowsort
SELECT DISTINCT + 4 * + col2 AS col0 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT 6 AS col1 FROM tab2 AS cor0
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 * + col0 + cor0.col0 + col0 col0 FROM tab2 AS cor0
----
329
3666
3713

query I rowsort
SELECT ALL col0 - + col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - cor0.col2 * - col2 - - col1 AS col0 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + 7 + col1 FROM tab0 AS cor0
----
104
93
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 - tab0.col1 col2 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT ALL + 59 FROM tab0 AS cor0
----
59
59
59

query I rowsort
SELECT + col1 * + cor0.col0 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + - 58 + - col1 * - cor0.col0 FROM tab0 cor0
----
2006
3337
8041

query I rowsort
SELECT - + col0 * cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL 48 + - tab0.col1 FROM tab0
----
-38
-43
-49

query I rowsort
SELECT 17 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL + cor0.col1 + col0 * - 51 FROM tab0 AS cor0
----
-1138
-1688
-4448

query I rowsort
SELECT + ( + col0 ) + col1 * col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL - 41 * + cor0.col2 - + col1 AS col0 FROM tab2 cor0
----
-1125
-1138
-1575

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7376
SELECT DISTINCT + + col1 * col0 + col0 DIV col0 AS col1 FROM tab2 AS cor0
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-7376
SELECT DISTINCT + + col1 * col0 + col0 / col0 AS col1 FROM tab2 AS cor0
----
1344
218
4603

query I rowsort
SELECT DISTINCT col0 + tab0.col1 + col2 FROM tab0
----
133
143
262

query I rowsort
SELECT - col0 * 11 AS col2 FROM tab0 AS cor0
----
-264
-385
-979

query I rowsort
SELECT DISTINCT - - 87 * - col0 AS col1 FROM tab1 AS cor0
----
-261
-5568
-6960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7380
SELECT ALL - - CAST( NULL AS SIGNED ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7380
SELECT ALL - - CAST ( NULL AS INTEGER ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 82 * cor0.col0 FROM tab0 AS cor0
----
-1968
-2870
-7298

query I rowsort
SELECT col0 + tab1.col1 FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) * + tab1.col1 + - 42 FROM tab1
----
36
598
998

query I rowsort
SELECT cor1.col2 - 80 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 557fb18adde188e3cfc3252b6fe67ae7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col1 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT - ( - col1 + + col1 ) FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7387
SELECT + CAST( NULL AS SIGNED ) - - ( col1 * col1 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7387
SELECT + CAST ( NULL AS INTEGER ) - - ( col1 * col1 ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + col2 + - col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT col0 + cor0.col0 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 49 col2 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT ALL + col2 + col0 * - col2 * - cor0.col2 FROM tab1 AS cor0
----
207993
737376
8802

onlyif mysql # use DIV operator for integer division
query I rowsort label-7393
SELECT DISTINCT 60 DIV col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7393
SELECT DISTINCT 60 / col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT - 45 + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
2793
52
7417

query I rowsort
SELECT DISTINCT + 8 * + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-136
-248
-472

query I rowsort
SELECT ALL + 50 AS col2 FROM tab2 AS cor0
----
50
50
50

query I rowsort
SELECT ALL - 83 AS col2 FROM tab2
----
-83
-83
-83

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT + ( + ( + col2 ) ) FROM tab0
----
1
33
82

query I rowsort
SELECT - + cor0.col1 * + col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - 82 FROM tab0 AS cor0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 97 col0 FROM tab2 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ALL + - 62 + cor0.col2 * col0 * + ( col0 ) AS col0 FROM tab0 AS cor0
----
1163
18946
649460

query I rowsort
SELECT DISTINCT - - 97 AS col2 FROM tab0 cor0
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 - cor0.col2 col2 FROM tab2 cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( col0 ) * + 45 col2 FROM tab1 AS cor0
----
-135
-2880
-3600

query I rowsort
SELECT + col0 * col2 + ( col2 ) AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL 11 * + col1 FROM tab2
----
187
341
649

onlyif mysql # use DIV operator for integer division
query I rowsort label-7411
SELECT DISTINCT + - cor0.col0 DIV - col1 AS col0 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-7411
SELECT DISTINCT + - cor0.col0 / - col1 AS col0 FROM tab1 AS cor0
----
0
6

query I rowsort
SELECT ALL ( - 66 ) AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to cd4a3594ee8b45223ebf9f25840cd112

query I rowsort
SELECT - + ( col2 ) FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + - col0 * cor0.col0 col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT cor0.col1 + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - cor0.col2 + + cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + col0 - cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + ( col2 ) AS col1 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - col2 ) col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + - col2 + + 69 FROM tab0 AS cor0
----
-13
36
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-7422
SELECT col2 DIV - 90 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7422
SELECT col2 / - 90 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL 31 FROM tab1 cor0
----
31
31
31

query I rowsort
SELECT ALL + ( - col1 ) + - cor0.col0 AS col2 FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7425
SELECT DISTINCT - col2 DIV + col0 + col1 DIV + col1 AS col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-7425
SELECT DISTINCT - col2 / + col0 + col1 / + col1 AS col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT - + 74 FROM tab0 AS cor0
----
-74

query I rowsort
SELECT ALL + - col1 + + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col0 FROM tab1 AS cor0
----
6
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-7429
SELECT - col2 + + 51 DIV + ( tab1.col2 * col2 ) FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7429
SELECT - col2 + + 51 / + ( tab1.col2 * col2 ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col1 * + col0 * - col2 AS col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT ALL ( + tab0.col1 ) FROM tab0
----
86
91
97

query I rowsort
SELECT + 98 AS col1 FROM tab1 AS cor0
----
98
98
98

query I rowsort
SELECT + + 19 FROM tab0 AS cor0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * + 44 col2 FROM tab0 AS cor0
----
3808
4093
4303

query I rowsort
SELECT - col2 + - 90 AS col1 FROM tab1 AS cor0
----
-144
-147
-186

query I rowsort
SELECT - col0 * - 55 AS col0 FROM tab1 AS cor0
----
165
3520
4400

query I rowsort
SELECT + - col1 * + ( col2 ) + col0 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7438
SELECT ALL col2 DIV col2 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7438
SELECT ALL col2 / col2 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL - 58 AS col0 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to a38440572743ed8a3d8af7b49a5388c9

query I rowsort
SELECT DISTINCT - cor0.col0 * - ( - ( + col0 ) * col1 ) FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT - cor0.col0 * - col2 + ( col1 ) + 63 AS col2 FROM tab0 AS cor0
----
195
7452
941

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ALL - 27 * + col2 FROM tab0
----
-2214
-27
-891

query I rowsort
SELECT - ( - col1 ) * - col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT 61 * + ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
183
3904
4880

query I rowsort
SELECT DISTINCT + 12 * - cor0.col0 AS col2 FROM tab2 cor0
----
-84
-936
-948

onlyif mysql # use DIV operator for integer division
query I rowsort label-7447
SELECT DISTINCT - col1 + + 24 DIV col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-7447
SELECT DISTINCT - col1 + + 24 / col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + 4 * + col0 FROM tab2 AS cor0
----
28
312
316

query I rowsort
SELECT + + 64 * + 78 AS col1 FROM tab2 AS cor0
----
4992
4992
4992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 - 84 col1 FROM tab0 AS cor0
----
-49
-60
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-7451
SELECT 58 DIV + 15 AS col0 FROM tab2 AS cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-7451
SELECT 58 / + 15 AS col0 FROM tab2 AS cor0
----
3
3
3

query I rowsort
SELECT col2 + 41 FROM tab2
----
67
68
79

query I rowsort
SELECT - 16 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
1376
1456
1552

query I rowsort
SELECT DISTINCT col0 + - ( col1 ) AS col1 FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + 59 * - col2 FROM tab1
----
-3186
-3363
-5664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT + ( + col0 ) * cor0.col0 - 10 FROM tab2 AS cor0
----
39
6074
6231

query I rowsort
SELECT col1 * col1 AS col0 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL 98 * col1 AS col2 FROM tab1 AS cor0
----
1274
2548
980

query I rowsort
SELECT - col1 * cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 - col0 col2 FROM tab1 AS cor0
----
-116
-132
-55

query I rowsort
SELECT DISTINCT - col1 + col2 * - col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT col1 - col0 AS col0 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 + col1 * 29 col1 FROM tab1 AS cor0
----
295
382
759

query I rowsort
SELECT ALL + 95 FROM tab1
----
95
95
95

query I rowsort
SELECT ALL + 5 AS col1 FROM tab2
----
5
5
5

query I rowsort
SELECT DISTINCT 92 * + col1 AS col2 FROM tab0
----
7912
8372
8924

query I rowsort
SELECT 8 * 38 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to dedc0010a5f3351c3f002e20f7851694

query I rowsort
SELECT ALL - col0 - col0 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT ALL 33 * + 55 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 19ba36a810b8be25accc1c062480ff2f

query I rowsort
SELECT tab1.col0 * col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col1 * - col1 * col1 FROM tab0
----
-636056
-753571
-912673

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7474
SELECT col0 * col1 + CAST( NULL AS SIGNED ) / + cor0.col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7474
SELECT col0 * col1 + CAST ( NULL AS INTEGER ) / + cor0.col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col1 * + col1 + 7 FROM tab0 AS cor0
----
7403
8288
9416

query I rowsort
SELECT - + col0 - - col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT 23 FROM tab1, tab2 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT tab0.col0 * tab0.col1 * - 67 FROM tab0
----
-138288
-227465
-542633

onlyif mysql # use DIV operator for integer division
query I rowsort label-7480
SELECT DISTINCT - col0 DIV - col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-7480
SELECT DISTINCT - col0 / - col1 FROM tab2
----
0
1
4

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 1751d8ec783486b9121baa2709745253

query I rowsort
SELECT col2 * 12 AS col2 FROM tab0 AS cor0
----
12
396
984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7483
SELECT + - col1 + - CAST( NULL AS SIGNED ) * - 19 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7483
SELECT + - col1 + - CAST ( NULL AS INTEGER ) * - 19 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7485
SELECT + ( col2 ) DIV + col2 - 96 FROM tab0
----
-95
-95
-95

skipif mysql # not compatible
query I rowsort label-7485
SELECT + ( col2 ) / + col2 - 96 FROM tab0
----
-95
-95
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7486
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-7486
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
NULL

query I rowsort
SELECT - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + col2 + + col0 * + col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL + col0 * col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + 68 AS col1 FROM tab2 cor0
----
68
68
68

query I rowsort
SELECT - ( 8 ) * col0 FROM tab0 cor0
----
-192
-280
-712

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 - - col0 * - col1 col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7494
SELECT DISTINCT + col0 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7494
SELECT DISTINCT + col0 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - - col0 * col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7496
SELECT ALL + col2 - CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-7496
SELECT ALL + col2 - CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + col2 * col0 * col1 + cor0.col2 FROM tab2 AS cor0
----
119678
51072
5886

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7498
SELECT ALL + col0 * + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7498
SELECT ALL + col0 * + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 26 col0 FROM tab0 AS cor0
----
-2236
-2366
-2522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7500
SELECT cor0.col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7500
SELECT cor0.col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col1 * col1 + + col1 * - col0 FROM tab1 cor0
----
-1209
-740
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7502
SELECT ALL cor0.col1 * - 28 * + 94 + - col1 * col0 DIV col1 FROM tab1 AS cor0
----
-26384
-34296
-68435

skipif mysql # not compatible
query I rowsort label-7502
SELECT ALL cor0.col1 * - 28 * + 94 + - col1 * col0 / col1 FROM tab1 AS cor0
----
-26384
-34296
-68435

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 + + cor0.col0 AS col2 FROM tab2 cor0
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 + + col1 * + col0 col1 FROM tab0 AS cor0
----
2174
3527
8279

query I rowsort
SELECT DISTINCT + - cor0.col2 - 21 FROM tab0 AS cor0
----
-103
-22
-54

query I rowsort
SELECT - cor0.col2 * - 24 + col2 * + col1 FROM tab1 AS cor0
----
1938
2700
3552

query I rowsort
SELECT - - col0 + col2 * - 56 FROM tab0 AS cor0
----
-1824
-21
-4503

query I rowsort
SELECT DISTINCT col2 + col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - col2 * + col0 * col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + col2 + 89 FROM tab0 AS cor0
----
122
171
90

query I rowsort
SELECT ALL - cor0.col0 * - ( - cor0.col1 ) + cor0.col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-7512
SELECT ALL - col2 DIV col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7512
SELECT ALL - col2 / col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col0 - 23 AS col1 FROM tab1
----
-20
41
57

query I rowsort
SELECT - 28 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2, tab2 AS cor3
----
243 values hashing to 10ed4d350e75fd84e2069195cbaf9c3d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col2 col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + 41 * ( col2 ) AS col1 FROM tab0 AS cor0
----
1353
3362
41

query I rowsort
SELECT DISTINCT - cor0.col1 * 19 AS col2 FROM tab0, tab0 AS cor0
----
-1634
-1729
-1843

query I rowsort
SELECT ALL - - col2 * col0 - col0 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7519
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7519
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - cor0.col1 * col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT 40 * + col2 AS col1 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT ALL 67 FROM tab2 cor0
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + col2 * + col1 col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL - + col1 * + col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7525
SELECT DISTINCT ( col1 ) DIV - col1 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7525
SELECT DISTINCT ( col1 ) / - col1 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + 53 * - col2 AS col1 FROM tab0 AS cor0
----
-1749
-4346
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7527
SELECT - - col0 * - col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7527
SELECT - - col0 * - col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 col2 FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7529
SELECT ( col1 ) - CAST( NULL AS SIGNED ) / 5 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7529
SELECT ( col1 ) - CAST ( NULL AS INTEGER ) / 5 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 - + col2 * 75 FROM tab0
----
-2389
-6059
22

query I rowsort
SELECT ALL + 14 AS col0 FROM tab1, tab0 cor0, tab1 cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7532
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7532
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 * col1 col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - 1 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT - 47 AS col1 FROM tab2 AS cor0
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 * col2 col1 FROM tab1 AS cor0
----
1188
1254
2112

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + ( col2 ) AS col2 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7539
SELECT DISTINCT - col1 DIV - col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7539
SELECT DISTINCT - col1 / - col0 FROM tab0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7540
SELECT col1 DIV - 32 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7540
SELECT col1 / - 32 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 37 AS col1 FROM tab0, tab1 AS cor0
----
37

query I rowsort
SELECT + - col2 + ( - col0 ) * - col0 AS col1 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT 27 * col1 FROM tab2
----
1593
459
837

query I rowsort
SELECT ( - 98 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT tab2.col0 + col1 * + col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT DISTINCT + 88 * cor0.col1 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
1144
2288
880

query I rowsort
SELECT + - col0 * col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT col0 + - col1 * cor0.col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - - col1 * col1 * + col0 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL col0 + - col2 * - col0 AS col2 FROM tab0
----
70
7387
816

query I rowsort
SELECT DISTINCT 85 * + col1 + col2 * - col0 + col0 FROM tab2
----
-1478
2453
3065

query I rowsort
SELECT ALL - 93 + - col0 AS col0 FROM tab0
----
-117
-128
-182

query I rowsort
SELECT + col2 * + ( tab1.col2 ) AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - - 70 * - 82 + cor0.col2 FROM tab2 cor0
----
-5702
-5713
-5714

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 54 * - col1 col2 FROM tab1 cor0
----
-1350
-483
-606

onlyif mysql # use DIV operator for integer division
query I rowsort label-7556
SELECT DISTINCT - ( - cor0.col1 ) DIV - col0 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-7556
SELECT DISTINCT - ( - cor0.col1 ) / - col0 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-26
-31
-38

query I rowsort
SELECT ALL col1 + cor0.col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col0 FROM tab2, tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT 26 * - col2 FROM tab1 AS cor0
----
-1404
-1482
-2496

query I rowsort
SELECT - col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - cor0.col2 + col0 * 33 FROM tab1 AS cor0
----
2055
2544
45

query I rowsort
SELECT ALL - col2 + + col2 * col2 FROM tab2 AS cor0
----
1406
650
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + - col1 * - 0 col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - 56 AS col0 FROM tab2 AS cor0
----
-56
-56
-56

query I rowsort
SELECT ALL + cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + 75 * + col1 AS col2 FROM tab1 cor0
----
1950
750
975

query I rowsort
SELECT DISTINCT - col1 + col0 * + col2 FROM tab1 AS cor0
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-7569
SELECT + col1 DIV col1 col0 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7569
SELECT + col1 / col1 col0 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + col0 * + col1 + - col1 * - col0 AS col0 FROM tab1 AS cor0
----
1280
156
2080

query I rowsort
SELECT + 42 * - col0 + + tab0.col0 + + 6 * + 57 AS col0 FROM tab0
----
-1093
-3307
-642

query I rowsort
SELECT col0 * 20 AS col1 FROM tab1
----
1280
1600
60

query I rowsort
SELECT DISTINCT - - 26 AS col0 FROM tab1 AS cor0
----
26

query I rowsort
SELECT DISTINCT 69 FROM tab1 AS cor0
----
69

query I rowsort
SELECT + + col1 * + cor0.col1 + + 6 FROM tab1 AS cor0
----
106
175
682

query I rowsort
SELECT ( col0 ) + col1 * cor0.col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - col2 + col2 * - 16 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT + ( col1 ) * - 9 FROM tab0 AS cor0
----
-774
-819
-873

query I rowsort
SELECT - 97 * col1 * col2 FROM tab1 AS cor0
----
-121056
-136188
-55290

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 90 col2 FROM tab0 AS cor0
----
90
90
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-7582
SELECT col2 DIV + col2 + - col2 DIV + col2 + + col0 * 66 DIV 41 FROM tab1 AS cor0
----
103
128
4

skipif mysql # not compatible
query I rowsort label-7582
SELECT col2 / + col2 + - col2 / + col2 + + col0 * 66 / 41 FROM tab1 AS cor0
----
103
128
4

query I rowsort
SELECT - ( + col0 * + col1 ) FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col2 * col1 * + 12 + + 50 * + tab2.col0 - col2 FROM tab2
----
10367
11664
22282

query I rowsort
SELECT - - col0 + col2 + col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT 25 * col2 AS col1 FROM tab0 AS cor0
----
2050
25
825

query I rowsort
SELECT + 50 + tab1.col1 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c046523cc02bdd2c024ad88715748c1b

query I rowsort
SELECT ALL - 80 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7589
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7589
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7590
SELECT DISTINCT col0 DIV 48 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-7590
SELECT DISTINCT col0 / 48 FROM tab0
----
0
1

query I rowsort
SELECT DISTINCT - ( 46 ) FROM tab0, tab1 cor0
----
-46

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT + - cor0.col1 * - col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL - cor0.col0 * 15 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 3756a62940adb500ed350763fc202fe1

query I rowsort
SELECT 46 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT - 78 FROM tab2 cor0
----
-78
-78
-78

query I rowsort
SELECT cor0.col1 * cor0.col0 * - cor0.col0 FROM tab2 cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - + ( col2 ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7599
SELECT - 11 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7599
SELECT - 11 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col0 * - 36 FROM tab2 cor0
----
-252
-2808
-2844

query I rowsort
SELECT - + 78 + col0 AS col1 FROM tab0 AS cor0
----
-43
-54
11

query I rowsort
SELECT ALL ( col2 ) AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL + ( 3 ) * - col0 * col0 AS col0 FROM tab0 AS cor0
----
-1728
-23763
-3675

query I rowsort
SELECT DISTINCT - col1 + col0 AS col0 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT DISTINCT cor0.col1 + 15 AS col1 FROM tab1 AS cor0
----
25
28
41

query I rowsort
SELECT DISTINCT + ( - 95 ) + + col0 FROM tab0 cor0
----
-6
-60
-71

query I rowsort
SELECT DISTINCT + ( ( - col0 ) ) * 40 AS col0 FROM tab1 AS cor0
----
-120
-2560
-3200

query I rowsort
SELECT DISTINCT 74 + col2 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT - - ( col0 ) + col0 * col0 AS col2 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT DISTINCT + col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + 43 * col0 FROM tab1 cor0
----
129
2752
3440

query I rowsort
SELECT ALL - 43 + col0 FROM tab1 AS cor0
----
-40
21
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col2 col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL + col0 * + col1 + - 85 + + col2 * + cor0.col1 * + col2 AS col1 FROM tab0 AS cor0
----
3407
619898
95633

query I rowsort
SELECT ALL + - ( - cor0.col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - 74 FROM tab1 cor0
----
-74

query I rowsort
SELECT + cor0.col1 * col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL + - cor0.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-7619
SELECT ALL cor0.col0 * + col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7619
SELECT ALL cor0.col0 * + col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * - col1 FROM tab2 cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col2 ) + + col2 * cor0.col0 col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + 19 * - col0 FROM tab0 cor0
----
-1691
-456
-665

query I rowsort
SELECT DISTINCT - col0 * - col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col2 + 95 AS col0 FROM tab1 AS cor0
----
-1
38
41

query I rowsort
SELECT ALL col0 * + col2 AS col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7626
SELECT - col2 + cor0.col1 DIV col2 + col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-7626
SELECT - col2 + cor0.col1 / col2 + col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT + + col2 + + 71 FROM tab1 AS cor0
----
125
128
167

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab0 AS cor0, tab2 AS cor1
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

query I rowsort
SELECT ALL 6 AS col2 FROM tab1
----
6
6
6

query I rowsort
SELECT ALL + col0 + 86 AS col0 FROM tab0 cor0
----
110
121
175

query I rowsort
SELECT + + col0 + ( col0 ) + - col0 * col0 AS col0 FROM tab0 AS cor0
----
-1155
-528
-7743

query I rowsort
SELECT ALL - ( - 68 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT ALL 68 + 34 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 792cf560743b7eec398ed5c7e48d1343

query I rowsort
SELECT DISTINCT - - col1 + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + - col2 + 46 AS col1 FROM tab2 AS cor0
----
19
20
8

query I rowsort
SELECT - col0 * tab0.col0 * 73 + - col0 FROM tab0
----
-42072
-578322
-89460

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + ( - cor0.col1 ) + col1 col1 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT ALL + col1 + - col0 * - 15 AS col2 FROM tab0
----
1426
446
622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL - 4 * col2 AS col2 FROM tab2
----
-104
-108
-152

query I rowsort
SELECT DISTINCT - 76 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-69
2
3

query I rowsort
SELECT DISTINCT - 29 + + col2 FROM tab2 AS cor0
----
-2
-3
9

query I rowsort
SELECT ALL 99 AS col2 FROM tab0
----
99
99
99

query I rowsort
SELECT - + col2 * - 57 AS col1 FROM tab2 AS cor0
----
1482
1539
2166

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7646
SELECT ALL + + col0 * - CAST( col0 AS SIGNED ) AS col2 FROM tab0 cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-7646
SELECT ALL + + col0 * - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - - col1 * - 23 FROM tab2 AS cor0
----
-1357
-391
-713

query I rowsort
SELECT + col2 * 67 AS col1 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT ALL + + col2 + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - col0 * + 95 FROM tab2 AS cor0
----
-665
-7410
-7505

query I rowsort
SELECT + cor0.col2 * ( col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + cor0.col2 * 43 FROM tab2 AS cor0
----
1118
1161
1634

query I rowsort
SELECT ALL + + col2 * - col0 + + col2 * - col2 + + col1 AS col1 FROM tab0 AS cor0
----
-13931
-1795
61

query I rowsort
SELECT DISTINCT - col1 * + col0 + + 12 * + col1 AS col0 FROM tab2 AS cor0
----
-1139
-3894
155

onlyif mysql # use DIV operator for integer division
query I rowsort label-7655
SELECT - - col0 DIV 54 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7655
SELECT - - col0 / 54 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL col1 * + col0 + col1 * - col2 AS col0 FROM tab1
----
-1326
-208
70

query I rowsort
SELECT DISTINCT col1 * + col0 * col1 AS col2 FROM tab1
----
13520
2028
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - col0 * col1 col0 FROM tab1 WHERE - col2 + - col2 NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL col0 AS col2 FROM tab2 WHERE NOT ( NULL ) IN ( + col0 )
----

query I rowsort
SELECT DISTINCT + tab0.col0 * + col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - col1 * - col0 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL - tab1.col0 * col2 * tab1.col0 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT ALL - tab0.col1 * col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT tab2.col0 * col1 + col1 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT + col0 + col1 AS col2 FROM tab2
----
137
38
96

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col1 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT tab1.col1 * col0 + tab1.col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT - 48 * - col1 FROM tab2 AS cor0
----
1488
2832
816

query I rowsort
SELECT ( - col0 ) * col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col0 col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT + 73 AS col0 FROM tab2 AS cor0
----
73
73
73

query I rowsort
SELECT ALL 74 AS col2 FROM tab2 AS cor0
----
74
74
74

query I rowsort
SELECT + - ( col2 ) * + col0 * col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL + ( - col2 ) * cor0.col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab1 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 32e6d0f63bf719b0a999c75379e75eca

onlyif mysql # use DIV operator for integer division
query I rowsort label-7677
SELECT tab0.col1 + + col1 + + col0 DIV tab0.col1 col1 FROM tab0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7677
SELECT tab0.col1 + + col1 + + col0 / tab0.col1 col1 FROM tab0
----
172
182
194

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL NOT IN ( - tab0.col1 * tab0.col1 )
----

query I rowsort
SELECT col1 + - col2 * col2 - col1 AS col1 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT - tab1.col0 AS col2 FROM tab1 WHERE NOT NULL BETWEEN ( col0 * - col0 ) AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7681
SELECT DISTINCT tab0.col2 + + col0 DIV - col1 - + col0 AS col1 FROM tab0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-7681
SELECT DISTINCT tab0.col2 + + col0 / - col1 - + col0 AS col1 FROM tab0
----
-34
-7
9

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT IN ( - tab1.col1 )
----

query I rowsort
SELECT ALL - - 51 + cor0.col2 * col2 FROM tab1 AS cor0
----
2967
3300
9267

query I rowsort
SELECT col1 * + col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + col2 * - col0 + - col2 + 66 FROM tab1 AS cor0
----
-150
-3639
-7710

query I rowsort
SELECT - + 66 + - cor0.col1 FROM tab1 AS cor0
----
-76
-79
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col0 ) col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - - 58 FROM tab0 AS cor0
----
58
58
58

query I rowsort
SELECT DISTINCT - 10 - - col0 AS col0 FROM tab0 AS cor0
----
14
25
79

query I rowsort
SELECT ALL + 62 FROM tab2 AS cor0
----
62
62
62

query I rowsort
SELECT ALL col1 + - col0 * col2 * + 99 AS col1 FROM tab0 AS cor0
----
-3368
-722411
-78322

query I rowsort
SELECT col2 + - cor0.col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + + 84 * + col0 - col1 * col0 FROM tab0 AS cor0
----
-455
-48
-623

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7694
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + col1 * + col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7694
SELECT DISTINCT - CAST ( NULL AS REAL ) + col1 * + col2 FROM tab2
----
NULL

query I rowsort
SELECT col2 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - cor0.col2 * - cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - 77 + col1 * + ( col2 ) AS col0 FROM tab2 AS cor0
----
1457
569
760

query I rowsort
SELECT DISTINCT 0 * + col2 AS col0 FROM tab2
----
0

query I rowsort
SELECT - 88 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 * 90 col2 FROM tab2
----
4410
547560
561690

query I rowsort
SELECT DISTINCT col0 * tab2.col1 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - 3 * - col2 - + col0 FROM tab1 cor0
----
107
159
208

query I rowsort
SELECT + + 37 - + 26 FROM tab0 AS cor0
----
11
11
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7705
SELECT ALL + CAST( NULL AS SIGNED ) * col1 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7705
SELECT ALL + CAST ( NULL AS INTEGER ) * col1 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 72 * col0 + + col1 AS col1 FROM tab0
----
1814
2617
6499

query I rowsort
SELECT DISTINCT - 55 * col2 AS col1 FROM tab2
----
-1430
-1485
-2090

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7708
SELECT CAST( col1 AS SIGNED ) * + col1 AS col2 FROM tab0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-7708
SELECT CAST ( col1 AS INTEGER ) * + col1 AS col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT 96 * - col2 * col1 FROM tab1
----
-119808
-134784
-54720

query I rowsort
SELECT ALL - tab0.col1 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT - 88 + - col0 FROM tab2
----
-166
-167
-95

query I rowsort
SELECT ALL 79 AS col1 FROM tab2 AS cor0
----
79
79
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7713
SELECT ALL + CAST( NULL AS SIGNED ) * col0 - col2 * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7713
SELECT ALL + CAST ( NULL AS INTEGER ) * col0 - col2 * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + col2 * 1 * + 69 AS col0 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT col1 * ( + col2 ) FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-7717
SELECT ALL - + col2 DIV - col1 AS col2 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7717
SELECT ALL - + col2 / - col1 AS col2 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT ALL cor0.col2 - 61 FROM tab0, tab2 AS cor0
----
9 values hashing to 8929ed9c198d0b966b471386db08414f

query I rowsort
SELECT - 77 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT + col1 * 42 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL + col1 * 65 AS col1 FROM tab2
----
1105
2015
3835

query I rowsort
SELECT ( + 85 ) FROM tab2, tab2 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT ALL 31 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT ALL - ( + col1 * col1 ) AS col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - 23 * col0 FROM tab1
----
-1472
-1840
-69

query I rowsort
SELECT col0 + + col2 * - ( - ( col0 ) ) FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - col1 * + 31 FROM tab2
----
-1829
-527
-961

query I rowsort
SELECT + ( - col0 ) AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL + cor1.col2 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT ( + col0 ) * - col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 12 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7733
SELECT - + CAST( - col2 AS SIGNED ) * col1 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-7733
SELECT - + CAST ( - col2 AS INTEGER ) * col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + cor0.col1 * + cor0.col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + - col1 * - col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + - col0 + col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - 39 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to a08a82dc9276c0173448e9a1c89dba93

query I rowsort
SELECT ALL 91 FROM tab1, tab0 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT + col2 + col1 * ( + 85 * + col0 + col2 ) AS col0 FROM tab2 cor0
----
114839
19309
392730

query I rowsort
SELECT - 23 * col2 FROM tab2 AS cor0
----
-598
-621
-874

query I rowsort
SELECT ALL - + 58 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT - + col0 + + col1 FROM tab1 AS cor0
----
-54
-67
23

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 * col0 * - col2 col1 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + 4 + - col2 FROM tab1 AS cor0
----
-50
-53
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7746
SELECT DISTINCT col0 DIV col1 + + col2 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7746
SELECT DISTINCT col0 / col1 + + col2 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT + col1 * col2 + 22 AS col1 FROM tab2
----
1556
668
859

query I rowsort
SELECT DISTINCT col2 * tab2.col0 * - tab2.col0 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-7749
SELECT DISTINCT + tab2.col0 DIV - col1 col2 FROM tab2
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7749
SELECT DISTINCT + tab2.col0 / - col1 col2 FROM tab2
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7750
SELECT DISTINCT col2 + col2 DIV col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7750
SELECT DISTINCT col2 + col2 / col1 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7751
SELECT - col0 * tab1.col1 - + col0 DIV - ( + col1 + 72 ) AS col2 FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-7751
SELECT - col0 * tab1.col1 - + col0 / - ( + col1 + 72 ) AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col0 * + col2 * 72 + - ( col1 ) FROM tab1 AS cor0
----
11638
262646
552947

query I rowsort
SELECT - col0 + - col1 * col1 AS col0 FROM tab1
----
-164
-249
-679

onlyif mysql # use DIV operator for integer division
query I rowsort label-7754
SELECT + col1 DIV 56 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7754
SELECT + col1 / 56 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + cor0.col0 * col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col0 * col1 + + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + + col1 + ( - col2 ) * - col1 + col2 FROM tab1 AS cor0
----
1357
1484
637

query I rowsort
SELECT DISTINCT - col0 * ( + 46 ) FROM tab1 cor0
----
-138
-2944
-3680

query I rowsort
SELECT - col1 + + 42 FROM tab2 cor0
----
-17
11
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-7760
SELECT cor0.col1 DIV cor0.col0 FROM tab1 cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7760
SELECT cor0.col1 / cor0.col0 FROM tab1 cor0
----
0
0
8

query I rowsort
SELECT DISTINCT + col0 * ( + 96 * col1 + - col1 ) FROM tab2 AS cor0
----
127585
20615
437190

query I rowsort
SELECT ALL + + cor0.col0 * col2 + + col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL col1 + - col1 + - 16 AS col0 FROM tab2 AS cor0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - + col2 + 73 + + 7 * + col0 AS col2 FROM tab0 AS cor0
----
208
317
614

query I rowsort
SELECT DISTINCT - col1 * col2 + - col2 AS col0 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT - cor0.col0 + + col1 * col0 * + ( - col2 ) AS col1 FROM tab2 AS cor0
----
-119730
-51113
-5866

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7767
SELECT - - CAST( col0 AS SIGNED ) + col0 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-7767
SELECT - - CAST ( col0 AS INTEGER ) + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL tab0.col2 - + 6 FROM tab0
----
-5
27
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 92 - col1 col2 FROM tab1 AS cor0
----
-102
-105
-118

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - ( 7 ) + col1 FROM tab1 AS cor0
----
19
3
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 * - col1 col1 FROM tab0 AS cor0
----
-774
-819
-873

query I rowsort
SELECT ALL + + 67 * + 82 + col1 FROM tab0 AS cor0
----
5580
5585
5591

query I rowsort
SELECT + col1 * - ( 19 ) FROM tab2
----
-1121
-323
-589

query I rowsort
SELECT - + cor0.col0 + + 23 FROM tab0 AS cor0
----
-1
-12
-66

query I rowsort
SELECT - + ( - 21 ) * col1 AS col0 FROM tab0 AS cor0
----
1806
1911
2037

query I rowsort
SELECT DISTINCT - 39 * - col0 AS col2 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT ALL - - 56 * + col2 * + cor0.col2 FROM tab2 AS cor0
----
37856
40824
80864

query I rowsort
SELECT ALL - + col0 * col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - 2 AS col1 FROM tab0 AS cor0
----
-2

query I rowsort
SELECT ALL + cor1.col2 FROM tab0, tab1 cor0, tab1, tab2 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT 16 FROM tab2, tab2 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7783
SELECT DISTINCT col1 * 35 + + 88 DIV col2 AS col2 FROM tab0
----
3012
3186
3483

skipif mysql # not compatible
query I rowsort label-7783
SELECT DISTINCT col1 * 35 + + 88 / col2 AS col2 FROM tab0
----
3012
3186
3483

query I rowsort
SELECT - - 34 + cor0.col2 * + col2 FROM tab2 cor0
----
1478
710
763

query I rowsort
SELECT - col2 + 87 FROM tab2
----
49
60
61

query I rowsort
SELECT ALL ( ( col2 ) ) FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7787
SELECT CAST( NULL AS SIGNED ) / 41 + - cor0.col0 * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7787
SELECT CAST ( NULL AS INTEGER ) / 41 + - cor0.col0 * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 col2 FROM tab2 AS cor0
----
78

query I rowsort
SELECT col2 * cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT ALL col2 + - ( 39 ) * col1 + - 6 AS col0 FROM tab1
----
-339
-417
-966

query I rowsort
SELECT ALL tab2.col1 + ( - 10 + col1 ) * 58 AS col0 FROM tab2
----
1249
2901
423

query I rowsort
SELECT ALL + tab1.col0 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab2 AS cor0
----
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-7795
SELECT - + 65 DIV + col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7795
SELECT - + 65 / + col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + CAST ( - 30 AS REAL ) + col1 * - ( - col0 * + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
106067
1489
358926

query I rowsort
SELECT DISTINCT + cor0.col0 - + col2 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7798
SELECT - CAST( NULL AS SIGNED ) * + 43 * - col1 + + 95 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7798
SELECT - CAST ( NULL AS INTEGER ) * + 43 * - col1 + + 95 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7799
SELECT ALL - - ( + 1 ) DIV cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7799
SELECT ALL - - ( + 1 ) / cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL + col0 + 79 AS col0 FROM tab1 AS cor0
----
143
159
82

query I rowsort
SELECT + 62 * col0 + col2 FROM tab1 AS cor0
----
240
4025
5056

query I rowsort
SELECT - 28 FROM tab2 cor0
----
-28
-28
-28

query I rowsort
SELECT DISTINCT - 74 FROM tab0, tab2 cor0, tab0 AS cor1
----
-74

query I rowsort
SELECT ALL col0 * + col2 - - 17 AS col0 FROM tab1
----
179
3665
7697

query I rowsort
SELECT ALL + ( + cor0.col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 45 FROM tab2 AS cor0
----
45
45
45

query I rowsort
SELECT ALL tab2.col1 + col2 * - 88 FROM tab2
----
-2229
-2345
-3327

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * + ( + 8 ) * col2 col1 FROM tab2 AS cor0
----
-12272
-5168
-6696

query I rowsort
SELECT col0 + + ( col1 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col2 * col0 + col1 - - col1 AS col2 FROM tab2 AS cor0
----
-127
-1910
-2968

onlyif mysql # use DIV operator for integer division
query I rowsort label-7811
SELECT ALL col2 DIV col2 + col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-7811
SELECT ALL col2 / col2 + col2 FROM tab1
----
55
58
97

query I rowsort
SELECT ALL ( 16 ) + - cor0.col2 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 4c6827ac950da821fb07d9a1a3507899

query I rowsort
SELECT - + col2 + - 36 AS col0 FROM tab2 AS cor0
----
-62
-63
-74

query I rowsort
SELECT ALL + col0 * col0 + cor0.col0 AS col1 FROM tab1 cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT - - col2 * 75 FROM tab2 AS cor0
----
1950
2025
2850

query I rowsort
SELECT col0 - - col1 * col0 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT ( - cor1.col0 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7818
SELECT - col0 DIV 54 AS col0 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7818
SELECT - col0 / 54 AS col0 FROM tab1
----
-1
-1
0

query I rowsort
SELECT DISTINCT + - col2 + cor0.col1 * ( + col1 ) * - col2 - col2 AS col0 FROM tab0 AS cor0
----
-244134
-679206
-9411

query I rowsort
SELECT ALL + cor0.col2 * cor0.col1 + - col1 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-7821
SELECT + cor0.col0 DIV + tab1.col2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 7e5c7714579af4e1291ae0c30ad11f46

skipif mysql # not compatible
query I rowsort label-7821
SELECT + cor0.col0 / + tab1.col2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 7e5c7714579af4e1291ae0c30ad11f46

query I rowsort
SELECT - col2 * 44 FROM tab1
----
-2376
-2508
-4224

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7823
SELECT + - col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7823
SELECT + - col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( col2 ) - - col1 col1 FROM tab0 AS cor0
----
195
205
264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7825
SELECT - col0 * - CAST( col0 * col0 AS DECIMAL ) - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7825
SELECT - col0 * - CAST ( col0 * col0 AS REAL ) - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * + 27 - - col2 FROM tab0 AS cor0
----
-2289
-2375
-2618

query I rowsort
SELECT ALL col1 + ( - 78 ) FROM tab1 AS cor0
----
-52
-65
-68

query I rowsort
SELECT DISTINCT - col0 - - col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT col0 - - ( col0 * cor0.col2 ) FROM tab1 AS cor0
----
165
3712
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 + col2 col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT col0 + 97 AS col1 FROM tab1 AS cor0
----
100
161
177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7832
SELECT - + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7832
SELECT - + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7833
SELECT ALL + CAST( NULL AS SIGNED ) / + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7833
SELECT ALL + CAST ( NULL AS INTEGER ) / + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col0 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - - 79 AS col0 FROM tab0 AS cor0
----
79
79
79

query I rowsort
SELECT ALL + col2 * col0 + - ( - 41 ) + + col0 AS col2 FROM tab1 AS cor0
----
206
3753
7801

query I rowsort
SELECT + cor0.col0 * + col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT - 28 AS col0 FROM tab1, tab0 cor0, tab0 cor1
----
27 values hashing to eac00a95d734c7071360ed392c3f39bc

query I rowsort
SELECT DISTINCT + 6 + col0 * - 40 * cor0.col1 FROM tab2 AS cor0
----
-184074
-53714
-8674

query I rowsort
SELECT DISTINCT + + col0 + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ( col0 ) + + cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - 60 + + 87 FROM tab2, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT + + cor0.col1 + col0 * + col0 AS col1 FROM tab1 cor0
----
35
4106
6413

query I rowsort
SELECT col2 + col1 * col2 AS col1 FROM tab0
----
2871
7544
98

query I rowsort
SELECT 52 + + col0 AS col0 FROM tab0
----
141
76
87

query I rowsort
SELECT DISTINCT col1 * + col2 * col1 AS col2 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT - + cor0.col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT 24 * - 48 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-1152

query I rowsort
SELECT DISTINCT ( col1 * + col1 ) FROM tab0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7850
SELECT + 73 * col0 - - col2 DIV col2 FROM tab1
----
220
4673
5841

skipif mysql # not compatible
query I rowsort label-7850
SELECT + 73 * col0 - - col2 / col2 FROM tab1
----
220
4673
5841

query I rowsort
SELECT DISTINCT col0 * + col1 - col2 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT - col0 + col1 * col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
17573
2117
936

query I rowsort
SELECT ALL + col1 * col2 + + col1 * - col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7854
SELECT CAST( NULL AS SIGNED ) * + col0 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7854
SELECT CAST ( NULL AS INTEGER ) * + col0 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + + ( col2 ) AS col0 FROM tab1 cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 + + col0 * + col2 * + cor0.col1 col2 FROM tab1 AS cor0
----
36459
4191
99819

query I rowsort
SELECT + 21 + - col1 * 32 FROM tab2 AS cor0
----
-1867
-523
-971

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 + - 82 AS col0 FROM tab2 cor0
----
-1043
-3563
-371

query I rowsort
SELECT 45 AS col2 FROM tab2 AS cor0
----
45
45
45

query I rowsort
SELECT ALL + 28 * col1 AS col2 FROM tab2 AS cor0
----
1652
476
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 83 col1 FROM tab2
----
83
83
83

query I rowsort
SELECT - col1 + - ( - col1 ) * - col0 * col0 FROM tab1 AS cor0
----
-260
-40970
-83213

query I rowsort
SELECT - cor0.col2 * col2 - col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT - 2 * - col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL cor1.col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT 10 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT + tab2.col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ( - col2 ) + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 37 FROM tab0, tab0 AS cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT ALL + + col2 + 60 + + col1 AS col1 FROM tab1 cor0
----
127
140
169

query I rowsort
SELECT ALL col2 - - ( + col1 + + col2 ) * - col0 * tab2.col1 FROM tab2
----
-12559
-391144
-73827

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7872
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) - col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7872
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) - col0 FROM tab0
----
NULL

query I rowsort
SELECT - col2 * col0 + - col0 + col0 FROM tab0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7874
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7874
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7875
SELECT DISTINCT + 35 * + cor0.col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7875
SELECT DISTINCT + 35 * + cor0.col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - 64 - 8 * + col0 FROM tab0 AS cor0
----
-256
-344
-776

query I rowsort
SELECT DISTINCT - 65 * + col2 FROM tab0 AS cor0
----
-2145
-5330
-65

query I rowsort
SELECT - col1 + 59 * col1 AS col2 FROM tab0 AS cor0
----
4988
5278
5626

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab0 cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - col0 * + 47 - tab1.col0 AS col0 FROM tab1
----
-144
-3072
-3840

onlyif mysql # use DIV operator for integer division
query I rowsort label-7881
SELECT + col2 + col1 DIV - col0 AS col2 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-7881
SELECT + col2 + col1 / - col0 AS col2 FROM tab1
----
46
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7882
SELECT ( - ( + tab1.col1 ) ) DIV - 51 + + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7882
SELECT ( - ( + tab1.col1 ) ) / - 51 + + col2 FROM tab1
----
54
57
96

query I rowsort
SELECT + col1 - - col0 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT col1 * + col0 * col0 AS col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + 30 + col1 AS col0 FROM tab0
----
116
121
127

query I rowsort
SELECT - 29 * + tab1.col2 AS col2 FROM tab1
----
-1566
-1653
-2784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab0 AS cor0
----
51

query I rowsort
SELECT + 98 + - 25 AS col1 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT ALL - col0 * cor0.col1 - cor0.col1 AS col1 FROM tab1 AS cor0
----
-104
-1053
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-7891
SELECT ALL - col1 + 24 DIV col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7891
SELECT ALL - col1 + 24 / col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL + ( col0 ) * tab0.col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + 92 FROM tab0
----
92
92
92

query I rowsort
SELECT ALL + 51 AS col0 FROM tab1
----
51
51
51

query I rowsort
SELECT col1 * + ( col1 ) - col1 AS col2 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT col1 + ( - col0 ) * col0 AS col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL + col0 + + col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - col1 + col1 * - 51 AS col0 FROM tab0 AS cor0
----
-4472
-4732
-5044

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * 68 col1 FROM tab2 AS cor0
----
-1768
-1836
-2584

onlyif mysql # use DIV operator for integer division
query I rowsort label-7900
SELECT cor0.col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7900
SELECT cor0.col0 / + col0 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + col2 * ( - col0 ) + + col1 AS col2 FROM tab2 cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 37 col0 FROM tab1
----
-37

query I rowsort
SELECT - cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + cor0.col2 * + ( - col1 ) AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col1 * ( + col0 + col1 ) FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT ALL - cor0.col2 + - col0 AS col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL col1 + - col2 * col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + + col0 + - col2 * - 83 AS col0 FROM tab2 AS cor0
----
2236
2248
3233

query I rowsort
SELECT ALL - col2 + - col0 * - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL + 67 * col2 FROM tab2
----
1742
1809
2546

query I rowsort
SELECT DISTINCT - + col1 * - col2 + - col0 AS col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + - 49 + + col0 FROM tab2 AS cor0
----
-42
29
30

query I rowsort
SELECT 39 - + col0 FROM tab2 AS cor0
----
-39
-40
32

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + 81 * - col0 - ( - cor0.col0 + cor0.col0 ) FROM tab2 AS cor0
----
-567
-6318
-6399

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col2 * col1 * 37 col2 FROM tab2 AS cor0
----
-23902
-30969
-56758

query I rowsort
SELECT - col2 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + cor0.col2 + - 69 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1135
-2112
-4045

query I rowsort
SELECT DISTINCT col0 * + col1 * col0 + + 63 FROM tab1
----
297
41023
83263

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7920
SELECT DISTINCT + col2 * - col2 / - CAST( NULL AS SIGNED ) + - 75 * + col1 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7920
SELECT DISTINCT + col2 * - col2 / - CAST ( NULL AS INTEGER ) + - 75 * + col1 AS col0 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT col2 + - col0 AS col2 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 13 * cor0.col0 col0 FROM tab1 AS cor0
----
-1136
-889
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7923
SELECT - col1 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7923
SELECT - col1 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - ( col1 ) + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col0 col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col1 * - tab2.col2 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - ( + col2 ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - 95 + - 55 AS col0 FROM tab1, tab2 cor0, tab2 cor1
----
27 values hashing to 33a2bf548fec79d4b8e6dea93edc77dd

query I rowsort
SELECT DISTINCT - col1 + - col1 * + tab0.col2 AS col2 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT col1 + tab1.col0 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 + col2 * + col2 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 + + col1 + ( - col1 ) col2 FROM tab2
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 99 ) * cor0.col0 - col1 * col2 col0 FROM tab0 AS cor0
----
-462
1349
3368

query I rowsort
SELECT - 36 + col1 FROM tab0 AS cor0
----
50
55
61

query I rowsort
SELECT ALL + + col2 - col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 75 + col1 FROM tab1 AS cor0
----
-49
-62
-65

query I rowsort
SELECT - + 94 AS col1 FROM tab1 AS cor0
----
-94
-94
-94

query I rowsort
SELECT + + col1 * - cor0.col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col1 * + 13 AS col1 FROM tab1 AS cor0
----
-130
-169
-338

query I rowsort
SELECT DISTINCT - - 90 AS col1 FROM tab0 AS cor0
----
90

query I rowsort
SELECT DISTINCT + 69 + + col2 AS col1 FROM tab1 AS cor0
----
123
126
165

query I rowsort
SELECT + + 14 FROM tab0 AS cor0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 70 + + col2 col0 FROM tab1 AS cor0
----
124
127
166

query I rowsort
SELECT DISTINCT cor0.col0 + 15 * - col0 AS col2 FROM tab2 cor0
----
-1092
-1106
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7946
SELECT DISTINCT CAST( NULL AS SIGNED ) - + col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7946
SELECT DISTINCT CAST ( NULL AS INTEGER ) - + col2 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT - col0 * + ( cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + 3 * cor0.col1 col0 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT + col2 * - 76 AS col2 FROM tab2 AS cor0
----
-1976
-2052
-2888

onlyif mysql # use DIV operator for integer division
query I rowsort label-7950
SELECT ALL col0 + - col1 DIV cor0.col1 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-7950
SELECT ALL col0 + - col1 / cor0.col1 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT ALL ( 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-7952
SELECT ALL CAST( col2 AS SIGNED ) col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7952
SELECT ALL CAST ( col2 AS INTEGER ) col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - 99 * - col1 AS col1 FROM tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT DISTINCT col0 * col1 * col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT - - 7 * + col0 AS col1 FROM tab2 cor0
----
49
546
553

query I rowsort
SELECT + 49 FROM tab0
----
49
49
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7957
SELECT DISTINCT CAST( col1 AS SIGNED ) * col2 AS col2 FROM tab1
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-7957
SELECT DISTINCT CAST ( col1 AS INTEGER ) * col2 AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7958
SELECT DISTINCT - col2 DIV col0 AS col2 FROM tab2
----
-3
0

skipif mysql # not compatible
query I rowsort label-7958
SELECT DISTINCT - col2 / col0 AS col2 FROM tab2
----
-3
0

query I rowsort
SELECT DISTINCT 64 * 4 * col2 FROM tab1
----
13824
14592
24576

query I rowsort
SELECT DISTINCT + 18 * tab1.col0 AS col1 FROM tab1
----
1152
1440
54

query I rowsort
SELECT 69 * col1 AS col0 FROM tab1
----
1794
690
897

onlyif mysql # use DIV operator for integer division
query I rowsort label-7962
SELECT + 47 DIV cor0.col1 FROM tab1 AS cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-7962
SELECT + 47 / cor0.col1 FROM tab1 AS cor0
----
1
3
4

query I rowsort
SELECT + col1 + + col1 * - col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + + 52 * cor0.col2 * 37 AS col0 FROM tab0 AS cor0
----
157768
1924
63492

query I rowsort
SELECT col2 + + col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL - cor0.col2 * - ( - 95 ) + + col2 * 64 * + col2 AS col0 FROM tab2 AS cor0
----
40794
44091
88806

query I rowsort
SELECT + col1 + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + col2 + 14 * col1 AS col0 FROM tab1 AS cor0
----
310
83
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + col2 * col0 col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT - - col0 + - ( col0 ) AS col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - col2 * col1 col1 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7972
SELECT DISTINCT + + col1 * + CAST( NULL AS SIGNED ) + 67 * col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7972
SELECT DISTINCT + + col1 * + CAST ( NULL AS INTEGER ) + 67 * col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * 79 AS col2 FROM tab0 AS cor0
----
6794
7189
7663

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col1 + col1 col2 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7975
SELECT DISTINCT - col1 + CAST( 43 AS SIGNED ) FROM tab2 cor0
----
-16
12
26

skipif mysql # not compatible
query I rowsort label-7975
SELECT DISTINCT - col1 + CAST ( 43 AS INTEGER ) FROM tab2 cor0
----
-16
12
26

query I rowsort
SELECT - - ( col0 ) + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT 91 * + col1 AS col0 FROM tab2 cor0
----
1547
2821
5369

query I rowsort
SELECT + - col2 * 81 FROM tab0 AS cor0
----
-2673
-6642
-81

query I rowsort
SELECT + col1 + 92 AS col1 FROM tab2 AS cor0
----
109
123
151

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 7781e11d4a9fc844b7b93d320748f7c1

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7982
SELECT col1 + - 39 * - col0 * + CAST( NULL AS SIGNED ) 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-7982
SELECT col1 + - 39 * - col0 * + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( col2 ) * - col0 * + col2 FROM tab2
----
-114076
-5103
-52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + col0 col1 FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-7985
SELECT - - col1 + - col1 DIV - col2 AS col1 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-7985
SELECT - - col1 + - col1 / - col2 AS col1 FROM tab0 AS cor0
----
194
88
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7986
SELECT 45 * col1 + + col2 * col1 - col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
1411
2228
4189

skipif mysql # not compatible
query I rowsort label-7986
SELECT 45 * col1 + + col2 * col1 - col1 / + col0 AS col2 FROM tab2 AS cor0
----
1411
2228
4189

query I rowsort
SELECT + col1 + + cor0.col2 * + col0 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - - col1 * + col2 - col1 * col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7989
SELECT + col2 + + col2 DIV col2 AS col0 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7989
SELECT + col2 + + col2 / col2 AS col0 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7990
SELECT - - col1 * + col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7990
SELECT - - col1 * + col0 / + col0 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col1 - col1 * + col2 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + + col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL 18 FROM tab2, tab2 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT ALL + 67 AS col1 FROM tab0
----
67
67
67

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
17
31
59

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query I rowsort
SELECT cor0.col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + + 74 + + col0 AS col2 FROM tab1 cor0
----
138
154
77

query I rowsort
SELECT 68 * 18 AS col1 FROM tab1 AS cor0
----
1224
1224
1224

onlyif mysql # use DIV operator for integer division
query I rowsort label-8000
SELECT ALL - cor0.col2 DIV - cor0.col2 + cor0.col2 + col1 AS col1 FROM tab0 AS cor0
----
120
174
99

skipif mysql # not compatible
query I rowsort label-8000
SELECT ALL - cor0.col2 / - cor0.col2 + cor0.col2 + col1 AS col1 FROM tab0 AS cor0
----
120
174
99

query I rowsort
SELECT ALL - col2 * - col0 + - cor0.col1 * - col1 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT ALL - - col2 * col1 + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT ( + col2 ) + col0 * - col1 AS col0 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT + + 97 FROM tab0 AS cor0
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8005
SELECT DISTINCT - col0 * - ( col1 * - col2 ) + + col2 * - col1 DIV col1 AS col1 FROM tab2
----
-119678
-51072
-5886

skipif mysql # not compatible
query I rowsort label-8005
SELECT DISTINCT - col0 * - ( col1 * - col2 ) + + col2 * - col1 / col1 AS col1 FROM tab2
----
-119678
-51072
-5886

query I rowsort
SELECT - + 67 * col2 + - col0 FROM tab1 AS cor0
----
-3621
-3883
-6512

query I rowsort
SELECT 74 + col1 + col2 FROM tab2 AS cor0
----
129
132
159

query I rowsort
SELECT - cor0.col0 * - col2 + + col0 FROM tab2 cor0
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8009
SELECT ALL + CAST( ( + col0 ) AS SIGNED ) AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8009
SELECT ALL + CAST ( ( + col0 ) AS INTEGER ) AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT + col1 * 73 AS col0 FROM tab2
----
1241
2263
4307

query I rowsort
SELECT ALL + cor0.col0 + - col0 - - col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + col0 - col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * - col0 - + cor0.col2 * + cor0.col1 FROM tab2 AS cor0
----
-6887
-7618
-886

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE ( NULL ) <= + cor0.col1
----

query I rowsort
SELECT - col1 * - col2 * col1 - - col0 * - col0 AS col0 FROM tab1 AS cor0
----
1604
36495
9824

query I rowsort
SELECT DISTINCT - col1 * + col0 + cor0.col2 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-8018
SELECT DISTINCT col2 DIV col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8018
SELECT DISTINCT col2 / col1 AS col2 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT col2 * col0 * col0 AS col2 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-8020
SELECT col1 DIV col0 col2 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8020
SELECT col1 / col0 col2 FROM tab2
----
0
0
4

query I rowsort
SELECT ALL col1 + col2 * col2 + col0 FROM tab2
----
1540
767
813

onlyif mysql # use DIV operator for integer division
query I rowsort label-8022
SELECT DISTINCT col1 + col0 DIV col0 + col0 AS col2 FROM tab1
----
30
75
94

skipif mysql # not compatible
query I rowsort label-8022
SELECT DISTINCT col1 + col0 / col0 + col0 AS col2 FROM tab1
----
30
75
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-8023
SELECT + col0 DIV col0 - - col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8023
SELECT + col0 / col0 - - col2 FROM tab0
----
2
34
83

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 - col2 <= - col0 / - col0
----

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 WHERE NOT col1 * - col2 - col1 IN ( + col1 )
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8026
SELECT DISTINCT + col2 DIV tab0.col2 AS col0 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-8026
SELECT DISTINCT + col2 / tab0.col2 AS col0 FROM tab0
----
1

query I rowsort
SELECT ALL - col2 + col1 * - col1 FROM tab2
----
-327
-3507
-988

query I rowsort
SELECT + col1 * tab0.col2 + + col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT col0 * - col1 + + col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT col2 + - col1 * col1 AS col2 FROM tab0 WHERE NOT col1 NOT IN ( col2 / + tab0.col0 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE + col1 IN ( tab1.col0 * tab1.col2 * col0 + - tab1.col1 + - col0 )
----

query I rowsort
SELECT DISTINCT - col0 + col0 + - col0 AS col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + col2 + - col0 - col0 FROM tab2
----
-120
-130
13

query I rowsort
SELECT - tab0.col0 + - tab0.col0 AS col1 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT - col2 * - col1 + - col2 + - col2 AS col1 FROM tab1
----
1056
1296
456

query I rowsort
SELECT ALL + col1 * + tab0.col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col1 - cor0.col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - col1 * col2 * tab1.col2 AS col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT + tab0.col1 * col0 - col0 FROM tab0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-8040
SELECT ALL tab2.col0 DIV col0 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8040
SELECT ALL tab2.col0 / col0 AS col0 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8041
SELECT ALL - col1 DIV + col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8041
SELECT ALL - col1 / + col2 AS col0 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT + tab2.col1 * col2 * col2 + + tab2.col0 - - col2 * + col1 AS col1 FROM tab2
----
23443
25273
41496

onlyif mysql # use DIV operator for integer division
query I rowsort label-8043
SELECT DISTINCT col2 DIV col0 + col2 + col1 * + col2 FROM tab1
----
1345
1476
627

skipif mysql # not compatible
query I rowsort label-8043
SELECT DISTINCT col2 / col0 + col2 + col1 * + col2 FROM tab1
----
1345
1476
627

query I rowsort
SELECT - tab1.col1 * - tab1.col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL col0 + - col0 * col0 + - tab0.col0 FROM tab0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + col1 * col0 * col0 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT - col2 - + col1 * col1 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT ALL col1 * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col0 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col1 + col1 * - col0 * col0 AS col2 FROM tab0 AS cor0
----
-118922
-49622
-720902

query I rowsort
SELECT - - col0 + col2 * col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col1 * col1 - + col0 * col1 FROM tab2
----
-1054
-1121
744

onlyif mysql # use DIV operator for integer division
query I rowsort label-8054
SELECT + col2 + + col2 DIV + col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8054
SELECT + col2 + + col2 / + col1 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + col2 + tab0.col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT col2 + + col1 + + col1 AS col1 FROM tab1
----
106
122
77

query I rowsort
SELECT DISTINCT - col0 * - col0 * col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT DISTINCT col2 + col2 * col0 + + tab1.col1 FROM tab1
----
242
3715
7789

query I rowsort
SELECT - col1 - + col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT + cor0.col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query IIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab2
----
54 values hashing to d8165ceb99ded93f34ad83c310a80ea7

onlyif mysql # use DIV operator for integer division
query I rowsort label-8062
SELECT + cor0.col0 + + col0 DIV + col1 AS col2 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-8062
SELECT + cor0.col0 + + col0 / + col1 AS col2 FROM tab1 AS cor0
----
3
70
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * col2 * col1 AS col1 FROM tab1 cor0
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 * 67 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ddc8f8290e988eafb1e168f8e4a5614e

onlyif mysql # use DIV operator for integer division
query I rowsort label-8067
SELECT tab1.col1 DIV 78 + - col2 col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8067
SELECT tab1.col1 / 78 + - col2 col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - col1 * - ( + col2 * col0 ) AS col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + - col0 * - col1 + col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8070
SELECT ALL + + col1 + CAST( - col0 + - cor0.col1 AS SIGNED ) col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8070
SELECT ALL + + col1 + CAST ( - col0 + - cor0.col1 AS INTEGER ) col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + + col1 * + col1 AS col0 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT - + col1 * - 65 FROM tab2 AS cor0
----
1105
2015
3835

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * + 19 col2 FROM tab2 AS cor0
----
133
1482
1501

query I rowsort
SELECT - cor0.col2 * + 23 + - 6 AS col2 FROM tab2 AS cor0
----
-604
-627
-880

onlyif mysql # use DIV operator for integer division
query I rowsort label-8075
SELECT DISTINCT - col1 DIV ( col2 + col2 ) FROM tab0 AS cor0
----
-1
-48
0

skipif mysql # not compatible
query I rowsort label-8075
SELECT DISTINCT - col1 / ( col2 + col2 ) FROM tab0 AS cor0
----
-1
-48
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8076
SELECT DISTINCT + + col1 + - 77 DIV col2 col1 FROM tab1 AS cor0
----
13
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8076
SELECT DISTINCT + + col1 + - 77 / col2 col1 FROM tab1 AS cor0
----
13
25
9

query I rowsort
SELECT DISTINCT - + ( - col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - - cor0.col2 - col2 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 17 * col2 FROM tab0 AS cor0
----
1394
17
561

query I rowsort
SELECT - col1 - 52 FROM tab0 AS cor0
----
-138
-143
-149

query I rowsort
SELECT DISTINCT + 33 * - col2 FROM tab0 AS cor0
----
-1089
-2706
-33

query I rowsort
SELECT ALL - - 36 FROM tab2 AS cor0
----
36
36
36

query I rowsort
SELECT DISTINCT - - ( col2 ) + - cor0.col2 * ( col2 ) FROM tab0 AS cor0
----
-1056
-6642
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8084
SELECT ALL + - 36 DIV - 96 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8084
SELECT ALL + - 36 / - 96 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL col2 * col2 - col2 AS col0 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - 99 * 93 + + col2 - col0 AS col1 FROM tab2 AS cor0
----
-9187
-9248
-9259

query I rowsort
SELECT + col0 - col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8089
SELECT col2 * col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8089
SELECT col2 * col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 + + col2 * - col0 * 83 FROM tab1 AS cor0
----
-13420
-302774
-637427

query I rowsort
SELECT DISTINCT - - cor0.col0 * - col1 - - ( + cor0.col2 ) FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT - - col2 + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - 92 + - col1 FROM tab1 AS cor0
----
-102
-105
-118

query I rowsort
SELECT - col1 * + cor0.col1 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8095
SELECT ALL cor0.col1 + col2 * - CAST( 54 * - col1 AS SIGNED ) FROM tab1 AS cor0
----
30790
67405
75842

skipif mysql # not compatible
query I rowsort label-8095
SELECT ALL cor0.col1 + col2 * - CAST ( 54 * - col1 AS INTEGER ) FROM tab1 AS cor0
----
30790
67405
75842

query I rowsort
SELECT DISTINCT + 96 * + col2 AS col0 FROM tab0 AS cor0
----
3168
7872
96

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL ( col0 ) + - 61 FROM tab2 AS cor0
----
-54
17
18

query I rowsort
SELECT ALL + cor0.col2 + + col1 * - col1 AS col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT 29 * + col0 FROM tab0 AS cor0
----
1015
2581
696

query I rowsort
SELECT ALL - col2 * - col0 * - 0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * 13 + col1 FROM tab2
----
382
397
511

query I rowsort
SELECT ALL - col1 * cor0.col0 - + 11 * + 78 AS col0 FROM tab1 AS cor0
----
-1498
-1898
-936

query I rowsort
SELECT DISTINCT 74 + col0 AS col2 FROM tab1 AS cor0
----
138
154
77

query I rowsort
SELECT ALL - - col1 + cor0.col1 * - 74 AS col0 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT col0 * + col1 + - 76 AS col1 FROM tab1
----
2
564
964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col1 col1 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8108
SELECT - + col2 DIV - 82 AS col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8108
SELECT - + col2 / - 82 AS col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT tab1.col2 - + col1 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT - + col2 + cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-8111
SELECT - col1 DIV - col1 + cor0.col2 * col1 FROM tab1 AS cor0
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-8111
SELECT - col1 / - col1 + cor0.col2 * col1 FROM tab1 AS cor0
----
1249
1405
571

query I rowsort
SELECT ALL 35 AS col0 FROM tab2
----
35
35
35

query I rowsort
SELECT ALL - tab0.col1 * 70 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 62074cb8738b78c3f90db7ff986a6624

query I rowsort
SELECT DISTINCT - tab2.col2 AS col0 FROM tab2, tab0 cor0
----
-26
-27
-38

query I rowsort
SELECT col1 * + tab0.col0 + + tab0.col2 FROM tab0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - ( + 59 ) FROM tab0, tab2 AS cor0
----
-59

query I rowsort
SELECT - 37 FROM tab2, tab1 AS cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT ALL - ( + 13 ) AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col1 + col2 * - col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab2, tab1 cor0
----
50

query I rowsort
SELECT ALL - ( col1 * + col2 ) + 43 FROM tab0
----
-2795
-54
-7419

query I rowsort
SELECT + 88 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

onlyif mysql # use DIV operator for integer division
query I rowsort label-8125
SELECT + ( col2 ) * col1 * - 14 + - col2 DIV col2 - col2 FROM tab1 AS cor0
----
-17569
-19711
-8038

skipif mysql # not compatible
query I rowsort label-8125
SELECT + ( col2 ) * col1 * - 14 + - col2 / col2 - col2 FROM tab1 AS cor0
----
-17569
-19711
-8038

query I rowsort
SELECT + 53 * col2 * - 99 + 0 AS col2 FROM tab0 AS cor0
----
-173151
-430254
-5247

query I rowsort
SELECT + 96 + - 76 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT + + col2 * + col2 * - col0 AS col0 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT - 9 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 3dfe689e16ce3a87877d40f349e6c7b5

query I rowsort
SELECT 57 * - col1 FROM tab2
----
-1767
-3363
-969

query I rowsort
SELECT DISTINCT + + col1 * col0 * 78 FROM tab1 AS cor0
----
49920
6084
81120

query I rowsort
SELECT DISTINCT + col2 * col1 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * cor0.col2 + - ( - col1 ) * col1 + col1 FROM tab2 cor0
----
-2696
1512
803

query I rowsort
SELECT + + 12 - + cor0.col2 FROM tab2 AS cor0
----
-14
-15
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 61 + - col1 col2 FROM tab1 AS cor0
----
-71
-74
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 50 * col1 + ( col2 ) - - cor0.col0 col1 FROM tab2 AS cor0
----
1584
3054
967

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8137
SELECT ALL - col1 + col0 * + CAST( NULL AS SIGNED ) / - col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8137
SELECT ALL - col1 + col0 * + CAST ( NULL AS INTEGER ) / - col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - 67 + + col2 AS col0 FROM tab2 AS cor0
----
-29
-40
-41

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col1 * col2 + CAST ( col0 AS REAL ) AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + - col0 - + col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT col0 - + cor0.col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL - 22 * col1 + cor0.col1 FROM tab1 AS cor0
----
-210
-273
-546

query I rowsort
SELECT - + cor0.col1 * - col1 - + col1 AS col2 FROM tab1 cor0
----
156
650
90

query I rowsort
SELECT DISTINCT - 39 * - col0 AS col0 FROM tab0
----
1365
3471
936

query I rowsort
SELECT col1 - tab2.col1 FROM tab2
----
0
0
0

query I rowsort
SELECT - + col1 + cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT - col0 * - cor0.col0 * 90 + - cor0.col0 FROM tab2 AS cor0
----
4403
547482
561611

query I rowsort
SELECT - 30 - + cor0.col2 FROM tab2 AS cor0
----
-56
-57
-68

query I rowsort
SELECT ALL + 63 + + tab1.col2 * tab1.col0 AS col1 FROM tab1
----
225
3711
7743

query I rowsort
SELECT + - 42 - col1 FROM tab0 AS cor0
----
-128
-133
-139

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT DISTINCT - col1 * + ( 0 ) * col0 AS col2 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8154
SELECT + cor0.col2 + ( 80 ) DIV col0 col0 FROM tab1 AS cor0
----
58
80
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8154
SELECT + cor0.col2 + ( 80 ) / col0 col0 FROM tab1 AS cor0
----
58
80
97

query I rowsort
SELECT + col2 * + ( col2 ) + col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT 41 AS col1 FROM tab0, tab2 AS cor0
----
41

query I rowsort
SELECT col1 - + 63 * + col1 FROM tab2
----
-1054
-1922
-3658

onlyif mysql # use DIV operator for integer division
query I rowsort label-8158
SELECT ( col2 ) DIV + col2 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8158
SELECT ( col2 ) / + col2 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 66 * + 30 col1 FROM tab1 cor0
----
-1980
-1980
-1980

query I rowsort
SELECT DISTINCT - 46 * 43 * + col1 AS col1 FROM tab2 AS cor0
----
-116702
-33626
-61318

onlyif mysql # use DIV operator for integer division
query I rowsort label-8161
SELECT DISTINCT + 68 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8161
SELECT DISTINCT + 68 / cor0.col0 AS col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT - - 18 * col2 AS col2 FROM tab1 AS cor0
----
1026
1728
972

query I rowsort
SELECT DISTINCT + col2 * 85 FROM tab1 cor0
----
4590
4845
8160

onlyif mysql # use DIV operator for integer division
query I rowsort label-8164
SELECT + col1 * col2 DIV - cor0.col0 AS col1 FROM tab0 AS cor0
----
-118
-2
-83

skipif mysql # not compatible
query I rowsort label-8164
SELECT + col1 * col2 / - cor0.col0 AS col1 FROM tab0 AS cor0
----
-118
-2
-83

query I rowsort
SELECT + ( - 68 ) AS col1 FROM tab1 AS cor0
----
-68
-68
-68

query I rowsort
SELECT ALL + 59 FROM tab2, tab0 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 75 + + col0 col1 FROM tab0 AS cor0
----
110
164
99

query I rowsort
SELECT DISTINCT - - ( cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + cor0.col2 + - col2 * col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col0 * col0 col1 FROM tab2 cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT - - col0 * col1 - - col2 FROM tab0 AS cor0
----
2097
3396
8181

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 col2 * - col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - + col2 * cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col2 * + ( + col2 ) FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - col2 * cor0.col1 + col0 + - cor0.col1 FROM tab0 AS cor0
----
-159
-2900
-7464

query I rowsort
SELECT - 80 AS col2 FROM tab0 cor0
----
-80
-80
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8178
SELECT ALL col0 + - col0 DIV col0 AS col0 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-8178
SELECT ALL col0 + - col0 / col0 AS col0 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT DISTINCT + - ( + col1 ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - cor0.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT + + col0 + col0 * col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT - col2 + - ( - cor0.col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - col1 * - col2 + - col0 * col0 FROM tab0 AS cor0
----
-1128
-459
2262

query I rowsort
SELECT ALL cor0.col0 * 58 AS col2 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT + col1 + ( col0 * - col2 ) FROM tab2 AS cor0
----
-158
-1969
-2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-8186
SELECT ALL - - col2 * + 23 + + cor0.col1 DIV cor0.col0 FROM tab0 AS cor0
----
1887
25
762

skipif mysql # not compatible
query I rowsort label-8186
SELECT ALL - - col2 * + 23 + + cor0.col1 / cor0.col0 FROM tab0 AS cor0
----
1887
25
762

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * 12 col0 FROM tab0 AS cor0
----
-12
-396
-984

query I rowsort
SELECT ALL 33 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT 48 AS col1 FROM tab1 AS cor0
----
48
48
48

query I rowsort
SELECT DISTINCT + ( 50 ) FROM tab2 cor0
----
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8191
SELECT ALL + CAST( col0 AS SIGNED ) col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8191
SELECT ALL + CAST ( col0 AS INTEGER ) col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 56 col2 FROM tab2 AS cor0
----
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 59 ) * - cor0.col2 col2 FROM tab0 AS cor0
----
-1947
-4838
-59

query I rowsort
SELECT DISTINCT + - 5 * col2 + + col2 AS col0 FROM tab0 AS cor0
----
-132
-328
-4

query I rowsort
SELECT - ( - col1 ) * - cor0.col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) + + col0 col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT tab0.col0 + ( col1 * - col0 + ( 28 ) ) FROM tab0
----
-2012
-3332
-7982

query I rowsort
SELECT DISTINCT tab1.col2 + + tab1.col2 * tab1.col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT DISTINCT + col2 + 12 FROM tab1
----
108
66
69

query I rowsort
SELECT DISTINCT - 30 FROM tab2, tab0 AS cor0, tab0 cor1
----
-30

query I rowsort
SELECT DISTINCT col2 * col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ( + col1 ) * 34 + col1 FROM tab1
----
350
455
910

query I rowsort
SELECT - ( - cor0.col1 ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT 59 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - 75 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT col2 * col0 * + col0 AS col0 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL - + col1 * + col2 + col0 FROM tab2 cor0
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - cor0.col0 * + 84 col1 FROM tab1 AS cor0
----
-306
-5433
-6816

query I rowsort
SELECT - 69 AS col2 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

query I rowsort
SELECT ALL - + col0 * - 59 AS col0 FROM tab1 cor0
----
177
3776
4720

onlyif mysql # use DIV operator for integer division
query I rowsort label-8212
SELECT ALL + col2 + 43 DIV col2 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8212
SELECT ALL + col2 + 43 / col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - cor0.col2 * + ( - cor0.col0 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col1 + - cor0.col1 * 64 AS col0 FROM tab2 cor0
----
-1071
-1953
-3717

query I rowsort
SELECT DISTINCT col0 + + 9 * col1 FROM tab0
----
798
908

query I rowsort
SELECT ALL + col2 * + 20 + + col1 * ( 54 ) + - col2 AS col2 FROM tab1
----
1623
2430
2526

query I rowsort
SELECT 97 + + col0 AS col1 FROM tab0
----
121
132
186

query I rowsort
SELECT DISTINCT ( + 16 ) * col1 + ( 4 ) FROM tab2
----
276
500
948

query I rowsort
SELECT ALL - 37 + + 41 FROM tab0 AS cor0
----
4
4
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8220
SELECT + CAST( NULL AS SIGNED ) + - col1 + + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8220
SELECT + CAST ( NULL AS INTEGER ) + - col1 + + col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8221
SELECT ALL + 18 DIV col1 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8221
SELECT ALL + 18 / col1 AS col0 FROM tab2
----
0
0
1

query I rowsort
SELECT + 68 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8223
SELECT + CAST( NULL AS DECIMAL ) + 12 + col1 * + col1 * - col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8223
SELECT + CAST ( NULL AS REAL ) + 12 + col1 * + col1 * - col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 87 + col2 * 58 FROM tab2 AS cor0
----
1595
1653
2291

onlyif mysql # use DIV operator for integer division
query I rowsort label-8225
SELECT DISTINCT - + col1 DIV + col2 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8225
SELECT DISTINCT - + col1 / + col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col0 + - cor0.col2 * 38 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-138560
-291760
-6153

query I rowsort
SELECT 78 * col1 FROM tab1 AS cor0
----
1014
2028
780

query I rowsort
SELECT - ( col1 ) * col1 FROM tab1 cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-8229
SELECT ALL + col0 DIV col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-8229
SELECT ALL + col0 / col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8230
SELECT DISTINCT ( - cor0.col0 ) - - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8230
SELECT DISTINCT ( - cor0.col0 ) - - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col2 * col1 * col0 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL + + 99 FROM tab1 AS cor0
----
99
99
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8233
SELECT - + col2 * + col2 + CAST( 66 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1023
-6658
65

skipif mysql # not compatible
query I rowsort label-8233
SELECT - + col2 * + col2 + CAST ( 66 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1023
-6658
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-8234
SELECT cor0.col1 + col2 DIV 31 FROM tab1 AS cor0
----
11
16
27

skipif mysql # not compatible
query I rowsort label-8234
SELECT cor0.col1 + col2 / 31 FROM tab1 AS cor0
----
11
16
27

query I rowsort
SELECT - 44 FROM tab1
----
-44
-44
-44

query I rowsort
SELECT + ( + col1 ) * + ( - col2 ) * col0 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ( + col0 ) + + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ( - col0 ) * 6 * - col0 + + col2 AS col0 FROM tab1 AS cor0
----
108
24633
38496

query I rowsort
SELECT + col2 * + col1 + cor0.col0 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 col2 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8241
SELECT ALL - col0 DIV - col0 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8241
SELECT ALL - col0 / - col0 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT - 74 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT + col2 - - col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + + cor0.col2 * 47 AS col0 FROM tab0 AS cor0
----
1551
3854
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-8246
SELECT - col2 DIV ( + 18 * col0 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8246
SELECT - col2 / ( + 18 * col0 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 + 58 * 37 FROM tab0 AS cor0
----
2064
2113
2145

query I rowsort
SELECT + cor0.col2 * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - cor0.col0 * - col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + ( col2 + - 33 * 45 ) FROM tab1
----
-1389
-1428
-1431

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8251
SELECT ALL col0 * + CAST( - 67 AS SIGNED ) FROM tab2 cor0
----
-469
-5226
-5293

skipif mysql # not compatible
query I rowsort label-8251
SELECT ALL col0 * + CAST ( - 67 AS INTEGER ) FROM tab2 cor0
----
-469
-5226
-5293

query I rowsort
SELECT DISTINCT col2 + col0 * + 71 FROM tab0 AS cor0
----
1737
2486
6401

query I rowsort
SELECT - 68 + + ( col1 ) FROM tab2 AS cor0
----
-37
-51
-9

query I rowsort
SELECT - ( 98 ) FROM tab1 AS cor0
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 + - col2 col0 FROM tab2 AS cor0
----
24
35
36

query I rowsort
SELECT ALL + - col1 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 - + col2 col1 FROM tab1 AS cor0
----
-141
-144
-183

query I rowsort
SELECT + cor0.col2 * + cor0.col1 + - col0 AS col2 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8259
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8259
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col0 + col2 - 6 FROM tab0 AS cor0
----
165
30
51

query I rowsort
SELECT + tab2.col0 * col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL - col2 - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + ( + col1 ) + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + 3 FROM tab2, tab0 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT + col2 * 7 FROM tab2
----
182
189
266

query I rowsort
SELECT ALL col1 * + col1 + - col2 AS col2 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT - col1 * 73 AS col1 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT ALL + + 87 AS col2 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT ( + col0 ) AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + 68 AS col2 FROM tab2
----
68
68
68

query I rowsort
SELECT ALL + + col1 * col1 + col2 + + cor0.col2 FROM tab1 AS cor0
----
214
361
784

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8273
SELECT DISTINCT + col2 - CAST( col2 + col2 * + 8 AS SIGNED ) AS col2 FROM tab2 cor0
----
-208
-216
-304

skipif mysql # not compatible
query I rowsort label-8273
SELECT DISTINCT + col2 - CAST ( col2 + col2 * + 8 AS INTEGER ) AS col2 FROM tab2 cor0
----
-208
-216
-304

query I rowsort
SELECT + col0 * + 74 * - col0 FROM tab1 AS cor0
----
-303104
-473600
-666

query I rowsort
SELECT ALL - col2 + 70 AS col1 FROM tab2 AS cor0
----
32
43
44

query I rowsort
SELECT + + col1 + - 83 FROM tab1 AS cor0
----
-57
-70
-73

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 + + 89 * col1 AS col1 FROM tab0 cor0
----
4816
637
8536

query I rowsort
SELECT DISTINCT - + cor0.col1 + - 5 FROM tab1 cor0
----
-15
-18
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-8279
SELECT ALL - col0 DIV - col1 - - col0 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-8279
SELECT ALL - col0 / - col1 - - col0 FROM tab1 AS cor0
----
3
70
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8280
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-8280
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 cor2
----
NULL

query I rowsort
SELECT cor1.col0 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL - - ( + col2 ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT 33 * 87 * col0 + 57 - cor0.col0 FROM tab2 AS cor0
----
20147
223917
226787

query I rowsort
SELECT ALL - ( col2 ) * col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL ( + tab0.col0 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 85 * cor0.col2 AS col1 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT DISTINCT - col0 * - col1 * - col0 AS col2 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT - ( col2 ) + col2 * - col2 * col0 AS col1 FROM tab2
----
-114114
-5130
-52754

query I rowsort
SELECT DISTINCT + - 76 FROM tab2, tab0, tab0 AS cor0
----
-76

query I rowsort
SELECT - - 75 + cor0.col1 AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 808686e7c6ae742c2c290742fcb4aa1e

query I rowsort
SELECT + cor0.col1 * - cor0.col1 + - col2 * + col2 * col1 AS col2 FROM tab2 AS cor0
----
-23560
-24837
-43365

query I rowsort
SELECT 87 AS col0 FROM tab0
----
87
87
87

query I rowsort
SELECT + - col2 * + col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col1 * 73 AS col0 FROM tab2
----
1241
2263
4307

query I rowsort
SELECT ALL - col1 + col2 * + col2 AS col1 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT + cor1.col2 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col1 * + 85 * cor0.col1 AS col2 FROM tab0 AS cor0
----
628660
703885
799765

query I rowsort
SELECT - col0 + + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL col1 * ( 2 ) AS col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8302
SELECT - + col1 DIV col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-8302
SELECT - + col1 / col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT ALL col0 * + 37 AS col2 FROM tab0 AS cor0
----
1295
3293
888

query I rowsort
SELECT DISTINCT + + col2 + col1 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - 11 * tab2.col2 + col0 + + tab2.col0 AS col2 FROM tab2
----
-130
-260
-283

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8306
SELECT + CAST( NULL AS SIGNED ) * + tab2.col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8306
SELECT + CAST ( NULL AS INTEGER ) * + tab2.col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + - tab0.col1 * col0 + + ( col1 ) FROM tab0
----
-1892
-3201
-7917

query I rowsort
SELECT DISTINCT ( + col2 ) * col1 + tab1.col1 AS col1 FROM tab1
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8309
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8309
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT 22 FROM tab0, tab2 cor0
----
22

query I rowsort
SELECT + 85 FROM tab2, tab2 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT - tab1.col0 + + 2 * col2 AS col2 FROM tab1
----
105
112
50

query I rowsort
SELECT DISTINCT + 35 + - col2 FROM tab0 AS cor0
----
-47
2
34

query I rowsort
SELECT 61 - - 21 FROM tab2 AS cor0
----
82
82
82

query I rowsort
SELECT ALL - cor0.col0 + - ( + col2 ) * - col0 * col1 - - cor0.col0 AS col2 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT ALL ( - col0 ) - - col2 * - 35 * col2 AS col0 FROM tab1 AS cor0
----
-102063
-113779
-322640

query I rowsort
SELECT col2 - - 49 FROM tab1 AS cor0
----
103
106
145

query I rowsort
SELECT 82 * + 11 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
806
845
848

onlyif mysql # use DIV operator for integer division
query I rowsort label-8319
SELECT 85 DIV col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-8319
SELECT 85 / col0 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT 6 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT DISTINCT - - col2 + - col0 + - col1 FROM tab0 AS cor0
----
-131
-77
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8322
SELECT cor0.col1 DIV col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-8322
SELECT cor0.col1 / col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
3
36
83

query I rowsort
SELECT ALL - - col1 * + col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + 25 * + col0 AS col1 FROM tab0 AS cor0
----
2225
600
875

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + cor0.col1 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + 29 * col1 AS col0 FROM tab2 AS cor0
----
1711
493
899

query I rowsort
SELECT DISTINCT + 29 * - col1 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT DISTINCT 63 FROM tab1 AS cor0
----
63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8329
SELECT + 25 * col0 + - CAST( NULL AS DECIMAL ) - 87 * col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8329
SELECT + 25 * col0 + - CAST ( NULL AS REAL ) - 87 * col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 72 AS col1 FROM tab2
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL 6 * cor0.col1 FROM tab0 AS cor0
----
516
546
582

query I rowsort
SELECT DISTINCT 91 * + col1 FROM tab2 AS cor0
----
1547
2821
5369

query I rowsort
SELECT + 37 + col0 AS col2 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT ALL col1 * ( - col1 ) + col2 AS col0 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT ALL tab1.col2 + 86 + col2 AS col2 FROM tab1
----
194
200
278

query I rowsort
SELECT DISTINCT - col1 + col0 AS col1 FROM tab1
----
-23
54
67

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0, tab0 cor2
----
3645 values hashing to 4037d65571c1bbf6e0e7d759f858120e

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - ( + col0 ) * - col0 + 85 AS col2 FROM tab2
----
134
6169
6326

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8342
SELECT + CAST( - 93 AS SIGNED ) + - col0 * - tab1.col2 FROM tab1
----
3555
69
7587

skipif mysql # not compatible
query I rowsort label-8342
SELECT + CAST ( - 93 AS INTEGER ) + - col0 * - tab1.col2 FROM tab1
----
3555
69
7587

query I rowsort
SELECT DISTINCT 21 FROM tab1, tab2 AS cor0
----
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-8344
SELECT - ( + col0 ) DIV - col0 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8344
SELECT - ( + col0 ) / - col0 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - 8 FROM tab2, tab1 AS cor0
----
-8

query I rowsort
SELECT + ( - col0 ) * - col0 + cor0.col1 FROM tab0 cor0
----
1322
662
8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8347
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8347
SELECT DISTINCT + CAST ( NULL AS REAL ) * col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col2 * - 31 AS col1 FROM tab1
----
-1674
-1767
-2976

query I rowsort
SELECT DISTINCT + col0 - col2 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL + 18 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2, tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8352
SELECT + col0 DIV - cor0.col0 + 91 AS col0 FROM tab0 AS cor0
----
90
90
90

skipif mysql # not compatible
query I rowsort label-8352
SELECT + col0 / - cor0.col0 + 91 AS col0 FROM tab0 AS cor0
----
90
90
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8353
SELECT + 62 DIV col0 + 39 * - col2 AS col2 FROM tab2
----
-1014
-1045
-1482

skipif mysql # not compatible
query I rowsort label-8353
SELECT + 62 / col0 + 39 * - col2 AS col2 FROM tab2
----
-1014
-1045
-1482

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT ALL - col1 * - cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col0 * - ( + col0 * col2 ) FROM tab1 AS cor0
----
-233472
-486
-614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-8357
SELECT + col0 + col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-8357
SELECT + col0 + col0 / + col1 AS col1 FROM tab2 AS cor0
----
7
79
83

query I rowsort
SELECT ALL + 96 * 5 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 9acccc87c27a3471de9d1287dcd8e1b6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8359
SELECT + col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8359
SELECT + col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + 99 * - ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-3243
-64
-8029

query I rowsort
SELECT DISTINCT cor0.col2 * + ( 29 ) FROM tab1 AS cor0
----
1566
1653
2784

onlyif mysql # use DIV operator for integer division
query I rowsort label-8362
SELECT ALL + - col0 DIV + col0 AS col2 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8362
SELECT ALL + - col0 / + col0 AS col2 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT + - col2 * col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col2 + + col1 * col0 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL - - col2 * - 58 FROM tab2 AS cor0
----
-1508
-1566
-2204

query I rowsort
SELECT col0 + + ( - col2 ) * + col1 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-8367
SELECT DISTINCT + + col0 DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8367
SELECT DISTINCT + + col0 / - col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col2 + 64 col1 FROM tab2 AS cor0
----
64
64
64

query I rowsort
SELECT ALL - + col2 + + cor0.col0 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT - cor0.col0 * ( col2 + + col0 ) AS col1 FROM tab0 AS cor0
----
-1260
-1368
-15219

query I rowsort
SELECT ALL + 51 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT ALL - 66 * 43 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to f64849faf59028aa8ddb86f6d52154bd

query I rowsort
SELECT DISTINCT tab2.col0 + 67 FROM tab2
----
145
146
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-8374
SELECT + col1 DIV 47 FROM tab0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-8374
SELECT + col1 / 47 FROM tab0
----
1
1
2

query I rowsort
SELECT + tab1.col2 * - ( + col0 ) AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT - - cor0.col2 + - 55 FROM tab0 cor0
----
-22
-54
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-8377
SELECT DISTINCT - col0 DIV tab0.col1 col0 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8377
SELECT DISTINCT - col0 / tab0.col1 col0 FROM tab0
----
0

query I rowsort
SELECT ALL - col2 * - 60 * - tab2.col1 FROM tab2
----
-38760
-50220
-92040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * ( col2 ) col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - col1 * + col1 + - col2 + 84 FROM tab2 AS cor0
----
-243
-3423
-904

query I rowsort
SELECT DISTINCT 65 * - col2 AS col1 FROM tab2
----
-1690
-1755
-2470

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8382
SELECT + - CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8382
SELECT + - CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 64 * col2 FROM tab2 AS cor0
----
1664
1728
2432

query I rowsort
SELECT col2 + - col1 + + col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + 5 * cor0.col1 + + col0 * 33 * + col0 + - cor0.col0 * ( + col1 ) FROM tab1 AS cor0
----
134578
210225
349

query I rowsort
SELECT + + col0 * 58 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT ALL col2 * + col2 + ( - 71 * + col0 ) AS col1 FROM tab2 AS cor0
----
-4165
-4862
232

onlyif mysql # use DIV operator for integer division
query I rowsort label-8388
SELECT DISTINCT col0 * col2 + cor0.col2 DIV 12 FROM tab2 AS cor0
----
191
2030
3005

skipif mysql # not compatible
query I rowsort label-8388
SELECT DISTINCT col0 * col2 + cor0.col2 / 12 FROM tab2 AS cor0
----
191
2030
3005

query I rowsort
SELECT ALL - tab0.col0 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - cor0.col0 + + 27 FROM tab1, tab2 AS cor0
----
9 values hashing to 79594e5a945fc94179551fa2b81a8e26

query I rowsort
SELECT col2 * + 30 FROM tab1 AS cor0
----
1620
1710
2880

query I rowsort
SELECT - 8 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT col2 - + 18 * + col1 FROM tab2
----
-1036
-268
-531

query I rowsort
SELECT - col1 - + 63 * col1 * - col2 FROM tab1
----
35900
78611
88426

onlyif mysql # use DIV operator for integer division
query I rowsort label-8395
SELECT DISTINCT - col0 + - tab0.col1 DIV + tab0.col2 AS col2 FROM tab0
----
-132
-26
-90

skipif mysql # not compatible
query I rowsort label-8395
SELECT DISTINCT - col0 + - tab0.col1 / + tab0.col2 AS col2 FROM tab0
----
-132
-26
-90

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8397
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 5 * col0 + + col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-8397
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 5 * col0 + + col2 FROM tab0
----
NULL

query I rowsort
SELECT ( - col2 ) * tab1.col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - col1 + + col2 * col2 FROM tab0
----
-96
1003
6633

query I rowsort
SELECT DISTINCT ( 77 ) FROM tab2
----
77

query I rowsort
SELECT ALL - + cor0.col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT ( col0 ) + col1 FROM tab0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8403
SELECT CAST( - col0 AS SIGNED ) + - col0 FROM tab1
----
-128
-160
-6

skipif mysql # not compatible
query I rowsort label-8403
SELECT CAST ( - col0 AS INTEGER ) + - col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT - 55 AS col1 FROM tab0
----
-55
-55
-55

query I rowsort
SELECT 54 AS col1 FROM tab0
----
54
54
54

query I rowsort
SELECT - col0 - - tab1.col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT 46 AS col0 FROM tab0, tab1 AS cor0
----
46

query I rowsort
SELECT DISTINCT + col1 * + col0 * + col2 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8409
SELECT DISTINCT - CAST( + col2 * + tab2.col2 AS SIGNED ) + + tab2.col2 + tab2.col0 col2 FROM tab2
----
-1327
-572
-695

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8409
SELECT DISTINCT - CAST ( + col2 * + tab2.col2 AS INTEGER ) + + tab2.col2 + tab2.col0 col2 FROM tab2
----
-1327
-572
-695

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8410
SELECT + CAST( - col2 AS SIGNED ) * - col2 + col2 * cor0.col1 FROM tab2 AS cor0
----
1566
2090
2210

skipif mysql # not compatible
query I rowsort label-8410
SELECT + CAST ( - col2 AS INTEGER ) * - col2 + col2 * cor0.col1 FROM tab2 AS cor0
----
1566
2090
2210

query I rowsort
SELECT col0 * col2 * col0 AS col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT DISTINCT - col0 + + col1 * + col0 AS col2 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT + col0 + + col1 AS col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - col2 * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 70 AS col1 FROM tab1 AS cor0
----
-70
-70
-70

query I rowsort
SELECT + 54 FROM tab0 AS cor0
----
54
54
54

query I rowsort
SELECT + + 14 * col2 AS col2 FROM tab2 AS cor0
----
364
378
532

query I rowsort
SELECT + col1 * + cor0.col1 * col0 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT - + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
0

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-8421
SELECT - cor0.col2 + + col2 DIV + col1 FROM tab1 AS cor0
----
-52
-52
-89

skipif mysql # not compatible
query I rowsort label-8421
SELECT - cor0.col2 + + col2 / + col1 FROM tab1 AS cor0
----
-52
-52
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8422
SELECT DISTINCT - col1 DIV + 91 AS col2 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-8422
SELECT DISTINCT - col1 / + 91 AS col2 FROM tab2
----
0

query I rowsort
SELECT DISTINCT - 40 AS col1 FROM tab2
----
-40

query I rowsort
SELECT - ( - col0 ) AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT + 83 AS col2 FROM tab1 cor0
----
83

query I rowsort
SELECT - - 59 AS col0 FROM tab2 cor0
----
59
59
59

query I rowsort
SELECT ALL + 93 AS col2 FROM tab1 AS cor0
----
93
93
93

query I rowsort
SELECT - - col2 + - ( col0 ) FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-8429
SELECT col1 + - col2 + - 35 DIV col0 FROM tab1
----
-39
-47
-83

skipif mysql # not compatible
query I rowsort label-8429
SELECT col1 + - col2 + - 35 / col0 FROM tab1
----
-39
-47
-83

query I rowsort
SELECT + cor0.col0 * col1 + - 70 AS col2 FROM tab0 cor0
----
1994
3325
8029

query I rowsort
SELECT cor0.col1 + - col2 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT col0 * - ( + col2 ) + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL + + cor0.col2 + col0 AS col1 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8434
SELECT + + col2 * + col1 + - col0 DIV col1 FROM tab1 AS cor0
----
1242
1404
564

skipif mysql # not compatible
query I rowsort label-8434
SELECT + + col2 * + col1 + - col0 / col1 FROM tab1 AS cor0
----
1242
1404
564

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8435
SELECT DISTINCT - + cor0.col0 * + CAST( NULL AS DECIMAL ) + + col0 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8435
SELECT DISTINCT - + cor0.col0 * + CAST ( NULL AS REAL ) + + col0 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 + - 82 * col1 AS col0 FROM tab1 AS cor0
----
-1053
-2106
-810

query I rowsort
SELECT + + col2 + - ( - col0 ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + cor0.col2 + + col2 * - col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + col2 - + col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + col2 * 46 + cor0.col0 FROM tab1 AS cor0
----
2487
2686
4496

onlyif mysql # use DIV operator for integer division
query I rowsort label-8441
SELECT - - col0 + col0 DIV + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-8441
SELECT - - col0 + col0 / + col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT col1 * tab2.col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL - ( 11 ) * - col1 AS col0 FROM tab2 AS cor0
----
187
341
649

query I rowsort
SELECT ALL + 90 * - col2 AS col1 FROM tab0 AS cor0
----
-2970
-7380
-90

query I rowsort
SELECT + tab1.col1 * 64 AS col0 FROM tab1
----
1664
640
832

query I rowsort
SELECT DISTINCT 78 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8447
SELECT DISTINCT - tab2.col1 - + CAST( col0 AS SIGNED ) AS col0 FROM tab2
----
-137
-38
-96

skipif mysql # not compatible
query I rowsort label-8447
SELECT DISTINCT - tab2.col1 - + CAST ( col0 AS INTEGER ) AS col0 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT 58 - 93 FROM tab0, tab2 cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab2, tab2 cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT 0 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + - col1 - - col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + col0 + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + + col2 + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - - col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * + col0 + - col2 col2 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT - col2 * + col1 + + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL col2 * + col0 + cor0.col0 * col2 FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT col0 * - col1 + + col0 * - col1 FROM tab2 AS cor0
----
-2686
-434
-9204

query I rowsort
SELECT DISTINCT + - col0 * col2 + col1 * - col0 FROM tab0 cor0
----
-15397
-2856
-3430

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - + col0 * + col0 col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT - col1 + col0 AS col2 FROM tab2 cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8463
SELECT DISTINCT + col2 - + col1 DIV col0 col2 FROM tab2 AS cor0
----
23
26
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8463
SELECT DISTINCT + col2 - + col1 / col0 col2 FROM tab2 AS cor0
----
23
26
38

query I rowsort
SELECT + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - - col0 + + col0 * + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT - - col1 * - cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - col1 * - col1 AS col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT + col2 * - col1 + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL cor0.col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - col0 - - col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL tab0.col2 * tab0.col1 - col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT ALL tab0.col1 - col0 AS col0 FROM tab0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col2 - - col2 col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT + col0 + - col1 * col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL + + col1 * + cor0.col0 + - col1 * col1 AS col1 FROM tab2 AS cor0
----
-744
1054
1121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 + col1 * + col2 col1 FROM tab2 cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-8477
SELECT ALL - + cor0.col2 * col2 + col1 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
-1088
-6723
0

skipif mysql # not compatible
query I rowsort label-8477
SELECT ALL - + cor0.col2 * col2 + col1 / cor0.col1 AS col2 FROM tab0 AS cor0
----
-1088
-6723
0

query I rowsort
SELECT + col0 * col0 - col2 AS col0 FROM tab2 AS cor0
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-8479
SELECT ALL + col0 * col0 + + col0 * + col1 + + col0 DIV - col0 FROM tab2
----
10685
265
7583

skipif mysql # not compatible
query I rowsort label-8479
SELECT ALL + col0 * col0 + + col0 * + col1 + + col0 / - col0 FROM tab2
----
10685
265
7583

query I rowsort
SELECT ALL + col2 * + col1 + col0 * - col2 AS col0 FROM tab0
----
164
2046
62

query I rowsort
SELECT ALL - col1 + col0 + - col1 AS col1 FROM tab1
----
-49
44
54

query I rowsort
SELECT col1 * col1 - col1 AS col1 FROM tab1
----
156
650
90

query I rowsort
SELECT ALL - - col0 + - col2 + - col1 AS col1 FROM tab1 cor0
----
-29
-3
-77

query I rowsort
SELECT DISTINCT col2 * + col0 - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1453
-772
2713

query I rowsort
SELECT col2 * - col1 + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT + col0 + - col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 WHERE NULL NOT IN ( + tab1.col2 )
----

query I rowsort
SELECT - col1 + col1 * - col0 + col2 FROM tab0
----
-2117
-3491
-8108

query I rowsort
SELECT col1 - col0 FROM tab2 WHERE NOT NULL <= - col2 * + col0
----

query I rowsort
SELECT DISTINCT tab0.col1 + + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL - 87 * + col2 FROM tab2
----
-2262
-2349
-3306

query I rowsort
SELECT tab1.col0 + - tab1.col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + col2 * + col2 * - col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + col0 col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8495
SELECT col2 DIV col1 AS col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-8495
SELECT col2 / col1 AS col1 FROM tab2
----
0
0
2

query I rowsort
SELECT DISTINCT col2 + col2 * - col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT + col0 + tab0.col0 * + col0 AS col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT col1 + col1 + - col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL tab2.col0 + + col1 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + col1 + - tab1.col0 AS col2 FROM tab1
----
-54
-67
23

query I rowsort
SELECT - col2 + + cor0.col2 * col2 * + cor0.col2 FROM tab1 AS cor0
----
157410
185136
884640

query I rowsort
SELECT DISTINCT + col0 + - col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + + col2 + col0 * + col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL + + col2 * - col0 + - col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT + col0 + - col0 AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL - - col0 - - col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - col1 * col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT - - col1 + - col1 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ( col1 ) * 34 FROM tab0
----
2924
3094
3298

query I rowsort
SELECT col1 + + col0 * + 3 FROM tab2 AS cor0
----
254
293
52

query I rowsort
SELECT - ( col0 ) + + 91 FROM tab0 AS cor0
----
2
56
67

query I rowsort
SELECT - col1 + col2 AS col0 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL 54 AS col2 FROM tab2 AS cor0
----
54
54
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-8514
SELECT - col1 DIV - col0 - + col0 * col0 FROM tab1 AS cor0
----
-1
-4096
-6400

skipif mysql # not compatible
query I rowsort label-8514
SELECT - col1 / - col0 - + col0 * col0 FROM tab1 AS cor0
----
-1
-4096
-6400

query I rowsort
SELECT ALL + - col2 * col2 + 64 AS col2 FROM tab0 AS cor0
----
-1025
-6660
63

query I rowsort
SELECT 55 + col0 + cor0.col2 FROM tab2 AS cor0
----
159
172
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8517
SELECT DISTINCT + 6 DIV + cor0.col0 FROM tab1 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-8517
SELECT DISTINCT + 6 / + cor0.col0 FROM tab1 AS cor0
----
0
2

query I rowsort
SELECT DISTINCT 0 FROM tab1 cor0
----
0

query I rowsort
SELECT col1 * - col1 + 6 * + col1 + + col2 FROM tab1 AS cor0
----
-466
17
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8520
SELECT + 43 * + cor0.col2 + 24 DIV - col2 - col1 FROM tab1 AS cor0
----
2296
2441
4115

skipif mysql # not compatible
query I rowsort label-8520
SELECT + 43 * + cor0.col2 + 24 / - col2 - col1 FROM tab1 AS cor0
----
2296
2441
4115

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * cor0.col2 + + col2 col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - 9 + + col0 AS col2 FROM tab0 AS cor0
----
15
26
80

query I rowsort
SELECT col2 + + 43 - - cor0.col0 AS col2 FROM tab1 AS cor0
----
100
164
219

query I rowsort
SELECT - col0 + 18 * - col1 AS col0 FROM tab0 AS cor0
----
-1572
-1727
-1781

query I rowsort
SELECT col1 * col2 + col1 + + col0 FROM tab0 AS cor0
----
229
2948
7642

query I rowsort
SELECT ALL - 57 - + 79 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 08f97f97b745950752b9b99b9639317a

query I rowsort
SELECT + col2 * + col2 AS col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT ALL col2 + col2 * - col1 * + col1 + - col1 * - tab1.col2 FROM tab1
----
-14880
-35046
-5073

query I rowsort
SELECT - 81 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

query I rowsort
SELECT - 52 FROM tab2, tab1 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT ALL - col1 + 58 AS col1 FROM tab0 AS cor0
----
-28
-33
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-8532
SELECT ( - col1 ) DIV + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8532
SELECT ( - col1 ) / + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 + col1 AS col0 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 46 col2 FROM tab0 AS cor0
----
1518
3772
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8535
SELECT DISTINCT - CAST( 2 AS SIGNED ) + col1 AS col0 FROM tab0 AS cor0
----
84
89
95

skipif mysql # not compatible
query I rowsort label-8535
SELECT DISTINCT - CAST ( 2 AS INTEGER ) + col1 AS col0 FROM tab0 AS cor0
----
84
89
95

query I rowsort
SELECT - col2 + cor0.col2 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL col2 + col2 + col1 FROM tab1 AS cor0
----
124
134
205

onlyif mysql # use DIV operator for integer division
query I rowsort label-8538
SELECT - - col1 + ( col1 ) DIV col1 AS col0 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-8538
SELECT - - col1 + ( col1 ) / col1 AS col0 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL - cor1.col0 AS col2 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT - 79 * - cor0.col2 + 18 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5ed2b770cfbe0911d48aeecbcef839a9

query I rowsort
SELECT ALL col2 * - col1 * + col2 AS col0 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT - col2 * col1 - col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-14924
-194
-5676

query I rowsort
SELECT ALL 55 * + col1 FROM tab0
----
4730
5005
5335

query I rowsort
SELECT DISTINCT 37 FROM tab0, tab1 AS cor0
----
37

query I rowsort
SELECT - 3 AS col1 FROM tab0
----
-3
-3
-3

query I rowsort
SELECT ( 92 + tab1.col1 ) AS col1 FROM tab1
----
102
105
118

query I rowsort
SELECT ALL + 13 FROM tab0
----
13
13
13

query I rowsort
SELECT col2 * 78 + col1 * - col0 * 46 FROM tab1
----
-24994
-40352
624

query I rowsort
SELECT ALL 29 * col0 + + 70 * - col0 AS col0 FROM tab0 AS cor0
----
-1435
-3649
-984

query I rowsort
SELECT ALL + col0 * + col1 + + 27 FROM tab2 AS cor0
----
1370
244
4629

query I rowsort
SELECT DISTINCT - cor0.col0 - col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + cor0.col2 * - col0 + + 65 FROM tab2 AS cor0
----
-124
-1963
-2937

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 35 col2 FROM tab2 AS cor0
----
35
35
35

query I rowsort
SELECT cor0.col1 + ( + ( - cor1.col0 ) ) AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to de0a8d8589708d2f25b29b2d1dd5d610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 67 col1 FROM tab2
----
67
67
67

query I rowsort
SELECT - 39 * col1 AS col1 FROM tab1 AS cor0
----
-1014
-390
-507

onlyif mysql # use DIV operator for integer division
query I rowsort label-8558
SELECT 93 DIV + col1 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8558
SELECT 93 / + col1 FROM tab0
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8559
SELECT - col0 DIV tab1.col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8559
SELECT - col0 / tab1.col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL + cor0.col1 + + 41 FROM tab1, tab0 AS cor0
----
9 values hashing to b7a76c4507d813340347bccd46e3c26e

onlyif mysql # use DIV operator for integer division
query I rowsort label-8561
SELECT col0 * col1 DIV - tab0.col1 AS col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-8561
SELECT col0 * col1 / - tab0.col1 AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT ( col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT 26 AS col1 FROM tab0 AS cor0
----
26
26
26

query I rowsort
SELECT DISTINCT + + 99 AS col0 FROM tab0, tab2, tab0 AS cor0
----
99

query I rowsort
SELECT ALL + col1 * ( - col0 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - col0 * 20 * + 74 AS col0 FROM tab2
----
-10360
-115440
-116920

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 * - CAST ( + col0 AS REAL ) FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8568
SELECT - cor0.col0 + + col1 DIV col0 AS col1 FROM tab0 AS cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-8568
SELECT - cor0.col0 + + col1 / col0 AS col1 FROM tab0 AS cor0
----
-21
-33
-88

query I rowsort
SELECT - 97 + - col2 FROM tab2 AS cor0
----
-123
-124
-135

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8570
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8570
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 * 87 col0 FROM tab1 AS cor0
----
87
87
87

query I rowsort
SELECT ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + + col0 * - col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col2 * + col0 + col1 * - 9 FROM tab2 AS cor0
----
-90
1497
2849

onlyif mysql # use DIV operator for integer division
query I rowsort label-8575
SELECT + + col2 * col1 DIV col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8575
SELECT + + col2 * col1 / col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) AS col2 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + + 99 + + 64 AS col0 FROM tab1 AS cor0
----
163
163
163

query I rowsort
SELECT - cor0.col1 * - 38 * + col1 + - ( + col0 ) AS col0 FROM tab1 AS cor0
----
25685
3736
6342

query I rowsort
SELECT ALL - tab2.col2 * + col2 * - col0 AS col1 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT ALL - 75 * col2 AS col2 FROM tab2 AS cor0
----
-1950
-2025
-2850

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) + col0 * - col1 col2 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT ( col2 ) + cor0.col2 * 44 FROM tab0 AS cor0
----
1485
3690
45

query I rowsort
SELECT DISTINCT 44 AS col1 FROM tab2 AS cor0
----
44

query I rowsort
SELECT + ( col2 ) * - col0 + + 60 + - ( col2 ) * col1 FROM tab1 AS cor0
----
-1506
-4158
-8868

query I rowsort
SELECT DISTINCT + col2 + + 47 FROM tab2 AS cor0
----
73
74
85

query I rowsort
SELECT - + 42 * cor0.col1 + col1 AS col0 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT ALL - col0 - - 60 FROM tab2 cor0
----
-18
-19
53

query I rowsort
SELECT + col1 + - col1 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - col1 * ( + col0 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - col1 - + 33 AS col0 FROM tab1 AS cor0
----
-43
-46
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8591
SELECT + CAST( 14 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

skipif mysql # not compatible
query I rowsort label-8591
SELECT + CAST ( 14 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT DISTINCT col2 - + 48 AS col1 FROM tab2
----
-10
-21
-22

query I rowsort
SELECT col2 * + col2 + col2 * ( + col0 + - col2 * + cor0.col1 ) FROM tab2 AS cor0
----
-20102
-21681
-37180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 68 + - col0 * col0 col2 FROM tab1
----
-4028
-6332
59

query I rowsort
SELECT ALL - ( cor0.col0 ) * + col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col2 + 97 * - col1 AS col1 FROM tab0 cor0
----
-8309
-8745
-9408

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ( ( col2 ) ) + + col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT DISTINCT - ( 95 ) AS col1 FROM tab2 AS cor0
----
-95

query I rowsort
SELECT DISTINCT + 85 FROM tab0 AS cor0
----
85

query I rowsort
SELECT ALL + 55 AS col2 FROM tab1 cor0
----
55
55
55

query I rowsort
SELECT + - col1 + col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL - + ( col1 ) + - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + col1 * col0 + col0 * ( cor0.col0 ) FROM tab1 AS cor0
----
4736
7440
87

query I rowsort
SELECT - + col1 * col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8606
SELECT - ( col0 ) DIV + ( col0 ) AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8606
SELECT - ( col0 ) / + ( col0 ) AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 61 AS col2 FROM tab2 AS cor0
----
-61
-61
-61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8608
SELECT - - cor0.col2 - + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8608
SELECT - - cor0.col2 - + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 + col1 col1 FROM tab1 AS cor0
----
-4086
-6387
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 93 + col1 col0 FROM tab2 cor0
----
131
189
230

query I rowsort
SELECT DISTINCT - col1 + + 83 FROM tab1 AS cor0
----
57
70
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-8613
SELECT ALL + col0 DIV 62 + + col0 * col0 FROM tab2 AS cor0
----
49
6085
6242

skipif mysql # not compatible
query I rowsort label-8613
SELECT ALL + col0 / 62 + + col0 * col0 FROM tab2 AS cor0
----
49
6085
6242

onlyif mysql # use DIV operator for integer division
query I rowsort label-8614
SELECT + col0 * - CAST( col2 AS SIGNED ) DIV + col2 col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8614
SELECT + col0 * - CAST ( col2 AS INTEGER ) / + col2 col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL col1 + + col1 * + col0 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-8617
SELECT DISTINCT + + col0 + col1 DIV + 53 AS col1 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-8617
SELECT DISTINCT + + col0 + col1 / + 53 AS col1 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + col1 + ( + col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + + col1 * + col0 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - - cor0.col0 + cor0.col0 FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 22 col1 FROM tab0, tab2 AS cor0
----
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8622
SELECT DISTINCT - CAST( NULL AS DECIMAL ) FROM tab0, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8622
SELECT DISTINCT - CAST ( NULL AS REAL ) FROM tab0, tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8623
SELECT DISTINCT col1 DIV - col0 + col1 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-8623
SELECT DISTINCT col1 / - col0 + col1 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT ALL - col0 * - col1 + + col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + + col0 - + cor0.col0 * + 51 FROM tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT - col0 + cor0.col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - col1 * 75 + col0 AS col2 FROM tab1 AS cor0
----
-1947
-686
-895

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8628
SELECT DISTINCT + col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8628
SELECT DISTINCT + col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 * col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - - col0 + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col1 * - col2 + col1 * + col1 FROM tab2 AS cor0
----
-357
124
1947

query I rowsort
SELECT DISTINCT + + col1 + + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - - cor0.col2 * col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - 95 FROM tab2 AS cor0
----
-95
-95
-95

query I rowsort
SELECT + col0 + - col0 AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8636
SELECT ALL - - 88 DIV - col2 + - col2 AS col0 FROM tab1 AS cor0
----
-55
-58
-96

skipif mysql # not compatible
query I rowsort label-8636
SELECT ALL - - 88 / - col2 + - col2 AS col0 FROM tab1 AS cor0
----
-55
-58
-96

query I rowsort
SELECT DISTINCT + col2 + ( - col0 ) FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col2 * + ( 15 ) + col2 FROM tab1
----
1536
864
912

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT - 24 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

onlyif mysql # use DIV operator for integer division
query I rowsort label-8642
SELECT ALL + col0 * - col1 * - 4 + col0 DIV col2 FROM tab0 AS cor0
----
13615
32397
8256

skipif mysql # not compatible
query I rowsort label-8642
SELECT ALL + col0 * - col1 * - 4 + col0 / col2 FROM tab0 AS cor0
----
13615
32397
8256

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 * col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL + 9 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT DISTINCT + 69 + - col0 AS col2 FROM tab1 AS cor0
----
-11
5
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 * - col1 col0 FROM tab2 AS cor0
----
1612
3068
884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8647
SELECT DISTINCT + cor0.col2 + - cor0.col2 * - CAST( NULL AS SIGNED ) * col1 col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8647
SELECT DISTINCT + cor0.col2 + - cor0.col2 * - CAST ( NULL AS INTEGER ) * col1 col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 22 col2 FROM tab2 cor0
----
-22

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 ALL - ( col2 ) + - col0 AS col1 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT 81 + + col2 FROM tab0 cor0
----
114
163
82

query I rowsort
SELECT DISTINCT + 72 - - col0 * - 64 FROM tab2 cor0
----
-376
-4920
-4984

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab1
----
48

query I rowsort
SELECT ALL - ( + col1 ) AS col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + + 22 FROM tab0, tab1, tab0 AS cor0
----
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8656
SELECT col1 * tab2.col1 - + CAST( col0 AS SIGNED ) AS col0 FROM tab2
----
210
3403
954

skipif mysql # not compatible
query I rowsort label-8656
SELECT col1 * tab2.col1 - + CAST ( col0 AS INTEGER ) AS col0 FROM tab2
----
210
3403
954

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8657
SELECT - 21 * - col0 - CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8657
SELECT - 21 * - col0 - CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 50 AS col2 FROM tab0
----
50
50
50

query I rowsort
SELECT col0 + - tab2.col2 AS col1 FROM tab2
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 * + col1 col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - - 51 * - col0 FROM tab1 AS cor0
----
-153
-3264
-4080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - col2 col2 FROM tab0
----
53
9
96

query I rowsort
SELECT + col2 AS col0 FROM tab1 WHERE NULL > + col1 + col2
----

query III rowsort
SELECT ALL * FROM tab2 WHERE ( col0 ) BETWEEN NULL AND col0
----

query I rowsort
SELECT ALL - col1 + - col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT - tab1.col0 + - col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT DISTINCT col1 + + tab0.col1 * col1 AS col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT col1 + + col1 AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT + col0 + - tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - col2 - - col0 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT + col0 + col2 * - col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT col0 FROM tab1 WHERE NOT + col0 IN ( - tab1.col0 + col0 * + col0 * + col1 )
----
3
64
80

query I rowsort
SELECT ALL + - col1 * col1 + - ( + col1 ) AS col1 FROM tab2 AS cor0
----
-306
-3540
-992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8674
SELECT DISTINCT + col2 - + cor0.col2 * ( ( + col2 ) * + CAST( NULL AS SIGNED ) ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8674
SELECT DISTINCT + col2 - + cor0.col2 * ( ( + col2 ) * + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8675
SELECT col2 - col2 DIV 28 FROM tab0 AS cor0
----
1
32
80

skipif mysql # not compatible
query I rowsort label-8675
SELECT col2 - col2 / 28 FROM tab0 AS cor0
----
1
32
80

query I rowsort
SELECT + 96 - - col2 * - ( - col0 ) AS col1 FROM tab2 AS cor0
----
2124
285
3098

onlyif mysql # use DIV operator for integer division
query I rowsort label-8677
SELECT ALL + col2 DIV col2 - - col0 AS col1 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-8677
SELECT ALL + col2 / col2 - - col0 AS col1 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT - col0 * - col0 * + col2 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT DISTINCT 75 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
75

query I rowsort
SELECT - col0 * col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - - col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - tab2.col2 FROM tab2 WHERE NOT NULL <> - col1
----

query I rowsort
SELECT DISTINCT tab2.col2 * col0 + tab2.col2 * - tab2.col1 * col2 AS col0 FROM tab2
----
-21546
-22410
-37856

query I rowsort
SELECT col2 + - col2 * - col0 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT tab1.col0 + - col2 * + col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT ALL col1 + col1 AS col1 FROM tab0 AS cor0 WHERE + col2 * col2 NOT IN ( col0 * - col0 - + col2 )
----
172
182
194

query I rowsort
SELECT - cor0.col0 FROM tab0, tab0 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 AS cor0 WHERE NOT NULL = - col0
----

query I rowsort
SELECT DISTINCT col1 * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col0 = NULL
----

query I rowsort
SELECT DISTINCT col0 * - col2 - - col0 AS col0 FROM tab2 WHERE NOT ( NULL ) <> col1
----

query I rowsort
SELECT ALL + col2 + - col0 AS col1 FROM tab2
----
-41
-52
20

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) > col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8694
SELECT - col1 DIV - col1 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8694
SELECT - col1 / - col1 AS col1 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col2 col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col0 * - col0 + + tab0.col1 - col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT col2 + col2 * + col0 FROM tab2
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-8698
SELECT col1 DIV + col0 AS col1 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8698
SELECT col1 / + col0 AS col1 FROM tab0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col1 col0 FROM tab2
----
0

query I rowsort
SELECT col1 + col0 * col1 FROM tab2
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col0 FROM tab2 AS cor0
----
91
91
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-8702
SELECT - col0 DIV + col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8702
SELECT - col0 / + col1 AS col2 FROM tab0 cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 3a31dab513390ca6bd05c71a3d9c50f0

query I rowsort
SELECT ALL + + col1 * - col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT 11 + tab0.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f532b60e718adbc85a8c055884fb1b5

query I rowsort
SELECT ALL - 49 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT DISTINCT 26 * + col0 FROM tab1 AS cor0
----
1664
2080
78

query I rowsort
SELECT ALL + 80 * + col1 AS col1 FROM tab0
----
6880
7280
7760

query I rowsort
SELECT ALL col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - + col2 * col2 + - col0 FROM tab0 cor0
----
-1113
-36
-6813

query I rowsort
SELECT ALL - - 5 AS col1 FROM tab0 AS cor0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 52 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT + ( col0 ) - + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT 82 AS col0 FROM tab2
----
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 col0 FROM tab0
----
37
37
37

query I rowsort
SELECT ( - 57 + + col1 ) FROM tab2
----
-26
-40
2

query I rowsort
SELECT + col1 + + ( col0 ) AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col2 * col2 * col0 + + col2 FROM tab2 AS cor0
----
-114038
-5076
-52702

query I rowsort
SELECT col0 * col0 - - 44 FROM tab2 AS cor0
----
6128
6285
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 * col0 * - col2 col2 FROM tab2
----
103428
153102
9639

query I rowsort
SELECT 0 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + tab1.col1 - - 2 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 18e817b62724a9e6c343ab9a374e92bc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + - 21 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-21

query I rowsort
SELECT - col0 + + col1 * col2 + cor0.col0 * 79 FROM tab2 cor0
----
1383
6808
7618

query I rowsort
SELECT DISTINCT - col0 * col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT - col1 * ( col2 ) AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col0 + col1 AS col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + 22 + col2 FROM tab1 AS cor0
----
118
76
79

query I rowsort
SELECT - col1 * cor0.col2 - - 54 * 70 * col1 FROM tab1 AS cor0
----
37230
47892
96876

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8731
SELECT ALL + col2 * + col2 * CAST( NULL AS SIGNED ) + - col0 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8731
SELECT ALL + col2 * + col2 * CAST ( NULL AS INTEGER ) + - col0 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 22 * cor0.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 537e5885fc7fd0d75c6a2a51b2d0dd23

query I rowsort
SELECT DISTINCT - col1 - cor0.col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - - 80 FROM tab0 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT 6 + - col2 FROM tab1 AS cor0
----
-48
-51
-90

query I rowsort
SELECT ALL ( - col0 ) * - col2 - ( tab1.col0 ) AS col2 FROM tab1
----
159
3584
7600

query I rowsort
SELECT DISTINCT - col1 * ( col1 ) * + col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT + + col2 + + col1 * + col1 AS col1 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-8739
SELECT - cor0.col2 - col0 DIV col0 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-8739
SELECT - cor0.col2 - col0 / col0 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT ALL 10 AS col2 FROM tab1
----
10
10
10

query I rowsort
SELECT - 78 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to c4f3c63f98c3c08f2848f46850a476d4

query I rowsort
SELECT DISTINCT + col0 + - tab2.col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT tab0.col2 + col2 * + tab0.col1 FROM tab0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8744
SELECT + 19 DIV - col0 + 49 col0 FROM tab1 AS cor0
----
43
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8744
SELECT + 19 / - col0 + 49 col0 FROM tab1 AS cor0
----
43
49
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-8745
SELECT DISTINCT col1 + col0 - - col2 DIV - col1 AS col1 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-8745
SELECT DISTINCT col1 + col0 - - col2 / - col1 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT 73 * + col1 AS col0 FROM tab0
----
6278
6643
7081

query I rowsort
SELECT - 21 FROM tab1
----
-21
-21
-21

onlyif mysql # use DIV operator for integer division
query I rowsort label-8748
SELECT + col1 DIV - col1 AS col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8748
SELECT + col1 / - col1 AS col1 FROM tab0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8749
SELECT - 38 * + cor0.col1 + + col2 * CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
-826
3268
7186

skipif mysql # not compatible
query I rowsort label-8749
SELECT - 38 * + cor0.col1 + + col2 * CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
-826
3268
7186

query I rowsort
SELECT DISTINCT - 26 * - 69 AS col1 FROM tab0 AS cor0
----
1794

onlyif mysql # use DIV operator for integer division
query I rowsort label-8751
SELECT ALL - + 55 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8751
SELECT ALL - + 55 / col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT + + tab2.col0 AS col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2, tab0 AS cor0, tab1 AS cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT ALL + ( - 96 ) FROM tab1 AS cor0
----
-96
-96
-96

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col2 * col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT 63 + 74 FROM tab2 AS cor0
----
137
137
137

onlyif mysql # use DIV operator for integer division
query I rowsort label-8758
SELECT col1 DIV + ( col1 ) - tab2.col1 AS col2 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-8758
SELECT col1 / + ( col1 ) - tab2.col1 AS col2 FROM tab2
----
-16
-30
-58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8759
SELECT col0 - + CAST( NULL AS SIGNED ) * 38 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8759
SELECT col0 - + CAST ( NULL AS INTEGER ) * 38 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + + ( - col2 ) FROM tab0
----
53
9
96

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col1 col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
10
13
26

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8764
SELECT DISTINCT - CAST( + ( col0 ) AS SIGNED ) AS col1 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-8764
SELECT DISTINCT - CAST ( + ( col0 ) AS INTEGER ) AS col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + 16 AS col2 FROM tab2
----
16
16
16

query I rowsort
SELECT + col0 * - 38 + tab2.col0 FROM tab2
----
-259
-2886
-2923

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) * col0 + - ( + 59 ) * - col1 AS col2 FROM tab0 AS cor0
----
13290
5650
6948

query I rowsort
SELECT ALL + cor0.col2 * col0 FROM tab0 cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8769
SELECT DISTINCT CAST( cor0.col1 AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-8769
SELECT DISTINCT CAST ( cor0.col1 AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + - col0 * col0 * col2 + 11 * + col0 + + col0 FROM tab2 AS cor0
----
-1239
-157248
-236210

query I rowsort
SELECT + ( col2 ) + + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - cor0.col1 - + 90 * - col1 FROM tab1 AS cor0
----
1157
2314
890

query I rowsort
SELECT - col2 * 3 AS col1 FROM tab2 AS cor0
----
-114
-78
-81

query I rowsort
SELECT - + col0 * 73 + - col2 FROM tab0 AS cor0
----
-1785
-2556
-6579

query I rowsort
SELECT ALL + 49 FROM tab1
----
49
49
49

query I rowsort
SELECT tab2.col1 + + col1 * col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT + col1 * col2 AS col1 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8778
SELECT + col1 DIV col1 - col2 col0 FROM tab0
----
-32
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8778
SELECT + col1 / col1 - col2 col0 FROM tab0
----
-32
-81
0

query I rowsort
SELECT ALL - + 23 FROM tab2 cor0
----
-23
-23
-23

query I rowsort
SELECT DISTINCT - col0 * ( col2 * col1 ) AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL col2 * + col2 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-8782
SELECT ALL col1 + - col0 DIV col0 AS col1 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-8782
SELECT ALL col1 + - col0 / col0 AS col1 FROM tab0 cor0
----
85
90
96

query I rowsort
SELECT + - cor0.col2 * + col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col1 - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + - col1 + col2 + + 98 FROM tab0 cor0
----
2
45
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - cor0.col1 col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + cor0.col1 + cor0.col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col2 * - col1 * col2 AS col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL + ( - col0 ) + + col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT 85 * + col1 FROM tab0 AS cor0
----
7310
7735
8245

query I rowsort
SELECT DISTINCT + - col0 * + col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 * ( + col1 ) FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-8795
SELECT + col2 DIV col0 + col0 + col0 * - col2 FROM tab1 AS cor0
----
-141
-3584
-7599

skipif mysql # not compatible
query I rowsort label-8795
SELECT + col2 / col0 + col0 + col0 * - col2 FROM tab1 AS cor0
----
-141
-3584
-7599

query I rowsort
SELECT DISTINCT + col2 * + 0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - col0 * col1 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT col1 + - ( + col0 ) * + col1 * - col0 AS col2 FROM tab1 cor0
----
260
40970
83213

query I rowsort
SELECT ALL - col2 * + col2 + + col2 + - col1 AS col0 FROM tab1 AS cor0
----
-2888
-3202
-9133

query I rowsort
SELECT ALL - col1 + - col1 * ( - col1 ) FROM tab2 cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT col2 * ( - 51 ) AS col1 FROM tab1 AS cor0
----
-2754
-2907
-4896

onlyif mysql # use DIV operator for integer division
query I rowsort label-8802
SELECT + col0 + + col1 DIV - 85 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8802
SELECT + col0 + + col1 / - 85 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col1 * col2 * 55 + col2 + - col0 FROM tab1 AS cor0
----
-31357
-68624
-77169

query I rowsort
SELECT DISTINCT col2 + col1 + + col0 AS col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT - 97 * + col1 FROM tab2 AS cor0
----
-1649
-3007
-5723

query I rowsort
SELECT - ( - cor0.col0 ) * col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8807
SELECT DISTINCT + + col0 DIV col0 AS col2 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-8807
SELECT DISTINCT + + col0 / col0 AS col2 FROM tab0 cor0
----
1

query I rowsort
SELECT col0 + - col1 * + col1 FROM tab2 cor0
----
-210
-3403
-954

query I rowsort
SELECT DISTINCT col2 * + col1 AS col2 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8810
SELECT - col1 DIV - 29 FROM tab0 AS cor0
----
2
3
3

skipif mysql # not compatible
query I rowsort label-8810
SELECT - col1 / - 29 FROM tab0 AS cor0
----
2
3
3

query I rowsort
SELECT + col1 * 2 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - ( 64 ) AS col2 FROM tab2 AS cor0
----
-64

query I rowsort
SELECT + + ( col0 ) * + col1 * + 86 AS col1 FROM tab1 AS cor0
----
55040
6708
89440

query I rowsort
SELECT ( ( col1 ) ) * - col0 * col0 AS col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT 45 + cor0.col2 * - cor0.col2 FROM tab2 AS cor0
----
-1399
-631
-684

query I rowsort
SELECT ALL - col1 + + col2 + 3 FROM tab2
----
-1
-30
24

query I rowsort
SELECT col1 * 60 * col0 FROM tab1 AS cor0
----
38400
4680
62400

query I rowsort
SELECT ALL + col2 + col2 FROM tab1
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-8819
SELECT + col2 DIV 93 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8819
SELECT + col2 / 93 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - col2 + 57 FROM tab1 AS cor0
----
-39
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8822
SELECT + col0 * cor0.col0 * - 1 + + col0 DIV col2 AS col1 FROM tab0 AS cor0
----
-1190
-576
-7920

skipif mysql # not compatible
query I rowsort label-8822
SELECT + col0 * cor0.col0 * - 1 + + col0 / col2 AS col1 FROM tab0 AS cor0
----
-1190
-576
-7920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 col2 FROM tab2, tab0 AS cor0
----
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8824
SELECT DISTINCT - col1 * CAST( + 53 * - col1 AS SIGNED ) + - col0 * col0 AS col1 FROM tab1 AS cor0
----
1204
2557
35819

skipif mysql # not compatible
query I rowsort label-8824
SELECT DISTINCT - col1 * CAST ( + 53 * - col1 AS INTEGER ) + - col0 * col0 AS col1 FROM tab1 AS cor0
----
1204
2557
35819

query I rowsort
SELECT - cor0.col1 * - 4 + 5 AS col2 FROM tab0 AS cor0
----
349
369
393

query I rowsort
SELECT ALL - 52 + + col1 AS col0 FROM tab0
----
34
39
45

query I rowsort
SELECT DISTINCT + + 19 + + col2 FROM tab0 AS cor0
----
101
20
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8828
SELECT ALL 4 DIV col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8828
SELECT ALL 4 / col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( 17 ) AS col0 FROM tab0 cor0
----
17

query I rowsort
SELECT col0 * 3 AS col0 FROM tab0
----
105
267
72

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2
----
3645 values hashing to a05c004695d644bdc7d07542d29e2010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + col0 col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT tab2.col1 * 65 FROM tab2, tab0 cor0
----
9 values hashing to 39013cbc2b01c7afe2a236f2b862e670

query I rowsort
SELECT + 98 AS col1 FROM tab1 cor0
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col0 col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT - col1 * tab2.col2 AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col0 * - col2 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + 35 * + col2 FROM tab0
----
1155
2870
35

query I rowsort
SELECT + + 99 * col0 * + 76 + - col2 FROM tab2 AS cor0
----
52641
586846
594358

onlyif mysql # use DIV operator for integer division
query I rowsort label-8840
SELECT + - 34 DIV - cor0.col2 + + col0 + col0 * cor0.col0 FROM tab0 AS cor0
----
1294
601
8010

skipif mysql # not compatible
query I rowsort label-8840
SELECT + - 34 / - cor0.col2 + + col0 + col0 * cor0.col0 FROM tab0 AS cor0
----
1294
601
8010

query I rowsort
SELECT col2 * + ( col0 + + col2 * + tab1.col1 ) AS col2 FROM tab1
----
127488
36138
75978

query I rowsort
SELECT - - col1 + ( + col2 ) * col0 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col0 * - 60 * 99 FROM tab0 AS cor0
----
-142560
-207900
-528660

query I rowsort
SELECT DISTINCT - col1 + - 73 AS col2 FROM tab1 AS cor0
----
-83
-86
-99

query I rowsort
SELECT - ( 89 ) AS col1 FROM tab1 AS cor0
----
-89
-89
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8846
SELECT ALL col2 DIV col1 - + col2 AS col1 FROM tab1
----
-52
-52
-89

skipif mysql # not compatible
query I rowsort label-8846
SELECT ALL col2 / col1 - + col2 AS col1 FROM tab1
----
-52
-52
-89

query I rowsort
SELECT - 67 - + col2 FROM tab2 AS cor0
----
-105
-93
-94

query I rowsort
SELECT ALL 40 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8849
SELECT + 3 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8849
SELECT + 3 / col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 98 AS col2 FROM tab2 AS cor0
----
-98
-98
-98

query I rowsort
SELECT - 84 + col1 FROM tab2 AS cor0
----
-25
-53
-67

query I rowsort
SELECT ALL - 86 * + cor0.col0 FROM tab1 cor0
----
-258
-5504
-6880

query I rowsort
SELECT DISTINCT + 86 + + col1 FROM tab1 AS cor0
----
112
96
99

query I rowsort
SELECT - col1 + col0 - col1 AS col0 FROM tab0 AS cor0
----
-148
-159
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 17 col0 FROM tab2 AS cor0
----
-17
-17
-17

query I rowsort
SELECT 54 - - col0 FROM tab1 cor0
----
118
134
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8857
SELECT DISTINCT ( col1 ) DIV col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8857
SELECT DISTINCT ( col1 ) / col0 FROM tab0
----
1
2
3

query I rowsort
SELECT 6 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT - ( + col1 ) * - tab2.col0 * 81 AS col2 FROM tab2
----
108783
17577
372762

query I rowsort
SELECT tab0.col2 * col1 * col0 AS col1 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-8861
SELECT - CAST( 59 AS SIGNED ) DIV + col0 FROM tab1
----
-19
0
0

skipif mysql # not compatible
query I rowsort label-8861
SELECT - CAST ( 59 AS INTEGER ) / + col0 FROM tab1
----
-19
0
0

query I rowsort
SELECT ALL + cor0.col1 * 9 + col0 AS col1 FROM tab2 AS cor0
----
232
286
609

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8863
SELECT ALL - cor0.col0 + - CAST( + ( col0 ) * col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-196
-2106
-3081

skipif mysql # not compatible
query I rowsort label-8863
SELECT ALL - cor0.col0 + - CAST ( + ( col0 ) * col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL 71 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT ALL - + col2 + + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - + col0 + - col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL - 78 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c4f3c63f98c3c08f2848f46850a476d4

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT cor0.col2 + - 96 AS col2 FROM tab0 AS cor0
----
-14
-63
-95

query I rowsort
SELECT - col0 * + 89 FROM tab1 AS cor0
----
-267
-5696
-7120

query I rowsort
SELECT - + 44 * 28 FROM tab0 cor0
----
-1232
-1232
-1232

query I rowsort
SELECT ALL 3 AS col1 FROM tab1 cor0
----
3
3
3

query I rowsort
SELECT ALL - cor0.col1 * 20 FROM tab0 AS cor0
----
-1720
-1820
-1940

query I rowsort
SELECT DISTINCT + - 98 AS col1 FROM tab0 AS cor0
----
-98

query I rowsort
SELECT DISTINCT + + 93 * col0 FROM tab2 AS cor0
----
651
7254
7347

query I rowsort
SELECT - 4 AS col0 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT - + cor0.col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + + col1 * - cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 83 * + col0 FROM tab0 AS cor0
----
-1992
-2905
-7387

query I rowsort
SELECT DISTINCT 48 + col2 AS col1 FROM tab1 cor0
----
102
105
144

query I rowsort
SELECT - 7 - col1 FROM tab0 AS cor0
----
-104
-93
-98

query I rowsort
SELECT ALL - - 52 * + ( cor0.col1 ) * - 59 FROM tab1 AS cor0
----
-30680
-39884
-79768

query I rowsort
SELECT col2 + 56 * col2 FROM tab1 cor0
----
3078
3249
5472

query I rowsort
SELECT DISTINCT 92 + - col2 FROM tab2 AS cor0
----
54
65
66

query I rowsort
SELECT ALL + col0 * col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - 40 + col0 AS col1 FROM tab1 AS cor0
----
-37
24
40

query I rowsort
SELECT - ( col2 ) * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + 40 + cor0.col2 AS col2 FROM tab1 AS cor0
----
136
94
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8889
SELECT ALL + col0 DIV ( tab0.col1 + col0 * tab0.col1 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8889
SELECT ALL + col0 / ( tab0.col1 + col0 * tab0.col1 ) FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col0 col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col1 + ( + 99 ) AS col0 FROM tab2
----
116
130
158

query I rowsort
SELECT DISTINCT tab2.col1 * 55 AS col2 FROM tab2
----
1705
3245
935

query I rowsort
SELECT ( col2 ) + + ( cor0.col1 ) FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 61 + + col0 + + col1 * col2 col0 FROM tab2 cor0
----
1551
664
783

query I rowsort
SELECT ALL - col2 * - col2 + col1 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT + + col1 + + col2 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab1 AS cor0
----
19

query I rowsort
SELECT DISTINCT - + col0 + + col1 + 58 * 6 AS col0 FROM tab2 AS cor0
----
286
329
372

query I rowsort
SELECT + col0 * col0 + 31 AS col1 FROM tab0 AS cor0
----
1256
607
7952

query I rowsort
SELECT - 83 + - col2 AS col0 FROM tab1 AS cor0
----
-137
-140
-179

query I rowsort
SELECT DISTINCT - - 94 AS col1 FROM tab0 AS cor0
----
94

query I rowsort
SELECT + tab0.col1 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL + + 88 * col1 AS col0 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT col0 + + cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + 87 AS col1 FROM tab2 cor0
----
87
87
87

query I rowsort
SELECT DISTINCT - col2 + col2 * + col0 + - col0 * col1 FROM tab0 AS cor0
----
-1305
-3361
-883

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8907
SELECT ALL 10 + col2 * CAST( col0 AS SIGNED ) + col2 FROM tab0 cor0
----
46
7390
835

skipif mysql # not compatible
query I rowsort label-8907
SELECT ALL 10 + col2 * CAST ( col0 AS INTEGER ) + col2 FROM tab0 cor0
----
46
7390
835

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 55 * 79 col2 FROM tab1
----
4345
4345
4345

query I rowsort
SELECT ALL + col0 * tab1.col0 + col1 + col2 FROM tab1
----
4163
6509
89

query I rowsort
SELECT - 32 AS col1 FROM tab0 AS cor0
----
-32
-32
-32

query I rowsort
SELECT + 83 * col0 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT 31 + + col1 AS col1 FROM tab1 AS cor0
----
41
44
57

query I rowsort
SELECT col2 + col0 * 72 * col1 AS col0 FROM tab1 AS cor0
----
46137
5670
74976

query I rowsort
SELECT + - col2 + - 27 AS col2 FROM tab1 AS cor0
----
-123
-81
-84

query I rowsort
SELECT - 48 * col0 FROM tab1
----
-144
-3072
-3840

query I rowsort
SELECT - col0 + col0 * col0 AS col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT - col2 * 44 AS col0 FROM tab2 AS cor0
----
-1144
-1188
-1672

onlyif mysql # use DIV operator for integer division
query I rowsort label-8918
SELECT + col0 DIV col0 + col1 * - col0 * - col1 col1 FROM tab2 cor0
----
22832
271519
6728

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8918
SELECT + col0 / col0 + col1 * - col0 * - col1 col1 FROM tab2 cor0
----
22832
271519
6728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * 52 col0 FROM tab1 AS cor0
----
156
3328
4160

query I rowsort
SELECT col0 * - col2 + + col1 + - col2 * col0 AS col2 FROM tab0
----
-14505
-1498
27

query I rowsort
SELECT - 46 FROM tab0
----
-46
-46
-46

query I rowsort
SELECT col0 * col1 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 45 * col0 * col1 AS col1 FROM tab2
----
207090
60435
9765

query I rowsort
SELECT ALL 87 + - col1 AS col1 FROM tab1
----
61
74
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8925
SELECT - 14 + - col1 + + CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8925
SELECT - 14 + - col1 + + CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab1.col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT 97 + - col0 * col0 FROM tab0
----
-1128
-479
-7824

query I rowsort
SELECT + col2 + col1 - - 89 FROM tab0
----
187
208
262

query I rowsort
SELECT + col0 * - col1 + - col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT 75 AS col0 FROM tab2, tab1 AS cor0
----
75

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT ALL - tab1.col2 FROM tab1, tab1 cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 col2 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL + cor0.col1 - 62 AS col2 FROM tab0 cor0
----
24
29
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8935
SELECT ALL cor0.col1 * CAST( NULL AS SIGNED ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8935
SELECT ALL cor0.col1 * CAST ( NULL AS INTEGER ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - 13 + + ( - col0 ) AS col2 FROM tab2 AS cor0
----
84
936
948

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8937
SELECT col0 * CAST( NULL AS SIGNED ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8937
SELECT col0 * CAST ( NULL AS INTEGER ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * ( col2 ) AS col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL + col0 + col1 * col0 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - col1 * - 12 + ( col0 ) * + 12 AS col1 FROM tab0 AS cor0
----
1320
1584
2160

query I rowsort
SELECT + + cor0.col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + + col0 * 75 + - 57 FROM tab2 AS cor0
----
468
5793
5868

query I rowsort
SELECT - col1 * 45 + col0 + 76 FROM tab1
----
-1091
-310
-429

query I rowsort
SELECT - 98 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 9b0655947ad21e0b95a137a474fa6a1f

query I rowsort
SELECT - col0 + - 92 FROM tab1
----
-156
-172
-95

query I rowsort
SELECT ( - col0 * - col0 ) FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT + 7 - col1 * + col2 AS col2 FROM tab1
----
-1241
-1397
-563

query I rowsort
SELECT DISTINCT + + col0 * cor0.col0 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8949
SELECT + ( 97 ) DIV - col1 - + col1 * + col0 FROM tab1 AS cor0
----
-1047
-649
-81

skipif mysql # not compatible
query I rowsort label-8949
SELECT + ( 97 ) / - col1 - + col1 * + col0 FROM tab1 AS cor0
----
-1047
-649
-81

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 69 AS REAL ) * col0 * + col0 AS col0 FROM tab1 AS cor0
----
282624
441600
621

query I rowsort
SELECT DISTINCT + - col1 * - 29 + + col0 AS col2 FROM tab2 AS cor0
----
1789
572
906

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 23 * col1 col0 FROM tab2 cor0
----
105846
30889
4991

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col1 + col1 col0 FROM tab1
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 + 40 col2 FROM tab0
----
-42
39
7

query I rowsort
SELECT - - cor0.col2 * - 66 + - col0 + - 64 FROM tab1 AS cor0
----
-3631
-3890
-6480

query I rowsort
SELECT + 50 FROM tab1 cor0
----
50
50
50

query I rowsort
SELECT ALL + - col1 + - col0 - col2 AS col1 FROM tab0 AS cor0
----
-133
-143
-262

query I rowsort
SELECT DISTINCT col2 * - col1 + - col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT + 17 * + col1 + + ( - 9 ) FROM tab2 AS cor0
----
280
518
994

query I rowsort
SELECT DISTINCT + col0 - col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT 92 FROM tab2, tab2 cor0, tab1 AS cor1
----
92

query I rowsort
SELECT ALL - - cor0.col0 * col2 + + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 * cor0.col2 col1 FROM tab2 cor0
----
2054
2133
3002

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT DISTINCT + 25 * cor0.col1 + - ( 98 ) AS col0 FROM tab1, tab2 cor0 CROSS JOIN tab2 cor1
----
1377
327
677

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8966
SELECT ALL + + col2 + col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8966
SELECT ALL + + col2 + col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8967
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * + 7 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8967
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * + 7 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 + 53 AS col2 FROM tab0 AS cor0
----
135
54
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-8969
SELECT 41 DIV col2 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8969
SELECT 41 / col2 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col0 col2 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col1 AS REAL ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - 20 FROM tab2, tab2 AS cor0
----
9 values hashing to f1cccb95c90889319e7a51e4ae9475bb

query I rowsort
SELECT DISTINCT - col2 * 68 + col1 FROM tab2 AS cor0
----
-1709
-1805
-2567

query I rowsort
SELECT ALL - 13 - - col0 AS col1 FROM tab0 cor0
----
11
22
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8975
SELECT CAST( - col0 AS SIGNED ) + + col2 * col1 FROM tab1 cor0
----
1168
1401
506

skipif mysql # not compatible
query I rowsort label-8975
SELECT CAST ( - col0 AS INTEGER ) + + col2 * col1 FROM tab1 cor0
----
1168
1401
506

query I rowsort
SELECT + - 56 * col2 + col2 * 32 FROM tab0 AS cor0
----
-1968
-24
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8977
SELECT col2 DIV + tab0.col1 + tab0.col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8977
SELECT col2 / + tab0.col1 + tab0.col1 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8978
SELECT + + CAST( NULL AS DECIMAL ) * - col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8978
SELECT + + CAST ( NULL AS REAL ) * - col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 85 ) * - col2 + - col0 * ( col1 ) col1 FROM tab0 AS cor0
----
-15069
-3480
-4869

query I rowsort
SELECT - col1 + - cor0.col1 * + col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT 94 AS col2 FROM tab1 AS cor0
----
94
94
94

query I rowsort
SELECT - + 44 FROM tab1 AS cor0
----
-44
-44
-44

query I rowsort
SELECT - 90 * 92 AS col0 FROM tab2
----
-8280
-8280
-8280

query I rowsort
SELECT + col0 * ( + col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + col2 * 70 AS col0 FROM tab0 AS cor0
----
2310
5740
70

query I rowsort
SELECT DISTINCT + col0 - - col1 * + 34 FROM tab1
----
404
522
887

onlyif mysql # use DIV operator for integer division
query I rowsort label-8988
SELECT col0 DIV - col2 AS col1 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8988
SELECT col0 / - col2 AS col1 FROM tab0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8989
SELECT DISTINCT col1 DIV - col0 + 58 AS col1 FROM tab0 cor0
----
55
56
57

skipif mysql # not compatible
query I rowsort label-8989
SELECT DISTINCT col1 / - col0 + 58 AS col1 FROM tab0 cor0
----
55
56
57

query I rowsort
SELECT DISTINCT col0 * + col1 + col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8991
SELECT - col0 - + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-8991
SELECT - col0 - + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-8992
SELECT DISTINCT - + col2 DIV + col0 - col1 AS col2 FROM tab0 cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-8992
SELECT DISTINCT - + col2 / + col0 - col1 AS col2 FROM tab0 cor0
----
-87
-91
-97

query I rowsort
SELECT DISTINCT col0 + 91 FROM tab0 cor0
----
115
126
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-8994
SELECT + tab1.col2 DIV tab1.col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8994
SELECT + tab1.col2 / tab1.col1 FROM tab1
----
2
5
7

query I rowsort
SELECT - 50 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

query I rowsort
SELECT ALL + - col1 * + col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + - ( col2 ) * col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8998
SELECT col2 + + ( - 13 ) DIV - col1 AS col1 FROM tab1
----
54
58
97

skipif mysql # not compatible
query I rowsort label-8998
SELECT col2 + + ( - 13 ) / - col1 AS col1 FROM tab1
----
54
58
97

query I rowsort
SELECT DISTINCT - col2 * + col0 * + tab1.col1 + col1 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT ( col1 ) - col1 FROM tab2
----
0
0
0

query I rowsort
SELECT 6 * col0 - col1 FROM tab0 AS cor0
----
113
443
58

query I rowsort
SELECT + col2 * 57 - - col0 * col1 * col1 AS col1 FROM tab2 cor0
----
24997
273000
8266

query I rowsort
SELECT 91 * col2 AS col2 FROM tab2 AS cor0
----
2366
2457
3458

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9004
SELECT DISTINCT - ( col1 ) * - CAST( col2 AS SIGNED ) * - col1 AS col0 FROM tab2
----
-10982
-25947
-90506

skipif mysql # not compatible
query I rowsort label-9004
SELECT DISTINCT - ( col1 ) * - CAST ( col2 AS INTEGER ) * - col1 AS col0 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT ALL tab1.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT - ( - tab0.col2 ) FROM tab0
----
1
33
82

query I rowsort
SELECT - 6 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
-144
-210
-534

query I rowsort
SELECT + + 82 AS col0 FROM tab1 AS cor0
----
82
82
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9010
SELECT + col2 * CAST( 53 AS SIGNED ) FROM tab2 AS cor0
----
1378
1431
2014

skipif mysql # not compatible
query I rowsort label-9010
SELECT + col2 * CAST ( 53 AS INTEGER ) FROM tab2 AS cor0
----
1378
1431
2014

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab2 AS cor0, tab1 cor1
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

query I rowsort
SELECT + - col2 + col0 * col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL - col0 + - 55 AS col1 FROM tab2 AS cor0
----
-133
-134
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9014
SELECT ALL + col2 + col2 * - 64 * 54 + - col0 DIV - tab0.col1 AS col2 FROM tab0
----
-114015
-283310
-3455

skipif mysql # not compatible
query I rowsort label-9014
SELECT ALL + col2 + col2 * - 64 * 54 + - col0 / - tab0.col1 AS col2 FROM tab0
----
-114015
-283310
-3455

query I rowsort
SELECT ALL - 76 * - col1 * 66 + + col1 AS col1 FROM tab1
----
130442
50170
65221

query I rowsort
SELECT + - col1 + + 36 * col0 FROM tab1 AS cor0
----
2294
2867
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * ( col2 ) col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - col2 + + 47 * col1 FROM tab0 AS cor0
----
4009
4195
4558

query I rowsort
SELECT + + col1 * + col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL col1 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9021
SELECT ALL - col2 + - col0 DIV + cor0.col2 FROM tab1 AS cor0
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-9021
SELECT ALL - col2 + - col0 / + cor0.col2 FROM tab1 AS cor0
----
-54
-58
-96

query I rowsort
SELECT DISTINCT 49 AS col0 FROM tab1, tab1 AS cor0
----
49

query I rowsort
SELECT ALL col1 + 99 AS col0 FROM tab0 cor0
----
185
190
196

query I rowsort
SELECT ALL - col0 * ( - 86 ) FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT DISTINCT - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ( + col2 ) * col0 * col0 + 26 FROM tab2
----
1349
158210
237184

query I rowsort
SELECT DISTINCT tab0.col1 * - col2 + col2 * col1 AS col1 FROM tab0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9028
SELECT ALL + col1 + - ( col2 ) + CAST( - col0 + col2 AS SIGNED ) FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-9028
SELECT ALL + col1 + - ( col2 ) + CAST ( - col0 + col2 AS INTEGER ) FROM tab0
----
2
62
62

query I rowsort
SELECT ALL - ( + col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col0 * col2 + - col0 AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT col1 + + col0 - col0 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col0 * + col0 + col1 * - 79 FROM tab0 AS cor0
----
-15110
-7370
-8888

query I rowsort
SELECT - col1 + + col1 * col2 + - col1 FROM tab2 AS cor0
----
1416
612
775

onlyif mysql # use DIV operator for integer division
query I rowsort label-9034
SELECT ALL + col0 DIV + col0 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9034
SELECT ALL + col0 / + col0 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 + col1 col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL - 13 AS col1 FROM tab0 AS cor0
----
-13
-13
-13

query I rowsort
SELECT ALL - - col1 AS col0 FROM tab1 cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9038
SELECT ALL + cor0.col0 DIV - col1 + col1 - cor0.col0 * + col2 FROM tab0 AS cor0
----
-706
-7207
62

skipif mysql # not compatible
query I rowsort label-9038
SELECT ALL + cor0.col0 / - col1 + col1 - cor0.col0 * + col2 FROM tab0 AS cor0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 + + col0 col2 FROM tab0 AS cor0
----
-31
-42
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 * - cor0.col2 col1 FROM tab2 AS cor0
----
-2366
-2457
-3458

query I rowsort
SELECT ALL + - col2 + col2 * - col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - + 86 * + col0 - + col2 AS col1 FROM tab2 AS cor0
----
-629
-6734
-6832

onlyif mysql # use DIV operator for integer division
query I rowsort label-9043
SELECT col0 DIV - cor0.col2 + + ( cor0.col0 ) * + col2 FROM tab1 AS cor0
----
162
3647
7680

skipif mysql # not compatible
query I rowsort label-9043
SELECT col0 / - cor0.col2 + + ( cor0.col0 ) * + col2 FROM tab1 AS cor0
----
162
3647
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 38 AS col0 FROM tab0 AS cor0
----
-38

query I rowsort
SELECT DISTINCT - ( - col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - 19 + cor0.col0 * - cor0.col0 + col2 * - col1 * col2 AS col1 FROM tab0 AS cor0
----
-1341
-619824
-94249

query I rowsort
SELECT DISTINCT + col1 * + col1 + - 30 AS col0 FROM tab2 cor0
----
259
3451
931

query I rowsort
SELECT ALL 30 * - col2 * + tab0.col1 FROM tab0
----
-223860
-2910
-85140

query I rowsort
SELECT - tab1.col0 AS col2 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1, tab1 cor0
----
10
13
26

query I rowsort
SELECT - + col2 + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-9053
SELECT - - col1 DIV + col1 - col1 FROM tab1 cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-9053
SELECT - - col1 / + col1 - col1 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT ALL + + 66 + - col1 AS col0 FROM tab1 AS cor0
----
40
53
56

query I rowsort
SELECT DISTINCT - - ( col0 ) * - cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - - cor0.col1 + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + - col0 - - col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL + + 25 * col1 FROM tab0 AS cor0
----
2150
2275
2425

onlyif mysql # use DIV operator for integer division
query I rowsort label-9059
SELECT col1 * - col0 DIV col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-9059
SELECT col1 * - col0 / col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL 65 FROM tab0, tab2 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT 80 + col1 AS col0 FROM tab1 AS cor0
----
106
90
93

query I rowsort
SELECT DISTINCT + + 74 * col1 FROM tab2 AS cor0
----
1258
2294
4366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col0 + col2 - cor0.col2 col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9064
SELECT - col2 * + cor0.col0 + + CAST( NULL AS SIGNED ) - 14 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9064
SELECT - col2 * + cor0.col0 + + CAST ( NULL AS INTEGER ) - 14 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 80 + - col1 col2 FROM tab1
----
-106
-90
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9066
SELECT - - col2 * col1 DIV col0 col1 FROM tab0 AS cor0
----
118
2
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9066
SELECT - - col2 * col1 / col0 col1 FROM tab0 AS cor0
----
118
2
83

query I rowsort
SELECT col1 * 68 + col0 + - col2 * + ( - col0 * col1 ) AS col1 FROM tab0 cor0
----
10026
670395
73984

query I rowsort
SELECT - - cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - tab0.col1 * + ( 20 ) AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 30116bcace0de97104b5f731073070dd

query I rowsort
SELECT DISTINCT + col1 + - tab1.col1 FROM tab1
----
0

query I rowsort
SELECT - col1 * - col1 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 5 + + tab0.col0 + + col0 col1 FROM tab0
----
173
43
65

query I rowsort
SELECT cor0.col1 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT + + cor0.col0 * col2 + + col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT ( ( col2 ) ) - + 23 * col1 FROM tab1 AS cor0
----
-173
-203
-544

query I rowsort
SELECT ( 32 ) * col1 * col1 FROM tab0 AS cor0
----
236672
264992
301088

query I rowsort
SELECT + - ( col1 ) + - cor0.col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT cor0.col0 - - 27 FROM tab2 AS cor0
----
105
106
34

query I rowsort
SELECT - + 74 FROM tab1 cor0
----
-74
-74
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-9080
SELECT ALL - col0 DIV col2 + cor0.col1 * - ( col0 ) + col1 FROM tab1 AS cor0
----
-1027
-52
-631

skipif mysql # not compatible
query I rowsort label-9080
SELECT ALL - col0 / col2 + cor0.col1 * - ( col0 ) + col1 FROM tab1 AS cor0
----
-1027
-52
-631

query I rowsort
SELECT ALL + ( - 90 ) + col1 FROM tab0 AS cor0
----
-4
1
7

query I rowsort
SELECT DISTINCT - cor0.col2 - 65 FROM tab2 AS cor0
----
-103
-91
-92

query I rowsort
SELECT ALL col2 * 55 AS col0 FROM tab0
----
1815
4510
55

query I rowsort
SELECT col1 * - tab1.col0 * + col1 + col2 FROM tab1
----
-13424
-1974
-6343

query I rowsort
SELECT DISTINCT - ( col1 ) * col2 + + col2 AS col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT ALL + col2 + - tab0.col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - 60 + + 39 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
2436
3060
57

query I rowsort
SELECT ALL + 12 * - col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-758
-947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col0 * + col1 + + cor0.col2 + ( - col1 ) * - col1 FROM tab2 cor0
----
1205
1670
8109

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9091
SELECT DISTINCT ( 2 ) * - col0 * + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9091
SELECT DISTINCT ( 2 ) * - col0 * + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 67 + col0 col2 FROM tab1 AS cor0
----
-3
-64
13

query I rowsort
SELECT DISTINCT 8 * tab2.col1 FROM tab2, tab0 AS cor0
----
136
248
472

query I rowsort
SELECT col2 * + col1 * col1 + - col1 FROM tab2
----
10965
25916
90447

query I rowsort
SELECT + col2 * tab1.col2 + col2 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT ALL + col2 * + col2 * tab1.col0 + col2 AS col2 FROM tab1
----
207993
737376
8802

query I rowsort
SELECT col2 FROM tab2 WHERE NULL <= col2 * col2
----

query I rowsort
SELECT + tab2.col1 * col1 + col2 FROM tab2
----
327
3507
988

query I rowsort
SELECT col2 - + col2 * col2 AS col1 FROM tab0 cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL col1 * col2 + tab1.col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT DISTINCT + col1 + col0 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL tab1.col2 + + col2 + + col2 * - col2 FROM tab1
----
-2808
-3135
-9024

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL BETWEEN ( + col2 ) AND ( - col1 * + col2 - + col0 )
----

query I rowsort
SELECT DISTINCT col0 + - col0 + col2 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT + col2 * - col0 - col2 FROM tab0
----
-36
-7380
-825

onlyif mysql # use DIV operator for integer division
query I rowsort label-9106
SELECT + col1 DIV + col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9106
SELECT + col1 / + col1 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 * col0 + - col0 + + col2 AS col2 FROM tab1
----
4089
60
6416

query I rowsort
SELECT + col2 + col0 - + col2 * tab2.col1 FROM tab2
----
-1430
-529
-803

query I rowsort
SELECT DISTINCT - col2 * + tab1.col2 FROM tab1
----
-2916
-3249
-9216

query III rowsort
SELECT * FROM tab2 WHERE NULL <= ( + col2 )
----

query I rowsort
SELECT col2 * col2 + col1 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT DISTINCT col2 * tab0.col1 + - col1 AS col0 FROM tab0
----
0
2752
7371

query I rowsort
SELECT + tab0.col0 * - col2 AS col0 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 + - col2 col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT col0 * + col0 + col0 * + col0 FROM tab1
----
12800
18
8192

query III rowsort
SELECT * FROM tab0 WHERE NOT ( + col1 + col1 ) NOT BETWEEN ( NULL ) AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col2 col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - col1 + col1 AS col1 FROM tab2 WHERE NULL IN ( - col2 / col1 - + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 * col1 col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9120
SELECT col2 DIV col2 + + tab0.col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9120
SELECT col2 / col2 + + tab0.col0 FROM tab0
----
25
36
90

query I rowsort
SELECT ALL + col0 * + col1 AS col0 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - tab0.col1 col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT col1 * - col2 * col1 + col2 AS col0 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT col1 * col0 * - tab1.col0 FROM tab1
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-9125
SELECT ALL + cor0.col2 DIV cor0.col1 + col1 AS col0 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-9125
SELECT ALL + cor0.col2 / cor0.col1 + col1 AS col0 FROM tab2 AS cor0
----
19
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9126
SELECT ALL tab0.col2 DIV tab0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-9126
SELECT ALL tab0.col2 / tab0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * + cor0.col2 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 + + col1 AS col0 FROM tab2 WHERE col0 + - col1 * + col2 <> + col2
----
55
58
85

query I rowsort
SELECT - col2 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE + col0 IN ( - col1 - col0 ) OR NOT col1 - col0 NOT BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9132
SELECT - - col2 + col1 DIV col1 AS col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-9132
SELECT - - col2 + col1 / col1 AS col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + cor0.col2 col2 FROM tab1 cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * + col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + cor0.col1 * + 66 + col2 AS col0 FROM tab1 AS cor0
----
1770
717
954

query I rowsort
SELECT DISTINCT - ( + col2 ) AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT col0 * - 49 AS col0 FROM tab2 AS cor0
----
-343
-3822
-3871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col2 col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT 42 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
42

query I rowsort
SELECT 49 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT DISTINCT - 98 * col0 AS col2 FROM tab1 AS cor0
----
-294
-6272
-7840

query I rowsort
SELECT - - 47 + 83 AS col1 FROM tab2 AS cor0
----
130
130
130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 - - col0 col1 FROM tab0 AS cor0
----
101
112
166

query I rowsort
SELECT DISTINCT - + col1 + 11 AS col1 FROM tab2 AS cor0
----
-20
-48
-6

query I rowsort
SELECT ALL - 99 FROM tab0, tab1 AS cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9148
SELECT - CAST( col2 AS SIGNED ) - col0 FROM tab2 AS cor0
----
-104
-117
-34

skipif mysql # not compatible
query I rowsort label-9148
SELECT - CAST ( col2 AS INTEGER ) - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - col2 * 47 * 90 AS col1 FROM tab0
----
-139590
-346860
-4230

query I rowsort
SELECT DISTINCT - cor0.col0 - col0 * 73 * 16 AS col0 FROM tab1 AS cor0
----
-3507
-74816
-93520

query I rowsort
SELECT + col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL BETWEEN + tab0.col2 * col1 AND + col1 * tab0.col0
----

query I rowsort
SELECT ALL 93 FROM tab0 AS cor0
----
93
93
93

query III rowsort
SELECT * FROM tab0 WHERE NOT - col2 >= ( + col0 - col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT col0 * col0 * col2 - - col1 * tab2.col1 FROM tab2
----
161665
2284
237447

query I rowsort
SELECT DISTINCT tab1.col0 * col0 + + col2 * col2 FROM tab1
----
15616
2925
7345

query I rowsort
SELECT - col1 + tab2.col0 FROM tab2
----
-24
19
62

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col0 IN ( col2 * + col2 )
----

query I rowsort
SELECT DISTINCT col2 * col0 + - col0 * tab1.col0 FROM tab1
----
-448
1280
153

query I rowsort
SELECT DISTINCT 32 * col0 + 16 FROM tab0
----
1136
2864
784

query I rowsort
SELECT col1 - + col2 * ( + 61 + - col1 ) AS col2 FROM tab2
----
-1655
-779
7

query I rowsort
SELECT ALL ( col0 ) * col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9163
SELECT ALL + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9163
SELECT ALL + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9164
SELECT DISTINCT - col2 + + col1 * + cor0.col1 DIV - cor0.col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-9164
SELECT DISTINCT - col2 + + col1 * + cor0.col1 / - cor0.col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9165
SELECT ALL CAST( ( + col1 ) AS SIGNED ) * col2 AS col0 FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-9165
SELECT ALL CAST ( ( + col1 ) AS INTEGER ) * col2 AS col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT tab0.col1 * tab0.col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT col1 + 85 FROM tab0
----
171
176
182

query I rowsort
SELECT + 62 * + 40 * + col1 AS col1 FROM tab0
----
213280
225680
240560

query I rowsort
SELECT 8 + col1 AS col1 FROM tab1
----
18
21
34

query I rowsort
SELECT DISTINCT col2 + tab0.col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + ( 91 ) * - col1 + - col0 AS col0 FROM tab0
----
-7850
-8370
-8862

onlyif mysql # use DIV operator for integer division
query I rowsort label-9172
SELECT + col1 * - tab1.col2 - - tab1.col1 DIV - CAST( col2 AS SIGNED ) FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-9172
SELECT + col1 * - tab1.col2 - - tab1.col1 / - CAST ( col2 AS INTEGER ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - 29 + 80 FROM tab1
----
51
51
51

query I rowsort
SELECT + tab1.col0 * col0 AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col1 * - 84 - - col0 FROM tab0
----
-7200
-7555
-8113

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9176
SELECT CAST( + col1 AS SIGNED ) AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-9176
SELECT CAST ( + col1 AS INTEGER ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT - 99 AS col0 FROM tab1
----
-99
-99
-99

query I rowsort
SELECT DISTINCT - + 88 * + col1 - col0 AS col0 FROM tab1 AS cor0
----
-1224
-2291
-944

query I rowsort
SELECT + col1 * + col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9180
SELECT ALL ( 9 ) + col2 * - CAST( + cor0.col1 AS SIGNED ) FROM tab1 AS cor0
----
-1239
-1395
-561

skipif mysql # not compatible
query I rowsort label-9180
SELECT ALL ( 9 ) + col2 * - CAST ( + cor0.col1 AS INTEGER ) FROM tab1 AS cor0
----
-1239
-1395
-561

query I rowsort
SELECT ALL - col1 + + col1 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT col1 * - col0 * - 48 + - col1 FROM tab1
----
30710
3718
49907

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9183
SELECT DISTINCT - CAST( 57 AS SIGNED ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-57

skipif mysql # not compatible
query I rowsort label-9183
SELECT DISTINCT - CAST ( 57 AS INTEGER ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-57

query I rowsort
SELECT + ( col0 ) * 94 AS col2 FROM tab2 AS cor0
----
658
7332
7426

query I rowsort
SELECT + col1 - - ( 10 ) FROM tab0 AS cor0
----
101
107
96

query I rowsort
SELECT ALL - - col0 * - col2 - cor0.col1 * + col1 AS col0 FROM tab0 cor0
----
-15579
-8188
-9444

query I rowsort
SELECT - col0 * + col1 + + 93 AS col1 FROM tab2 AS cor0
----
-124
-1250
-4509

query I rowsort
SELECT DISTINCT tab0.col0 + + col1 FROM tab0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9189
SELECT DISTINCT + + col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9189
SELECT DISTINCT + + col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 - 74 FROM tab1 AS cor0
----
-48
-61
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-9191
SELECT ALL - - col1 DIV 44 AS col1 FROM tab0 AS cor0
----
1
2
2

skipif mysql # not compatible
query I rowsort label-9191
SELECT ALL - - col1 / 44 AS col1 FROM tab0 AS cor0
----
1
2
2

query I rowsort
SELECT ALL col2 * + ( cor0.col1 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + - col0 * - col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9194
SELECT DISTINCT + + col1 DIV col0 AS col1 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-9194
SELECT DISTINCT + + col1 / col0 AS col1 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT DISTINCT + - col0 + col0 * col0 * + col0 FROM tab1 AS cor0
----
24
262080
511920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + ( + col2 ) col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 + ( + cor0.col1 ) AS col2 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT - col2 * 10 AS col0 FROM tab2 AS cor0
----
-260
-270
-380

query I rowsort
SELECT ALL col2 * + col2 * + cor0.col2 + - cor0.col2 FROM tab1 AS cor0
----
157410
185136
884640

query I rowsort
SELECT - col0 * - 55 * col1 FROM tab0 AS cor0
----
113520
186725
445445

query I rowsort
SELECT ALL + - col1 * + col0 - - 60 FROM tab1 AS cor0
----
-18
-580
-980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9202
SELECT - col0 * CAST( NULL AS SIGNED ) + 41 / + col2 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9202
SELECT - col0 * CAST ( NULL AS INTEGER ) + 41 / + col2 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * 74 FROM tab0
----
6364
6734
7178

query I rowsort
SELECT ALL + tab2.col2 * + 10 AS col2 FROM tab2
----
260
270
380

query I rowsort
SELECT col0 + - 88 * - col0 FROM tab2
----
623
6942
7031

query I rowsort
SELECT DISTINCT cor0.col1 * - ( - 4 ) + col0 * 17 FROM tab2 AS cor0
----
1411
1562
243

query I rowsort
SELECT ALL col2 * + ( cor0.col2 ) + - col0 AS col0 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT DISTINCT + cor0.col2 * ( - col0 ) AS col1 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9209
SELECT + 50 + cor0.col1 DIV + col2 FROM tab1 AS cor0
----
50
50
50

skipif mysql # not compatible
query I rowsort label-9209
SELECT + 50 + cor0.col1 / + col2 FROM tab1 AS cor0
----
50
50
50

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - 35 - col2 AS col0 FROM tab0 AS cor0
----
-117
-36
-68

query I rowsort
SELECT ALL + ( col1 ) * col0 + + 65 + col1 * col0 FROM tab2 AS cor0
----
2751
499
9269

query I rowsort
SELECT + col1 * col2 - - cor0.col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + + col1 + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9215
SELECT col0 DIV col1 + col1 col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9215
SELECT col0 / col1 + col1 col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + - col2 * col2 * col2 - col2 AS col2 FROM tab1 AS cor0
----
-157518
-185250
-884832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9217
SELECT + CAST( NULL AS SIGNED ) + - col1 + cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9217
SELECT + CAST ( NULL AS INTEGER ) + - col1 + cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT ( - 50 ) * - col2 AS col1 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT ALL + + 5 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT DISTINCT - ( col0 ) * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - col1 + + col0 + col2 FROM tab0 cor0
----
-29
-61
80

query I rowsort
SELECT ALL + - col0 * 39 * cor0.col0 FROM tab2 AS cor0
----
-1911
-237276
-243399

query I rowsort
SELECT ALL - col0 - + col0 * + col2 AS col0 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT tab1.col2 * + col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT col1 + ( - col1 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * + 59 + + col1 + - col1 * - col1 AS col0 FROM tab0 AS cor0
----
11571
13623
8898

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 + col0 - + 46 col0 FROM tab2 AS cor0
----
322
3513
922

query I rowsort
SELECT DISTINCT - + 10 + + col2 AS col0 FROM tab1 AS cor0
----
44
47
86

query I rowsort
SELECT DISTINCT + col0 * + cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-9231
SELECT + col2 DIV - col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9231
SELECT + col2 / - col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT - - 20 * col0 FROM tab1 cor0
----
1280
1600
60

query I rowsort
SELECT ALL 44 FROM tab2 cor0
----
44
44
44

query I rowsort
SELECT DISTINCT + col2 + + cor0.col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT ALL - + col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + col1 * - col2 + ( - ( col2 ) ) FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT ( col2 ) + + col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL 95 AS col0 FROM tab2 AS cor0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 57 col0 FROM tab2 AS cor0
----
57

query I rowsort
SELECT ALL - - 47 + - col2 FROM tab0 AS cor0
----
-35
14
46

query I rowsort
SELECT DISTINCT + cor0.col0 * + col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + - col2 * + ( col1 ) + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT ( cor1.col1 ) AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
10
13
26

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 6 AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

query I rowsort
SELECT + - 45 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 71160abf09589695379a70558726f0ba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col0 FROM tab2, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + + 55 AS col2 FROM tab2 AS cor0
----
55
55
55

query I rowsort
SELECT + + 57 AS col1 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT - 86 AS col2 FROM tab0
----
-86
-86
-86

query I rowsort
SELECT DISTINCT ( tab1.col2 * col2 ) AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT 29 AS col0 FROM tab1
----
29

query I rowsort
SELECT + 73 * - col1 + ( + col2 ) * cor0.col2 FROM tab1 cor0
----
1018
2519
8267

query I rowsort
SELECT - tab0.col0 * + col1 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT - ( + col2 ) FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + col2 - col0 FROM tab1 cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9256
SELECT - col2 * CAST( col2 * + col2 AS SIGNED ) FROM tab0
----
-1
-35937
-551368

skipif mysql # not compatible
query I rowsort label-9256
SELECT - col2 * CAST ( col2 * + col2 AS INTEGER ) FROM tab0
----
-1
-35937
-551368

onlyif mysql # use DIV operator for integer division
query I rowsort label-9257
SELECT DISTINCT col2 DIV ( col1 ) col2 FROM tab1
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9257
SELECT DISTINCT col2 / ( col1 ) col2 FROM tab1
----
2
5
7

query I rowsort
SELECT - col0 + + 54 FROM tab0 AS cor0
----
-35
19
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col0 * col0 + - ( + col2 ) AS col2 FROM tab2 AS cor0
----
-6110
-6279
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-9261
SELECT + col1 DIV CAST( - col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9261
SELECT + col1 / CAST ( - col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT DISTINCT cor0.col1 * + 32 FROM tab2 AS cor0
----
1888
544
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + 17 col2 FROM tab1 AS cor0
----
26
4113
6417

query I rowsort
SELECT DISTINCT col2 * col2 AS col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT 48 * 8 AS col0 FROM tab2 AS cor0
----
384
384
384

query I rowsort
SELECT DISTINCT col0 + - col0 * - cor0.col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT 83 FROM tab1, tab2 cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT + - col2 * 12 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-17328
-8112
-8748

query I rowsort
SELECT + 24 * col1 FROM tab1 AS cor0
----
240
312
624

query I rowsort
SELECT ALL + col0 + + ( col1 ) * col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT ALL - col0 + + col1 AS col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - - ( cor0.col1 ) * + col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9273
SELECT + - 40 + col0 DIV + cor0.col1 AS col1 FROM tab2 AS cor0
----
-36
-39
-40

skipif mysql # not compatible
query I rowsort label-9273
SELECT + - 40 + col0 / + cor0.col1 AS col1 FROM tab2 AS cor0
----
-36
-39
-40

query I rowsort
SELECT ALL + 55 + - col2 * + col2 AS col0 FROM tab1 AS cor0
----
-2861
-3194
-9161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9275
SELECT - CAST( NULL AS SIGNED ) + + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9275
SELECT - CAST ( NULL AS INTEGER ) + + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 94 * - cor0.col1 FROM tab0 cor0
----
8084
8554
9118

query I rowsort
SELECT + 94 * 93 AS col2 FROM tab0 AS cor0
----
8742
8742
8742

query I rowsort
SELECT - 4 + col1 FROM tab2 AS cor0
----
13
27
55

query I rowsort
SELECT ALL col0 * + col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 + - col2 * - 40 FROM tab2 AS cor0
----
1066
1107
1558

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9282
SELECT ALL - col2 DIV - cor0.col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-9282
SELECT ALL - col2 / - cor0.col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT col2 * - cor0.col1 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 65 * + col0 * - ( 99 ) FROM tab2 AS cor0
----
45045
501930
508365

query I rowsort
SELECT DISTINCT + 31 AS col0 FROM tab2 AS cor0
----
31

query I rowsort
SELECT + 31 + cor0.col1 * col1 FROM tab1 cor0
----
131
200
707

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 93ed44f621cc970f32b0cc9543b45262

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 43f0c51511c8642d19190fd4dfcf905a

query I rowsort
SELECT DISTINCT - + col1 * + col2 * - col1 AS col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT - 80 FROM tab1, tab2 AS cor0, tab2 cor1
----
-80

query I rowsort
SELECT col1 + + col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - + col0 + cor0.col1 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL + 6 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT DISTINCT + tab2.col0 + - 13 AS col2 FROM tab2
----
-6
65
66

query I rowsort
SELECT tab0.col1 - 30 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 0a899f5de6b5d07a47f3c71f3a668858

query I rowsort
SELECT ALL col2 * col0 * + col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT 17 AS col0 FROM tab0 AS cor0
----
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-9300
SELECT ALL - + cor0.col2 * col1 + cor0.col1 DIV - 38 FROM tab0 AS cor0
----
-2840
-7464
-99

skipif mysql # not compatible
query I rowsort label-9300
SELECT ALL - + cor0.col2 * col1 + cor0.col1 / - 38 FROM tab0 AS cor0
----
-2840
-7464
-99

query I rowsort
SELECT DISTINCT - 35 AS col0 FROM tab1 AS cor0
----
-35

query I rowsort
SELECT + - col2 + col0 + col1 AS col0 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT DISTINCT + 63 * col1 AS col2 FROM tab0 AS cor0
----
5418
5733
6111

query I rowsort
SELECT 24 * col0 FROM tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT ALL - + 90 + - col2 * 11 FROM tab2 AS cor0
----
-376
-387
-508

query I rowsort
SELECT DISTINCT - - col2 * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + col1 + + col2 * + col2 AS col1 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ( col0 ) AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - col2 - + col1 AS col2 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT - + cor0.col1 * + 28 + + cor0.col2 - - cor0.col1 AS col2 FROM tab0 cor0
----
-2289
-2375
-2618

query I rowsort
SELECT ALL + - col0 * + 32 FROM tab0 AS cor0
----
-1120
-2848
-768

query I rowsort
SELECT DISTINCT - - 27 AS col1 FROM tab2 cor0 CROSS JOIN tab1 cor1
----
27

query I rowsort
SELECT + 65 + - col0 * - col2 * + col2 FROM tab0
----
100
26201
598501

query I rowsort
SELECT DISTINCT 57 - + col2 FROM tab2
----
19
30
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col0 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-9316
SELECT DISTINCT ( col0 ) DIV + col2 + col0 AS col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-9316
SELECT DISTINCT ( col0 ) / + col2 + col0 AS col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT ALL 89 * - 50 + + col2 * + ( - col2 * col1 ) FROM tab0 cor0
----
-4547
-616334
-98104

query I rowsort
SELECT DISTINCT - col0 * - 12 FROM tab1 cor0
----
36
768
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9319
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9319
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + 28 ) * - col0 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT ALL + 26 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 8b6a624eb92fb019d9664318e519f062

query I rowsort
SELECT ALL - col1 * - ( col1 ) + - col0 FROM tab2
----
210
3403
954

query I rowsort
SELECT DISTINCT 60 + 96 + - cor0.col2 * 81 AS col1 FROM tab0, tab0 AS cor0
----
-2517
-6486
75

query I rowsort
SELECT - col0 * col1 - col0 AS col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT + ( col0 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9326
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * 70 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9326
SELECT DISTINCT - CAST ( NULL AS REAL ) * 70 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col0 + col2 + - col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col2 * col2 * col1 AS col0 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT + 82 * + col2 AS col0 FROM tab0 cor0
----
2706
6724
82

query I rowsort
SELECT - cor1.col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT + col2 + ( col2 * + ( - col2 ) ) AS col0 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT ALL 22 FROM tab2
----
22
22
22

query I rowsort
SELECT ( + tab0.col2 ) + + col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT + col2 - tab0.col2 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + - 11 AS col0 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to b479c2926237a341642edb92c755a9f3

query I rowsort
SELECT ALL - col1 * tab0.col2 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT tab1.col0 + - tab1.col2 * col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT 58 AS col1 FROM tab2
----
58
58
58

query I rowsort
SELECT DISTINCT + - col1 + - col0 AS col0 FROM tab2 cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col2 col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col2 * cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9342
SELECT DISTINCT - col2 * col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9342
SELECT DISTINCT - col2 * col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 30 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9344
SELECT DISTINCT col0 * CAST( + col1 + col0 AS SIGNED ) AS col2 FROM tab2
----
10686
266
7584

skipif mysql # not compatible
query I rowsort label-9344
SELECT DISTINCT col0 * CAST ( + col1 + col0 AS INTEGER ) AS col2 FROM tab2
----
10686
266
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-9345
SELECT col1 DIV - ( + col2 ) + tab0.col2 + - 18 col1 FROM tab0
----
-114
13
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9345
SELECT col1 / - ( + col2 ) + tab0.col2 + - 18 col1 FROM tab0
----
-114
13
63

query I rowsort
SELECT DISTINCT + tab0.col0 + ( col2 ) + + col2 FROM tab0
----
253
37
90

query I rowsort
SELECT col2 + 96 FROM tab0
----
129
178
97

query I rowsort
SELECT - col1 + col0 + - 68 * col0 FROM tab0
----
-1694
-2442
-6054

query I rowsort
SELECT col1 * - col2 * - col2 AS col2 FROM tab1
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9350
SELECT - col0 DIV ( 88 ) - + cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-90

skipif mysql # not compatible
query I rowsort label-9350
SELECT - col0 / ( 88 ) - + cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-90

query I rowsort
SELECT + - ( - 29 ) * + col1 + col2 FROM tab1 AS cor0
----
347
473
808

query I rowsort
SELECT DISTINCT + + col2 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + cor0.col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + - col0 * - col1 * col1 AS col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT col2 * - col0 + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + - 24 * - col0 AS col2 FROM tab0 AS cor0
----
2136
576
840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9357
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9357
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( + ( col2 ) ) + - col2 * + 11 AS col0 FROM tab1 cor0
----
-540
-570
-960

query I rowsort
SELECT - cor0.col2 * - col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - 34 * + ( - cor0.col0 ) FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT DISTINCT col0 + 61 AS col1 FROM tab2
----
139
140
68

query I rowsort
SELECT + + col1 * ( - col0 ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col1 * + col2 - col2 * col2 col0 FROM tab1
----
-10384
-3755
-4317

query I rowsort
SELECT ALL + - 14 AS col1 FROM tab2 AS cor0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT ( col0 ) * col2 + + ( - col1 ) FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-9366
SELECT + 60 DIV - 78 + - col1 * - ( - col2 * + col0 ) FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif mysql # not compatible
query I rowsort label-9366
SELECT + 60 / - 78 + - col1 * - ( - col2 * + col0 ) FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + 88 FROM tab1, tab0 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT + col0 + 29 FROM tab2 cor0
----
107
108
36

query I rowsort
SELECT 69 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + ( 24 ) col0 FROM tab1
----
-240
-312
-624

query I rowsort
SELECT + + ( - col0 ) * cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + 84 AS col2 FROM tab0, tab0 AS cor0
----
84

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab0, tab2 AS cor0
----
70

query I rowsort
SELECT DISTINCT + 94 + + 70 * + col1 FROM tab1 AS cor0
----
1004
1914
794

query I rowsort
SELECT - col1 * 77 * col2 AS col1 FROM tab1 AS cor0
----
-108108
-43890
-96096

query I rowsort
SELECT DISTINCT - ( - col0 ) AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL - ( + ( col2 ) ) * - col2 * col1 FROM tab1 AS cor0
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9378
SELECT DISTINCT tab1.col0 * col0 DIV col0 AS col1 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9378
SELECT DISTINCT tab1.col0 * col0 / col0 AS col1 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9379
SELECT ALL col0 * col2 DIV - tab0.col1 FROM tab0
----
-80
-9
0

skipif mysql # not compatible
query I rowsort label-9379
SELECT ALL col0 * col2 / - tab0.col1 FROM tab0
----
-80
-9
0

query I rowsort
SELECT - col0 - ( - 17 * col2 ) AS col0 FROM tab0
----
-18
1305
537

query I rowsort
SELECT col2 - col2 * + tab2.col0 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col0 * - col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - 25 AS col0 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 6f83d63ca9889b3b99826987c718bda8

query I rowsort
SELECT DISTINCT + col2 * - col1 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - - 4 * - col2 AS col1 FROM tab1 AS cor0
----
-216
-228
-384

query I rowsort
SELECT 67 + - col1 FROM tab2 cor0
----
36
50
8

query I rowsort
SELECT col2 + col0 * 26 AS col0 FROM tab2 AS cor0
----
2054
209
2092

onlyif mysql # use DIV operator for integer division
query I rowsort label-9388
SELECT - col1 DIV 22 AS col1 FROM tab0
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-9388
SELECT - col1 / 22 AS col1 FROM tab0
----
-3
-4
-4

query I rowsort
SELECT DISTINCT - ( 2 ) AS col2 FROM tab1
----
-2

query I rowsort
SELECT DISTINCT 9 FROM tab1
----
9

query I rowsort
SELECT - ( + 46 ) FROM tab2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT 98 FROM tab0
----
98

query I rowsort
SELECT ( col2 * col0 ) FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9394
SELECT - ( - 97 ) DIV + col1 FROM tab1
----
3
7
9

skipif mysql # not compatible
query I rowsort label-9394
SELECT - ( - 97 ) / + col1 FROM tab1
----
3
7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT 35 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT DISTINCT + 68 FROM tab1
----
68

query I rowsort
SELECT 90 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT + + 43 * + col1 + 46 AS col0 FROM tab1 AS cor0
----
1164
476
605

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - cor0.col1 + + col2 * - col2 col1 FROM tab1 AS cor0
----
-2240
-3149
-9047

query I rowsort
SELECT 94 * + col2 AS col1 FROM tab2 AS cor0
----
2444
2538
3572

query I rowsort
SELECT - - col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + 66 FROM tab1
----
66
66
66

query I rowsort
SELECT ALL - cor0.col2 + col0 + - col0 * + col1 AS col1 FROM tab1 AS cor0
----
-1056
-129
-633

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 + col0 FROM tab0 AS cor0
----
1113
36
6813

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 * CAST ( - ( + col1 ) AS REAL ) - CAST ( + ( col0 ) AS INTEGER ) * - col0 FROM tab2 AS cor0
----
10686
266
7584

query I rowsort
SELECT - col1 * + cor0.col0 + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - - col0 * cor0.col1 + col0 * col0 FROM tab1 AS cor0
----
4736
7440
87

query I rowsort
SELECT 87 * col2 FROM tab2
----
2262
2349
3306

query I rowsort
SELECT - col0 - + col0 AS col1 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT ( + tab2.col2 ) * col0 + - col2 AS col1 FROM tab2
----
162
2002
2964

query I rowsort
SELECT 18 * - col0 * + tab2.col2 FROM tab2
----
-3402
-36504
-54036

query I rowsort
SELECT col2 + col2 * 26 - col0 * col2 AS col2 FROM tab0
----
-5084
-8
99

query I rowsort
SELECT 44 - col1 FROM tab2 AS cor0
----
-15
13
27

query I rowsort
SELECT - col1 * tab1.col0 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + 56 * + col0 + + col2 * 76 FROM tab1
----
11776
4272
7916

query I rowsort
SELECT ALL + col1 - - col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL col2 + - cor0.col2 + + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + - col0 * + 73 + - col1 * + col1 AS col2 FROM tab2 AS cor0
----
-1472
-6056
-9175

onlyif mysql # use DIV operator for integer division
query I rowsort label-9420
SELECT ALL + col0 + col2 DIV - col0 AS col1 FROM tab1 AS cor0
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-9420
SELECT ALL + col0 + col2 / - col0 AS col1 FROM tab1 AS cor0
----
-15
64
79

query I rowsort
SELECT - col2 + col0 * 57 AS col0 FROM tab0 AS cor0
----
1335
1994
4991

query I rowsort
SELECT ALL + col1 + - col1 * - cor0.col1 * + col1 + + ( + col0 ) FROM tab0 AS cor0
----
636166
753751
912805

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9423
SELECT DISTINCT - col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9423
SELECT DISTINCT - col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col2 + 79 FROM tab2 AS cor0
----
41
52
53

query I rowsort
SELECT + - col1 + 52 AS col2 FROM tab1 AS cor0
----
26
39
42

query I rowsort
SELECT ALL col2 + col2 + col0 FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT DISTINCT - + col2 * - col0 + col0 * + col1 + col0 AS col0 FROM tab2 AS cor0
----
413
4424
6708

query I rowsort
SELECT + 82 + col1 * col0 FROM tab0
----
2146
3477
8181

query I rowsort
SELECT + - 28 * - col2 AS col2 FROM tab1 AS cor0
----
1512
1596
2688

query I rowsort
SELECT - 48 * col0 FROM tab0 cor0
----
-1152
-1680
-4272

query I rowsort
SELECT + 37 * - 30 * - cor0.col0 FROM tab1 AS cor0
----
3330
71040
88800

query I rowsort
SELECT + ( 65 ) + - col2 AS col1 FROM tab0 AS cor0
----
-17
32
64

query I rowsort
SELECT + - 48 * 76 * cor0.col1 FROM tab1 AS cor0
----
-36480
-47424
-94848

query I rowsort
SELECT - cor0.col0 * - cor0.col0 * col2 FROM tab0 cor0
----
1225
19008
649522

query I rowsort
SELECT + col2 * - cor0.col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL cor0.col2 - col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + - cor0.col2 * col1 + col2 AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + 81 + cor0.col1 FROM tab2 AS cor0
----
112
140
98

query I rowsort
SELECT 28 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT ALL + ( + cor0.col2 ) + - 48 FROM tab2, tab0 cor0
----
9 values hashing to cbbada6719925700b51a1f41d72c2568

query I rowsort
SELECT DISTINCT - - ( cor0.col1 ) * - col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * cor0.col1 - + 24 col2 FROM tab1 AS cor0
----
-124
-193
-700

onlyif mysql # use DIV operator for integer division
query I rowsort label-9443
SELECT + col1 * 77 + tab1.col1 DIV + col2 AS col1 FROM tab1
----
1001
2002
770

skipif mysql # not compatible
query I rowsort label-9443
SELECT + col1 * 77 + tab1.col1 / + col2 AS col1 FROM tab1
----
1001
2002
770

query I rowsort
SELECT cor0.col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col0 * 66 * + ( + col1 ) AS col1 FROM tab2 cor0
----
14322
303732
88638

onlyif mysql # use DIV operator for integer division
query I rowsort label-9446
SELECT DISTINCT + col1 DIV ( col0 * col0 + + col1 ) AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9446
SELECT DISTINCT + col1 / ( col0 * col0 + + col1 ) AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col0 + - cor0.col2 * + col2 AS col1 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT ALL - + cor0.col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - col2 + col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + + col1 * 81 AS col1 FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT DISTINCT - col0 + + ( col2 ) FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col1 ) col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + 61 FROM tab1 AS cor0
----
61
61
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9454
SELECT ALL + CAST( NULL AS SIGNED ) * - cor0.col0 - + col0 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9454
SELECT ALL + CAST ( NULL AS INTEGER ) * - cor0.col0 - + col0 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + col2 ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col2 * col1 AS col0 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9457
SELECT DISTINCT + CAST( col1 AS SIGNED ) + col2 * col0 * + col2 FROM tab2 AS cor0
----
114093
5134
52787

skipif mysql # not compatible
query I rowsort label-9457
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + col2 * col0 * + col2 FROM tab2 AS cor0
----
114093
5134
52787

query I rowsort
SELECT - + 77 * + 78 FROM tab0 AS cor0
----
-6006
-6006
-6006

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9459
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9459
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT + tab1.col1 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9462
SELECT ALL + CAST( NULL AS SIGNED ) / + col0 + + col1 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9462
SELECT ALL + CAST ( NULL AS INTEGER ) / + col0 + + col1 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + ( + col1 ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col0 + 81 col0 FROM tab0 AS cor0
----
-1144
-495
-7840

query I rowsort
SELECT + + cor0.col2 * - col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + 96 AS col1 FROM tab2 AS cor0
----
96

query I rowsort
SELECT + col1 * tab2.col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT 56 AS col2 FROM tab1
----
56

query I rowsort
SELECT ALL - 64 + + col1 FROM tab2 AS cor0
----
-33
-47
-5

query I rowsort
SELECT DISTINCT + 31 FROM tab2 cor0
----
31

query I rowsort
SELECT ALL + col1 + cor0.col2 * 67 FROM tab1 cor0
----
3644
3829
6445

query I rowsort
SELECT cor0.col2 * - col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 * - 77 FROM tab1 AS cor0
----
-1001
-2002
-770

query I rowsort
SELECT ALL col2 + - ( + col2 ) FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9475
SELECT - col0 DIV - 34 AS col2 FROM tab2 AS cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-9475
SELECT - col0 / - 34 AS col2 FROM tab2 AS cor0
----
0
2
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9476
SELECT - + col1 + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9476
SELECT - + col1 + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + + ( + ( col2 ) ) FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col1 * ( + col0 ) FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * cor0.col1 col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - col1 + tab0.col0 AS col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT 69 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
69

query I rowsort
SELECT DISTINCT + col0 * col0 * col2 + - col0 + col0 AS col1 FROM tab2
----
1323
158184
237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9483
SELECT - col1 * - col1 + CAST( ( col0 ) AS SIGNED ) AS col1 FROM tab0
----
7420
8370
9444

skipif mysql # not compatible
query I rowsort label-9483
SELECT - col1 * - col1 + CAST ( ( col0 ) AS INTEGER ) AS col1 FROM tab0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 + col1 col2 FROM tab2
----
137
38
96

query I rowsort
SELECT 6 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT - col2 * + col2 - - col2 FROM tab2
----
-1406
-650
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-9487
SELECT col2 DIV + col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9487
SELECT col2 / + col1 FROM tab1 cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * + col0 col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 19 * col1 * tab2.col0 AS col2 FROM tab2
----
25517
4123
87438

query I rowsort
SELECT ALL + col2 * col0 + col0 * tab1.col0 FROM tab1
----
14080
171
7744

query I rowsort
SELECT + col2 + cor0.col2 * + col2 AS col2 FROM tab2 cor0
----
1482
702
756

query I rowsort
SELECT + col0 + - cor0.col2 + col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
29
6136
6282

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( + col1 ) AND NULL NOT IN ( + col2 + - col0 )
----

query I rowsort
SELECT tab2.col2 + tab2.col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - col0 * + col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - col2 + + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + - cor0.col1 AS col2 FROM tab1, tab2, tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL 87 * col0 - col0 AS col1 FROM tab2
----
602
6708
6794

query I rowsort
SELECT DISTINCT - col1 * 2 + col0 AS col2 FROM tab2
----
-40
-55
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-9500
SELECT - 46 * col1 + cor0.col1 DIV col0 FROM tab0 cor0
----
-3953
-4185
-4460

skipif mysql # not compatible
query I rowsort label-9500
SELECT - 46 * col1 + cor0.col1 / col0 FROM tab0 cor0
----
-3953
-4185
-4460

onlyif mysql # use DIV operator for integer division
query I rowsort label-9501
SELECT - - 43 DIV + col1 + + col2 * + col1 * - col2 col2 FROM tab1 AS cor0
----
-119805
-32486
-75815

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9501
SELECT - - 43 / + col1 + + col2 * + col1 * - col2 col2 FROM tab1 AS cor0
----
-119805
-32486
-75815

query I rowsort
SELECT DISTINCT + col1 + - 6 FROM tab2
----
11
25
53

query I rowsort
SELECT 79 * col2 AS col2 FROM tab0
----
2607
6478
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-9504
SELECT col0 DIV - 35 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-9504
SELECT col0 / - 35 FROM tab0
----
-1
-2
0

query I rowsort
SELECT DISTINCT 20 + col2 FROM tab1
----
116
74
77

query I rowsort
SELECT ALL + col2 + 28 AS col0 FROM tab1
----
124
82
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 9 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT - 21 * - col2 FROM tab0
----
1722
21
693

query I rowsort
SELECT - tab0.col1 * - cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 116454f2268e21c1351daf3f5803c987

query I rowsort
SELECT DISTINCT - col1 * + col2 + col0 * - col2 FROM tab1
----
-1566
-4218
-8928

query I rowsort
SELECT ALL - 53 * col0 FROM tab1
----
-159
-3392
-4240

query I rowsort
SELECT DISTINCT col2 + col0 * col2 * col0 AS col0 FROM tab0 cor0
----
1226
19041
649604

query I rowsort
SELECT DISTINCT + 23 FROM tab0
----
23

query I rowsort
SELECT ALL + - col1 + + cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + 32 + col1 AS col2 FROM tab2 AS cor0
----
49
63
91

query I rowsort
SELECT + + col1 * + col1 * + col2 + col0 AS col0 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT - col1 - col0 * col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT - - cor0.col1 + col2 AS col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT - - col2 * + col2 + cor0.col1 * col1 FROM tab2 AS cor0
----
1690
1733
4157

query I rowsort
SELECT ALL ( - col2 ) * + col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + + 76 + col0 FROM tab1 AS cor0
----
140
156
79

query I rowsort
SELECT + + 1 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ALL + - 9 * + cor0.col1 + - col2 FROM tab1 AS cor0
----
-147
-213
-288

onlyif mysql # use DIV operator for integer division
query I rowsort label-9524
SELECT ALL + 27 + col1 DIV + col0 FROM tab0 AS cor0
----
28
29
30

skipif mysql # not compatible
query I rowsort label-9524
SELECT ALL + 27 + col1 / + col0 FROM tab0 AS cor0
----
28
29
30

query I rowsort
SELECT DISTINCT col1 * col0 * - col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - - 80 - + col0 FROM tab0 AS cor0
----
-9
45
56

query I rowsort
SELECT ( + col1 * + col2 ) + col2 * col0 AS col1 FROM tab2
----
1026
3562
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-9528
SELECT + col1 DIV - 4 + col1 FROM tab2 AS cor0
----
13
24
45

skipif mysql # not compatible
query I rowsort label-9528
SELECT + col1 / - 4 + col1 FROM tab2 AS cor0
----
13
24
45

query I rowsort
SELECT ALL 65 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT ALL 63 * + col2 AS col1 FROM tab0
----
2079
5166
63

query I rowsort
SELECT ALL + 25 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

onlyif mysql # use DIV operator for integer division
query I rowsort label-9532
SELECT + 88 + + col2 DIV col2 FROM tab1 AS cor0
----
89
89
89

skipif mysql # not compatible
query I rowsort label-9532
SELECT + 88 + + col2 / col2 FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT col0 * 42 FROM tab0 AS cor0
----
1008
1470
3738

query I rowsort
SELECT - - col2 * + col1 + + cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
6887
7618
886

onlyif mysql # use DIV operator for integer division
query I rowsort label-9535
SELECT col1 DIV + col1 + col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-9535
SELECT col1 / + col1 + col2 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9536
SELECT - + col0 * col1 + - col1 DIV - col2 FROM tab0 AS cor0
----
-2062
-3298
-8098

skipif mysql # not compatible
query I rowsort label-9536
SELECT - + col0 * col1 + - col1 / - col2 FROM tab0 AS cor0
----
-2062
-3298
-8098

query I rowsort
SELECT 71 * col1 AS col0 FROM tab1 AS cor0
----
1846
710
923

query I rowsort
SELECT - 52 * col1 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-384592
-430612
-489268

query I rowsort
SELECT + col2 * - 53 AS col0 FROM tab1
----
-2862
-3021
-5088

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 col2 FROM tab2, tab0 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-9542
SELECT ALL + + col0 * col0 DIV 7 + 11 col0 FROM tab2 AS cor0
----
18
880
902

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9542
SELECT ALL + + col0 * col0 / 7 + 11 col0 FROM tab2 AS cor0
----
18
880
902

query I rowsort
SELECT DISTINCT + + col2 * col1 - col2 AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL + col1 + col2 * cor0.col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - + col0 * col1 - 75 FROM tab2 AS cor0
----
-1418
-292
-4677

query I rowsort
SELECT col1 * + ( cor0.col2 ) + col0 * 58 AS col0 FROM tab0 AS cor0
----
12624
2127
4230

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-9548
SELECT - + col1 - 10 DIV col2 col1 FROM tab0 AS cor0
----
-107
-86
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9548
SELECT - + col1 - 10 / col2 col1 FROM tab0 AS cor0
----
-107
-86
-91

query I rowsort
SELECT DISTINCT - cor0.col0 + - ( col2 ) * + cor0.col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT - + col0 + + 93 FROM tab0 AS cor0
----
4
58
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-9551
SELECT + col0 - + 15 DIV col1 AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9551
SELECT + col0 - + 15 / col1 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col0 - col2 AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - 11 FROM tab0
----
-11
-11
-11

query I rowsort
SELECT - col0 - - ( + col0 ) FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9555
SELECT - - col1 + 46 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
17
25
59

skipif mysql # not compatible
query I rowsort label-9555
SELECT - - col1 + 46 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
17
25
59

query I rowsort
SELECT + 48 + 60 FROM tab2, tab0 AS cor0
----
9 values hashing to 6d22d46245dff8bdc639b4b61304fdd9

query I rowsort
SELECT ( + col2 ) AS col0 FROM tab0 cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9558
SELECT DISTINCT + tab0.col0 DIV + col0 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-9558
SELECT DISTINCT + tab0.col0 / + col0 FROM tab0
----
1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 cor2
----
972 values hashing to d522b52b67b20888d3544d25cb98f232

query I rowsort
SELECT ALL - col1 + - 69 AS col0 FROM tab1 AS cor0
----
-79
-82
-95

query I rowsort
SELECT - col1 * col0 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL ( - 70 ) - - col0 * 16 FROM tab1 cor0
----
-22
1210
954

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9563
SELECT ALL - CAST( NULL AS SIGNED ) * + col2 + + col1 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9563
SELECT ALL - CAST ( NULL AS INTEGER ) * + col2 + + col1 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 25 * 27 - - col0 FROM tab0 AS cor0
----
699
710
764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( 32 ) + col2 * + ( col0 ) col0 FROM tab2 AS cor0
----
157
1996
2970

query I rowsort
SELECT 98 + + col2 AS col0 FROM tab2 AS cor0
----
124
125
136

query I rowsort
SELECT + 90 FROM tab1 AS cor0
----
90
90
90

query I rowsort
SELECT ALL - col1 * col0 + col0 * + 92 AS col2 FROM tab2 cor0
----
2574
427
5925

query I rowsort
SELECT DISTINCT col2 * 25 AS col0 FROM tab0 AS cor0
----
2050
25
825

query I rowsort
SELECT - col2 + - ( - col2 * - col0 ) AS col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL - col0 - 59 FROM tab1 AS cor0
----
-123
-139
-62

query I rowsort
SELECT DISTINCT - ( col1 ) + - cor0.col1 * + col2 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT - ( 16 ) * - col0 AS col1 FROM tab2 AS cor0
----
112
1248
1264

query I rowsort
SELECT ALL + + col1 * col2 + + col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-9575
SELECT - 84 DIV + cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 10801b3149af80a3ee50a58dd0e66a56

skipif mysql # not compatible
query I rowsort label-9575
SELECT - 84 / + cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 10801b3149af80a3ee50a58dd0e66a56

query I rowsort
SELECT ALL + 70 + + 87 FROM tab1
----
157
157
157

query I rowsort
SELECT ( + col0 ) - - col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - - col0 + - cor0.col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + col0 * ( + col0 ) FROM tab1
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9580
SELECT DISTINCT + col2 + - col1 + + col2 DIV - col1 AS col1 FROM tab1
----
26
42
76

skipif mysql # not compatible
query I rowsort label-9580
SELECT DISTINCT + col2 + - col1 + + col2 / - col1 AS col1 FROM tab1
----
26
42
76

query I rowsort
SELECT - 33 - + col1 FROM tab2 AS cor0
----
-50
-64
-92

query I rowsort
SELECT ALL 45 FROM tab0
----
45
45
45

query I rowsort
SELECT ALL col2 * ( - col2 ) + + col1 - + cor0.col0 * col1 FROM tab1 AS cor0
----
-10243
-2968
-3879

query I rowsort
SELECT - 76 * + col0 * + col1 AS col2 FROM tab1 AS cor0
----
-48640
-5928
-79040

query I rowsort
SELECT + col1 * col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL 64 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT + tab1.col2 - 49 FROM tab1
----
47
5
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9588
SELECT col1 + CAST( col2 AS SIGNED ) * tab1.col2 AS col0 FROM tab1
----
2942
3259
9229

skipif mysql # not compatible
query I rowsort label-9588
SELECT col1 + CAST ( col2 AS INTEGER ) * tab1.col2 AS col0 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT DISTINCT - col2 + + col2 * col2 AS col1 FROM tab1 AS cor0
----
2862
3192
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9590
SELECT ALL - - cor0.col2 DIV + 53 - ( col0 ) AS col2 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-9590
SELECT ALL - - cor0.col2 / + 53 - ( col0 ) AS col2 FROM tab1 AS cor0
----
-2
-63
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + - 11 col1 FROM tab2 AS cor0
----
-28
-42
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 * col0 col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT 23 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1, tab2 AS cor0 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT - tab1.col1 AS col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT col2 + + 20 FROM tab1 cor0
----
116
74
77

query I rowsort
SELECT DISTINCT - + col0 + col0 * + col1 AS col2 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 + - col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL - + col2 + - col0 AS col0 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT - - cor0.col2 + + col1 AS col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9601
SELECT DISTINCT + col2 + - col2 * - CAST( col0 AS SIGNED ) FROM tab0
----
36
7380
825

skipif mysql # not compatible
query I rowsort label-9601
SELECT DISTINCT + col2 + - col2 * - CAST ( col0 AS INTEGER ) FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT - col1 + - col2 AS col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT DISTINCT col2 + + col1 FROM tab1
----
109
67
80

query I rowsort
SELECT 97 + - 13 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to 3a186ad492d315801f56fb30a5e89dbb

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9606
SELECT + col1 / + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9606
SELECT + col1 / + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + - 50 * + col0 FROM tab0 AS cor0
----
-1114
-1653
-4359

query I rowsort
SELECT ALL - col1 * + 99 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT ALL + - col2 + + ( col2 ) * col0 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-9610
SELECT ALL - col2 DIV - ( col2 ) AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9610
SELECT ALL - col2 / - ( col2 ) AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL col0 + cor0.col0 * col0 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-9612
SELECT ALL col2 DIV + cor0.col0 + col1 AS col2 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-9612
SELECT ALL col2 / + cor0.col0 + col1 AS col2 FROM tab2 AS cor0
----
17
34
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9613
SELECT col0 * CAST( NULL AS SIGNED ) * - col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9613
SELECT col0 * CAST ( NULL AS INTEGER ) * - col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + col0 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT 29 AS col2 FROM tab1, tab2 cor0 CROSS JOIN tab0, tab0 AS cor1
----
81 values hashing to 40739d223aa019bd2dfe2db99d596302

query I rowsort
SELECT + 88 * col1 + - col0 + + col2 AS col0 FROM tab2
----
1455
2748
5140

query I rowsort
SELECT - 11 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1, tab1 cor0, tab2, tab2 AS cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT DISTINCT + - 95 AS col2 FROM tab2 AS cor0
----
-95

query I rowsort
SELECT ALL - ( - col1 ) * col0 + 67 AS col0 FROM tab2 AS cor0
----
1410
284
4669

query I rowsort
SELECT + + 29 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT + col1 * - cor0.col2 - - col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col1 * col2 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT col0 - - col0 * col0 FROM tab1 cor0
----
12
4160
6480

query I rowsort
SELECT - col2 + - col2 * - cor0.col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT - 30 - col0 FROM tab1 AS cor0
----
-110
-33
-94

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + col0 + - col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL ( + col1 ) + - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL col1 + + col0 - 46 AS col0 FROM tab1 AS cor0
----
-17
28
47

query I rowsort
SELECT ALL - 32 AS col2 FROM tab1 AS cor0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT 99 * + col1 * - col2 FROM tab0
----
-280962
-738738
-9603

query I rowsort
SELECT ALL + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - 52 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1352
-520
-676

query I rowsort
SELECT ALL + col1 + cor0.col2 * col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT col0 * col2 * + col2 AS col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT - col1 * col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col2 + - cor0.col1 * 13 FROM tab2 cor0
----
-259
-430
-793

query I rowsort
SELECT + 2 AS col1 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT - - 81 + col1 FROM tab0 AS cor0
----
167
172
178

query I rowsort
SELECT DISTINCT col2 + col0 * - col0 FROM tab1 cor0
----
-4039
-6304
45

query I rowsort
SELECT col2 * + cor0.col0 + + col0 * col2 FROM tab2 cor0
----
378
4056
6004

query I rowsort
SELECT ALL + + cor0.col1 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 98 + col1 FROM tab1 AS cor0
----
-72
-85
-88

query I rowsort
SELECT ALL ( - col1 ) * + 84 * + tab1.col2 FROM tab1
----
-104832
-117936
-47880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9646
SELECT cor0.col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9646
SELECT cor0.col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9647
SELECT cor0.col1 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9647
SELECT cor0.col1 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 + + col0 AS col1 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9649
SELECT DISTINCT + CAST( NULL AS SIGNED ) col1 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9649
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT + 98 * col0 AS col1 FROM tab0 AS cor0
----
2352
3430
8722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 col0 FROM tab2 AS cor0
----
60

query I rowsort
SELECT ALL + 74 + col2 FROM tab0 AS cor0
----
107
156
75

query I rowsort
SELECT - - 24 * + col1 AS col0 FROM tab1 cor0
----
240
312
624

query I rowsort
SELECT - - 78 AS col1 FROM tab1 AS cor0
----
78
78
78

query I rowsort
SELECT DISTINCT - - 11 * - col2 FROM tab2 AS cor0
----
-286
-297
-418

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

query I rowsort
SELECT - ( col1 ) * - col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + 10 * + col0 * col2 FROM tab1
----
1620
36480
76800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9659
SELECT ( 97 ) * col2 + + CAST( col2 AS SIGNED ) * col0 AS col2 FROM tab0
----
132
15252
3993

skipif mysql # not compatible
query I rowsort label-9659
SELECT ( 97 ) * col2 + + CAST ( col2 AS INTEGER ) * col0 AS col2 FROM tab0
----
132
15252
3993

query I rowsort
SELECT 90 - + col2 AS col1 FROM tab0 cor0
----
57
8
89

query I rowsort
SELECT - cor0.col2 + col2 + col0 * + 96 FROM tab1 AS cor0
----
288
6144
7680

query I rowsort
SELECT + - col1 - col1 AS col2 FROM tab0 AS cor0
----
-172
-182
-194

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 97 AS REAL ) FROM tab0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 34 col2 FROM tab0, tab1 AS cor0
----
34

query I rowsort
SELECT DISTINCT - - col2 + col0 * col1 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT col1 * - col2 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1 cor1, tab0, tab0 AS cor2
----
3645 values hashing to 862fba9ac85fdf2cec88a0bec0808b7e

query I rowsort
SELECT - 64 FROM tab2 cor0
----
-64
-64
-64

query I rowsort
SELECT ALL - col2 + - col2 - col2 FROM tab2 AS cor0
----
-114
-78
-81

query I rowsort
SELECT 52 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT ALL tab1.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-9672
SELECT + + 86 DIV - 7 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

skipif mysql # not compatible
query I rowsort label-9672
SELECT + + 86 / - 7 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
10
13
26

query I rowsort
SELECT - 3 FROM tab1, tab1 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT col2 + 79 + - col1 AS col2 FROM tab0
----
-17
26
70

query I rowsort
SELECT ALL col0 + + 42 FROM tab2
----
120
121
49

query I rowsort
SELECT ALL + ( ( col0 ) ) + tab0.col1 AS col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 14 col1 FROM tab2 AS cor0
----
-14
-14
-14

query I rowsort
SELECT + ( col0 ) - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + - col2 + col1 FROM tab2 cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col2 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT - ( col2 * col0 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT 19 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 964295a09704e7eeb1758493220d9bb0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9684
SELECT + col0 + - col1 DIV col1 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-9684
SELECT + col0 + - col1 / col1 FROM tab1
----
2
63
79

query I rowsort
SELECT + + cor0.col1 * 69 FROM tab1 AS cor0
----
1794
690
897

query I rowsort
SELECT col2 * + ( col2 ) FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + col0 * ( + ( - col0 ) ) FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT col1 * 17 AS col2 FROM tab1 AS cor0
----
170
221
442

onlyif mysql # use DIV operator for integer division
query I rowsort label-9689
SELECT DISTINCT + col0 DIV + 81 + - 32 - + cor0.col0 FROM tab2 AS cor0
----
-110
-111
-39

skipif mysql # not compatible
query I rowsort label-9689
SELECT DISTINCT + col0 / + 81 + - 32 - + cor0.col0 FROM tab2 AS cor0
----
-110
-111
-39

query I rowsort
SELECT - col2 * 42 AS col1 FROM tab0 AS cor0
----
-1386
-3444
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-9691
SELECT ALL + + col2 DIV + ( col0 * + col1 ) + + col0 * + col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-9691
SELECT ALL + + col2 / + ( col0 * + col1 ) + + col0 * + col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-9692
SELECT + 10 DIV tab2.col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif mysql # not compatible
query I rowsort label-9692
SELECT + 10 / tab2.col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - cor0.col2 * 58 FROM tab1 AS cor0
----
-3132
-3306
-5568

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to 85e6cb74738e0d8388af8fb625b2bd38

onlyif mysql # use DIV operator for integer division
query I rowsort label-9696
SELECT DISTINCT col0 DIV + 50 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-9696
SELECT DISTINCT col0 / + 50 FROM tab2
----
0
1

query I rowsort
SELECT - col0 * 45 AS col1 FROM tab0 AS cor0
----
-1080
-1575
-4005

onlyif mysql # use DIV operator for integer division
query I rowsort label-9698
SELECT DISTINCT - col2 DIV 62 AS col2 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9698
SELECT DISTINCT - col2 / 62 AS col2 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT col0 * + 55 AS col0 FROM tab1 AS cor0
----
165
3520
4400

query I rowsort
SELECT - - col2 * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + col0 * 8 FROM tab1 cor0
----
24
512
640

query I rowsort
SELECT + + 91 AS col0 FROM tab1 AS cor0
----
91
91
91

query I rowsort
SELECT - col2 * + col2 * + col2 AS col1 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT ALL + + cor0.col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + + 53 + col0 * - cor0.col2 FROM tab1 AS cor0
----
-109
-3595
-7627

onlyif mysql # use DIV operator for integer division
query I rowsort label-9707
SELECT + col0 DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9707
SELECT + col0 / + cor0.col0 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + + col0 * col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - 5 * 64 AS col1 FROM tab2 AS cor0
----
-320

query I rowsort
SELECT ALL + + col2 + - 94 FROM tab1 AS cor0
----
-37
-40
2

query I rowsort
SELECT + 45 * + 2 - + col0 FROM tab1 AS cor0
----
10
26
87

query I rowsort
SELECT ALL + col2 * + 54 FROM tab2 AS cor0
----
1404
1458
2052

onlyif mysql # use DIV operator for integer division
query I rowsort label-9713
SELECT - col2 DIV col0 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-9713
SELECT - col2 / col0 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-14
-44

query I rowsort
SELECT + + 62 + - 86 * - col2 FROM tab2 cor0
----
2298
2384
3330

query I rowsort
SELECT ALL 3 + col2 * col2 FROM tab1 AS cor0
----
2919
3252
9219

onlyif mysql # use DIV operator for integer division
query I rowsort label-9716
SELECT - col1 + + ( + cor0.col1 ) DIV + 60 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-9716
SELECT - col1 + + ( + cor0.col1 ) / + 60 FROM tab0 AS cor0
----
-85
-90
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9717
SELECT DISTINCT + + CAST( + col2 AS SIGNED ) * + col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-9717
SELECT DISTINCT + + CAST ( + col2 AS INTEGER ) * + col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT ALL + 28 FROM tab1, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9720
SELECT tab1.col2 * ( + col1 ) DIV + col1 - col1 * - 58 FROM tab1
----
1562
637
850

skipif mysql # not compatible
query I rowsort label-9720
SELECT tab1.col2 * ( + col1 ) / + col1 - col1 * - 58 FROM tab1
----
1562
637
850

query I rowsort
SELECT ALL + cor0.col2 - tab2.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to a315d120f944e987e8b5f24efc4da004

query I rowsort
SELECT DISTINCT + 98 FROM tab1, tab0 AS cor0
----
98

query I rowsort
SELECT ALL + col0 + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + cor0.col2 * + col0 + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + - cor0.col1 * + col1 + cor0.col0 + - col1 FROM tab0 cor0
----
-7458
-8283
-9471

onlyif mysql # use DIV operator for integer division
query I rowsort label-9726
SELECT DISTINCT + col2 DIV col1 + - 52 FROM tab0 AS cor0
----
-52

skipif mysql # not compatible
query I rowsort label-9726
SELECT DISTINCT + col2 / col1 + - 52 FROM tab0 AS cor0
----
-52

query I rowsort
SELECT + - 12 + cor0.col1 FROM tab0 AS cor0
----
74
79
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + 8 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
15
86
87

query I rowsort
SELECT ALL + ( + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + + 37 + cor0.col0 * 28 FROM tab1 AS cor0
----
121
1829
2277

query I rowsort
SELECT DISTINCT - + 93 AS col2 FROM tab2 AS cor0
----
-93

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-9734
SELECT ( + col0 ) DIV + col2 AS col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9734
SELECT ( + col0 ) / + col2 AS col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - 65 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-147
-66
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - + 69 * col2 FROM tab2 AS cor0
----
-1794
-1863
-2622

onlyif mysql # use DIV operator for integer division
query I rowsort label-9738
SELECT ALL + ( col2 ) DIV - tab0.col0 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9738
SELECT ALL + ( col2 ) / - tab0.col0 FROM tab0
----
-1
0
0

query I rowsort
SELECT cor0.col0 + 16 FROM tab1, tab0 cor0
----
9 values hashing to d621991bf69b93f7ea86e01229aee8d4

query I rowsort
SELECT 36 * + 88 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f989a071984c2a5d732e31a6f4fbe41b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9741
SELECT DISTINCT - col1 * CAST( col0 * col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

skipif mysql # not compatible
query I rowsort label-9741
SELECT DISTINCT - col1 * CAST ( col0 * col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT col0 * - 91 FROM tab1 AS cor0
----
-273
-5824
-7280

query I rowsort
SELECT + - 49 + col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
123
133
145

query I rowsort
SELECT DISTINCT + + col1 * ( col1 ) + + col1 AS col1 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT + + ( col0 ) + col0 - + cor0.col1 * col2 FROM tab2 AS cor0
----
-1378
-488
-823

onlyif mysql # use DIV operator for integer division
query I rowsort label-9746
SELECT ALL - - col0 DIV + col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9746
SELECT ALL - - col0 / + col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + col0 - col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + 33 + + col0 AS col0 FROM tab2 AS cor0
----
111
112
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - + 43 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT ALL - - col0 + ( col1 + col1 ) FROM tab0 AS cor0
----
196
229
271

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + - col1 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + - ( + col1 ) * + col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT col0 * - 17 AS col0 FROM tab0 AS cor0
----
-1513
-408
-595

query I rowsort
SELECT ALL + 77 AS col2 FROM tab0 AS cor0
----
77
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9756
SELECT ALL + tab0.col0 * CAST( 8 AS SIGNED ) - + col2 col1 FROM tab0
----
159
279
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9756
SELECT ALL + tab0.col0 * CAST ( 8 AS INTEGER ) - + col2 col1 FROM tab0
----
159
279
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 - + col1 col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT DISTINCT col0 + 6 AS col1 FROM tab2 AS cor0
----
13
84
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9759
SELECT - ( cor0.col2 ) DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9759
SELECT - ( cor0.col2 ) / cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - col1 + col2 * col0 AS col0 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-9761
SELECT + + col0 DIV col0 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9761
SELECT + + col0 / col0 AS col2 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9762
SELECT - 28 DIV cor0.col1 AS col1 FROM tab1 AS cor0
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-9762
SELECT - 28 / cor0.col1 AS col1 FROM tab1 AS cor0
----
-1
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col2 FROM tab2, tab0 cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT tab0.col0 * - ( + tab0.col2 ) FROM tab0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9765
SELECT ALL - CAST( - col1 AS SIGNED ) + col2 * + 61 FROM tab2 AS cor0
----
1645
1678
2335

skipif mysql # not compatible
query I rowsort label-9765
SELECT ALL - CAST ( - col1 AS INTEGER ) + col2 * + 61 FROM tab2 AS cor0
----
1645
1678
2335

query I rowsort
SELECT ALL 11 * + 97 FROM tab1 AS cor0
----
1067
1067
1067

onlyif mysql # use DIV operator for integer division
query I rowsort label-9767
SELECT ALL CAST( - col1 AS SIGNED ) + - col1 DIV + tab2.col0 + + 61 AS col0 FROM tab2
----
2
26
44

skipif mysql # not compatible
query I rowsort label-9767
SELECT ALL CAST ( - col1 AS INTEGER ) + - col1 / + tab2.col0 + + 61 AS col0 FROM tab2
----
2
26
44

query I rowsort
SELECT DISTINCT - col1 * col2 - - col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - ( col1 ) + col2 FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort
SELECT - col1 * + CAST ( ( - col1 ) AS REAL ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - 26 FROM tab1, tab1 AS cor0
----
-26

query I rowsort
SELECT DISTINCT - col2 + col0 * - col2 AS col2 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT - col0 + - col0 * 40 + - col1 * col0 AS col1 FROM tab1
----
-201
-3264
-4320

query I rowsort
SELECT - ( - 16 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

onlyif mysql # use DIV operator for integer division
query I rowsort label-9775
SELECT col1 DIV - col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-9775
SELECT col1 / - col0 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT col1 * + 46 * 66 + - col0 + - 75 FROM tab2
----
178971
51458
94034

query I rowsort
SELECT DISTINCT col0 + ( - col2 ) * + col2 FROM tab1
----
-2913
-3185
-9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + cor0.col2 ) col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 col0 FROM tab1
----
108
114
192

query I rowsort
SELECT col0 * + ( col1 * - col0 ) + col1 + + col0 * - col2 FROM tab1
----
-370
-44598
-90867

query I rowsort
SELECT DISTINCT - cor0.col1 + ( col0 ) + + col1 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col0 + + 16 * + ( + col2 ) AS col0 FROM tab1 AS cor0
----
1456
848
861

query I rowsort
SELECT ALL + col0 * + ( ( - col0 ) + + 72 ) FROM tab1 AS cor0
----
-640
207
512

query I rowsort
SELECT - col2 - + ( + col1 ) * + col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT + col0 + col1 * - 15 AS col0 FROM tab2 AS cor0
----
-176
-458
-807

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 + - col2 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9787
SELECT + col1 - col2 DIV 95 FROM tab1 AS cor0
----
10
12
26

skipif mysql # not compatible
query I rowsort label-9787
SELECT + col1 - col2 / 95 FROM tab1 AS cor0
----
10
12
26

query I rowsort
SELECT ALL - 62 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT DISTINCT - col0 * - cor0.col0 - 32 AS col2 FROM tab2 AS cor0
----
17
6052
6209

query I rowsort
SELECT - + col2 * col0 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + cor0.col0 + cor0.col1 * col0 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * col0 + + col0 col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL col2 + cor0.col2 * col1 AS col0 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + col2 * + 41 FROM tab1 AS cor0
----
2214
2337
3936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9795
SELECT + CAST( NULL AS SIGNED ) * + cor0.col1 - - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9795
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col1 - - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # use DIV operator for integer division
query I rowsort label-9797
SELECT - tab2.col2 DIV 68 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9797
SELECT - tab2.col2 / 68 FROM tab2
----
0
0
0

query I rowsort
SELECT - col2 * + 8 - + col0 * col1 FROM tab2 AS cor0
----
-1647
-433
-4810

query I rowsort
SELECT - col0 * + col2 - - col0 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + 70 - col0 FROM tab1 AS cor0
----
-10
6
67

query I rowsort
SELECT ALL 57 AS col0 FROM tab1
----
57
57
57

query I rowsort
SELECT ALL - col0 * col1 * 12 AS col2 FROM tab1 AS cor0
----
-12480
-7680
-936

query I rowsort
SELECT + col1 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 * col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col2 * tab1.col1 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 82 * - col2 AS col1 FROM tab1 cor0
----
-4428
-4674
-7872

onlyif mysql # use DIV operator for integer division
query I rowsort label-9807
SELECT DISTINCT - col2 * col1 DIV + ( ( - cor0.col2 ) + + col0 ) FROM tab1 AS cor0
----
-81
27
78

skipif mysql # not compatible
query I rowsort label-9807
SELECT DISTINCT - col2 * col1 / + ( ( - cor0.col2 ) + + col0 ) FROM tab1 AS cor0
----
-81
27
78

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to f0b9665afa0b835e4e5097af17c51766

query I rowsort
SELECT + ( + 84 ) FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT + - col0 + cor0.col1 * + col2 AS col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL + col2 * col1 * col0 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-9812
SELECT col1 DIV ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9812
SELECT col1 / ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9813
SELECT DISTINCT col2 * - CAST( 63 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2079
-5166
-63

skipif mysql # not compatible
query I rowsort label-9813
SELECT DISTINCT col2 * - CAST ( 63 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2079
-5166
-63

query I rowsort
SELECT DISTINCT col1 * - col2 + - col1 * col2 AS col1 FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT - col1 * - ( 27 ) FROM tab2 cor0
----
1593
459
837

query I rowsort
SELECT + col0 * ( - col1 ) + + col2 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9817
SELECT + + col0 * + CAST( col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-9817
SELECT + + col0 * + CAST ( col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - tab0.col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL + - col2 - col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

onlyif mysql # use DIV operator for integer division
query I rowsort label-9820
SELECT DISTINCT 10 DIV + col1 + ( col1 ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-9820
SELECT DISTINCT 10 / + col1 + ( col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - 12 * cor0.col0 - + col2 FROM tab1 AS cor0
----
-1056
-825
-90

query I rowsort
SELECT - 52 AS col1 FROM tab2 cor0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT + 86 FROM tab1
----
86

query I rowsort
SELECT + 70 * + col2 FROM tab0
----
2310
5740
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-9825
SELECT - ( col2 ) DIV ( - col0 ) AS col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9825
SELECT - ( col2 ) / ( - col0 ) AS col0 FROM tab0
----
0
0
1

query I rowsort
SELECT col2 * - col1 * col1 AS col0 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT - 91 FROM tab1
----
-91

query I rowsort
SELECT ALL 83 - - col1 * tab0.col0 FROM tab0
----
2147
3478
8182

query I rowsort
SELECT ALL 7 FROM tab2
----
7
7
7

query I rowsort
SELECT DISTINCT - tab0.col0 * - col1 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + 78 * col1 + col0 AS col0 FROM tab0 AS cor0
----
6732
7187
7601

onlyif mysql # use DIV operator for integer division
query I rowsort label-9832
SELECT cor0.col2 DIV - cor0.col1 + - col2 FROM tab2 AS cor0
----
-26
-27
-40

skipif mysql # not compatible
query I rowsort label-9832
SELECT cor0.col2 / - cor0.col1 + - col2 FROM tab2 AS cor0
----
-26
-27
-40

query I rowsort
SELECT ALL cor1.col2 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT - col2 * col2 + - col0 AS col1 FROM tab2
----
-1523
-736
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-9835
SELECT 76 DIV - 50 FROM tab0, tab1, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to f3aaea07874d9328a91c424c0907a688

skipif mysql # not compatible
query I rowsort label-9835
SELECT 76 / - 50 FROM tab0, tab1, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to f3aaea07874d9328a91c424c0907a688

query I rowsort
SELECT DISTINCT col1 + + 75 FROM tab1 AS cor0
----
101
85
88

query I rowsort
SELECT ALL + cor0.col0 + - col1 * - ( + col2 * - col2 + col0 ) AS col2 FROM tab1 cor0
----
-118688
-31786
-75735

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 33 col2 FROM tab1 AS cor0
----
-33
-33
-33

query I rowsort
SELECT + 2 + + cor0.col1 FROM tab0 AS cor0
----
88
93
99

query I rowsort
SELECT col2 * + col1 AS col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT 91 - - 24 AS col2 FROM tab1
----
115
115
115

query I rowsort
SELECT tab2.col1 * 29 * col0 + - col0 AS col1 FROM tab2
----
133380
38868
6286

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( + col0 ) - tab1.col2 col2 FROM tab1
----
-45
4039
6304

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab2 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT col2 * + tab2.col1 * + col2 + 43 * col0 FROM tab2
----
22900
27945
43238

onlyif mysql # use DIV operator for integer division
query I rowsort label-9846
SELECT DISTINCT tab2.col2 + - col0 DIV col0 AS col0 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-9846
SELECT DISTINCT tab2.col2 + - col0 / col0 AS col0 FROM tab2
----
25
26
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col1 * - col2 col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT 46 + col1 FROM tab0
----
132
137
143

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ( + col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 54 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT + + col2 + - col2 * + col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT 36 AS col2 FROM tab0
----
36
36
36

query I rowsort
SELECT + col1 * 20 * col2 + + 45 * col2 AS col2 FROM tab1
----
13965
29280
30510

query I rowsort
SELECT cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - col1 + + col2 * + ( - cor0.col0 ) FROM tab2 cor0
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT - - col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - col1 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT col1 + cor0.col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL - - col1 * cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT 16 * col1 FROM tab0 AS cor0
----
1376
1456
1552

query I rowsort
SELECT + 1 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT col1 * - col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT 22 AS col2 FROM tab1
----
22
22
22

query I rowsort
SELECT ALL - ( - col2 ) + + col1 * 27 FROM tab2 AS cor0
----
1619
497
864

query I rowsort
SELECT DISTINCT col2 * - cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9868
SELECT DISTINCT + + cor0.col2 * - cor0.col2 + col0 + + 27 DIV + col2 FROM tab1 cor0
----
-2913
-3185
-9136

skipif mysql # not compatible
query I rowsort label-9868
SELECT DISTINCT + + cor0.col2 * - cor0.col2 + col0 + + 27 / + col2 FROM tab1 cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL - - 34 - - col1 AS col2 FROM tab2 AS cor0
----
51
65
93

query I rowsort
SELECT DISTINCT + cor0.col0 - - col0 * + col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + 92 * col2 * col0 FROM tab1 AS cor0
----
14904
335616
706560

query I rowsort
SELECT 30 + - col1 AS col1 FROM tab2 AS cor0
----
-1
-29
13

query I rowsort
SELECT col2 * ( - col0 ) + - cor0.col0 + col2 AS col2 FROM tab1 AS cor0
----
-111
-3655
-7664

query I rowsort
SELECT + + col1 * 28 - + ( - col1 ) * - 9 FROM tab0 cor0
----
1634
1729
1843

query I rowsort
SELECT + col2 + + tab0.col2 - col1 FROM tab0
----
-20
-95
73

query I rowsort
SELECT - + col2 + col2 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + - ( - col1 ) * col1 * cor0.col0 FROM tab0 AS cor0
----
177471
329314
736927

query I rowsort
SELECT col0 * 77 AS col1 FROM tab2 AS cor0
----
539
6006
6083

onlyif mysql # use DIV operator for integer division
query I rowsort label-9879
SELECT ALL + + col1 DIV col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9879
SELECT ALL + + col1 / col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT col1 + cor0.col2 * + col2 - - col0 AS col2 FROM tab0 cor0
----
1199
133
6904

onlyif mysql # use DIV operator for integer division
query I rowsort label-9881
SELECT DISTINCT - col1 DIV 56 col0 FROM tab2 cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9881
SELECT DISTINCT - col1 / 56 col0 FROM tab2 cor0
----
-1
0

query I rowsort
SELECT - + cor0.col2 + 24 FROM tab1 AS cor0
----
-30
-33
-72

query I rowsort
SELECT ALL 86 * - ( cor0.col0 ) FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT 87 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT + col1 * + 43 FROM tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT DISTINCT 37 FROM tab1 AS cor0
----
37

query I rowsort
SELECT ALL - ( col0 ) + col1 * - col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT 66 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab1 cor2
----
81 values hashing to dc112f70fecc29a6e605a39541192f43

query I rowsort
SELECT DISTINCT col2 - col2 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9890
SELECT + col1 + col2 DIV col0 col2 FROM tab2
----
17
34
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9890
SELECT + col1 + col2 / col0 col2 FROM tab2
----
17
34
59

query I rowsort
SELECT ALL - col1 + + tab0.col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + tab2.col1 + col0 + - tab2.col0 AS col2 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9893
SELECT ALL col1 DIV col0 + col0 AS col1 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-9893
SELECT ALL col1 / col0 + col0 AS col1 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT DISTINCT - 79 + col1 - cor0.col1 FROM tab0 cor0
----
-79

query I rowsort
SELECT DISTINCT 49 * col0 - + 91 FROM tab0 cor0
----
1085
1624
4270

query I rowsort
SELECT ALL + + cor0.col0 * - col1 + 39 AS col1 FROM tab2 AS cor0
----
-1304
-178
-4563

query I rowsort
SELECT ALL + - col1 + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + - col0 * + 4 AS col1 FROM tab0 AS cor0
----
-140
-356
-96

query I rowsort
SELECT ALL - - col2 - 28 AS col2 FROM tab2 AS cor0
----
-1
-2
10

query I rowsort
SELECT + col2 * + col0 + col1 * + col0 * col0 FROM tab0 AS cor0
----
118860
50328
728109

query I rowsort
SELECT - col2 * + 74 AS col1 FROM tab2 AS cor0
----
-1924
-1998
-2812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( col1 ) * + col1 col0 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT + col2 * cor0.col0 + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
2704
4446
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-9904
SELECT DISTINCT + col1 * cor0.col2 DIV - col2 + + col0 AS col2 FROM tab0 AS cor0
----
-2
-62

skipif mysql # not compatible
query I rowsort label-9904
SELECT DISTINCT + col1 * cor0.col2 / - col2 + + col0 AS col2 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9905
SELECT DISTINCT - + cor0.col0 * + CAST( NULL AS SIGNED ) + 51 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9905
SELECT DISTINCT - + cor0.col0 * + CAST ( NULL AS INTEGER ) + 51 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - + col2 * + ( col0 ) - - cor0.col2 * col0 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9907
SELECT DISTINCT - col0 DIV - col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9907
SELECT DISTINCT - col0 / - col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9908
SELECT + col0 + - ( cor0.col0 ) DIV col1 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-9908
SELECT + col0 + - ( cor0.col0 ) / col1 FROM tab1 AS cor0
----
3
58
74

query I rowsort
SELECT ALL + + col0 * 76 FROM tab2 AS cor0
----
532
5928
6004

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL - col2 + - tab2.col0 AS col1 FROM tab2
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9912
SELECT ALL 89 + + tab2.col1 DIV 93 AS col0 FROM tab2
----
89
89
89

skipif mysql # not compatible
query I rowsort label-9912
SELECT ALL 89 + + tab2.col1 / 93 AS col0 FROM tab2
----
89
89
89

query I rowsort
SELECT + + col1 + col1 * col2 AS col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9914
SELECT col1 - CAST( + col2 AS SIGNED ) * - col2 AS col2 FROM tab0 AS cor0
----
1175
6815
98

skipif mysql # not compatible
query I rowsort label-9914
SELECT col1 - CAST ( + col2 AS INTEGER ) * - col2 AS col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL 92 - col2 * ( - tab1.col1 ) AS col2 FROM tab1
----
1340
1496
662

onlyif mysql # use DIV operator for integer division
query I rowsort label-9916
SELECT ALL - 58 DIV 75 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9916
SELECT ALL - 58 / 75 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - 34 * - 10 * col0 + col2 * - 7 AS col1 FROM tab2 cor0
----
2191
26338
26594

query I rowsort
SELECT col1 * + col2 * - col2 AS col0 FROM tab1 cor0
----
-119808
-32490
-75816

query I rowsort
SELECT + 30 + - col1 FROM tab2 AS cor0
----
-1
-29
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9920
SELECT ALL - CAST( + col2 AS SIGNED ) * col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-9920
SELECT ALL - CAST ( + col2 AS INTEGER ) * col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9921
SELECT + ( + col1 ) DIV + col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9921
SELECT + ( + col1 ) / + col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT + 53 + + 83 FROM tab1 AS cor0
----
136

query I rowsort
SELECT ALL - 55 * col0 FROM tab2 AS cor0
----
-385
-4290
-4345

query I rowsort
SELECT - + 5 * + 56 AS col1 FROM tab1 AS cor0
----
-280
-280
-280

query I rowsort
SELECT ALL + + col1 * ( col2 ) AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col2 + 11 FROM tab2 AS cor0
----
-15
-16
-27

query I rowsort
SELECT DISTINCT + 56 * + 83 FROM tab0 cor0
----
4648

query I rowsort
SELECT - cor0.col1 + 2 FROM tab0 AS cor0
----
-84
-89
-95

query I rowsort
SELECT ALL + ( + 13 ) AS col1 FROM tab0 AS cor0
----
13
13
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9930
SELECT + CAST( + 38 AS SIGNED ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
48
51
64

skipif mysql # not compatible
query I rowsort label-9930
SELECT + CAST ( + 38 AS INTEGER ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
48
51
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9931
SELECT DISTINCT - ( col2 ) * - col0 + - CAST( NULL AS DECIMAL ) + 25 * + col2 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9931
SELECT DISTINCT - ( col2 ) * - col0 + - CAST ( NULL AS REAL ) + 25 * + col2 AS col1 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9932
SELECT DISTINCT - 98 DIV - col2 + col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-9932
SELECT DISTINCT - 98 / - col2 + col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT + col1 * + col2 + col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - + cor0.col0 + col0 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT col2 * + 51 FROM tab0
----
1683
4182
51

query I rowsort
SELECT - col1 + - cor0.col0 * + col2 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL ( 4 ) AS col0 FROM tab2
----
4
4
4

query I rowsort
SELECT - ( col2 ) + col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 39 + col2 FROM tab1 AS cor0
----
135
93
96

query I rowsort
SELECT ( - col1 ) * cor0.col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col1 * + 60 * col0 FROM tab0
----
123840
203700
485940

query I rowsort
SELECT 39 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT 71 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9944
SELECT ALL CAST( NULL AS SIGNED ) * + 45 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9944
SELECT ALL CAST ( NULL AS INTEGER ) * + 45 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 + + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - ( col1 * + col0 ) AS col2 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-9947
SELECT DISTINCT col0 DIV + col2 AS col1 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9947
SELECT DISTINCT col0 / + col2 AS col1 FROM tab0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + col2 * col1 * + col2 AS col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT - col2 + 67 FROM tab0
----
-15
34
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab1, tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 90 FROM tab2, tab0 AS cor0
----
90

query I rowsort
SELECT - 55 + col0 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-7353
-847
-90

query I rowsort
SELECT DISTINCT 41 FROM tab1, tab1 AS cor0
----
41

query I rowsort
SELECT ALL - 22 FROM tab1
----
-22
-22
-22

query I rowsort
SELECT 78 AS col2 FROM tab2 cor0
----
78
78
78

query I rowsort
SELECT ALL 89 FROM tab2, tab1 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ( col2 ) * + col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT cor0.col2 + - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9960
SELECT + - col0 DIV - 48 FROM tab1 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9960
SELECT + - col0 / - 48 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT col2 + - ( col0 ) FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL - col2 * - ( - ( col2 ) ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT col2 * col1 * col1 + - col0 * - ( + col0 + col1 ) * + col1 FROM tab1 AS cor0
----
112944
38766
53060

query I rowsort
SELECT + cor0.col1 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - + cor0.col1 * + col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col0 col0 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9967
SELECT - cor0.col1 * 55 DIV + 86 FROM tab1 cor0
----
-16
-6
-8

skipif mysql # not compatible
query I rowsort label-9967
SELECT - cor0.col1 * 55 / + 86 FROM tab1 cor0
----
-16
-6
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9968
SELECT + - col1 DIV - 88 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9968
SELECT + - col1 / - 88 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9969
SELECT DISTINCT - - CAST( NULL AS SIGNED ) / col1 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9969
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) / col1 AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + 85 AS col1 FROM tab0 AS cor0
----
85
85
85

query I rowsort
SELECT ALL + col0 * + 37 + col2 - - 20 * - 29 FROM tab0 AS cor0
----
2795
341
716

query I rowsort
SELECT cor0.col0 + 75 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 02d3bd118524dbb5fb916f296cd1cc74

onlyif mysql # use DIV operator for integer division
query I rowsort label-9973
SELECT + cor1.col2 DIV 61 FROM tab2 cor0 CROSS JOIN tab1, tab0 cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif mysql # not compatible
query I rowsort label-9973
SELECT + cor1.col2 / 61 FROM tab2 cor0 CROSS JOIN tab1, tab0 cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

query I rowsort
SELECT col1 + - col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + col0 + + 76 * col0 * + ( col1 ) FROM tab0 cor0
----
156888
258055
615613

onlyif mysql # use DIV operator for integer division
query I rowsort label-9976
SELECT - cor0.col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9976
SELECT - cor0.col2 / + col1 AS col0 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT + col0 + col2 + + ( col0 + cor0.col2 ) AS col2 FROM tab1 AS cor0
----
114
242
352

onlyif mysql # use DIV operator for integer division
query I rowsort label-9978
SELECT ALL col0 DIV - col0 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9978
SELECT ALL col0 / - col0 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col1 col2 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - ( - col2 ) col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9981
SELECT DISTINCT col2 * + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-9981
SELECT DISTINCT col2 * + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT 78 * col1 FROM tab1
----
1014
2028
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 - - col0 col1 FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 + tab1.col2 col1 FROM tab1
----
138
141
180

query I rowsort
SELECT DISTINCT col0 + col0 + col1 AS col1 FROM tab2
----
175
215
45

query I rowsort
SELECT ALL col0 * - 34 * + col2 FROM tab1 AS cor0
----
-124032
-261120
-5508

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9987
SELECT DISTINCT cor0.col1 - CAST( 19 AS SIGNED ) FROM tab2, tab1 AS cor0
----
-6
-9
7

skipif mysql # not compatible
query I rowsort label-9987
SELECT DISTINCT cor0.col1 - CAST ( 19 AS INTEGER ) FROM tab2, tab1 AS cor0
----
-6
-9
7

query I rowsort
SELECT ALL - - col2 + + col0 * col2 FROM tab2 cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + - cor0.col2 * - col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 69 - + col0 AS col0 FROM tab0
----
-20
34
45

query I rowsort
SELECT + tab0.col2 * col1 AS col1 FROM tab0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9992
SELECT DISTINCT - tab0.col2 - - col2 * CAST( col1 AS SIGNED ) * col0 AS col1 FROM tab0
----
3394
664036
68079

skipif mysql # not compatible
query I rowsort label-9992
SELECT DISTINCT - tab0.col2 - - col2 * CAST ( col1 AS INTEGER ) * col0 AS col1 FROM tab0
----
3394
664036
68079

query I rowsort
SELECT DISTINCT tab0.col1 + + 61 + - col0 FROM tab0
----
123
63

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab1 cor0, tab0 AS cor1
----
54
57
96

query I rowsort
SELECT - col0 + 49 FROM tab1
----
-15
-31
46

query I rowsort
SELECT col0 + 59 AS col2 FROM tab2
----
137
138
66

query I rowsort
SELECT col0 - col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT tab2.col2 * + col2 + - col2 + col0 AS col1 FROM tab2
----
1485
709
728

query I rowsort
SELECT ALL + col0 + + 51 AS col1 FROM tab2
----
129
130
58

