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 cor0.col0 + col0 * - col2 FROM tab1 AS cor0
----
-159
-3584
-7600

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

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

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

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

query I rowsort
SELECT DISTINCT - + cor0.col0 * + col1 + + col0 * col2 FROM tab2 AS cor0
----
-2574
-28
1659

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - col2 + - col1 col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT ALL col2 + cor0.col1 + col1 * cor0.col2 AS col0 FROM tab2 cor0
----
1619
701
895

onlyif mysql # use DIV operator for integer division
query I rowsort label-8
SELECT DISTINCT col1 DIV + col0 + col2 FROM tab1 AS cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-8
SELECT DISTINCT col1 / + col0 + col2 FROM tab1 AS cor0
----
57
62
96

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

query I rowsort
SELECT col2 * + tab1.col0 * col0 AS col2 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL + col1 * - col2 + - col2 * col0 * col1 + + col2 FROM tab2
----
-121160
-51642
-6669

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

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

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

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

query I rowsort
SELECT - col2 * - col1 + + 73 * col2 * ( + 40 ) FROM tab0 AS cor0
----
246902
3017
99198

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 92 AS REAL ) * + col1 + - col2 + col1 * cor0.col2 AS col0 FROM tab2 AS cor0
----
2172
3662
6936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-18
SELECT DISTINCT - CAST( tab0.col1 AS SIGNED ) AS col1 FROM tab0, tab1 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-18
SELECT DISTINCT - CAST ( tab0.col1 AS INTEGER ) AS col1 FROM tab0, tab1 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + col1 * 95 FROM tab1
----
1235
2470
950

skipif mysql # not compatible
query I rowsort
SELECT tab1.col2 * ( + ( - col0 ) ) + + CAST ( col0 AS REAL ) + - tab1.col1 FROM tab1
----
-185
-3594
-7613

query I rowsort
SELECT ALL 9 * tab0.col0 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 4d46dc1ba5f1cec596972d175a7de877

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 * - col2 col2 FROM tab0 cor0
----
297
738
9

query I rowsort
SELECT 73 * 35 + - tab0.col0 FROM tab0
----
2466
2520
2531

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-28
SELECT 59 DIV col2 AS col0 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-28
SELECT 59 / col2 AS col0 FROM tab1
----
0
1
1

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

query I rowsort
SELECT ALL ( cor0.col1 ) * cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 * col0 col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - - 97 FROM tab2 AS cor0
----
97
97
97

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

query I rowsort
SELECT 0 * 39 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL 48 * - col2 FROM tab2
----
-1248
-1296
-1824

onlyif mysql # use DIV operator for integer division
query I rowsort label-36
SELECT ALL + ( - tab2.col1 ) DIV - col1 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-36
SELECT ALL + ( - tab2.col1 ) / - col1 AS col2 FROM tab2
----
1
1
1

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

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

skipif mysql # not compatible
query I rowsort label-38
SELECT DISTINCT + col1 * CAST ( + 87 AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
179568
295365
704613

query I rowsort
SELECT - cor0.col2 * - 53 AS col2 FROM tab2 cor0
----
1378
1431
2014

query I rowsort
SELECT DISTINCT col1 * + 46 - ( col2 ) FROM tab0 AS cor0
----
3923
4104
4461

query I rowsort
SELECT DISTINCT cor0.col1 * - 11 FROM tab1 AS cor0
----
-110
-143
-286

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-43
SELECT ALL tab2.col2 * - tab2.col1 * - CAST( - col0 AS SIGNED ) AS col0 FROM tab2
----
-119652
-51034
-5859

skipif mysql # not compatible
query I rowsort label-43
SELECT ALL tab2.col2 * - tab2.col1 * - CAST ( - col0 AS INTEGER ) AS col0 FROM tab2
----
-119652
-51034
-5859

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

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

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

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

query I rowsort
SELECT ALL + 82 * col2 AS col2 FROM tab1
----
4428
4674
7872

query I rowsort
SELECT DISTINCT col2 - + ( 80 ) FROM tab1
----
-23
-26
16

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-51
SELECT + - col2 * + col1 - + ( - col0 + cor0.col2 ) DIV col0 AS col2 FROM tab1 AS cor0
----
-1248
-1421
-570

skipif mysql # not compatible
query I rowsort label-51
SELECT + - col2 * + col1 - + ( - col0 + cor0.col2 ) / col0 AS col2 FROM tab1 AS cor0
----
-1248
-1421
-570

query I rowsort
SELECT + + col0 * - cor0.col0 * + 52 + - col2 + - col2 AS col1 FROM tab1 AS cor0
----
-213106
-332992
-576

query I rowsort
SELECT - col2 + + 27 + - col0 * col2 * - col1 AS col2 FROM tab2 AS cor0
----
119653
51023
5859

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-55
SELECT col2 DIV col1 + col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-55
SELECT col2 / col1 + col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-56
SELECT + col2 * col1 - ( col0 ) DIV + col0 AS col0 FROM tab2 cor0
----
1533
645
836

skipif mysql # not compatible
query I rowsort label-56
SELECT + col2 * col1 - ( col0 ) / + col0 AS col0 FROM tab2 cor0
----
1533
645
836

query I rowsort
SELECT - col2 * - 96 - 30 AS col1 FROM tab1 AS cor0
----
5154
5442
9186

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

query I rowsort
SELECT 42 AS col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

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

query I rowsort
SELECT DISTINCT - 64 + + 23 AS col1 FROM tab2
----
-41

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

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

query I rowsort
SELECT ALL + - 29 + cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to f324fe9ea0d4e677f90cc924f1232d55

query I rowsort
SELECT - 95 * cor0.col1 FROM tab2 AS cor0
----
-1615
-2945
-5605

onlyif mysql # use DIV operator for integer division
query I rowsort label-66
SELECT DISTINCT - 13 * col2 DIV + cor0.col0 + col2 col2 FROM tab1 AS cor0
----
-180
46
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-66
SELECT DISTINCT - 13 * col2 / + cor0.col0 + col2 col2 FROM tab1 AS cor0
----
-180
46
81

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

query I rowsort
SELECT DISTINCT + 53 + col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
157
170
87

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

query I rowsort
SELECT ALL + 24 * col0 FROM tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT ALL col0 * - col1 * col2 + 16 * + col2 FROM tab0 AS cor0
----
-3379
-662806
-67584

query I rowsort
SELECT DISTINCT - + col1 - 82 FROM tab0 AS cor0
----
-168
-173
-179

query I rowsort
SELECT DISTINCT col2 + 93 AS col0 FROM tab2 cor0
----
119
120
131

query I rowsort
SELECT ALL + 81 * - cor0.col1 * - col2 + + col1 FROM tab2 AS cor0
----
124313
52343
67828

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

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

query I rowsort
SELECT ALL - ( - 32 ) + col0 FROM tab0 AS cor0
----
121
56
67

query I rowsort
SELECT DISTINCT + col0 * 87 AS col2 FROM tab0 AS cor0
----
2088
3045
7743

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

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

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

query I rowsort
SELECT DISTINCT + - 47 + col1 * col2 - col1 AS col0 FROM tab0 cor0
----
-47
2705
7324

query I rowsort
SELECT DISTINCT - col1 * - 83 + - col0 AS col0 FROM tab2 AS cor0
----
1332
2566
4819

query I rowsort
SELECT ALL 17 - cor0.col0 AS col0 FROM tab0 cor0
----
-18
-7
-72

query I rowsort
SELECT ALL 82 * - col0 - col1 AS col1 FROM tab0 AS cor0
----
-2054
-2967
-7389

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

query I rowsort
SELECT ALL 75 * + col0 * col0 FROM tab1
----
307200
480000
675

query I rowsort
SELECT cor0.col0 + tab2.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 218174566e316faf7def1869e4f9f1b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + tab1.col1 * col1 col2 FROM tab1
----
-156
-650
-90

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

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

query I rowsort
SELECT col2 + col2 * 18 FROM tab2 cor0
----
494
513
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-91
SELECT DISTINCT - + cor0.col1 DIV + CAST( + 91 AS SIGNED ) - - cor0.col2 FROM tab0 AS cor0
----
0
33
81

skipif mysql # not compatible
query I rowsort label-91
SELECT DISTINCT - + cor0.col1 / + CAST ( + 91 AS INTEGER ) - - cor0.col2 FROM tab0 AS cor0
----
0
33
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-92
SELECT ALL + col0 DIV 99 + col0 + col0 * - cor0.col2 FROM tab2 cor0
----
-182
-1950
-2923

skipif mysql # not compatible
query I rowsort label-92
SELECT ALL + col0 / 99 + col0 + col0 * - cor0.col2 FROM tab2 cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 39 col2 FROM tab0
----
128
63
74

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-95
SELECT - col0 / 29 col0 FROM tab0 AS cor0
----
-1
-3
0

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

query I rowsort
SELECT - col2 + col0 * 39 FROM tab2 cor0
----
246
3016
3043

query I rowsort
SELECT - 90 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - 94 * col1 col0 FROM tab2
----
-1519
-2907
-5468

query I rowsort
SELECT ALL + col0 + 71 FROM tab1 AS cor0
----
135
151
74

query I rowsort
SELECT ALL - + 65 * + col1 * - col1 FROM tab0 AS cor0
----
480740
538265
611585

query I rowsort
SELECT ALL + 95 * + 75 FROM tab2 AS cor0
----
7125
7125
7125

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

query I rowsort
SELECT ALL col2 * 16 FROM tab2
----
416
432
608

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

query I rowsort
SELECT - 98 * + col1 FROM tab1 AS cor0
----
-1274
-2548
-980

query I rowsort
SELECT DISTINCT 84 + col0 FROM tab0 cor0
----
108
119
173

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-109
SELECT ALL + + cor0.col2 * cor0.col1 DIV - 23 AS col0 FROM tab0 AS cor0
----
-123
-324
-4

skipif mysql # not compatible
query I rowsort label-109
SELECT ALL + + cor0.col2 * cor0.col1 / - 23 AS col0 FROM tab0 AS cor0
----
-123
-324
-4

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

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

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

query I rowsort
SELECT col1 + - 48 + col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2938
-3287
-9251

query I rowsort
SELECT + col2 + - ( cor0.col1 ) * cor0.col0 FROM tab1 AS cor0
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * 97 col2 FROM tab2 AS cor0
----
-1649
-3007
-5723

onlyif mysql # use DIV operator for integer division
query I rowsort label-115
SELECT ALL - col2 + col2 DIV col1 col1 FROM tab1 cor0
----
-52
-52
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-115
SELECT ALL - col2 + col2 / col1 col1 FROM tab1 cor0
----
-52
-52
-89

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

query I rowsort
SELECT DISTINCT - col1 * col2 + 62 AS col0 FROM tab2
----
-1472
-584
-775

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

query I rowsort
SELECT col2 + col0 * 99 - ( tab1.col2 * + col2 ) AS col2 FROM tab1
----
-1200
-2565
3144

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 + 75 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
-11
-16
-22

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col1 FROM tab2, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL - 83 - + tab2.col1 AS col2 FROM tab2
----
-100
-114
-142

query I rowsort
SELECT DISTINCT 33 + + col2 - + col1 AS col1 FROM tab2
----
0
29
54

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

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

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

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

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

query I rowsort
SELECT - cor0.col1 + cor0.col0 + 37 AS col0 FROM tab2 AS cor0
----
13
56
99

query I rowsort
SELECT - cor0.col1 + 83 * 7 FROM tab2 AS cor0
----
522
550
564

query I rowsort
SELECT col2 + + ( - col0 ) * col2 * 87 FROM tab1 cor0
----
-14040
-317319
-668064

onlyif mysql # use DIV operator for integer division
query I rowsort label-133
SELECT 75 DIV 33 AS col2 FROM tab2 cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-133
SELECT 75 / 33 AS col2 FROM tab2 cor0
----
2
2
2

query I rowsort
SELECT + 89 + - ( + cor0.col1 ) * + col0 * - col0 FROM tab0 AS cor0
----
118914
49625
720900

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-135
SELECT + CAST( ( col0 ) AS SIGNED ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-135
SELECT + CAST ( ( col0 ) AS INTEGER ) FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-136
SELECT col0 DIV col2 + col1 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-136
SELECT col0 / col2 + col1 FROM tab0
----
132
86
92

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 + 60 FROM tab1 cor0
----
-36
3
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-141
SELECT ALL - col0 DIV 11 + cor0.col0 DIV - ( - cor0.col0 ) AS col1 FROM tab0 cor0
----
-1
-2
-7

skipif mysql # not compatible
query I rowsort label-141
SELECT ALL - col0 / 11 + cor0.col0 / - ( - cor0.col0 ) AS col1 FROM tab0 cor0
----
-1
-2
-7

query I rowsort
SELECT col0 * 46 AS col2 FROM tab2 AS cor0
----
322
3588
3634

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

skipif mysql # not compatible
query I rowsort label-143
SELECT ALL + - CAST ( + col2 AS INTEGER ) * cor0.col1 + - ( col2 ) * col1 FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT DISTINCT - - col2 * 67 - + cor0.col2 * col2 FROM tab1 AS cor0
----
-2784
570
702

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

query I rowsort
SELECT ALL + 87 * col2 AS col0 FROM tab1
----
4698
4959
8352

query I rowsort
SELECT ALL 62 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT DISTINCT + - col2 * col2 * 24 + col2 * + col0 AS col2 FROM tab2 AS cor0
----
-14196
-17307
-31654

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-151
SELECT ALL 31 + col0 - col0 DIV + 15 FROM tab1 AS cor0
----
106
34
91

skipif mysql # not compatible
query I rowsort label-151
SELECT ALL 31 + col0 - col0 / + 15 FROM tab1 AS cor0
----
106
34
91

query I rowsort
SELECT DISTINCT + ( - col0 ) * - 5 FROM tab1 AS cor0
----
15
320
400

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

query I rowsort
SELECT ALL - ( 15 ) AS col1 FROM tab1
----
-15
-15
-15

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

query I rowsort
SELECT DISTINCT - cor0.col2 * + 76 + 99 FROM tab1 AS cor0
----
-4005
-4233
-7197

query I rowsort
SELECT ALL tab0.col0 * - col1 * - 79 FROM tab0
----
163056
268205
639821

onlyif mysql # use DIV operator for integer division
query I rowsort label-158
SELECT col0 DIV + 2 + + 18 * + col2 * col2 AS col2 FROM tab1 cor0
----
165928
52489
58514

skipif mysql # not compatible
query I rowsort label-158
SELECT col0 / + 2 + + 18 * + col2 * col2 AS col2 FROM tab1 cor0
----
165928
52489
58514

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 56 - + col2 col0 FROM tab2
----
-82
-83
-94

query I rowsort
SELECT + 94 * + col1 FROM tab0
----
8084
8554
9118

query I rowsort
SELECT ( + col0 ) * 43 FROM tab0
----
1032
1505
3827

query I rowsort
SELECT - 34 FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT DISTINCT tab2.col1 * - ( - col2 ) * col2 + col2 * tab2.col0 FROM tab2
----
22788
27550
41912

query I rowsort
SELECT - - cor0.col2 * col2 + - 56 FROM tab1 cor0
----
2860
3193
9160

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

query I rowsort
SELECT + - col0 + 39 * - col0 AS col1 FROM tab1 cor0
----
-120
-2560
-3200

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

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

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

query I rowsort
SELECT col2 * - tab0.col0 + 34 AS col1 FROM tab0
----
-1
-7264
-758

query I rowsort
SELECT + tab0.col2 * + col0 - - 66 * 45 AS col0 FROM tab0
----
10268
3005
3762

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 * - col0 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col2 - - 5 AS col0 FROM tab1 AS cor0
----
101
59
62

query I rowsort
SELECT ALL + 66 * col2 FROM tab2
----
1716
1782
2508

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-180
SELECT ALL - + cor0.col0 + cor0.col1 * col1 DIV 28 AS col1 FROM tab2 AS cor0
----
-69
27
46

skipif mysql # not compatible
query I rowsort label-180
SELECT ALL - + cor0.col0 + cor0.col1 * col1 / 28 AS col1 FROM tab2 AS cor0
----
-69
27
46

query I rowsort
SELECT DISTINCT - - col1 + - 6 AS col2 FROM tab2 AS cor0
----
11
25
53

query I rowsort
SELECT 67 * col2 - - col0 FROM tab2 AS cor0
----
1816
1820
2625

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

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

skipif mysql # not compatible
query I rowsort label-184
SELECT ALL - - CAST ( col2 AS INTEGER ) * - col0 * 42 FROM tab1 cor0
----
-153216
-322560
-6804

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 15 AS REAL ) + col0 * col2 AS col2 FROM tab1 AS cor0
----
177
3663
7695

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-187
SELECT DISTINCT - + 65 DIV col0 - col0 AS col1 FROM tab2 AS cor0
----
-16
-78
-79

skipif mysql # not compatible
query I rowsort label-187
SELECT DISTINCT - + 65 / col0 - col0 AS col1 FROM tab2 AS cor0
----
-16
-78
-79

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

query I rowsort
SELECT - col1 * + col0 + - col2 * + 30 AS col1 FROM tab0 cor0
----
-10559
-3054
-3425

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-191
SELECT DISTINCT 60 DIV cor0.col0 FROM tab1 AS cor0
----
0
20

skipif mysql # not compatible
query I rowsort label-191
SELECT DISTINCT 60 / cor0.col0 FROM tab1 AS cor0
----
0
20

query I rowsort
SELECT ALL - - 45 + cor0.col1 AS col2 FROM tab2 cor0
----
104
62
76

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

query I rowsort
SELECT + 14 + 90 AS col1 FROM tab1 AS cor0
----
104
104
104

query I rowsort
SELECT ALL + cor0.col0 * + 27 * col2 FROM tab2 cor0
----
5103
54756
81054

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-197
SELECT DISTINCT + - cor0.col1 + col1 DIV col1 AS col0 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-197
SELECT DISTINCT + - cor0.col1 + col1 / col1 AS col0 FROM tab0 AS cor0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col2 * + col0 col0 FROM tab1 AS cor0
----
-108
-3591
-7584

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

query I rowsort
SELECT ALL col1 + + 33 * + tab0.col1 FROM tab0
----
2924
3094
3298

query I rowsort
SELECT + + col2 + - col1 * + 8 AS col2 FROM tab1 AS cor0
----
-154
-23
-8

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

query I rowsort
SELECT ALL + - col2 * col1 - - col1 * + col0 FROM tab1 AS cor0
----
-1326
-208
70

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

query I rowsort
SELECT ALL + col0 + + 90 FROM tab1
----
154
170
93

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

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

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

query I rowsort
SELECT - ( col2 ) + + col1 * 17 AS col2 FROM tab2
----
251
500
977

query I rowsort
SELECT ALL - col0 + col1 * - col2 * col1 - - col2 AS col0 FROM tab1 AS cor0
----
-16208
-36453
-5707

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-211
SELECT DISTINCT col0 DIV - col2 + - ( - col2 ) * + col2 * col0 AS col2 FROM tab1 AS cor0
----
207935
737280
8748

skipif mysql # not compatible
query I rowsort label-211
SELECT DISTINCT col0 / - col2 + - ( - col2 ) * + col2 * col0 AS col2 FROM tab1 AS cor0
----
207935
737280
8748

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-212
SELECT + col1 / 72 + col0 col2 FROM tab0
----
25
36
90

query I rowsort
SELECT + 86 + + col0 * + col1 AS col0 FROM tab2 AS cor0
----
1429
303
4688

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 60 + col1 + col2 * - 69 col0 FROM tab1 AS cor0
----
-1811
-3520
-83

query I rowsort
SELECT + 78 * tab0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 7de15befa4eeabd40210b3c7fdc18770

query I rowsort
SELECT DISTINCT ( 76 ) + col2 AS col0 FROM tab0
----
109
158
77

query I rowsort
SELECT ALL 77 * col2 AS col0 FROM tab0 cor0
----
2541
6314
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 3 * + col2 col1 FROM tab1 AS cor0
----
162
171
288

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

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

query I rowsort
SELECT DISTINCT + ( - col1 ) * col1 - 93 FROM tab0 AS cor0
----
-7489
-8374
-9502

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

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

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

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

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

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

query I rowsort
SELECT ALL - cor0.col2 * ( + cor0.col1 ) FROM tab1, tab1 cor0
----
9 values hashing to 315ab91f9844de122b0c28cd16e982e4

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 22 col0 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to a0e2414933a8871692e3623f463e9d4b

onlyif mysql # use DIV operator for integer division
query I rowsort label-231
SELECT DISTINCT + col0 DIV + 10 AS col1 FROM tab1
----
0
6
8

skipif mysql # not compatible
query I rowsort label-231
SELECT DISTINCT + col0 / + 10 AS col1 FROM tab1
----
0
6
8

query I rowsort
SELECT DISTINCT + 53 AS col0 FROM tab1
----
53

query I rowsort
SELECT ALL ( - col1 ) * col1 AS col0 FROM tab0
----
-7396
-8281
-9409

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

query I rowsort
SELECT ALL + + 12 + - cor0.col0 FROM tab0 AS cor0
----
-12
-23
-77

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + col0 + + col1 col1 FROM tab0 AS cor0
----
-1954
-3263
-7919

query I rowsort
SELECT - 47 + + cor0.col1 FROM tab2 AS cor0
----
-16
-30
12

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-241
SELECT + col2 DIV col0 + - col0 + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
23

skipif mysql # not compatible
query I rowsort label-241
SELECT + col2 / col0 + - col0 + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 * col1 col0 FROM tab2 AS cor0
----
-1326
-2418
-4602

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

query I rowsort
SELECT ALL 9 + + tab1.col1 AS col2 FROM tab1
----
19
22
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-245
SELECT ALL col0 DIV + col1 + tab1.col2 + col2 * - col0 FROM tab1
----
-108
-3585
-7578

skipif mysql # not compatible
query I rowsort label-245
SELECT ALL col0 / + col1 + tab1.col2 + col2 * - col0 FROM tab1
----
-108
-3585
-7578

query I rowsort
SELECT col0 + cor0.col2 * 17 AS col0 FROM tab0 AS cor0
----
1483
52
585

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + ( 27 ) col0 FROM tab1 AS cor0
----
-1728
-2160
-81

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-250
SELECT ALL + + col2 + + col0 DIV + col1 + cor0.col0 AS col2 FROM tab1 AS cor0
----
127
182
57

skipif mysql # not compatible
query I rowsort label-250
SELECT ALL + + col2 + + col0 / + col1 + cor0.col0 AS col2 FROM tab1 AS cor0
----
127
182
57

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

skipif mysql # not compatible
query I rowsort label-251
SELECT DISTINCT + + col1 / - ( + col0 + - col1 ) AS col0 FROM tab0 AS cor0
----
1
45

query I rowsort
SELECT ALL + col0 * - ( col0 + - col1 ) AS col0 FROM tab1 cor0
----
-3456
-5360
69

query I rowsort
SELECT ALL - ( col1 * + col2 ) + col1 * col1 * - col0 FROM tab1
----
-14768
-3432
-6970

query I rowsort
SELECT - 68 + col2 AS col1 FROM tab2
----
-30
-41
-42

query I rowsort
SELECT cor0.col2 * - 21 + col1 + cor0.col1 FROM tab2 AS cor0
----
-428
-505
-764

onlyif mysql # use DIV operator for integer division
query I rowsort label-256
SELECT - - ( + ( - col0 ) ) DIV + CAST( 36 AS SIGNED ) - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7923

skipif mysql # not compatible
query I rowsort label-256
SELECT - - ( + ( - col0 ) ) / + CAST ( 36 AS INTEGER ) - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7923

query I rowsort
SELECT - - 1 + - col2 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT - + ( cor0.col1 ) * + cor0.col2 + + 55 FROM tab1 AS cor0
----
-1193
-1349
-515

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

query I rowsort
SELECT DISTINCT + col0 * 23 AS col0 FROM tab0
----
2047
552
805

query I rowsort
SELECT - 62 * + 57 - col2 FROM tab0 AS cor0
----
-3535
-3567
-3616

query I rowsort
SELECT DISTINCT + col0 - + 75 AS col2 FROM tab0 cor0
----
-40
-51
14

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

query I rowsort
SELECT DISTINCT + col0 * - 62 + col2 FROM tab2 AS cor0
----
-407
-4810
-4860

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

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

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

query I rowsort
SELECT ALL + 35 * col0 + - 23 FROM tab1 AS cor0
----
2217
2777
82

query I rowsort
SELECT ALL - - 77 + col0 AS col0 FROM tab2 cor0
----
155
156
84

query I rowsort
SELECT ALL - 27 - - 95 FROM tab1
----
68
68
68

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-273
SELECT col1 + - col0 DIV ( + col0 ) + col0 AS col1 FROM tab1
----
28
73
92

skipif mysql # not compatible
query I rowsort label-273
SELECT col1 + - col0 / ( + col0 ) + col0 AS col1 FROM tab1
----
28
73
92

query I rowsort
SELECT DISTINCT col2 + 25 AS col0 FROM tab1
----
121
79
82

query I rowsort
SELECT - 32 * + 49 + col1 AS col0 FROM tab0 AS cor0
----
-1471
-1477
-1482

query I rowsort
SELECT ALL + col2 + + col2 * 52 AS col0 FROM tab1 AS cor0
----
2862
3021
5088

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

query I rowsort
SELECT - col1 * col0 * - col0 + col0 AS col1 FROM tab2 cor0
----
106176
1526
359034

query I rowsort
SELECT DISTINCT + + cor0.col1 * 25 + + col2 AS col2 FROM tab0 AS cor0
----
2183
2357
2426

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

query I rowsort
SELECT DISTINCT + 3 + col0 AS col2 FROM tab2 AS cor0
----
10
81
82

query I rowsort
SELECT + 39 + + col0 * col1 FROM tab0 AS cor0
----
2103
3434
8138

query I rowsort
SELECT col0 * 51 * col1 AS col0 FROM tab1 cor0
----
32640
3978
53040

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

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

skipif mysql # not compatible
query I rowsort label-285
SELECT ALL + CAST ( - cor0.col0 AS INTEGER ) FROM tab1 AS cor0
----
-3
-64
-80

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

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

query I rowsort
SELECT 46 * col1 * col1 AS col2 FROM tab0 AS cor0
----
340216
380926
432814

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 60 + cor0.col0 col0 FROM tab2 AS cor0
----
-53
18
19

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

query I rowsort
SELECT DISTINCT 92 * - col2 + col2 * + tab1.col2 FROM tab1
----
-1995
-2052
384

query I rowsort
SELECT + col1 + - col2 + + col0 FROM tab2
----
11
111
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-293
SELECT DISTINCT col0 + col1 DIV + cor0.col2 col1 FROM tab0 AS cor0
----
132
26
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-293
SELECT DISTINCT col0 + col1 / + cor0.col2 col1 FROM tab0 AS cor0
----
132
26
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-294
SELECT DISTINCT - col0 * col2 DIV + 33 + - 30 + - col0 AS col0 FROM tab2 cor0
----
-169
-199
-42

skipif mysql # not compatible
query I rowsort label-294
SELECT DISTINCT - col0 * col2 / + 33 + - 30 + - col0 AS col0 FROM tab2 cor0
----
-169
-199
-42

query I rowsort
SELECT DISTINCT + col2 * col0 + 32 + col2 AS col0 FROM tab2 AS cor0
----
2086
248
3072

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

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

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

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

query I rowsort
SELECT + col0 * 86 FROM tab2 cor0
----
602
6708
6794

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

query I rowsort
SELECT ALL cor0.col0 + 86 * - col0 FROM tab0 AS cor0
----
-2040
-2975
-7565

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

query I rowsort
SELECT col0 + + 26 * 59 * - col1 AS col1 FROM tab2 AS cor0
----
-25999
-47547
-90428

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

query I rowsort
SELECT col0 + + ( cor0.col2 * + col2 ) - - col1 FROM tab2 AS cor0
----
1540
767
813

onlyif mysql # use DIV operator for integer division
query I rowsort label-306
SELECT - col0 DIV 44 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-306
SELECT - col0 / 44 FROM tab2 AS cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT - col1 * - cor0.col1 + col2 FROM tab1 AS cor0
----
157
265
730

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

query I rowsort
SELECT ALL cor0.col2 * 31 + + col1 FROM tab2 AS cor0
----
1195
865
868

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-311
SELECT DISTINCT + col2 DIV col2 + 63 * col1 AS col1 FROM tab1 AS cor0
----
1639
631
820

skipif mysql # not compatible
query I rowsort label-311
SELECT DISTINCT + col2 / col2 + 63 * col1 AS col1 FROM tab1 AS cor0
----
1639
631
820

query I rowsort
SELECT - + cor0.col0 - + 61 AS col1 FROM tab1 AS cor0
----
-125
-141
-64

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-314
SELECT col1 * 81 DIV - ( col0 ) + col0 FROM tab0 AS cor0
----
-189
-266
7

skipif mysql # not compatible
query I rowsort label-314
SELECT col1 * 81 / - ( col0 ) + col0 FROM tab0 AS cor0
----
-189
-266
7

query I rowsort
SELECT - - col2 * 57 + col1 FROM tab1 AS cor0
----
3104
3259
5485

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

skipif mysql # not compatible
query I rowsort label-316
SELECT col2 / ( - col2 ) FROM tab1
----
-1
-1
-1

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-319
SELECT - col1 DIV - 16 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-319
SELECT - col1 / - 16 FROM tab1
----
0
0
1

query I rowsort
SELECT - col1 * col2 + col2 * - tab2.col2 * col1 + col1 FROM tab2
----
-23405
-25177
-41359

query I rowsort
SELECT DISTINCT - + 40 + + col1 FROM tab0 AS cor0
----
46
51
57

query I rowsort
SELECT + col1 + cor0.col1 * - ( 15 ) * + col2 AS col2 FROM tab2 cor0
----
-12524
-22951
-9673

query I rowsort
SELECT DISTINCT col1 + cor0.col2 * 97 FROM tab0 cor0
----
194
3287
8045

query I rowsort
SELECT + + col0 * - col0 * 16 FROM tab2 AS cor0
----
-784
-97344
-99856

query I rowsort
SELECT - ( + col2 ) * 8 AS col0 FROM tab0 AS cor0
----
-264
-656
-8

query I rowsort
SELECT ALL + ( - 71 ) FROM tab2
----
-71
-71
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-327
SELECT ALL + 62 DIV - cor0.col1 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 7b7165043c920f0f38c46f36c0f8d696

skipif mysql # not compatible
query I rowsort label-327
SELECT ALL + 62 / - cor0.col1 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 7b7165043c920f0f38c46f36c0f8d696

query I rowsort
SELECT + 39 * tab0.col1 + + col1 FROM tab0
----
3440
3640
3880

query I rowsort
SELECT - 39 + - col2 FROM tab0
----
-121
-40
-72

query I rowsort
SELECT - 27 * col0 + + col1 * ( + col0 ) * col1 AS col0 FROM tab1
----
11360
1947
4672

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + cor1.col2 ) col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - ( - col1 * + col1 ) AS col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL + col2 * col1 * - 53 + col2 FROM tab0 AS cor0
----
-150381
-395404
-5140

query I rowsort
SELECT DISTINCT - - col1 * - 98 AS col0 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT + col2 * + 69 FROM tab0 cor0
----
2277
5658
69

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

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

skipif mysql # not compatible
query I rowsort label-342
SELECT col1 / 90 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-343
SELECT 95 DIV - cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2, tab2 AS cor3
----
243 values hashing to 9a4ea33cca2c71bc3771c8f7e23f66e3

skipif mysql # not compatible
query I rowsort label-343
SELECT 95 / - cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2, tab2 AS cor3
----
243 values hashing to 9a4ea33cca2c71bc3771c8f7e23f66e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 * + col2 col2 FROM tab0
----
3135
7790
95

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

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

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

query I rowsort
SELECT - ( - cor0.col0 ) * col0 * + 52 + col0 AS col0 FROM tab1 AS cor0
----
213056
332880
471

query I rowsort
SELECT ALL - 18 * cor1.col0 AS col0 FROM tab1, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 0f522ba4a96f12b85f4c4897c56a1416

query I rowsort
SELECT DISTINCT 60 + - tab0.col1 - + cor0.col1 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 5622fe88427e1b91bd68b3c7bcf19459

query I rowsort
SELECT ALL 53 * tab0.col0 + - col0 * col0 AS col2 FROM tab0
----
-3204
630
696

query I rowsort
SELECT DISTINCT 84 + col1 FROM tab0
----
170
175
181

onlyif mysql # use DIV operator for integer division
query I rowsort label-352
SELECT ALL - 1 + col1 DIV - 79 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-352
SELECT ALL - 1 + col1 / - 79 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - col1 + - col1 * - 84 AS col2 FROM tab0 AS cor0
----
7138
7553
8051

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

query I rowsort
SELECT ALL - 57 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

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

query I rowsort
SELECT DISTINCT - col2 + + 16 AS col2 FROM tab1 AS cor0
----
-38
-41
-80

query I rowsort
SELECT DISTINCT - + 68 + - col0 FROM tab0 AS cor0
----
-103
-157
-92

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-360
SELECT ALL + + CAST( + col2 AS SIGNED ) DIV + col2 FROM tab1 AS cor0
----
1
1
1

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

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

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

query I rowsort
SELECT DISTINCT - ( 31 ) FROM tab0 cor0
----
-31

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

query I rowsort
SELECT + 41 + - 96 * col1 AS col2 FROM tab1 AS cor0
----
-1207
-2455
-919

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

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

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

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

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

query I rowsort
SELECT ALL 87 AS col2 FROM tab2 AS cor0
----
87
87
87

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

query I rowsort
SELECT ALL + col1 * - 87 * - 30 FROM tab0 AS cor0
----
224460
237510
253170

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

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

query I rowsort
SELECT ALL + 93 - col2 FROM tab0
----
11
60
92

query I rowsort
SELECT + - col1 * ( cor0.col1 ) + col1 * + col0 FROM tab0 cor0
----
-182
-5332
-6014

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

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

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

query I rowsort
SELECT ALL col2 + col1 * 57 + - col1 AS col0 FROM tab0
----
4849
5178
5433

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-380
SELECT - 8 + 14 DIV col2 AS col0 FROM tab0 AS cor0
----
-8
-8
6

skipif mysql # not compatible
query I rowsort label-380
SELECT - 8 + 14 / col2 AS col0 FROM tab0 AS cor0
----
-8
-8
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-381
SELECT DISTINCT col0 + 14 DIV col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-381
SELECT DISTINCT col0 + 14 / col1 FROM tab2
----
7
78
79

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

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

query I rowsort
SELECT + col2 * col2 * + ( + 3 * col0 ) FROM tab1 AS cor0
----
2211840
26244
623808

query I rowsort
SELECT DISTINCT + 3 * col1 AS col1 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT ( 57 ) AS col2 FROM tab1
----
57
57
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-387
SELECT ALL + 93 DIV + col1 + - 61 col1 FROM tab1 AS cor0
----
-52
-54
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-387
SELECT ALL + 93 / + col1 + - 61 col1 FROM tab1 AS cor0
----
-52
-54
-58

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

query I rowsort
SELECT DISTINCT - - 6 * + col1 FROM tab2 AS cor0
----
102
186
354

query I rowsort
SELECT DISTINCT + + col2 * col1 + - 94 AS col2 FROM tab2 AS cor0
----
1440
552
743

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + cor0.col2 * - ( col0 ) col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT col2 * - col2 + col0 AS col1 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT ALL 57 + + cor0.col1 * 7 - col0 * col2 FROM tab0 cor0
----
-133
-6604
701

onlyif mysql # use DIV operator for integer division
query I rowsort label-395
SELECT DISTINCT 38 + - col0 DIV 46 FROM tab2 AS cor0
----
37
38

skipif mysql # not compatible
query I rowsort label-395
SELECT DISTINCT 38 + - col0 / 46 FROM tab2 AS cor0
----
37
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT - 98 AS col1 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 9b0655947ad21e0b95a137a474fa6a1f

query I rowsort
SELECT DISTINCT + 24 * col1 FROM tab0
----
2064
2184
2328

query I rowsort
SELECT ALL - 90 * - tab0.col0 AS col0 FROM tab0
----
2160
3150
8010

query I rowsort
SELECT col1 * + 37 + ( - col0 ) FROM tab1 AS cor0
----
306
401
959

query I rowsort
SELECT + 66 * + 49 FROM tab2 AS cor0
----
3234
3234
3234

query I rowsort
SELECT ALL ( + 85 ) FROM tab2 AS cor0
----
85
85
85

query I rowsort
SELECT + ( col1 ) + - col2 * - 50 * col0 FROM tab0 cor0
----
1847
364991
39686

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

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

query I rowsort
SELECT + 41 + col1 * + col0 + col1 * 93 * col1 FROM tab0 cor0
----
689933
778273
878473

query I rowsort
SELECT + 97 * - 58 FROM tab2 AS cor0
----
-5626
-5626
-5626

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + cor0.col2 + + col1 col2 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT - - col2 * - cor0.col2 + 57 + 36 FROM tab2 AS cor0
----
-1351
-583
-636

query I rowsort
SELECT ALL - + 45 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to c48656d0914b6c81d547bb602cc4fdfc

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

query I rowsort
SELECT + ( - 60 ) * col1 FROM tab1
----
-1560
-600
-780

query I rowsort
SELECT + - cor0.col1 + - 31 * col1 * - col2 AS col1 FROM tab2 AS cor0
----
20009
25916
47495

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

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

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

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

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

query I rowsort
SELECT + col0 + - cor0.col1 * + col1 * col2 FROM tab1 AS cor0
----
-16144
-36501
-5636

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

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

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

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

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

query I rowsort
SELECT - col0 * + 68 FROM tab2
----
-476
-5304
-5372

query I rowsort
SELECT + cor0.col2 + cor0.col0 FROM tab2, tab1 cor0
----
9 values hashing to 8733ba2dd568938e338b27ad757d3e3b

onlyif mysql # use DIV operator for integer division
query I rowsort label-424
SELECT + ( col1 ) + cor0.col1 DIV + col2 AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-424
SELECT + ( col1 ) + cor0.col1 / + col2 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - - col0 + - 89 + + col1 AS col2 FROM tab0 AS cor0
----
21
43
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-426
SELECT + 68 + col2 DIV 50 FROM tab1 cor0
----
69
69
69

skipif mysql # not compatible
query I rowsort label-426
SELECT + 68 + col2 / 50 FROM tab1 cor0
----
69
69
69

query I rowsort
SELECT DISTINCT + + col2 + col0 * - 57 * + col0 FROM tab2 AS cor0
----
-2766
-346762
-355699

query I rowsort
SELECT ALL ( + col2 * + ( + ( - tab1.col2 ) ) ) + tab1.col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT col0 + + tab1.col1 + col2 AS col2 FROM tab1
----
131
189
83

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

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

query I rowsort
SELECT 80 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT 0 * - col0 AS col1 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-434
SELECT - + col2 * - CAST( 93 AS SIGNED ) - - cor0.col0 * - col1 AS col2 FROM tab0 AS cor0
----
-3302
-473
1005

skipif mysql # not compatible
query I rowsort label-434
SELECT - + col2 * - CAST ( 93 AS INTEGER ) - - cor0.col0 * - col1 AS col2 FROM tab0 AS cor0
----
-3302
-473
1005

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col2 col0 FROM tab2, tab1, tab2 cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT - col1 * cor0.col2 - 85 FROM tab0 AS cor0
----
-182
-2923
-7547

query I rowsort
SELECT ALL - 34 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

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

query I rowsort
SELECT ALL - cor0.col0 * 52 FROM tab1 AS cor0
----
-156
-3328
-4160

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

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

query I rowsort
SELECT + + col1 * - 55 FROM tab1 AS cor0
----
-1430
-550
-715

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

skipif mysql # not compatible
query I rowsort label-442
SELECT ALL - + cor0.col2 / - ( col1 ) AS col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + + 25 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

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

query I rowsort
SELECT DISTINCT col2 - ( 34 ) * - col1 FROM tab2
----
1081
2032
616

query I rowsort
SELECT col1 - + 35 * + col2 FROM tab2
----
-1313
-851
-914

query I rowsort
SELECT DISTINCT col1 - + col0 * ( - col2 * col2 ) AS col2 FROM tab0
----
132
26222
598527

query I rowsort
SELECT + col0 * col0 * tab2.col2 + + col1 AS col0 FROM tab2
----
1354
158243
237175

onlyif mysql # use DIV operator for integer division
query I rowsort label-449
SELECT DISTINCT + col0 DIV ( + col2 ) - col0 * col1 AS col1 FROM tab0
----
-2064
-3360
-8098

skipif mysql # not compatible
query I rowsort label-449
SELECT DISTINCT + col0 / ( + col2 ) - col0 * col1 AS col1 FROM tab0
----
-2064
-3360
-8098

onlyif mysql # use DIV operator for integer division
query I rowsort label-450
SELECT DISTINCT + col2 DIV 73 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-450
SELECT DISTINCT + col2 / 73 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT col0 + + tab1.col2 + 36 FROM tab1
----
157
212
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-452
SELECT CAST( col0 AS SIGNED ) AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-452
SELECT CAST ( col0 AS INTEGER ) AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT 0 * col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col0 + - col2 ) col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL cor0.col0 * 99 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to c3832063f95c4ca790fc55cf38ea97a8

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-456
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 19 * col1 col0 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-457
SELECT ALL CAST( 87 AS SIGNED ) + col1 + - col2 DIV ( col0 ) FROM tab1
----
95
97
99

skipif mysql # not compatible
query I rowsort label-457
SELECT ALL CAST ( 87 AS INTEGER ) + col1 + - col2 / ( col0 ) FROM tab1
----
95
97
99

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

query I rowsort
SELECT - 77 + 96 * - col0 FROM tab0 AS cor0
----
-2381
-3437
-8621

query I rowsort
SELECT ALL ( 17 ) + col1 * 98 * tab0.col2 AS col0 FROM tab0
----
278141
731293
9523

query I rowsort
SELECT + - 23 * - col0 AS col1 FROM tab1 cor0
----
1472
1840
69

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

query I rowsort
SELECT DISTINCT - - 64 + + col2 FROM tab1 AS cor0
----
118
121
160

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * col0 col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 14 + - 55 FROM tab2 AS cor0
----
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * + cor0.col1 col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - 41 AS col2 FROM tab2 AS cor0
----
-41
-41
-41

query I rowsort
SELECT ( 8 ) + + col1 FROM tab0
----
105
94
99

query I rowsort
SELECT DISTINCT - 34 + col1 FROM tab2 cor0
----
-17
-3
25

query I rowsort
SELECT ALL - 36 * - 93 AS col2 FROM tab0 AS cor0
----
3348
3348
3348

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

query I rowsort
SELECT 50 + + cor0.col1 AS col2 FROM tab0 cor0
----
136
141
147

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

query I rowsort
SELECT - + 15 * + col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-1257
-1283
-1454

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

skipif mysql # not compatible
query I rowsort
SELECT + - 82 + cor0.col2 * CAST ( + col1 AS REAL ) AS col0 FROM tab1 cor0
----
1166
1322
488

query I rowsort
SELECT DISTINCT - col1 * col2 + col1 + - col2 FROM tab1 cor0
----
-1331
-1432
-617

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

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

query I rowsort
SELECT + 50 * + col0 AS col1 FROM tab0
----
1200
1750
4450

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

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

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

query I rowsort
SELECT DISTINCT - + col0 + + 31 FROM tab2 AS cor0
----
-47
-48
24

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

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

query I rowsort
SELECT ALL + cor0.col0 + + 57 * - 8 AS col1 FROM tab1 AS cor0
----
-376
-392
-453

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

query I rowsort
SELECT DISTINCT - - col1 * ( 23 + col2 ) AS col1 FROM tab1 AS cor0
----
1547
2002
800

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * ( col0 ) - + col1 col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL + col0 - 13 FROM tab1 AS cor0
----
-10
51
67

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-493
SELECT ALL - col0 DIV + ( col1 ) - + col1 FROM tab2 AS cor0
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-493
SELECT ALL - col0 / + ( col1 ) - + col1 FROM tab2 AS cor0
----
-21
-31
-60

query I rowsort
SELECT col2 * + 95 FROM tab1 AS cor0
----
5130
5415
9120

query I rowsort
SELECT - col0 * col1 * - 79 AS col0 FROM tab2 cor0
----
106097
17143
363558

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

query I rowsort
SELECT 65 - - col0 AS col2 FROM tab2
----
143
144
72

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-500
SELECT col0 DIV + col2 + 29 AS col1 FROM tab1
----
29
29
30

skipif mysql # not compatible
query I rowsort label-500
SELECT col0 / + col2 + 29 AS col1 FROM tab1
----
29
29
30

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

skipif mysql # not compatible
query I rowsort label-501
SELECT ALL - CAST ( NULL AS INTEGER ) * - cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + col0 + 10 AS col1 FROM tab1 AS cor0
----
13
74
90

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + ( col2 * + tab0.col1 ) col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab0, tab0 AS cor0
----
10

query I rowsort
SELECT + - 54 + + col2 * + col1 FROM tab2 AS cor0
----
1480
592
783

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

query I rowsort
SELECT ALL - - 36 - + col2 AS col0 FROM tab1 AS cor0
----
-18
-21
-60

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

query I rowsort
SELECT DISTINCT + + ( col0 ) * cor0.col1 + + 34 AS col2 FROM tab1 AS cor0
----
1074
112
674

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

query I rowsort
SELECT DISTINCT col1 * col0 + + col0 + + 73 * col0 AS col0 FROM tab2
----
10374
7189
735

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

query I rowsort
SELECT - col1 * col1 + - 40 - - col1 AS col0 FROM tab2 AS cor0
----
-312
-3462
-970

query I rowsort
SELECT ALL + 84 * cor0.col0 * + ( 2 + cor0.col0 ) AS col2 FROM tab0 AS cor0
----
108780
52416
680316

query I rowsort
SELECT DISTINCT + + col0 * col2 + col0 * 52 FROM tab1 AS cor0
----
11840
318
6976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 14 + col1 col0 FROM tab0 AS cor0
----
72
77
83

query I rowsort
SELECT ALL - 67 * - col1 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT col1 * col1 * col2 + 5 * + col2 - - col0 FROM tab2 AS cor0
----
11251
26089
90714

onlyif mysql # use DIV operator for integer division
query I rowsort label-521
SELECT col0 * col0 DIV col2 FROM tab0
----
1225
17
96

skipif mysql # not compatible
query I rowsort label-521
SELECT col0 * col0 / col2 FROM tab0
----
1225
17
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 10 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # use DIV operator for integer division
query I rowsort label-523
SELECT + col1 + col0 DIV - 78 AS col2 FROM tab0 AS cor0
----
86
90
97

skipif mysql # not compatible
query I rowsort label-523
SELECT + col1 + col0 / - 78 AS col2 FROM tab0 AS cor0
----
86
90
97

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

query I rowsort
SELECT ALL - col2 * - 40 AS col1 FROM tab0 cor0
----
1320
3280
40

query I rowsort
SELECT ALL + cor1.col0 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + - col1 * - col2 * col1 + col2 FROM tab0 AS cor0
----
244101
679124
9410

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

query I rowsort
SELECT - - col1 + 94 * col2 FROM tab0 AS cor0
----
191
3188
7799

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

skipif mysql # not compatible
query I rowsort label-530
SELECT cor0.col1 * + CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 * - 12 FROM tab2 cor0
----
-312
-324
-456

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-534
SELECT - cor0.col2 + 31 / col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

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

query I rowsort
SELECT - - cor0.col1 * col1 - - 66 AS col1 FROM tab2 AS cor0
----
1027
3547
355

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

query I rowsort
SELECT ALL - 39 + col0 * - ( 80 + col2 ) FROM tab2 cor0
----
-788
-8307
-9361

query I rowsort
SELECT - + ( + col0 ) - 61 * - col2 AS col1 FROM tab0 AS cor0
----
1989
26
4913

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

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

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

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

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

query I rowsort
SELECT + ( + cor0.col0 ) * cor0.col2 * col2 + col1 AS col2 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT ALL - 83 + col1 FROM tab0 AS cor0
----
14
3
8

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

query I rowsort
SELECT - + col2 * + col2 - - 1 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT + col0 * + col2 + col1 * 70 AS col0 FROM tab2 AS cor0
----
2359
4192
6158

query I rowsort
SELECT ALL 26 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT - cor0.col2 * - 97 AS col1 FROM tab1 AS cor0
----
5238
5529
9312

query I rowsort
SELECT cor0.col2 * + ( + 77 + + cor0.col0 ) * ( - cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-10864
-1238692
-286638

query I rowsort
SELECT 22 + col2 * col0 * - col1 FROM tab1 AS cor0
----
-36458
-4190
-99818

query I rowsort
SELECT + col0 * 28 * - col1 AS col2 FROM tab2 AS cor0
----
-128856
-37604
-6076

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

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

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

query I rowsort
SELECT + 16 + + col1 FROM tab0 AS cor0
----
102
107
113

query I rowsort
SELECT DISTINCT ( col1 + - col1 ) FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * 55 col2 FROM tab0 cor0
----
1320
1925
4895

query I rowsort
SELECT ALL 53 + col2 FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT DISTINCT col1 + 21 AS col0 FROM tab1 cor0
----
31
34
47

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 96 AS REAL ) FROM tab0 cor0
----
96
96
96

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

query I rowsort
SELECT DISTINCT + + col0 * 48 FROM tab2 cor0
----
336
3744
3792

query I rowsort
SELECT DISTINCT - - 89 * - col1 * + col2 FROM tab1 AS cor0
----
-111072
-124956
-50730

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

query I rowsort
SELECT 68 * col0 AS col1 FROM tab0 cor0
----
1632
2380
6052

onlyif mysql # use DIV operator for integer division
query I rowsort label-567
SELECT DISTINCT - col2 DIV col0 + + 57 DIV col1 AS col0 FROM tab1 AS cor0
----
-16
3
5

skipif mysql # not compatible
query I rowsort label-567
SELECT DISTINCT - col2 / col0 + + 57 / col1 AS col0 FROM tab1 AS cor0
----
-16
3
5

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0, tab1 AS cor2
----
13122 values hashing to 46f62700b24db410ea500cee901849b8

query I rowsort
SELECT - ( col2 ) - col2 * - col2 AS col0 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - 71 * - ( col1 * + col1 ) - + 42 FROM tab1
----
11957
47954
7058

query I rowsort
SELECT ( - col2 * + tab1.col1 + col2 * - tab1.col2 ) AS col2 FROM tab1
----
-10464
-3819
-4320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-572
SELECT ALL + - col1 * CAST( - 71 AS SIGNED ) + - col0 col0 FROM tab2 AS cor0
----
1128
2194
4111

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-572
SELECT ALL + - col1 * CAST ( - 71 AS INTEGER ) + - col0 col0 FROM tab2 AS cor0
----
1128
2194
4111

query I rowsort
SELECT ALL - col1 * - 1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col2 * 89 AS col0 FROM tab2 AS cor0
----
2314
2403
3382

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

query I rowsort
SELECT DISTINCT + cor0.col2 + - 57 FROM tab1 AS cor0
----
-3
0
39

query I rowsort
SELECT - + col0 * - 88 FROM tab2 AS cor0
----
616
6864
6952

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-579
SELECT col1 + col2 * col1 DIV - col1 FROM tab1 AS cor0
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-579
SELECT col1 + col2 * col1 / - col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL col1 + + ( 27 ) * col0 + 24 FROM tab2 AS cor0
----
2174
2189
244

query I rowsort
SELECT col2 * 22 + 58 FROM tab1 AS cor0
----
1246
1312
2170

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

query I rowsort
SELECT DISTINCT col0 + + 59 * tab0.col0 FROM tab0
----
1440
2100
5340

query I rowsort
SELECT ALL + col1 + - col2 * 21 FROM tab2
----
-487
-536
-781

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-585
SELECT DISTINCT col2 + - CAST( 98 AS SIGNED ) + - col1 * ( - col0 ) * col1 FROM tab0
----
177439
329218
736993

skipif mysql # not compatible
query I rowsort label-585
SELECT DISTINCT col2 + - CAST ( 98 AS INTEGER ) + - col1 * ( - col0 ) * col1 FROM tab0
----
177439
329218
736993

query I rowsort
SELECT ALL - - col2 * col2 * col2 + ( col0 ) * col1 AS col0 FROM tab0 AS cor0
----
3396
38001
559467

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

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

query I rowsort
SELECT - col0 + + 16 * tab1.col2 AS col2 FROM tab1
----
1456
848
861

query I rowsort
SELECT ALL + col1 + 52 AS col2 FROM tab2
----
111
69
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-591
SELECT ALL - col0 + + ( - tab0.col1 ) DIV - col2 AS col0 FROM tab0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-591
SELECT ALL - col0 + + ( - tab0.col1 ) / - col2 AS col0 FROM tab0
----
-22
-88
62

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

query I rowsort
SELECT 87 + cor0.col0 FROM tab2 cor0
----
165
166
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-594
SELECT ALL - 38 + - cor0.col0 * cor0.col0 DIV col1 AS col0 FROM tab1 cor0
----
-38
-447
-530

skipif mysql # not compatible
query I rowsort label-594
SELECT ALL - 38 + - cor0.col0 * cor0.col0 / col1 AS col0 FROM tab1 cor0
----
-38
-447
-530

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

skipif mysql # not compatible
query I rowsort label-595
SELECT - CAST ( NULL AS INTEGER ) * 43 + - tab2.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-596
SELECT DISTINCT + col1 * CAST( - ( - col2 ) * + 34 + + 32 AS SIGNED ) FROM tab2 AS cor0
----
22508
29450
54044

skipif mysql # not compatible
query I rowsort label-596
SELECT DISTINCT + col1 * CAST ( - ( - col2 ) * + 34 + + 32 AS INTEGER ) FROM tab2 AS cor0
----
22508
29450
54044

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 * 31 + col2 * - cor0.col0 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
-24
-4450
1085

query I rowsort
SELECT ALL + tab2.col2 * col2 + + col0 AS col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT 71 + 58 AS col1 FROM tab2
----
129
129
129

query I rowsort
SELECT ALL ( - col0 ) * col0 + + 6 AS col0 FROM tab1
----
-3
-4090
-6394

onlyif mysql # use DIV operator for integer division
query I rowsort label-604
SELECT ALL 88 DIV - col0 + col1 + - col2 FROM tab1
----
-48
-57
-84

skipif mysql # not compatible
query I rowsort label-604
SELECT ALL 88 / - col0 + col1 + - col2 FROM tab1
----
-48
-57
-84

query I rowsort
SELECT ( 7 ) + col0 FROM tab0 cor0
----
31
42
96

query I rowsort
SELECT DISTINCT + 22 * col2 AS col1 FROM tab1 AS cor0
----
1188
1254
2112

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

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

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

query I rowsort
SELECT ALL ( - 24 ) * + col2 FROM tab1 AS cor0
----
-1296
-1368
-2304

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-611
SELECT - + col0 + + col0 DIV 41 AS col1 FROM tab1 AS cor0
----
-3
-63
-79

skipif mysql # not compatible
query I rowsort label-611
SELECT - + col0 + + col0 / 41 AS col1 FROM tab1 AS cor0
----
-3
-63
-79

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-613
SELECT DISTINCT + 68 DIV - col0 AS col2 FROM tab2 AS cor0
----
-9
0

skipif mysql # not compatible
query I rowsort label-613
SELECT DISTINCT + 68 / - col0 AS col2 FROM tab2 AS cor0
----
-9
0

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

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

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

query I rowsort
SELECT DISTINCT 6 + col2 FROM tab2
----
32
33
44

query I rowsort
SELECT - 89 * - col0 + col2 FROM tab2
----
650
6968
7069

query I rowsort
SELECT 83 + + col1 AS col2 FROM tab1 AS cor0
----
109
93
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-620
SELECT ALL col2 DIV + 12 + col0 + col1 * ( col1 ) * + col2 FROM tab1
----
16312
36511
5768

skipif mysql # not compatible
query I rowsort label-620
SELECT ALL col2 / + 12 + col0 + col1 * ( col1 ) * + col2 FROM tab1
----
16312
36511
5768

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

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

query I rowsort
SELECT DISTINCT + 86 AS col1 FROM tab2
----
86

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

query I rowsort
SELECT - col0 + 94 FROM tab1 AS cor0
----
14
30
91

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

query I rowsort
SELECT 35 - cor0.col0 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 39485aff7f743fa63854142a97231d6c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 + col2 col1 FROM tab1 AS cor0
----
216
3705
7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - 24 + col1 + + cor0.col2 * ( - col2 ) col0 FROM tab0 cor0
----
-2232
-3067
-8817

query I rowsort
SELECT - 96 * col0 AS col1 FROM tab1
----
-288
-6144
-7680

query I rowsort
SELECT DISTINCT - 51 * - tab2.col1 AS col1 FROM tab2, tab1, tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT + 97 + 90 FROM tab0 AS cor0
----
187
187
187

query I rowsort
SELECT + col2 * + 5 FROM tab0 AS cor0
----
165
410
5

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

query I rowsort
SELECT + col2 * + 91 + + col1 FROM tab2 AS cor0
----
2425
2488
3475

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 * + 95 + - cor0.col0 / CAST ( - col0 AS REAL ) AS col1 FROM tab2 AS cor0
----
-2469
-2564
-3609

query I rowsort
SELECT + 6 + + col2 AS col1 FROM tab0 cor0
----
39
7
88

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

query I rowsort
SELECT + col1 + - col0 * col0 FROM tab1
----
-4086
-6387
17

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

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

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

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 WHERE ( - col1 ) BETWEEN col1 AND NULL
----

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

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

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

query I rowsort
SELECT col1 FROM tab1 WHERE NOT ( col0 * col1 / + col2 ) = col2
----
10
13
26

query I rowsort
SELECT col0 + tab0.col0 + + tab0.col2 * + col0 FROM tab0
----
105
7476
840

query I rowsort
SELECT + col2 FROM tab1 WHERE ( NULL ) <> NULL
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-654
SELECT col0 DIV - col1 col0 FROM tab2
----
-1
-4
0

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

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

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

query I rowsort
SELECT - col1 + + col1 / - col0 FROM tab0 WHERE NULL BETWEEN + col0 AND + col2
----

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0 WHERE NULL < ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - col2 + - col1 * + col1 + - col1 FROM tab0
----
-7515
-8454
-9507

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 WHERE NOT NULL BETWEEN cor0.col2 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-662
SELECT DISTINCT + col0 DIV col0 + col1 * col2 FROM tab2
----
1535
647
838

skipif mysql # not compatible
query I rowsort label-662
SELECT DISTINCT + col0 / col0 + col1 * col2 FROM tab2
----
1535
647
838

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

query I rowsort
SELECT + tab0.col1 * 7 + + col2 AS col1 FROM tab0
----
635
680
719

query I rowsort
SELECT col2 * - 22 FROM tab1 AS cor0
----
-1188
-1254
-2112

query I rowsort
SELECT col2 * - ( - 2 ) FROM tab1 AS cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col0 * col0 col1 FROM tab0 cor0
----
-1322
-662
-8012

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

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

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

query I rowsort
SELECT - col1 + 69 * ( col1 ) FROM tab1 AS cor0
----
1768
680
884

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

query I rowsort
SELECT DISTINCT col1 * ( 10 ) + + col0 AS col0 FROM tab2
----
249
317
668

query I rowsort
SELECT ALL - - col2 + - 34 + col2 AS col2 FROM tab1 AS cor0
----
158
74
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - 89 * col1 - + col0 col1 FROM tab1 AS cor0
----
-1157
-2314
-890

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

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

query I rowsort
SELECT ALL - + 6 * col2 + - col2 FROM tab2 AS cor0
----
-182
-189
-266

query I rowsort
SELECT DISTINCT - 48 * + cor0.col0 * - cor0.col2 - 35 * + col0 AS col2 FROM tab0 cor0
----
347189
37176
455

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

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

query I rowsort
SELECT 78 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT cor0.col1 + - cor1.col2 AS col1 FROM tab2, tab2 AS cor0, tab2 cor1
----
9 values hashing to 388493d861b014f5947e20fd539835b7

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

query I rowsort
SELECT DISTINCT + + col2 + + cor0.col0 + + col0 * 55 FROM tab1 AS cor0
----
222
3641
4576

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-684
SELECT DISTINCT - 57 DIV + col2 FROM tab0 AS cor0
----
-1
-57
0

skipif mysql # not compatible
query I rowsort label-684
SELECT DISTINCT - 57 / + col2 FROM tab0 AS cor0
----
-1
-57
0

query I rowsort
SELECT + 89 + + col2 FROM tab1 AS cor0
----
143
146
185

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-688
SELECT DISTINCT - cor0.col2 + CAST( - 61 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-143
-62
-94

skipif mysql # not compatible
query I rowsort label-688
SELECT DISTINCT - cor0.col2 + CAST ( - 61 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-143
-62
-94

query I rowsort
SELECT ALL - col0 * - 5 AS col2 FROM tab0 AS cor0
----
120
175
445

query I rowsort
SELECT + col0 + 35 AS col0 FROM tab1 AS cor0
----
115
38
99

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

query I rowsort
SELECT + col1 * - 55 FROM tab1 AS cor0
----
-1430
-550
-715

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

query I rowsort
SELECT ALL cor0.col2 + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-695
SELECT DISTINCT - col0 * col2 * - col1 + + col1 DIV - col2 FROM tab0 AS cor0
----
3298
664117
68110

skipif mysql # not compatible
query I rowsort label-695
SELECT DISTINCT - col0 * col2 * - col1 + + col1 / - col2 FROM tab0 AS cor0
----
3298
664117
68110

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 + + col2 * col1 - col1 col1 FROM tab1
----
1315
1381
624

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

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

query I rowsort
SELECT + 65 + 55 FROM tab0 cor0
----
120
120
120

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

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

query I rowsort
SELECT ( 78 + + col1 ) FROM tab2
----
109
137
95

query I rowsort
SELECT DISTINCT ( - col0 + col2 ) FROM tab1
----
-7
16
51

query I rowsort
SELECT ALL ( - 81 ) * tab2.col2 FROM tab2
----
-2106
-2187
-3078

query I rowsort
SELECT ALL + cor0.col1 + - col1 * - col2 * + col2 FROM tab2 AS cor0
----
22630
24565
39943

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

query I rowsort
SELECT ALL + cor0.col2 * cor1.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 3a284e2c11914d1b470b4242a365931a

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

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

query I rowsort
SELECT - ( + 18 ) * + col1 FROM tab0
----
-1548
-1638
-1746

query I rowsort
SELECT DISTINCT + ( tab0.col0 ) - ( col0 * col0 + col2 ) FROM tab0
----
-1191
-585
-7914

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

query I rowsort
SELECT - col1 + - tab1.col1 + col1 FROM tab1
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 + + col0 + + 85 col1 FROM tab1
----
147
208
224

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

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

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

query I rowsort
SELECT DISTINCT - 86 * + col2 AS col1 FROM tab0
----
-2838
-7052
-86

query I rowsort
SELECT col0 + + col0 * - tab1.col0 AS col2 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT + col2 + - 78 AS col2 FROM tab2 cor0
----
-40
-51
-52

query I rowsort
SELECT DISTINCT + cor0.col0 * + 66 AS col1 FROM tab1 AS cor0
----
198
4224
5280

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

query I rowsort
SELECT ALL - + col1 * - 95 FROM tab2 AS cor0
----
1615
2945
5605

query I rowsort
SELECT + - col2 + + col0 * + 3 - + col0 FROM tab2 AS cor0
----
-13
120
130

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

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

query I rowsort
SELECT ALL - col0 + ( cor0.col0 ) * col0 + col1 FROM tab1 AS cor0
----
32
4042
6333

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

query I rowsort
SELECT col0 - ( + 69 * col0 + col0 ) FROM tab1 AS cor0
----
-207
-4416
-5520

query I rowsort
SELECT ALL + col0 + + 70 AS col0 FROM tab2 AS cor0
----
148
149
77

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

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

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

query I rowsort
SELECT - col0 * cor0.col1 + col2 * - col1 FROM tab2 cor0
----
-1054
-1989
-6136

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

query I rowsort
SELECT ALL + col2 + col2 + - col0 * + col2 AS col1 FROM tab1
----
-3534
-54
-7488

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

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

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

query I rowsort
SELECT - + col2 * col2 + - col1 - - col0 * col1 FROM tab0 AS cor0
----
1284
3297
889

query I rowsort
SELECT ALL 64 + col2 FROM tab2 AS cor0
----
102
90
91

query I rowsort
SELECT DISTINCT + - 17 - cor0.col2 AS col1 FROM tab2 AS cor0
----
-43
-44
-55

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 * col0 * + col2 + col0 col2 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT - col0 * col2 + + col0 * - col2 AS col0 FROM tab1 AS cor0
----
-15360
-324
-7296

query I rowsort
SELECT + 55 AS col0 FROM tab1
----
55
55
55

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

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

query I rowsort
SELECT ALL - col1 * - col1 + tab2.col2 + col2 FROM tab2
----
1015
3533
365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * tab0.col0 + - 77 col0 FROM tab0
----
1148
499
7844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col1 * - col2 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

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

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 * - 87 AS col2 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT ALL + cor0.col2 * ( - 72 ) + col1 * col1 * col1 + + col0 AS col2 FROM tab1 AS cor0
----
-3040
-4635
13691

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col2 * col2 col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT - cor0.col1 + 6 * + col0 AS col0 FROM tab1 AS cor0
----
-8
374
467

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

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

query I rowsort
SELECT DISTINCT - col0 - + col0 * - 19 AS col2 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT - - col1 * 22 FROM tab2 AS cor0
----
1298
374
682

query I rowsort
SELECT DISTINCT - - col0 * + 27 * - col2 FROM tab1 cor0
----
-207360
-4374
-98496

query I rowsort
SELECT - tab2.col2 + + 5 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to db10bf89bdc9a84b6ff1be51e722fddf

query I rowsort
SELECT DISTINCT 61 * col2 AS col2 FROM tab1
----
3294
3477
5856

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

query I rowsort
SELECT + col1 * - 34 FROM tab0 AS cor0
----
-2924
-3094
-3298

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

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

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

skipif mysql # not compatible
query I rowsort label-769
SELECT + col2 * ( + col1 ) + CAST ( col2 AS INTEGER ) * col2 FROM tab2 AS cor0
----
1566
2090
2210

query I rowsort
SELECT DISTINCT + col0 + - cor0.col2 * col2 FROM tab0 AS cor0
----
-1065
-6635
34

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

query I rowsort
SELECT col0 * 40 - col1 AS col1 FROM tab2 AS cor0
----
249
3061
3143

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

skipif mysql # not compatible
query I rowsort label-773
SELECT ALL - col1 * col1 + - col2 * + CAST ( - 17 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1463
242
869

onlyif mysql # use DIV operator for integer division
query I rowsort label-774
SELECT - col2 * col2 DIV col0 + - 78 AS col0 FROM tab0 AS cor0
----
-123
-153
-78

skipif mysql # not compatible
query I rowsort label-774
SELECT - col2 * col2 / col0 + - 78 AS col0 FROM tab0 AS cor0
----
-123
-153
-78

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( - col0 AS REAL ) + col2 * col2 AS col2 FROM tab2 AS cor0
----
1365
598
722

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

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

query I rowsort
SELECT DISTINCT - ( - 73 ) + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1607
719
910

query I rowsort
SELECT ALL - 90 FROM tab0, tab1 cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 7414b682e5ab5dac55bc20746601d17a

query I rowsort
SELECT DISTINCT + 60 * + 92 AS col1 FROM tab0
----
5520

query I rowsort
SELECT - 72 * cor0.col0 + 52 * + 33 FROM tab1, tab0 AS cor0
----
9 values hashing to 92332cb8f95eecec25a5552be00569c2

onlyif mysql # use DIV operator for integer division
query I rowsort label-781
SELECT DISTINCT - - ( col1 ) - + col0 DIV 92 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-781
SELECT DISTINCT - - ( col1 ) - + col0 / 92 FROM tab0 cor0
----
86
91
97

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

query I rowsort
SELECT - col0 * col0 - 8 FROM tab0 AS cor0
----
-1233
-584
-7929

query I rowsort
SELECT DISTINCT + 74 * + 56 - col1 * tab2.col1 FROM tab2
----
3183
3855
663

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col1 + 56 col2 FROM tab0 AS cor0
----
2120
3451
8155

query I rowsort
SELECT - 31 * - col0 + col0 AS col0 FROM tab0 AS cor0
----
1120
2848
768

query I rowsort
SELECT ALL 79 + col2 * - cor0.col2 FROM tab1 AS cor0
----
-2837
-3170
-9137

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 14 * + cor0.col1 + 94 col2 FROM tab1 AS cor0
----
-270
-46
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 23 * col2 + + col2 * col1 col1 FROM tab0 AS cor0
----
120
3597
9348

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 * - col1 - - col1 * 33 col0 FROM tab0
----
-241230
-6208
-676039

onlyif mysql # use DIV operator for integer division
query I rowsort label-792
SELECT DISTINCT ( col0 ) - col0 * col0 DIV + 48 FROM tab1
----
-21
-53
3

skipif mysql # not compatible
query I rowsort label-792
SELECT DISTINCT ( col0 ) - col0 * col0 / + 48 FROM tab1
----
-21
-53
3

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

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

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

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

query I rowsort
SELECT ( col2 ) + + tab0.col1 * - col0 - + col2 * col1 FROM tab0
----
-15479
-3491
-4869

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 * col0 + CAST ( 61 AS REAL ) AS col0 FROM tab1 AS cor0
----
-4035
-6339
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col1 + 2 col1 FROM tab0 cor0
----
2066
3397
8101

query I rowsort
SELECT DISTINCT - + 59 * - col2 FROM tab2 AS cor0
----
1534
1593
2242

query I rowsort
SELECT DISTINCT 51 * - col1 FROM tab0 AS cor0
----
-4386
-4641
-4947

onlyif mysql # use DIV operator for integer division
query I rowsort label-801
SELECT ALL + col0 * + col1 + col1 DIV col0 AS col0 FROM tab1 AS cor0
----
1040
640
86

skipif mysql # not compatible
query I rowsort label-801
SELECT ALL + col0 * + col1 + col1 / col0 AS col0 FROM tab1 AS cor0
----
1040
640
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-802
SELECT ALL - - col0 * col2 * col2 + + ( + col2 ) DIV ( + col2 ) FROM tab1 AS cor0
----
207937
737281
8749

skipif mysql # not compatible
query I rowsort label-802
SELECT ALL - - col0 * col2 * col2 + + ( + col2 ) / ( + col2 ) FROM tab1 AS cor0
----
207937
737281
8749

query I rowsort
SELECT ALL + + col0 * + col0 + - col1 * - 49 * + col2 FROM tab0 AS cor0
----
139638
373559
5978

query I rowsort
SELECT - - col0 * + col0 + 18 AS col0 FROM tab1 AS cor0
----
27
4114
6418

query I rowsort
SELECT DISTINCT 20 + col1 * 65 AS col1 FROM tab0 AS cor0
----
5610
5935
6325

query I rowsort
SELECT DISTINCT - 82 * + col2 * + col2 AS col2 FROM tab0 AS cor0
----
-551368
-82
-89298

query I rowsort
SELECT + cor0.col0 * + cor0.col1 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6387e809cb1e467e8e7184dc79f3a43b

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

query I rowsort
SELECT - - col2 + + ( + col2 ) * col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT + 9 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT - + cor0.col2 * ( 70 ) FROM tab1, tab1 AS cor0
----
9 values hashing to b10298cd906e891aea3c841dd0ebe30c

onlyif mysql # use DIV operator for integer division
query I rowsort label-812
SELECT ALL - 89 DIV + col2 col2 FROM tab0 AS cor0
----
-1
-2
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-812
SELECT ALL - 89 / + col2 col2 FROM tab0 AS cor0
----
-1
-2
-89

query I rowsort
SELECT DISTINCT 67 + col0 AS col1 FROM tab2
----
145
146
74

query I rowsort
SELECT ALL - 16 + tab1.col2 * col0 * + col0 FROM tab1
----
233456
470
614384

query I rowsort
SELECT + 62 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

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

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

query I rowsort
SELECT ALL + cor0.col0 + - 96 - col2 AS col2 FROM tab0 cor0
----
-105
-62
-89

query I rowsort
SELECT DISTINCT + 58 + - col0 AS col1 FROM tab2 AS cor0
----
-20
-21
51

query I rowsort
SELECT + 44 * 50 AS col2 FROM tab2 AS cor0
----
2200
2200
2200

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

query I rowsort
SELECT ALL + ( col2 ) - cor0.col2 * + 37 FROM tab2 AS cor0
----
-1368
-936
-972

query I rowsort
SELECT ALL + ( + col0 ) + - col1 * + col2 * 57 FROM tab2 AS cor0
----
-36743
-47702
-87360

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

query I rowsort
SELECT DISTINCT - - col1 * 37 * 50 AS col1 FROM tab1 AS cor0
----
18500
24050
48100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + 24 + + col0 col1 FROM tab1 AS cor0
----
1299
1432
2384

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

query I rowsort
SELECT - col1 + 87 AS col2 FROM tab2 AS cor0
----
28
56
70

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

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

query I rowsort
SELECT ALL col0 + 57 + + col2 AS col2 FROM tab2
----
161
174
91

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

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

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

query I rowsort
SELECT ALL + 6 * cor0.col1 + + ( - col1 ) AS col0 FROM tab2 AS cor0
----
155
295
85

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

skipif mysql # not compatible
query I rowsort label-835
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT 98 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT - 59 + col0 * tab1.col2 FROM tab1
----
103
3589
7621

onlyif mysql # use DIV operator for integer division
query I rowsort label-838
SELECT ( + cor0.col0 ) DIV cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-838
SELECT ( + cor0.col0 ) / cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 14fcfa6c11198893073049d94262832c

query I rowsort
SELECT + cor0.col1 * 34 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 415ebb5288da4ad39bce2a37614e97c7

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

skipif mysql # not compatible
query I rowsort label-840
SELECT ALL - col2 * + col2 + - CAST ( col1 AS INTEGER ) * + col2 + + ( 39 ) FROM tab1 AS cor0
----
-10425
-3780
-4281

onlyif mysql # use DIV operator for integer division
query I rowsort label-841
SELECT DISTINCT - col0 * col1 DIV - 96 + cor0.col2 FROM tab0 AS cor0
----
166
36
54

skipif mysql # not compatible
query I rowsort label-841
SELECT DISTINCT - col0 * col1 / - 96 + cor0.col2 FROM tab0 AS cor0
----
166
36
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-842
SELECT DISTINCT - 60 DIV col0 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-842
SELECT DISTINCT - 60 / col0 FROM tab0
----
-1
-2
0

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

query I rowsort
SELECT + tab0.col0 + + 82 * - 65 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1691e4563aff4f3340ada08f0cacc532

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-845
SELECT ALL - col1 * CAST ( col2 AS INTEGER ) col2 FROM tab0
----
-2838
-7462
-97

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

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

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

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

query I rowsort
SELECT + cor0.col1 * 37 AS col2 FROM tab0 AS cor0
----
3182
3367
3589

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

query I rowsort
SELECT DISTINCT ( + col2 + col0 * 27 ) AS col2 FROM tab0
----
2485
681
946

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

skipif mysql # not compatible
query I rowsort label-853
SELECT DISTINCT + ( - 38 ) + - col2 / col0 FROM tab2 AS cor0
----
-38
-41

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

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

query I rowsort
SELECT - 66 * col2 AS col2 FROM tab2 AS cor0
----
-1716
-1782
-2508

query I rowsort
SELECT - col2 + + col2 * 66 AS col0 FROM tab0 AS cor0
----
2145
5330
65

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

query I rowsort
SELECT ALL 20 * - col1 AS col0 FROM tab1
----
-200
-260
-520

query I rowsort
SELECT + 77 * + 81 FROM tab0, tab2 AS cor0
----
9 values hashing to 064513c7815816bf6d5b9f8aa3d3bf7d

query I rowsort
SELECT - col2 * 66 FROM tab2
----
-1716
-1782
-2508

query I rowsort
SELECT ALL col1 * 79 - col0 AS col0 FROM tab1
----
2051
726
947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-863
SELECT - col2 - CAST( 54 AS SIGNED ) * col1 * 8 AS col0 FROM tab2
----
-13419
-25514
-7382

skipif mysql # not compatible
query I rowsort label-863
SELECT - col2 - CAST ( 54 AS INTEGER ) * col1 * 8 AS col0 FROM tab2
----
-13419
-25514
-7382

onlyif mysql # use DIV operator for integer division
query I rowsort label-864
SELECT col2 DIV - col2 col2 FROM tab1
----
-1
-1
-1

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

query I rowsort
SELECT 34 * + col0 * + cor0.col0 FROM tab0 AS cor0
----
19584
269314
41650

onlyif mysql # use DIV operator for integer division
query I rowsort label-866
SELECT - 4 DIV col1 + + col2 * - 60 AS col0 FROM tab1 AS cor0
----
-3240
-3420
-5760

skipif mysql # not compatible
query I rowsort label-866
SELECT - 4 / col1 + + col2 * - 60 AS col0 FROM tab1 AS cor0
----
-3240
-3420
-5760

query I rowsort
SELECT - 70 + - ( col2 ) * col0 FROM tab2 AS cor0
----
-2098
-259
-3072

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

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

query I rowsort
SELECT + + 31 + col0 AS col2 FROM tab2 AS cor0
----
109
110
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-871
SELECT ALL - 8 + col2 DIV - cor0.col2 AS col1 FROM tab0 AS cor0
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-871
SELECT ALL - 8 + col2 / - cor0.col2 AS col1 FROM tab0 AS cor0
----
-9
-9
-9

query I rowsort
SELECT 6 * + col2 + col1 * ( col0 ) FROM tab0 AS cor0
----
2262
3401
8591

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

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

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

skipif mysql # not compatible
query I rowsort label-874
SELECT ALL + col0 + - col2 - + cor0.col1 * CAST ( cor0.col2 AS INTEGER ) * + col1 AS col2 FROM tab2 AS cor0
----
-10941
-25967
-90454

query I rowsort
SELECT ALL + - 46 + - 37 * cor0.col2 FROM tab1 AS cor0
----
-2044
-2155
-3598

query I rowsort
SELECT DISTINCT - ( 53 ) * - col1 + col2 AS col2 FROM tab0 AS cor0
----
4591
4905
5142

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

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

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

query I rowsort
SELECT ALL - - col1 * - col2 + - 6 * col2 * - col2 FROM tab0 AS cor0
----
-91
32882
3696

query I rowsort
SELECT + - col0 + col0 * - 96 AS col1 FROM tab2 AS cor0
----
-679
-7566
-7663

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

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

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

query I rowsort
SELECT + col0 + 6 FROM tab0 cor0
----
30
41
95

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-888
SELECT ALL - col1 DIV - cor0.col2 + 34 AS col2 FROM tab0 AS cor0
----
131
35
36

skipif mysql # not compatible
query I rowsort label-888
SELECT ALL - col1 / - cor0.col2 + 34 AS col2 FROM tab0 AS cor0
----
131
35
36

query I rowsort
SELECT ALL col1 + ( + col0 ) * - cor0.col0 - ( 32 ) FROM tab0 AS cor0
----
-1160
-522
-7862

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

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

query I rowsort
SELECT ALL + - col2 + + 29 * ( col2 ) FROM tab2 AS cor0
----
1064
728
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-893
SELECT DISTINCT - col1 DIV col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-893
SELECT DISTINCT - col1 / col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT ALL + col2 + 31 + col2 AS col2 FROM tab1 AS cor0
----
139
145
223

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

skipif mysql # not compatible
query I rowsort label-895
SELECT ALL col2 + CAST ( col2 AS INTEGER ) * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT col1 * 69 + col0 FROM tab0 AS cor0
----
5958
6368
6728

onlyif mysql # use DIV operator for integer division
query I rowsort label-897
SELECT ALL cor0.col0 + col0 DIV + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-897
SELECT ALL cor0.col0 + col0 / + col0 FROM tab2 AS cor0
----
79
8
80

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

query I rowsort
SELECT ALL + col2 * + 84 + cor0.col2 * + cor0.col2 * ( - col2 ) FROM tab0 AS cor0
----
-33165
-544480
83

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

skipif mysql # not compatible
query I rowsort label-900
SELECT - col1 + + CAST ( - 16 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1549
-890
-922

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

query I rowsort
SELECT ALL col1 + + 34 AS col0 FROM tab1 cor0
----
44
47
60

query I rowsort
SELECT ALL - 32 FROM tab1, tab1 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

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

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

query I rowsort
SELECT - 80 + - 90 * - col2 AS col2 FROM tab1 AS cor0
----
4780
5050
8560

query I rowsort
SELECT ALL col1 + + ( col0 ) - tab0.col1 * col1 AS col2 FROM tab0
----
-7286
-8101
-9277

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - col0 col1 FROM tab0 AS cor0
----
-34
-7
9

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

skipif mysql # not compatible
query I rowsort label-909
SELECT - - col1 * col1 * + CAST ( - 27 * - col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
181629
616437
7330986

query I rowsort
SELECT ALL + - 91 * col0 AS col1 FROM tab2 AS cor0
----
-637
-7098
-7189

onlyif mysql # use DIV operator for integer division
query I rowsort label-911
SELECT DISTINCT - col2 * col0 + + col0 DIV + col2 FROM tab0
----
-7297
-792
0

skipif mysql # not compatible
query I rowsort label-911
SELECT DISTINCT - col2 * col0 + + col0 / + col2 FROM tab0
----
-7297
-792
0

query I rowsort
SELECT DISTINCT + 15 * + col0 + col2 FROM tab1
----
1017
1296
99

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

query I rowsort
SELECT DISTINCT 79 + - col2 FROM tab1 cor0
----
-17
22
25

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

query I rowsort
SELECT DISTINCT + 27 * - col0 + col1 FROM tab1 AS cor0
----
-1718
-2147
-55

query I rowsort
SELECT ALL - 37 * + cor1.col1 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to be1cec0c74285dae0aa8e3415ab72ec4

query I rowsort
SELECT 83 + 90 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 42e9e39032893ffe035a9badeadcb9e2

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

skipif mysql # not compatible
query I rowsort label-919
SELECT - CAST ( - 18 AS INTEGER ) + - col1 FROM tab1
----
-8
5
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-920
SELECT ALL 25 DIV col1 AS col0 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-920
SELECT ALL 25 / col1 AS col0 FROM tab2 AS cor0
----
0
0
1

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

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

query I rowsort
SELECT DISTINCT ( - 10 ) AS col1 FROM tab1 AS cor0
----
-10

query I rowsort
SELECT - + ( - col1 ) * col2 * col1 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT 24 * 53 FROM tab2 AS cor0
----
1272
1272
1272

query I rowsort
SELECT DISTINCT + + col0 + - 94 AS col2 FROM tab1 cor0
----
-14
-30
-91

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

query I rowsort
SELECT DISTINCT + - cor0.col0 * 69 + 23 FROM tab0 AS cor0
----
-1633
-2392
-6118

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

query I rowsort
SELECT + col1 * - col1 + - 42 FROM tab2 AS cor0
----
-1003
-331
-3523

query I rowsort
SELECT + cor0.col1 * cor0.col1 + - col2 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT - + col2 + - col2 * 85 AS col0 FROM tab1 cor0
----
-4644
-4902
-8256

query I rowsort
SELECT 19 * 83 FROM tab2 AS cor0
----
1577
1577
1577

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

skipif mysql # not compatible
query I rowsort label-934
SELECT 82 + col1 / + col0 FROM tab1 AS cor0
----
82
82
90

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

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

skipif mysql # not compatible
query I rowsort
SELECT + + ( col2 ) + cor0.col0 * CAST ( 0 AS REAL ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - 60 * - tab0.col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c21071c4cd7297349dd0f26ad47f69e2

query I rowsort
SELECT DISTINCT - col0 * 89 AS col0 FROM tab1
----
-267
-5696
-7120

query I rowsort
SELECT col2 * col1 * + 22 AS col1 FROM tab1
----
12540
27456
30888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + 2 col2 FROM tab2 AS cor0
----
-5
-76
-77

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

query I rowsort
SELECT DISTINCT + 75 AS col1 FROM tab0
----
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-943
SELECT ALL 66 DIV - 26 FROM tab0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-943
SELECT ALL 66 / - 26 FROM tab0
----
-2
-2
-2

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

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

query I rowsort
SELECT - ( + col1 ) + - col2 * col2 FROM tab0
----
-1175
-6815
-98

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

query I rowsort
SELECT + + col2 * ( - 24 ) + col0 AS col0 FROM tab2 AS cor0
----
-546
-641
-833

onlyif mysql # use DIV operator for integer division
query I rowsort label-948
SELECT + col1 * + ( - 97 ) + col1 DIV ( col1 ) FROM tab0 cor0
----
-8341
-8826
-9408

skipif mysql # not compatible
query I rowsort label-948
SELECT + col1 * + ( - 97 ) + col1 / ( col1 ) FROM tab0 cor0
----
-8341
-8826
-9408

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

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

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

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

query I rowsort
SELECT DISTINCT col0 + col2 * - col1 * col0 + + col2 AS col1 FROM tab1 AS cor0
----
-36359
-4155
-99664

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 WHERE col2 IN ( - col0 * col2 )
----

query I rowsort
SELECT DISTINCT tab0.col2 * + tab0.col2 * col0 + + col0 + - col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT tab1.col1 + col1 - col1 * col0 AS col2 FROM tab1
----
-1014
-26
-620

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

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

query I rowsort
SELECT - col2 * col0 + + tab2.col2 + + col1 AS col0 FROM tab2
----
-131
-1943
-2947

onlyif mysql # use DIV operator for integer division
query I rowsort label-959
SELECT ALL tab1.col1 + - col0 + + tab1.col0 DIV + col2 FROM tab1
----
-53
-67
23

skipif mysql # not compatible
query I rowsort label-959
SELECT ALL tab1.col1 + - col0 + + tab1.col0 / + col2 FROM tab1
----
-53
-67
23

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE col2 - - col2 <> NULL
----

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

skipif mysql # not compatible
query I rowsort label-961
SELECT DISTINCT col0 / - tab1.col1 AS col2 FROM tab1
----
-6
0

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

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

query I rowsort
SELECT - col0 + tab1.col2 + col2 * col2 AS col2 FROM tab1
----
2967
3242
9232

query I rowsort
SELECT DISTINCT col1 * + col1 + col2 + col2 * + col2 AS col1 FROM tab1
----
3406
3646
9481

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

query I rowsort
SELECT + col1 + - col2 * col0 * + tab0.col1 FROM tab0 WHERE ( col1 - - col0 * col1 ) NOT IN ( - col1 )
----
-3298
-664027
-68026

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

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

query I rowsort
SELECT tab2.col2 * - col0 + col2 + - col0 * + col2 * col0 AS col2 FROM tab2
----
-1485
-160186
-240122

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-971
SELECT ALL - col0 + + col1 + + col2 DIV col1 FROM tab2
----
-19
-60
24

skipif mysql # not compatible
query I rowsort label-971
SELECT ALL - col0 + + col1 + + col2 / col1 FROM tab2
----
-19
-60
24

query I rowsort
SELECT + col2 FROM tab0 WHERE ( NULL ) <= ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-973
SELECT col1 DIV + col2 + - col0 * + col0 * + col2 AS col1 FROM tab0
----
-1128
-19006
-649521

skipif mysql # not compatible
query I rowsort label-973
SELECT col1 / + col2 + - col0 * + col0 * + col2 AS col1 FROM tab0
----
-1128
-19006
-649521

query I rowsort
SELECT DISTINCT - col2 * col2 * + col2 FROM tab1
----
-157464
-185193
-884736

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

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

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

query I rowsort
SELECT - tab1.col1 * col0 - col1 * + col0 FROM tab1
----
-1280
-156
-2080

query I rowsort
SELECT col1 * col2 * col0 - + col1 FROM tab1
----
36470
4186
99827

query I rowsort
SELECT ALL col2 + - col0 + - col2 * - col1 AS col1 FROM tab0 cor0
----
2847
63
7455

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

query I rowsort
SELECT ALL col2 + col2 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-1056
-1296
-456

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

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

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

query I rowsort
SELECT + col2 + + 9 FROM tab2 AS cor0
----
35
36
47

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

query I rowsort
SELECT ALL + col0 * 41 AS col1 FROM tab1 AS cor0
----
123
2624
3280

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

query I rowsort
SELECT ALL - col0 + - 99 AS col0 FROM tab2 AS cor0
----
-106
-177
-178

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-991
SELECT ALL + + cor0.col2 * + CAST( cor0.col1 AS SIGNED ) * col2 + + col0 * + 9 FROM tab0 AS cor0
----
412
612685
93870

skipif mysql # not compatible
query I rowsort label-991
SELECT ALL + + cor0.col2 * + CAST ( cor0.col1 AS INTEGER ) * col2 + + col0 * + 9 FROM tab0 AS cor0
----
412
612685
93870

query I rowsort
SELECT ALL + col2 + + 1 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT - - col0 + 13 FROM tab2 AS cor0
----
20
91
92

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + col0 col1 FROM tab0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-996
SELECT col0 * + col0 + col1 DIV col1 AS col2 FROM tab2
----
50
6085
6242

skipif mysql # not compatible
query I rowsort label-996
SELECT col0 * + col0 + col1 / col1 AS col2 FROM tab2
----
50
6085
6242

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

query I rowsort
SELECT ALL - col0 FROM tab2 WHERE NOT NULL = NULL
----

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

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

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL BETWEEN tab2.col2 AND col0
----

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

query I rowsort
SELECT col0 * tab1.col1 - col0 FROM tab1
----
576
75
960

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

query I rowsort
SELECT - cor0.col0 + - col0 * + col0 + - col1 FROM tab2 AS cor0
----
-6221
-6337
-87

query I rowsort
SELECT DISTINCT - 29 * col0 FROM tab1 AS cor0
----
-1856
-2320
-87

query I rowsort
SELECT + 63 * - col2 AS col1 FROM tab2 AS cor0
----
-1638
-1701
-2394

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

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 WHERE NOT ( NULL ) > ( NULL )
----

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

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

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

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

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

query I rowsort
SELECT ALL 28 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

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

query I rowsort
SELECT - 74 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

onlyif mysql # use DIV operator for integer division
query I rowsort label-1017
SELECT ALL 6 DIV ( + tab0.col2 ) + cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9500435760b7ac316ae8c30a5135af3e

skipif mysql # not compatible
query I rowsort label-1017
SELECT ALL 6 / ( + tab0.col2 ) + cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9500435760b7ac316ae8c30a5135af3e

query I rowsort
SELECT - + col0 + - col2 * - 61 FROM tab1 AS cor0
----
3291
3413
5776

query I rowsort
SELECT DISTINCT + + col1 - + 21 AS col0 FROM tab1 AS cor0
----
-11
-8
5

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

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 * - 36 AS col1 FROM tab0 AS cor0
----
122220
291564
74304

query I rowsort
SELECT ALL + 92 * 41 + col2 + col2 FROM tab0
----
3774
3838
3936

query I rowsort
SELECT - ( - 14 ) * + col2 - col1 FROM tab0 AS cor0
----
-83
1057
376

query I rowsort
SELECT ALL - col2 * + 47 + col1 * + col2 FROM tab2 AS cor0
----
-1140
-432
312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * cor0.col2 - - col0 col2 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-1026
SELECT + 45 DIV + 83 + col2 col2 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1026
SELECT + 45 / + 83 + col2 col2 FROM tab2 cor0
----
26
27
38

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

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

query I rowsort
SELECT DISTINCT + 62 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-5332
-5642
-6014

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

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

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

skipif mysql # not compatible
query I rowsort label-1031
SELECT DISTINCT cor0.col2 / - col2 AS col2 FROM tab1 AS cor0
----
-1

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

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

query I rowsort
SELECT + - 80 + col2 AS col2 FROM tab0 AS cor0
----
-47
-79
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1035
SELECT + 55 DIV + col1 + - col1 * - col2 FROM tab2 AS cor0
----
1534
649
838

skipif mysql # not compatible
query I rowsort label-1035
SELECT + 55 / + col1 + - col1 * - col2 FROM tab2 AS cor0
----
1534
649
838

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1037
SELECT + - ( col2 ) + - col0 - col2 DIV - col1 FROM tab1 AS cor0
----
-116
-169
-55

skipif mysql # not compatible
query I rowsort label-1037
SELECT + - ( col2 ) + - col0 - col2 / - col1 FROM tab1 AS cor0
----
-116
-169
-55

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 * cor0.col2 col0 FROM tab2 cor0
----
1560
1620
2280

onlyif mysql # use DIV operator for integer division
query I rowsort label-1041
SELECT - col1 DIV col1 + cor0.col1 * col2 FROM tab2 AS cor0
----
1533
645
836

skipif mysql # not compatible
query I rowsort label-1041
SELECT - col1 / col1 + cor0.col1 * col2 FROM tab2 AS cor0
----
1533
645
836

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

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

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

skipif mysql # not compatible
query I rowsort label-1044
SELECT + 10 / col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 * 98 AS col2 FROM tab2 AS cor0
----
-2548
-2646
-3724

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

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

query I rowsort
SELECT - col0 * 25 FROM tab0
----
-2225
-600
-875

query I rowsort
SELECT + 73 + + cor0.col1 * - col2 * col1 - + col2 AS col1 FROM tab2 AS cor0
----
-10947
-25901
-90459

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

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

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

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

query I rowsort
SELECT 16 * col0 AS col0 FROM tab0
----
1424
384
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

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

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

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

query I rowsort
SELECT DISTINCT - 22 - cor0.col2 FROM tab0 cor0
----
-104
-23
-55

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

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

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

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col2 * + col0 + - ( + col0 ) AS col0 FROM tab1 AS cor0
----
-208000
-737360
-8751

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
-86
-91
-97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1063
SELECT ALL - col1 DIV tab1.col1 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1063
SELECT ALL - col1 / tab1.col1 AS col2 FROM tab1
----
-1
-1
-1

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

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

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

skipif mysql # not compatible
query I rowsort label-1066
SELECT ALL 66 / col1 AS col1 FROM tab0 cor0
----
0
0
0

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

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

skipif mysql # not compatible
query I rowsort label-1068
SELECT + col2 + col1 / + 15 FROM tab1 AS cor0
----
55
57
96

query I rowsort
SELECT ALL col1 * col1 + 81 FROM tab1 AS cor0
----
181
250
757

query I rowsort
SELECT DISTINCT col0 - - 33 FROM tab0 cor0
----
122
57
68

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

query I rowsort
SELECT ALL + col2 * + col0 + + 80 AS col2 FROM tab1 AS cor0
----
242
3728
7760

query I rowsort
SELECT ALL + + col1 * - 45 + col2 FROM tab2 AS cor0
----
-1368
-2629
-727

onlyif mysql # use DIV operator for integer division
query I rowsort label-1074
SELECT DISTINCT - cor0.col2 DIV CAST( + col1 AS SIGNED ) + - col2 - + col2 AS col1 FROM tab0 cor0
----
-164
-2
-66

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

query I rowsort
SELECT 7 * col0 * + col0 FROM tab2
----
343
42588
43687

onlyif mysql # use DIV operator for integer division
query I rowsort label-1076
SELECT col2 DIV col2 + col0 - + col1 FROM tab1
----
-22
55
68

skipif mysql # not compatible
query I rowsort label-1076
SELECT col2 / col2 + col0 - + col1 FROM tab1
----
-22
55
68

query I rowsort
SELECT - 20 * 20 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 62a353f997e2776254aabeb7980dcd80

skipif mysql # not compatible
query I rowsort
SELECT col0 * col1 * CAST ( col0 + col0 AS REAL ) AS col0 FROM tab0
----
1441622
237650
99072

query I rowsort
SELECT + col1 * ( cor0.col2 ) * col1 + - cor0.col1 * + cor0.col0 FROM tab0 AS cor0
----
242004
6014
670943

query I rowsort
SELECT col0 + 27 AS col0 FROM tab0 AS cor0
----
116
51
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1081
SELECT - cor0.col1 + CAST( - col0 AS SIGNED ) + col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-1081
SELECT - cor0.col1 + CAST ( - col0 AS INTEGER ) + col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

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

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

query I rowsort
SELECT tab0.col0 * 34 FROM tab0
----
1190
3026
816

query I rowsort
SELECT 14 * + col0 + col0 * col1 FROM tab0 AS cor0
----
2400
3885
9345

query I rowsort
SELECT ALL - 62 - col0 * + col0 * 53 FROM tab0 AS cor0
----
-30590
-419875
-64987

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

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

query I rowsort
SELECT DISTINCT tab2.col0 * + col1 * col1 + - col1 AS col0 FROM tab2
----
22814
271459
6696

query I rowsort
SELECT ALL - - 12 + cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 8685f613bbe40deaafd2e24593a96e07

query I rowsort
SELECT DISTINCT - tab2.col1 + - ( 80 ) FROM tab2
----
-111
-139
-97

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1092
SELECT + 46 * + cor0.col0 + col0 DIV ( col0 + col2 ) AS col0 FROM tab1 AS cor0
----
138
2944
3680

skipif mysql # not compatible
query I rowsort label-1092
SELECT + 46 * + cor0.col0 + col0 / ( col0 + col2 ) AS col0 FROM tab1 AS cor0
----
138
2944
3680

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

query I rowsort
SELECT - 11 * - tab0.col0 * col2 + col0 * col2 FROM tab0
----
420
87576
9504

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

query I rowsort
SELECT DISTINCT - col0 * + col0 * col0 + col2 * + col2 FROM tab2 AS cor0
----
-473876
-491595
386

onlyif mysql # use DIV operator for integer division
query I rowsort label-1097
SELECT + col1 DIV 9 + - col2 FROM tab0 AS cor0
----
-24
-72
9

skipif mysql # not compatible
query I rowsort label-1097
SELECT + col1 / 9 + - col2 FROM tab0 AS cor0
----
-24
-72
9

query I rowsort
SELECT ALL + + ( - col0 ) * - col1 + col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT 40 + 31 AS col0 FROM tab0 cor0
----
71

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

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

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

query I rowsort
SELECT ALL + - 22 + + col0 FROM tab0 AS cor0
----
13
2
67

query I rowsort
SELECT + 14 * + col1 AS col1 FROM tab1 AS cor0
----
140
182
364

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + 25 AS REAL ) * + col2 FROM tab1 AS cor0
----
-1350
-1425
-2400

query I rowsort
SELECT DISTINCT - ( + col2 ) + col1 - col1 * + col0 FROM tab1
----
-106
-1123
-687

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * col2 + 89 col0 FROM tab2 AS cor0
----
-1445
-557
-748

query I rowsort
SELECT + - col2 + - col2 - ( + cor0.col2 + col2 ) AS col1 FROM tab0 AS cor0
----
-132
-328
-4

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

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

query I rowsort
SELECT ALL - col1 * - 96 + - col2 AS col1 FROM tab0 AS cor0
----
8223
8654
9311

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

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

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

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

query I rowsort
SELECT DISTINCT + 94 + col2 FROM tab2 AS cor0
----
120
121
132

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

query I rowsort
SELECT + cor0.col0 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT ( 20 ) + - col2 FROM tab0
----
-13
-62
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-1122
SELECT DISTINCT col0 * - col1 + col1 + + 88 DIV col2 FROM tab0
----
-1976
-3210
-8007

skipif mysql # not compatible
query I rowsort label-1122
SELECT DISTINCT col0 * - col1 + col1 + + 88 / col2 FROM tab0
----
-1976
-3210
-8007

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

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

query I rowsort
SELECT - + col1 * col0 - 77 FROM tab0 cor0
----
-2141
-3472
-8176

query I rowsort
SELECT DISTINCT + 22 + + col0 AS col2 FROM tab2
----
100
101
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-1127
SELECT + col0 DIV - col2 + col1 + - col1 * ( col2 ) AS col1 FROM tab0 AS cor0
----
-2752
-35
-7372

skipif mysql # not compatible
query I rowsort label-1127
SELECT + col0 / - col2 + col1 + - col1 * ( col2 ) AS col1 FROM tab0 AS cor0
----
-2752
-35
-7372

query I rowsort
SELECT ALL 28 * + col2 FROM tab1
----
1512
1596
2688

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

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

query I rowsort
SELECT - col1 * - col1 + cor0.col1 * + col0 FROM tab1 cor0
----
1209
740
754

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

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

query I rowsort
SELECT ALL + col0 * + 76 AS col2 FROM tab0 AS cor0
----
1824
2660
6764

query I rowsort
SELECT ALL - - ( 64 ) * cor0.col2 FROM tab0 AS cor0
----
2112
5248
64

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

query I rowsort
SELECT ALL 37 * 71 + cor0.col2 FROM tab1 AS cor0
----
2681
2684
2723

query I rowsort
SELECT - 90 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

query I rowsort
SELECT ALL + ( col1 ) * cor0.col0 + + col1 * ( + col0 + col2 ) * col2 AS col2 FROM tab1 AS cor0
----
220688
69610
80106

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

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

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

query I rowsort
SELECT + + ( - 12 ) * - col2 AS col0 FROM tab0 AS cor0
----
12
396
984

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

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

query I rowsort
SELECT DISTINCT + 30 - - col1 FROM tab2
----
47
61
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1145
SELECT - col2 DIV - tab1.col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1145
SELECT - col2 / - tab1.col1 AS col0 FROM tab1
----
2
5
7

query I rowsort
SELECT 22 * - col2 + - col2 AS col1 FROM tab0
----
-1886
-23
-759

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

query I rowsort
SELECT 77 * 59 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to ef462b8a591156b9d300f724d33d915e

query I rowsort
SELECT 6 FROM tab1, tab2 cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL tab1.col1 * - 82 AS col2 FROM tab1
----
-1066
-2132
-820

query I rowsort
SELECT cor0.col1 * 63 FROM tab1, tab1 AS cor0
----
9 values hashing to a73c0ca94fe889b26b3c1fa07ca34379

query I rowsort
SELECT DISTINCT col2 * + ( + col1 + - col1 ) AS col0 FROM tab2
----
0

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

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

query I rowsort
SELECT 12 * 67 FROM tab0 AS cor0
----
804
804
804

query I rowsort
SELECT 27 * + col2 AS col1 FROM tab0 AS cor0
----
2214
27
891

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 21 + cor0.col2 col1 FROM tab2 cor0
----
47
48
59

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

query I rowsort
SELECT ALL + 3 + + col0 FROM tab0 AS cor0
----
27
38
92

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 DISTINCT + col2 * + col1 - col2 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-1162
SELECT - col2 DIV - cor0.col0 + - col1 AS col2 FROM tab0 AS cor0
----
-85
-91
-97

skipif mysql # not compatible
query I rowsort label-1162
SELECT - col2 / - cor0.col0 + - col1 AS col2 FROM tab0 AS cor0
----
-85
-91
-97

query I rowsort
SELECT ALL - - ( - col1 ) * ( 37 ) + + col1 FROM tab1 AS cor0
----
-360
-468
-936

query I rowsort
SELECT + cor0.col2 + - cor0.col0 * + 58 AS col0 FROM tab1 AS cor0
----
-120
-3655
-4544

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

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

query I rowsort
SELECT DISTINCT - - col1 * - 9 * - col0 + - col0 * - 6 + col0 FROM tab1 cor0
----
6208
723
9920

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1168
SELECT ALL col1 + col0 / - cor0.col2 col0 FROM tab0 AS cor0
----
62
86
90

query I rowsort
SELECT ALL + + col0 * 97 - col1 * - col1 FROM tab2 AS cor0
----
11047
1640
7952

query I rowsort
SELECT DISTINCT + col2 + 83 AS col2 FROM tab1 AS cor0
----
137
140
179

query I rowsort
SELECT DISTINCT + col2 + ( 8 ) FROM tab1 AS cor0
----
104
62
65

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

query I rowsort
SELECT ALL + col0 + + ( + col2 + col0 ) * - col0 FROM tab0 cor0
----
-1225
-1344
-15130

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

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

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

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

query I rowsort
SELECT + - ( + 89 ) + - col0 * + col1 - - col0 * col1 AS col0 FROM tab0 AS cor0
----
-89
-89
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1177
SELECT ( 54 ) DIV col0 FROM tab2 AS cor0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-1177
SELECT ( 54 ) / col0 FROM tab2 AS cor0
----
0
0
7

query I rowsort
SELECT + col0 * - 2 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1180
SELECT DISTINCT - tab0.col1 + + col1 DIV - col0 AS col1 FROM tab0
----
-89
-92
-99

skipif mysql # not compatible
query I rowsort label-1180
SELECT DISTINCT - tab0.col1 + + col1 / - col0 AS col1 FROM tab0
----
-89
-92
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 + + cor0.col2 col2 FROM tab2 AS cor0
----
-22
-6058
-6203

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

query I rowsort
SELECT DISTINCT - - ( - cor0.col2 ) * col2 * - col2 FROM tab1 cor0
----
157464
185193
884736

query I rowsort
SELECT cor0.col2 * col0 * 45 + - 87 AS col2 FROM tab0 AS cor0
----
1488
328323
35553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 39 * col0 col1 FROM tab2 AS cor0
----
273
3042
3081

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

query I rowsort
SELECT ALL - - 91 * col0 * 68 AS col1 FROM tab0 cor0
----
148512
216580
550732

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 * col1 col1 FROM tab1 AS cor0
----
117
234
90

query I rowsort
SELECT - col0 + - 51 AS col0 FROM tab2
----
-129
-130
-58

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1191
SELECT 62 DIV - 44 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1191
SELECT 62 / - 44 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 3 * - col2 - tab2.col1 col1 FROM tab2
----
19
50
97

query I rowsort
SELECT + 27 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

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

query I rowsort
SELECT + 1 FROM tab2, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1196
SELECT DISTINCT + col0 * col2 DIV - col1 FROM tab2 cor0
----
-176
-34
-6

skipif mysql # not compatible
query I rowsort label-1196
SELECT DISTINCT + col0 * col2 / - col1 FROM tab2 cor0
----
-176
-34
-6

query I rowsort
SELECT DISTINCT - 97 * col1 AS col1 FROM tab1 AS cor0
----
-1261
-2522
-970

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

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

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

query I rowsort
SELECT DISTINCT - col0 + - col1 + 12 AS col1 FROM tab2
----
-125
-26
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1201
SELECT - ( col0 ) + CAST( 15 AS SIGNED ) FROM tab1
----
-49
-65
12

skipif mysql # not compatible
query I rowsort label-1201
SELECT - ( col0 ) + CAST ( 15 AS INTEGER ) FROM tab1
----
-49
-65
12

query I rowsort
SELECT - col0 + + ( 95 + col2 ) AS col2 FROM tab0 AS cor0
----
104
61
88

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1204
SELECT col2 * col1 DIV 49 + ( + col0 ) * 90 AS col1 FROM tab0
----
2217
3151
8162

skipif mysql # not compatible
query I rowsort label-1204
SELECT col2 * col1 / 49 + ( + col0 ) * 90 AS col1 FROM tab0
----
2217
3151
8162

query I rowsort
SELECT ALL 21 * col2 + + tab2.col2 AS col2 FROM tab2
----
572
594
836

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

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

query I rowsort
SELECT DISTINCT - ( 90 ) * cor0.col2 + + 48 FROM tab1 AS cor0
----
-4812
-5082
-8592

query I rowsort
SELECT DISTINCT 61 * col0 + col1 * 27 AS col2 FROM tab1 AS cor0
----
4174
5231
885

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

query I rowsort
SELECT - tab1.col0 * col1 + 71 FROM tab1
----
-569
-7
-969

onlyif mysql # use DIV operator for integer division
query I rowsort label-1212
SELECT col1 * tab2.col0 DIV col0 + - col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1212
SELECT col1 * tab2.col0 / col0 + - col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 51 + col1 col1 FROM tab1 AS cor0
----
-25
-38
-41

query I rowsort
SELECT 64 * + 90 FROM tab2 AS cor0
----
5760
5760
5760

query I rowsort
SELECT DISTINCT 95 + col2 * col2 + ( 29 ) FROM tab2 AS cor0
----
1568
800
853

query I rowsort
SELECT ALL - + col0 * + 88 FROM tab2 AS cor0
----
-616
-6864
-6952

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1217
SELECT ALL + CAST( - col0 AS SIGNED ) * - cor0.col1 + 46 FROM tab1 AS cor0
----
1086
124
686

skipif mysql # not compatible
query I rowsort label-1217
SELECT ALL + CAST ( - col0 AS INTEGER ) * - cor0.col1 + 46 FROM tab1 AS cor0
----
1086
124
686

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 43 + - cor0.col0 col0 FROM tab2 AS cor0
----
-121
-122
-50

query I rowsort
SELECT col0 * 79 * col2 FROM tab1
----
12798
288192
606720

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

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

skipif mysql # not compatible
query I rowsort label-1222
SELECT + CAST ( + col2 AS INTEGER ) * - col2 + - 36 FROM tab1 AS cor0
----
-2952
-3285
-9252

query I rowsort
SELECT col0 * + 93 + col1 AS col1 FROM tab2 AS cor0
----
682
7313
7364

query I rowsort
SELECT DISTINCT - tab2.col2 * + col0 + + 72 AS col1 FROM tab2
----
-117
-1956
-2930

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1225
SELECT col2 / - col0 col0 FROM tab2
----
-3
0
0

query I rowsort
SELECT - col0 * - 94 AS col2 FROM tab1
----
282
6016
7520

query I rowsort
SELECT ALL + tab1.col1 * 33 AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to e4be6bb22d116d5ff9de77ea56a6f271

query I rowsort
SELECT + col0 + 32 FROM tab1 AS cor0
----
112
35
96

skipif mysql # not compatible
query I rowsort
SELECT + + col1 * col1 + cor0.col1 + - CAST ( + col0 + col1 AS REAL ) * col2 FROM tab1 AS cor0
----
-4108
-864
-8746

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

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

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

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

query I rowsort
SELECT - 52 * cor0.col0 FROM tab2 AS cor0
----
-364
-4056
-4108

query I rowsort
SELECT DISTINCT - + ( col1 ) * 94 FROM tab2 AS cor0
----
-1598
-2914
-5546

query I rowsort
SELECT + 9 * col2 FROM tab0 AS cor0
----
297
738
9

query I rowsort
SELECT - cor0.col0 * tab0.col2 AS col2 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to e98e390b6032a8c87284759dbb040a9f

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

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

skipif mysql # not compatible
query I rowsort label-1238
SELECT - col0 * - CAST ( + 43 AS INTEGER ) FROM tab0 cor0
----
1032
1505
3827

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

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

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 + + 5 * col0 * + col1 FROM tab2 AS cor0
----
1922
24544
7361

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1242
SELECT - col0 + + col0 DIV - 21 FROM tab1 cor0
----
-3
-67
-83

skipif mysql # not compatible
query I rowsort label-1242
SELECT - col0 + + col0 / - 21 FROM tab1 cor0
----
-3
-67
-83

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

query I rowsort
SELECT - col2 * - col2 - 97 * col0 FROM tab0
----
-1239
-1909
-3394

query I rowsort
SELECT ( 23 ) FROM tab2
----
23
23
23

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

query I rowsort
SELECT 46 * col0 FROM tab0
----
1104
1610
4094

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

query I rowsort
SELECT + - col2 * - col1 * + col0 + col2 * + col0 AS col2 FROM tab2 AS cor0
----
121680
54036
6048

query I rowsort
SELECT 85 * col2 + 29 FROM tab1 AS cor0
----
4619
4874
8189

onlyif mysql # use DIV operator for integer division
query I rowsort label-1251
SELECT - 47 + - col1 DIV col0 AS col1 FROM tab2 AS cor0
----
-47
-47
-51

skipif mysql # not compatible
query I rowsort label-1251
SELECT - 47 + - col1 / col0 AS col1 FROM tab2 AS cor0
----
-47
-47
-51

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

skipif mysql # not compatible
query I rowsort label-1252
SELECT + col1 / 49 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT col2 * ( - 3 ) FROM tab1
----
-162
-171
-288

query I rowsort
SELECT DISTINCT + col1 + 90 FROM tab1 AS cor0
----
100
103
116

query I rowsort
SELECT ALL + 99 * col1 + col0 FROM tab0 AS cor0
----
8538
9098
9638

query I rowsort
SELECT ALL col0 + + ( col2 ) + + 28 AS col1 FROM tab1 AS cor0
----
149
204
85

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

query I rowsort
SELECT ALL 91 FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 8a48d0ac75792561e233f0311a8872fd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1259
SELECT ALL - col1 + CAST( 83 * col2 AS SIGNED ) AS col0 FROM tab0
----
-14
2653
6715

skipif mysql # not compatible
query I rowsort label-1259
SELECT ALL - col1 + CAST ( 83 * col2 AS INTEGER ) AS col0 FROM tab0
----
-14
2653
6715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + tab1.col2 col1 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL - ( + col0 ) * col1 * col0 + + col1 * - col1 FROM tab2
----
-106386
-2480
-362437

query I rowsort
SELECT DISTINCT - col2 * tab2.col2 + col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT - 96 + - col0 * tab0.col1 FROM tab0
----
-2160
-3491
-8195

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

query I rowsort
SELECT 38 + ( tab2.col0 ) FROM tab2
----
116
117
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1266
SELECT + 68 * + 32 + col2 + col2 * col0 DIV + col0 col0 FROM tab1
----
2284
2290
2368

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1266
SELECT + 68 * + 32 + col2 + col2 * col0 / + col0 col0 FROM tab1
----
2284
2290
2368

query I rowsort
SELECT + - 24 * 53 + + cor0.col2 FROM tab1 cor0
----
-1176
-1215
-1218

query I rowsort
SELECT DISTINCT - col2 + + 6 AS col2 FROM tab1 AS cor0
----
-48
-51
-90

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

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

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

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

query I rowsort
SELECT ALL + ( + 56 ) * + cor0.col2 FROM tab1 AS cor0
----
3024
3192
5376

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1274
SELECT col0 * - col1 / - col1 + + tab0.col1 col1 FROM tab0
----
110
132
180

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

query I rowsort
SELECT ALL + ( 83 + cor1.col0 ) FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 26c1e9095d895be75f4609be3f9194bf

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

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

query I rowsort
SELECT - col2 * col1 + + col2 + col1 AS col0 FROM tab2 AS cor0
----
-1449
-591
-779

query I rowsort
SELECT - cor0.col2 * ( 60 ) + - col0 * - ( col2 * - col0 ) + col2 FROM tab2 AS cor0
----
-159718
-239400
-2916

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

query I rowsort
SELECT ALL + col2 + + 17 AS col0 FROM tab2 AS cor0
----
43
44
55

query I rowsort
SELECT - + col0 * 60 - col2 AS col1 FROM tab1 AS cor0
----
-234
-3897
-4896

query I rowsort
SELECT ALL + - col1 + - col2 * - 43 AS col0 FROM tab0 AS cor0
----
-54
1333
3435

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

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

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

query I rowsort
SELECT ALL + ( + col0 + tab0.col1 ) * col0 FROM tab0
----
16020
2640
4620

onlyif mysql # use DIV operator for integer division
query I rowsort label-1287
SELECT - + col1 DIV CAST( 24 AS SIGNED ) + + col0 FROM tab1 AS cor0
----
2
64
80

skipif mysql # not compatible
query I rowsort label-1287
SELECT - + col1 / CAST ( 24 AS INTEGER ) + + col0 FROM tab1 AS cor0
----
2
64
80

query I rowsort
SELECT DISTINCT - col1 + 59 * cor0.col1 * col1 AS col0 FROM tab0 AS cor0
----
436278
488488
555034

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

query I rowsort
SELECT DISTINCT + col0 + 90 AS col2 FROM tab0 AS cor0
----
114
125
179

onlyif mysql # use DIV operator for integer division
query I rowsort label-1291
SELECT + col0 DIV + 33 + col2 AS col2 FROM tab0
----
2
33
84

skipif mysql # not compatible
query I rowsort label-1291
SELECT + col0 / + 33 + col2 AS col2 FROM tab0
----
2
33
84

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

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

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

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

query I rowsort
SELECT + cor0.col0 - + col2 * + col2 FROM tab0 cor0
----
-1065
-6635
34

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

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

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

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

query I rowsort
SELECT - 13 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
11
22
76

query I rowsort
SELECT + col2 + 86 + - col0 AS col1 FROM tab2
----
106
34
45

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

skipif mysql # not compatible
query I rowsort label-1301
SELECT DISTINCT - col1 * + CAST ( - col0 AS INTEGER ) - + col1 FROM tab0
----
1978
3298
8008

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

query I rowsort
SELECT ALL 15 + col1 AS col1 FROM tab1 AS cor0
----
25
28
41

query I rowsort
SELECT DISTINCT col2 + cor0.col2 * + 19 * cor0.col2 FROM tab0 AS cor0
----
127838
20
20724

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

query I rowsort
SELECT DISTINCT - 93 + - col0 * col1 FROM tab0 AS cor0
----
-2157
-3488
-8192

query I rowsort
SELECT + - 46 + + col2 AS col0 FROM tab2 AS cor0
----
-19
-20
-8

query I rowsort
SELECT DISTINCT - + col1 * col0 * 63 AS col0 FROM tab2 AS cor0
----
-13671
-289926
-84609

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + cor0.col0 * col0 + + CAST ( 12 * - col2 AS REAL ) col1 FROM tab1 AS cor0
----
-639
3412
5248

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

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

query I rowsort
SELECT DISTINCT 73 * col0 + tab0.col0 FROM tab0
----
1776
2590
6586

query I rowsort
SELECT + ( + col2 * + col0 ) - + tab2.col0 * col0 FROM tab2
----
-3239
-4056
140

query I rowsort
SELECT ALL + + cor0.col2 * + cor0.col1 * 33 FROM tab2 AS cor0
----
21318
27621
50622

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 * - col2 col1 FROM tab1 cor0
----
-136
-3638
-7667

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

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

skipif mysql # not compatible
query I rowsort label-1317
SELECT - + col2 * + col2 * CAST ( col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT - 9 * col2 AS col0 FROM tab0 AS cor0
----
-297
-738
-9

query I rowsort
SELECT ALL + - col2 * + col2 + col0 FROM tab0 AS cor0
----
-1065
-6635
34

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

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

query I rowsort
SELECT + cor0.col0 * - col0 + col1 * cor0.col2 FROM tab1 AS cor0
----
-3526
-5152
1395

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

query I rowsort
SELECT + 59 * col0 AS col1 FROM tab1 AS cor0
----
177
3776
4720

query I rowsort
SELECT DISTINCT - col0 * 32 FROM tab1 cor0
----
-2048
-2560
-96

query I rowsort
SELECT DISTINCT 15 + + 91 FROM tab0, tab1 AS cor0
----
106

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 * col2 + - col2 * cor0.col1 col1 FROM tab1 AS cor0
----
-1242
3078
6432

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

query I rowsort
SELECT col2 + 22 FROM tab1 AS cor0
----
118
76
79

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

query I rowsort
SELECT - 70 * + col2 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-2450
-510860
-55440

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

skipif mysql # not compatible
query I rowsort label-1334
SELECT + + CAST ( col1 AS INTEGER ) + - col2 * + col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT - 54 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 18 col2 FROM tab0
----
68
73
79

query I rowsort
SELECT - + col0 * + col0 + - col1 + col2 AS col2 FROM tab2 AS cor0
----
-53
-6117
-6220

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

query I rowsort
SELECT 1 * + 37 AS col1 FROM tab2 AS cor0
----
37
37
37

query I rowsort
SELECT - - 69 * - 63 + + col0 + - 45 AS col0 FROM tab2 AS cor0
----
-4313
-4314
-4385

query I rowsort
SELECT + + 50 * cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
1750
364900
39600

query I rowsort
SELECT - + 27 * + col0 AS col2 FROM tab2 AS cor0
----
-189
-2106
-2133

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( - 33 ) * - col0 + col1 col2 FROM tab0 AS cor0
----
1252
3028
878

query I rowsort
SELECT ALL 94 + - cor0.col1 FROM tab0 AS cor0
----
-3
3
8

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT + col2 + + cor0.col0 * CAST ( + col2 * col0 AS REAL ) AS col0 FROM tab0 AS cor0
----
1226
19041
649604

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

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

query I rowsort
SELECT 35 * cor0.col0 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT DISTINCT - cor1.col0 - 9 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-33
-44
-98

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1354
SELECT + col2 + ( - col2 + + col0 ) DIV ( - ( cor0.col0 ) + col2 ) FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-1354
SELECT + col2 + ( - col2 + + col0 ) / ( - ( cor0.col0 ) + col2 ) FROM tab2 AS cor0
----
25
26
37

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 5 * 10 + cor0.col2 col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
4
46
7

query I rowsort
SELECT 57 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1360
SELECT DISTINCT - col1 DIV 60 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-1360
SELECT DISTINCT - col1 / 60 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1361
SELECT ALL - 83 DIV - cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cc7d5aa36630418df613be069b2cc88c

skipif mysql # not compatible
query I rowsort label-1361
SELECT ALL - 83 / - cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cc7d5aa36630418df613be069b2cc88c

query I rowsort
SELECT + tab1.col0 * - 50 FROM tab1
----
-150
-3200
-4000

query I rowsort
SELECT col1 * ( col2 * col2 ) FROM tab2
----
22599
24548
39884

query I rowsort
SELECT DISTINCT + col1 + - 93 FROM tab0
----
-2
-7
4

query I rowsort
SELECT ALL + + col0 * - 12 FROM tab1 cor0
----
-36
-768
-960

query I rowsort
SELECT - + col2 + ( - col2 ) * + cor0.col1 FROM tab1 AS cor0
----
-1344
-1458
-627

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * ( - 38 ) col0 FROM tab1 AS cor0
----
-114
-2432
-3040

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

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

query I rowsort
SELECT - + col1 * 45 + 18 AS col1 FROM tab1 AS cor0
----
-1152
-432
-567

query I rowsort
SELECT - + col2 * + 1 FROM tab0 cor0
----
-1
-33
-82

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 + col0 + + 54 * col2 col1 FROM tab1 AS cor0
----
2919
3142
5264

query I rowsort
SELECT ALL + cor0.col2 * ( col1 * col1 ) FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-1375
SELECT ALL - col1 + + col2 DIV + cor0.col0 AS col1 FROM tab0 AS cor0
----
-85
-91
-97

skipif mysql # not compatible
query I rowsort label-1375
SELECT ALL - col1 + + col2 / + cor0.col0 AS col1 FROM tab0 AS cor0
----
-85
-91
-97

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

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

query I rowsort
SELECT ALL - col1 * col1 * - col0 + col2 AS col2 FROM tab2 AS cor0
----
22869
271544
6754

query I rowsort
SELECT DISTINCT + col0 * 34 + + 55 * cor0.col1 FROM tab1 AS cor0
----
1532
2726
3435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - 83 col2 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT DISTINCT - col1 * + 78 + col2 + col1 AS col1 FROM tab0 cor0
----
-6589
-6925
-7468

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + 87 * - col2 + - col1 col0 FROM tab2
----
-2347
-2407
-3361

query I rowsort
SELECT DISTINCT - 87 * - cor0.col1 FROM tab2 AS cor0
----
1479
2697
5133

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

query I rowsort
SELECT + col0 * + 49 AS col2 FROM tab0
----
1176
1715
4361

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * col2 + + col2 col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + col0 * + col2 + + 65 AS col1 FROM tab2 cor0
----
2093
254
3067

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

skipif mysql # not compatible
query I rowsort
SELECT ALL - 47 + - cor0.col0 * - CAST ( col2 + col1 AS REAL ) AS col2 FROM tab0 AS cor0
----
15350
2809
3383

query I rowsort
SELECT ALL ( col1 ) * ( - 93 ) * cor0.col0 + 96 FROM tab2 AS cor0
----
-124803
-20085
-427890

query I rowsort
SELECT cor0.col2 + + 50 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to b9742db8b1bf309580788cf7f58b30d4

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

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

query I rowsort
SELECT 81 * + col2 FROM tab0 AS cor0
----
2673
6642
81

query I rowsort
SELECT + ( + cor2.col0 ) FROM tab0, tab0 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to 63f734facb33901524f6f2c799118db4

query I rowsort
SELECT - ( col1 ) * 38 FROM tab2 AS cor0
----
-1178
-2242
-646

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

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

query I rowsort
SELECT DISTINCT + + cor0.col2 + col1 * ( col0 * + col1 ) AS col2 FROM tab2 AS cor0
----
22869
271544
6754

query I rowsort
SELECT 79 + - 55 FROM tab1, tab0 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT ALL col2 * + 38 + + col2 FROM tab2 AS cor0
----
1014
1053
1482

query I rowsort
SELECT ALL col1 + - 51 * col0 AS col2 FROM tab2 cor0
----
-326
-3919
-4012

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

query I rowsort
SELECT DISTINCT - col0 * col1 + col0 + + col0 AS col1 FROM tab2 AS cor0
----
-1185
-203
-4446

query I rowsort
SELECT ALL 88 * - tab2.col1 FROM tab2
----
-1496
-2728
-5192

query I rowsort
SELECT - - ( col2 ) + cor0.col2 * - 51 FROM tab1 AS cor0
----
-2700
-2850
-4800

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

query I rowsort
SELECT ALL 95 + + 96 * tab0.col2 FROM tab0
----
191
3263
7967

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

query I rowsort
SELECT ALL + col2 + + 11 AS col1 FROM tab2 AS cor0
----
37
38
49

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

query I rowsort
SELECT ALL - 18 * col0 FROM tab1 cor0
----
-1152
-1440
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 48 ) col2 FROM tab2 AS cor0
----
-48
-48
-48

query I rowsort
SELECT - cor1.col1 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + 28 * col2 * - 92 FROM tab0 AS cor0
----
-211232
-2576
-85008

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 * - col2 * - col2 col0 FROM tab0 AS cor0
----
302580
45
49005

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

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

query I rowsort
SELECT + + 33 * - col0 + col2 * + col0 FROM tab2 AS cor0
----
-42
-546
395

onlyif mysql # use DIV operator for integer division
query I rowsort label-1422
SELECT DISTINCT + 15 + col2 DIV - 40 FROM tab1 AS cor0
----
13
14

skipif mysql # not compatible
query I rowsort label-1422
SELECT DISTINCT + 15 + col2 / - 40 FROM tab1 AS cor0
----
13
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1423
SELECT 30 + cor0.col2 * CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
1278
1434
600

skipif mysql # not compatible
query I rowsort label-1423
SELECT 30 + cor0.col2 * CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
1278
1434
600

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1425
SELECT ALL - col1 DIV cor0.col0 + - ( ( col1 ) ) * ( - ( col2 ) * + col0 + + col1 ) AS col2 FROM tab1 cor0
----
3528
36380
99671

skipif mysql # not compatible
query I rowsort label-1425
SELECT ALL - col1 / cor0.col0 + - ( ( col1 ) ) * ( - ( col2 ) * + col0 + + col1 ) AS col2 FROM tab1 cor0
----
3528
36380
99671

query I rowsort
SELECT DISTINCT tab0.col0 * - tab0.col0 + + col1 FROM tab0
----
-1128
-490
-7830

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

query I rowsort
SELECT DISTINCT + 36 * + col0 + - col1 * - col0 FROM tab1
----
186
2944
3920

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

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

query I rowsort
SELECT + 16 * col2 + col1 FROM tab1
----
1549
890
922

query I rowsort
SELECT + col0 + - 92 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-4965
-5180
-8752

query I rowsort
SELECT + 9 * col0 + - col0 + 94 AS col0 FROM tab1 AS cor0
----
118
606
734

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1434
SELECT DISTINCT 84 - tab2.col0 / CAST( NULL AS SIGNED ) col2 FROM tab2, tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1434
SELECT DISTINCT 84 - tab2.col0 / CAST ( NULL AS INTEGER ) col2 FROM tab2, tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1435
SELECT DISTINCT + ( + col1 ) DIV col2 col0 FROM tab0
----
1
2
97

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

query I rowsort
SELECT ALL - - 57 * col1 FROM tab0 AS cor0
----
4902
5187
5529

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

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

query I rowsort
SELECT ALL ( + 66 + col0 ) FROM tab0
----
101
155
90

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 * - ( + col2 ) + tab0.col2 col2 FROM tab0
----
-611802
-93621
-96

query I rowsort
SELECT DISTINCT 90 + - col2 AS col0 FROM tab1
----
-6
33
36

query I rowsort
SELECT DISTINCT col2 * tab1.col1 + + ( col0 ) * + col1 FROM tab1
----
1210
1482
2288

query I rowsort
SELECT + col0 * col1 + + 29 AS col2 FROM tab1 AS cor0
----
1069
107
669

query I rowsort
SELECT + 2 * - cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 3ecf22ea98914f3029f17bd37e7e2ec3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - ( + col2 ) col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 + 82 AS col0 FROM tab0 AS cor0
----
-15
-2756
-7380

query I rowsort
SELECT - cor0.col1 * 89 + + 70 * + col1 FROM tab2 AS cor0
----
-1121
-323
-589

onlyif mysql # use DIV operator for integer division
query I rowsort label-1449
SELECT cor0.col2 + cor0.col1 DIV col1 + cor0.col2 * - ( col1 ) * col2 AS col2 FROM tab2 AS cor0
----
-22571
-24509
-39857

skipif mysql # not compatible
query I rowsort label-1449
SELECT cor0.col2 + cor0.col1 / col1 + cor0.col2 * - ( col1 ) * col2 AS col2 FROM tab2 AS cor0
----
-22571
-24509
-39857

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1455
SELECT col1 + - tab1.col0 DIV col1 + col0 FROM tab1
----
29
68
87

skipif mysql # not compatible
query I rowsort label-1455
SELECT col1 + - tab1.col0 / col1 + col0 FROM tab1
----
29
68
87

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

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

query I rowsort
SELECT DISTINCT + - col2 + - 17 * - cor0.col1 FROM tab0 AS cor0
----
1429
1465
1648

query I rowsort
SELECT ALL - + col2 + - col1 * - cor0.col0 FROM tab1 cor0
----
24
583
944

query I rowsort
SELECT - + col1 * 81 * col1 + 89 AS col2 FROM tab2 AS cor0
----
-23320
-281872
-77752

query I rowsort
SELECT ALL - ( - 56 ) + cor0.col2 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT ( 51 ) FROM tab2 AS cor0
----
51
51
51

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

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

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

query I rowsort
SELECT - 49 + col2 * - col1 * - 12 AS col2 FROM tab1 AS cor0
----
14927
16799
6791

query I rowsort
SELECT DISTINCT - 46 + + ( col1 ) * - 4 * col0 FROM tab2 AS cor0
----
-18454
-5418
-914

onlyif mysql # use DIV operator for integer division
query I rowsort label-1466
SELECT DISTINCT - - col0 DIV + col1 - + cor0.col0 AS col0 FROM tab2 AS cor0
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-1466
SELECT DISTINCT - - col0 / + col1 - + cor0.col0 AS col0 FROM tab2 AS cor0
----
-7
-75
-77

query I rowsort
SELECT DISTINCT - 49 + + col2 AS col0 FROM tab0 AS cor0
----
-16
-48
33

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

query I rowsort
SELECT DISTINCT ( - ( col2 ) ) * col1 + 97 FROM tab1 AS cor0
----
-1151
-1307
-473

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

query I rowsort
SELECT + col1 + 36 AS col2 FROM tab1 AS cor0
----
46
49
62

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

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

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

query I rowsort
SELECT ALL - col0 + + ( ( col1 ) ) + cor0.col1 FROM tab1 AS cor0
----
-44
-54
49

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

query I rowsort
SELECT ALL 64 * col0 AS col2 FROM tab2
----
448
4992
5056

query I rowsort
SELECT 62 * col0 FROM tab0
----
1488
2170
5518

query I rowsort
SELECT + col0 * + 63 FROM tab0 cor0
----
1512
2205
5607

query I rowsort
SELECT ALL + + col1 + 42 FROM tab2 AS cor0
----
101
59
73

query I rowsort
SELECT DISTINCT - 14 * + col0 FROM tab0 AS cor0
----
-1246
-336
-490

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + - tab1.col2 col2 FROM tab1
----
-28
-47
-83

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

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

query I rowsort
SELECT ALL col1 * - col1 + - col2 * - 89 + cor0.col1 * - col0 FROM tab0 AS cor0
----
-12715
-6523
-9082

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1488
SELECT + + CAST ( - ( - col1 ) AS INTEGER ) / 77 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT ALL + col0 + col2 * 92 AS col1 FROM tab1 AS cor0
----
4971
5308
8912

query I rowsort
SELECT ALL - col0 * col2 - + col1 * 79 AS col0 FROM tab1 AS cor0
----
-2216
-4438
-8707

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

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

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1498
SELECT ALL cor0.col0 + cor0.col0 DIV + cor0.col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-1498
SELECT ALL cor0.col0 + cor0.col0 / + cor0.col0 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1499
SELECT + col0 * ( + col0 ) + + col0 DIV - 90 AS col2 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-1499
SELECT + col0 * ( + col0 ) + + col0 / - 90 AS col2 FROM tab0 AS cor0
----
1225
576
7921

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

query I rowsort
SELECT - ( + 53 ) AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

query I rowsort
SELECT DISTINCT tab2.col0 + ( + col0 ) + tab2.col2 FROM tab2
----
182
196
41

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1504
SELECT - col0 + - CAST( 75 AS SIGNED ) FROM tab1
----
-139
-155
-78

skipif mysql # not compatible
query I rowsort label-1504
SELECT - col0 + - CAST ( 75 AS INTEGER ) FROM tab1
----
-139
-155
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 57 * - col0 col1 FROM tab0 AS cor0
----
-1368
-1995
-5073

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col0 * col2 col2 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + ( - col0 ) + + col2 * - 73 AS col1 FROM tab2 cor0
----
-1976
-1978
-2853

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

query I rowsort
SELECT ( col1 ) * + col2 + + col1 * col0 AS col0 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT ALL + tab0.col0 + ( col0 ) AS col2 FROM tab0
----
178
48
70

query I rowsort
SELECT col0 * + 32 FROM tab2
----
224
2496
2528

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

skipif mysql # not compatible
query I rowsort label-1512
SELECT cor1.col1 / cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 cor1, tab0 AS cor2
----
81 values hashing to d6108c5b43122b3502ee4b866bdba754

query I rowsort
SELECT col2 * - 74 * col0 AS col1 FROM tab1
----
-11988
-269952
-568320

query I rowsort
SELECT + col2 + - col1 * col1 AS col1 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT - 18 AS col2 FROM tab0
----
-18

query I rowsort
SELECT + 68 * + col2 AS col1 FROM tab1 AS cor0
----
3672
3876
6528

query I rowsort
SELECT + 66 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT + cor0.col1 * cor0.col2 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 7623ebe74018211e6a4da91fc8c37d6d

query I rowsort
SELECT col0 * col2 * tab1.col2 + - col2 AS col2 FROM tab1
----
207879
737184
8694

query I rowsort
SELECT DISTINCT 76 + - col1 * - col0 FROM tab2
----
1419
293
4678

onlyif mysql # use DIV operator for integer division
query I rowsort label-1521
SELECT 18 DIV + col2 AS col0 FROM tab0
----
0
0
18

skipif mysql # not compatible
query I rowsort label-1521
SELECT 18 / + col2 AS col0 FROM tab0
----
0
0
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-1522
SELECT ( + tab2.col2 ) + col1 DIV col1 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-1522
SELECT ( + tab2.col2 ) + col1 / col1 FROM tab2
----
27
28
39

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1525
SELECT 8 DIV tab1.col0 AS col0 FROM tab1
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1525
SELECT 8 / tab1.col0 AS col0 FROM tab1
----
0
0
2

query I rowsort
SELECT - 17 + + col2 * + col1 FROM tab1
----
1231
1387
553

query I rowsort
SELECT - col2 + 55 FROM tab2 AS cor0
----
17
28
29

query I rowsort
SELECT ALL - col2 + - col2 * - 73 + col0 AS col1 FROM tab1 AS cor0
----
3891
4168
6992

query I rowsort
SELECT DISTINCT - + cor0.col1 * + ( - 73 ) - col1 FROM tab2 AS cor0
----
1224
2232
4248

query I rowsort
SELECT col0 * - col1 + ( col2 ) FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - - col1 - 74 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
248
4746
5933

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

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

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

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

query I rowsort
SELECT ALL - col1 + + ( 96 * col2 + - 71 * + col1 ) FROM tab2 AS cor0
----
-1752
2424
360

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

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

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

query I rowsort
SELECT DISTINCT - col0 * col1 + + col2 + + col2 FROM tab2 AS cor0
----
-1267
-163
-4550

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

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

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

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

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

query I rowsort
SELECT 1 * - col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - - col1 * + col1 + + cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
15005
8485
9410

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1544
SELECT + 34 + + col2 / - col2 col0 FROM tab0 AS cor0
----
33
33
33

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

query I rowsort
SELECT + + col0 + - col2 * col2 FROM tab0 AS cor0
----
-1065
-6635
34

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

query I rowsort
SELECT + + col1 + 97 * - col0 AS col1 FROM tab1 AS cor0
----
-265
-6198
-7747

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

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

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

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

query I rowsort
SELECT - 40 FROM tab1, tab1 AS cor0
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT col0 + - ( col2 ) * tab2.col2 * + 89 FROM tab2
----
-128437
-60086
-64874

query I rowsort
SELECT - 13 + - col2 FROM tab0
----
-14
-46
-95

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

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

query I rowsort
SELECT ALL + 54 AS col0 FROM tab0 AS cor0
----
54
54
54

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

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

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

query I rowsort
SELECT DISTINCT + col0 + - 37 * + col2 AS col2 FROM tab1 cor0
----
-1995
-2045
-3472

query I rowsort
SELECT - - 5 + col2 AS col1 FROM tab2 AS cor0
----
31
32
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-1562
SELECT + 64 DIV + tab2.col0 FROM tab2
----
0
0
9

skipif mysql # not compatible
query I rowsort label-1562
SELECT + 64 / + tab2.col0 FROM tab2
----
0
0
9

query I rowsort
SELECT 15 * - col0 AS col1 FROM tab0
----
-1335
-360
-525

onlyif mysql # use DIV operator for integer division
query I rowsort label-1564
SELECT - ( + col1 ) DIV col2 - ( col0 * 92 + col0 ) col1 FROM tab0 AS cor0
----
-2234
-3352
-8278

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1564
SELECT - ( + col1 ) / col2 - ( col0 * 92 + col0 ) col1 FROM tab0 AS cor0
----
-2234
-3352
-8278

query I rowsort
SELECT ALL - 42 + col1 AS col2 FROM tab2 AS cor0
----
-11
-25
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-1566
SELECT DISTINCT - 43 + - col0 DIV col1 FROM tab2 cor0
----
-43
-44
-47

skipif mysql # not compatible
query I rowsort label-1566
SELECT DISTINCT - 43 + - col0 / col1 FROM tab2 cor0
----
-43
-44
-47

query I rowsort
SELECT DISTINCT + 13 * - col1 + col1 FROM tab1 AS cor0
----
-120
-156
-312

query I rowsort
SELECT ALL - - col0 * col2 + - ( - col1 ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
1150
3291
5509

query I rowsort
SELECT DISTINCT ( - col1 ) + - 31 AS col2 FROM tab2 AS cor0
----
-48
-62
-90

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

query I rowsort
SELECT 73 * col1 * col2 + - col2 FROM tab0 cor0
----
207141
544644
7080

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1574
SELECT - - CAST( - 3 AS SIGNED ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

skipif mysql # not compatible
query I rowsort label-1574
SELECT - - CAST ( - 3 AS INTEGER ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-1575
SELECT col0 + col1 * col1 DIV - ( col2 + 25 ) col1 FROM tab2 AS cor0
----
-11
10
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1575
SELECT col0 + col1 * col1 / - ( col2 + 25 ) col1 FROM tab2 AS cor0
----
-11
10
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-1576
SELECT + ( col2 ) + col2 DIV col0 FROM tab1 cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-1576
SELECT + ( col2 ) + col2 / col0 FROM tab1 cor0
----
57
72
97

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

query I rowsort
SELECT ALL + col1 + cor0.col1 * + col2 * + col2 AS col2 FROM tab1 AS cor0
----
119821
32500
75842

query I rowsort
SELECT + 2 - col0 FROM tab2 AS cor0
----
-5
-76
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-1580
SELECT + col0 DIV col1 + col0 AS col2 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-1580
SELECT + col0 / col1 + col0 AS col2 FROM tab2 AS cor0
----
7
79
83

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

query I rowsort
SELECT 69 + tab1.col2 * + 58 FROM tab1
----
3201
3375
5637

query I rowsort
SELECT ALL + col2 + - col2 * 72 AS col2 FROM tab0
----
-2343
-5822
-71

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col1 col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL + 12 + - col0 AS col0 FROM tab1
----
-52
-68
9

query I rowsort
SELECT - ( + 57 ) AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT ALL 67 * - tab0.col0 * col2 FROM tab0
----
-2345
-488966
-53064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) * + ( - col0 ) * tab1.col0 col2 FROM tab1
----
-262144
-27
-512000

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

query I rowsort
SELECT ALL + - col1 + col2 * 95 FROM tab0 AS cor0
----
-2
3049
7699

onlyif mysql # use DIV operator for integer division
query I rowsort label-1593
SELECT DISTINCT - - col0 DIV CAST( 53 AS SIGNED ) + + col2 * col0 AS col0 FROM tab1 AS cor0
----
162
3649
7681

skipif mysql # not compatible
query I rowsort label-1593
SELECT DISTINCT - - col0 / CAST ( 53 AS INTEGER ) + + col2 * col0 AS col0 FROM tab1 AS cor0
----
162
3649
7681

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1596
SELECT ALL - - col0 + 47 DIV - cor0.col1 col1 FROM tab2 AS cor0
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1596
SELECT ALL - - col0 + 47 / - cor0.col1 col1 FROM tab2 AS cor0
----
6
77
78

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

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

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

query I rowsort
SELECT DISTINCT - ( 33 ) * - cor0.col2 * - col0 AS col2 FROM tab2 AS cor0
----
-6237
-66924
-99066

query I rowsort
SELECT - + 22 + 62 AS col1 FROM tab2 cor0
----
40
40
40

query I rowsort
SELECT DISTINCT 29 * + cor0.col0 AS col2 FROM tab1 cor0
----
1856
2320
87

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

skipif mysql # not compatible
query I rowsort label-1603
SELECT DISTINCT + CAST ( NULL AS REAL ) / - 71 AS col0 FROM tab2 AS cor0
----
NULL

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

query I rowsort
SELECT ( + col1 ) + col0 + cor0.col0 AS col0 FROM tab2 cor0
----
175
215
45

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

query I rowsort
SELECT - 49 + - col2 FROM tab0 AS cor0
----
-131
-50
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 + + col1 col1 FROM tab2 AS cor0
----
35
49
77

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1612
SELECT + - col2 * col0 DIV 14 + - 61 * - col0 AS col2 FROM tab2 AS cor0
----
414
4605
4614

skipif mysql # not compatible
query I rowsort label-1612
SELECT + - col2 * col0 / 14 + - 61 * - col0 AS col2 FROM tab2 AS cor0
----
414
4605
4614

query I rowsort
SELECT DISTINCT + - cor0.col2 * cor0.col2 + 20 FROM tab2 AS cor0
----
-1424
-656
-709

onlyif mysql # use DIV operator for integer division
query I rowsort label-1614
SELECT ALL - + col0 DIV + col0 + col1 - - cor0.col1 FROM tab2 AS cor0
----
117
33
61

skipif mysql # not compatible
query I rowsort label-1614
SELECT ALL - + col0 / + col0 + col1 - - cor0.col1 FROM tab2 AS cor0
----
117
33
61

query I rowsort
SELECT DISTINCT 0 * + col1 - - col0 FROM tab2
----
7
78
79

query I rowsort
SELECT - 79 * - col1 + cor0.col0 FROM tab2 AS cor0
----
1422
2456
4739

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

query I rowsort
SELECT DISTINCT 40 * - col0 FROM tab2 AS cor0
----
-280
-3120
-3160

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

query I rowsort
SELECT 94 + col1 AS col1 FROM tab2 AS cor0
----
111
125
153

query I rowsort
SELECT col1 * col2 - 72 FROM tab1 AS cor0
----
1176
1332
498

query I rowsort
SELECT col2 * col0 + 93 + cor0.col1 AS col1 FROM tab1 AS cor0
----
281
3751
7786

query I rowsort
SELECT col2 + cor0.col0 * col2 - - col1 * + col2 FROM tab1 AS cor0
----
1620
4275
9024

query I rowsort
SELECT + - col2 + col1 + col0 * col2 FROM tab0 AS cor0
----
131
7307
845

onlyif mysql # use DIV operator for integer division
query I rowsort label-1625
SELECT 46 * + col0 + + ( 18 ) DIV col0 - + 98 col2 FROM tab1 AS cor0
----
2846
3582
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1625
SELECT 46 * + col0 + + ( 18 ) / col0 - + 98 col2 FROM tab1 AS cor0
----
2846
3582
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-1626
SELECT - col2 DIV + col1 + - col1 * col2 FROM tab1 AS cor0
----
-1255
-1406
-575

skipif mysql # not compatible
query I rowsort label-1626
SELECT - col2 / + col1 + - col1 * col2 FROM tab1 AS cor0
----
-1255
-1406
-575

query I rowsort
SELECT ALL col2 + + col0 + col2 * - ( + col0 ) AS col2 FROM tab0
----
-7127
-735
1

query I rowsort
SELECT ALL + 25 * cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4eb0abec54c1f4b900ce137796f96cee

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1629
SELECT - cor0.col0 / - col2 col1 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 8 ) * - col2 col0 FROM tab2 cor0
----
208
216
304

query I rowsort
SELECT col0 * ( + ( + tab0.col2 ) ) + - 96 FROM tab0
----
-61
696
7202

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 + col1 col0 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT - 58 * + tab0.col2 + cor0.col2 AS col1 FROM tab0, tab2, tab2 cor0
----
27 values hashing to 8c570f17564cc0ff30dbb5f6d9ab9d80

query I rowsort
SELECT ALL + + 5 + 36 FROM tab0 cor0
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 83 col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 88760a1f9dd1b906461fb55f104f82fe

onlyif mysql # use DIV operator for integer division
query I rowsort label-1636
SELECT + ( + ( col1 ) ) + tab1.col1 DIV + 34 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1636
SELECT + ( + ( col1 ) ) + tab1.col1 / + 34 FROM tab1
----
10
13
26

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

query I rowsort
SELECT - tab2.col2 - - 86 AS col2 FROM tab2
----
48
59
60

query I rowsort
SELECT DISTINCT col2 * + 12 - - col1 FROM tab1
----
1165
674
694

query I rowsort
SELECT - - 78 - col0 FROM tab0 AS cor0
----
-11
43
54

query I rowsort
SELECT - cor0.col1 + 46 AS col2 FROM tab0 AS cor0
----
-40
-45
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 82 + 70 * + col1 + + 15 col0 FROM tab1
----
1007
1917
797

query I rowsort
SELECT ALL + 9 + 73 + + col1 AS col2 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT ( 39 ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
1287
3198
39

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

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

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

query I rowsort
SELECT ALL 8 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT - cor0.col1 + col1 + 3 FROM tab2 AS cor0
----
3
3
3

query I rowsort
SELECT + - 56 * - cor0.col2 FROM tab1 cor0
----
3024
3192
5376

query I rowsort
SELECT + col0 + 72 FROM tab0 AS cor0
----
107
161
96

query I rowsort
SELECT ALL 61 + 52 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to ece70480e55244469a16ed2f016bf62b

query I rowsort
SELECT ALL col2 - 89 AS col2 FROM tab2 AS cor0
----
-51
-62
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 6 col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT ALL - + col1 * - 23 FROM tab1 AS cor0
----
230
299
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-1655
SELECT col0 + + col0 DIV - col2 FROM tab1
----
3
63
80

skipif mysql # not compatible
query I rowsort label-1655
SELECT col0 + + col0 / - col2 FROM tab1
----
3
63
80

query I rowsort
SELECT DISTINCT - col2 * ( col0 + - col1 ) FROM tab2 cor0
----
-2356
-494
648

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

skipif mysql # not compatible
query I rowsort label-1657
SELECT ALL + cor0.col2 * CAST ( NULL AS REAL ) + 34 / cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + ( 86 ) * cor0.col1 + 13 FROM tab1, tab2 AS cor0
----
9 values hashing to d67857b35da78c1820b3a756239c46c3

query I rowsort
SELECT ALL - - 33 + - col0 AS col0 FROM tab2 AS cor0
----
-45
-46
26

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

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

query I rowsort
SELECT DISTINCT - 34 * - col1 + col0 FROM tab0 cor0
----
2948
3183
3333

query I rowsort
SELECT ALL + cor0.col2 + ( col0 ) * col0 + + col1 AS col2 FROM tab2 AS cor0
----
107
6169
6296

query I rowsort
SELECT DISTINCT + col1 * col0 * + col0 - 74 * + col1 FROM tab2 AS cor0
----
-775
104839
354590

onlyif mysql # use DIV operator for integer division
query I rowsort label-1665
SELECT - col1 DIV col2 + + col1 * + col2 AS col0 FROM tab1
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-1665
SELECT - col1 / col2 + + col1 * + col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + 95 + - 51 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

onlyif mysql # use DIV operator for integer division
query I rowsort label-1667
SELECT + - col0 DIV + col2 + + 85 + + col2 col0 FROM tab1 AS cor0
----
139
141
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1667
SELECT + - col0 / + col2 + + 85 + + col2 col0 FROM tab1 AS cor0
----
139
141
181

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

query I rowsort
SELECT DISTINCT + - 87 + col0 + 11 * col2 AS col2 FROM tab1 AS cor0
----
1049
510
604

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

query I rowsort
SELECT - 48 + + col2 + col1 FROM tab1 AS cor0
----
19
32
61

query I rowsort
SELECT + 14 * - col0 + + col2 AS col1 FROM tab0 AS cor0
----
-1164
-303
-489

query I rowsort
SELECT ALL 62 AS col1 FROM tab1 AS cor0
----
62
62
62

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

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

query I rowsort
SELECT + 20 * - 26 AS col0 FROM tab0
----
-520
-520
-520

query I rowsort
SELECT ALL 25 + + col1 * tab1.col1 FROM tab1
----
125
194
701

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT col0 + col0 * + CAST ( 68 AS REAL ) * - col1 FROM tab0 AS cor0
----
-140328
-230825
-550643

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

query I rowsort
SELECT - col2 + - col0 * col2 * - col2 AS col0 FROM tab0 AS cor0
----
26103
34
598354

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 * + col0 col2 FROM tab1 AS cor0
----
1040
640
78

query III rowsort
SELECT * FROM tab1 cor0 WHERE NULL < NULL OR NULL <> NULL
----

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

query I rowsort
SELECT - col2 + + col1 + + col1 FROM tab0 AS cor0
----
100
139
193

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

query I rowsort
SELECT DISTINCT + col1 - col2 * col2 FROM tab1
----
-2890
-3239
-9203

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1694
SELECT ALL col0 - col2 DIV col0 FROM tab0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-1694
SELECT ALL col0 - col2 / col0 FROM tab0
----
23
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1695
SELECT ALL col1 - - col1 DIV col2 FROM tab0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-1695
SELECT ALL col1 - - col1 / col2 FROM tab0
----
194
88
92

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

query I rowsort
SELECT DISTINCT - col1 * col2 * col1 + + col1 AS col1 FROM tab1
----
-16211
-36478
-5690

query I rowsort
SELECT ALL - tab1.col2 + col0 + col0 AS col1 FROM tab1
----
-48
64
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-1699
SELECT + col1 + col1 DIV col1 + col1 * + col0 * tab0.col0 AS col2 FROM tab0
----
118923
49623
720903

skipif mysql # not compatible
query I rowsort label-1699
SELECT + col1 + col1 / col1 + col1 * + col0 * tab0.col0 AS col2 FROM tab0
----
118923
49623
720903

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

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

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

query I rowsort
SELECT 91 - + col2 AS col2 FROM tab2
----
53
64
65

query I rowsort
SELECT col1 * - tab0.col1 + col2 + + col2 AS col0 FROM tab0
----
-7330
-8117
-9407

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1708
SELECT DISTINCT col2 * col0 - - col2 DIV col0 FROM tab2
----
192
2028
3002

skipif mysql # not compatible
query I rowsort label-1708
SELECT DISTINCT col2 * col0 - - col2 / col0 FROM tab2
----
192
2028
3002

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

query I rowsort
SELECT DISTINCT + col0 FROM tab2 WHERE col1 NOT IN ( - col0 )
----
7
78
79

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1712
SELECT + 9 DIV - col0 + col2 col0 FROM tab1 AS cor0
----
51
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1712
SELECT + 9 / - col0 + col2 col0 FROM tab1 AS cor0
----
51
57
96

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

query I rowsort
SELECT DISTINCT 72 * col2 FROM tab1 AS cor0
----
3888
4104
6912

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

query I rowsort
SELECT DISTINCT - col1 * col0 - + 16 * - col0 * - col2 FROM tab2 AS cor0
----
-3241
-37050
-49375

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

query I rowsort
SELECT + 79 * + col2 FROM tab0 AS cor0
----
2607
6478
79

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

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

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

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

query I rowsort
SELECT - col0 + - col2 + col1 AS col0 FROM tab1 AS cor0
----
-111
-163
-31

query I rowsort
SELECT - col0 + + col1 + col0 * - col1 FROM tab0
----
-2002
-3333
-8097

onlyif mysql # use DIV operator for integer division
query I rowsort label-1725
SELECT col1 DIV tab0.col1 + col2 DIV tab0.col0 + col0 * - col2 FROM tab0
----
-34
-7297
-790

skipif mysql # not compatible
query I rowsort label-1725
SELECT col1 / tab0.col1 + col2 / tab0.col0 + col0 * - col2 FROM tab0
----
-34
-7297
-790

onlyif mysql # use DIV operator for integer division
query I rowsort label-1726
SELECT DISTINCT + tab2.col2 + + col0 DIV col0 AS col0 FROM tab2
----
27
28
39

skipif mysql # not compatible
query I rowsort label-1726
SELECT DISTINCT + tab2.col2 + + col0 / col0 AS col0 FROM tab2
----
27
28
39

query I rowsort
SELECT ALL + col1 - - col2 * + col0 FROM tab0
----
132
7389
878

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

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

query I rowsort
SELECT ALL col1 * col1 + - 88 FROM tab0 AS cor0
----
7308
8193
9321

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 * col0 col1 FROM tab1
----
291
6208
7760

query I rowsort
SELECT ALL + col0 * + ( + 1 ) AS col0 FROM tab0
----
24
35
89

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

query I rowsort
SELECT + cor0.col2 * - ( 63 ) AS col0 FROM tab1 AS cor0
----
-3402
-3591
-6048

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 * - col0 col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT + 21 * + col0 * + col1 + + col1 FROM tab2 cor0
----
28220
4588
96701

query I rowsort
SELECT - + ( 80 ) AS col2 FROM tab2 cor0
----
-80
-80
-80

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

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

query I rowsort
SELECT - ( 71 ) + - col0 AS col0 FROM tab0 AS cor0
----
-106
-160
-95

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 60 + + col0 * tab2.col0 col0 FROM tab2
----
109
6144
6301

query I rowsort
SELECT ( 85 ) + col2 AS col1 FROM tab1
----
139
142
181

query I rowsort
SELECT DISTINCT col2 * col1 * col2 + col0 * + tab0.col2 FROM tab0
----
132
619182
94446

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

skipif mysql # not compatible
query I rowsort label-1746
SELECT - CAST ( NULL AS INTEGER ) / + 38 - - col2 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 64 + + col0 * - col0 FROM tab1 cor0
----
-4032
-6336
55

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

skipif mysql # not compatible
query I rowsort label-1748
SELECT + 18 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

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

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( 29 AS REAL ) + + col0 FROM tab1 cor0
----
109
32
93

query I rowsort
SELECT ALL + ( - 92 ) FROM tab2 AS cor0
----
-92
-92
-92

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

query I rowsort
SELECT ALL + col0 * col1 - cor0.col2 * - col2 AS col2 FROM tab0 cor0
----
14823
3153
3396

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

query I rowsort
SELECT DISTINCT - 17 * col2 AS col0 FROM tab2 AS cor0
----
-442
-459
-646

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

query I rowsort
SELECT DISTINCT col0 + - col2 + col0 AS col0 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT ( 4 ) * col0 FROM tab2
----
28
312
316

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

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

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

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

query I rowsort
SELECT ALL 10 AS col2 FROM tab2 AS cor0
----
10
10
10

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1765
SELECT + col0 DIV ( - col1 ) AS col2 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-1765
SELECT + col0 / ( - col1 ) AS col2 FROM tab2 AS cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1766
SELECT - col2 * 89 + col0 DIV - cor0.col2 - cor0.col2 FROM tab0 AS cor0
----
-125
-2970
-7381

skipif mysql # not compatible
query I rowsort label-1766
SELECT - col2 * 89 + col0 / - cor0.col2 - cor0.col2 FROM tab0 AS cor0
----
-125
-2970
-7381

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - ( col1 ) + col2 col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - col1 + ( - 60 * - col1 ) AS col1 FROM tab1 AS cor0
----
1534
590
767

query I rowsort
SELECT DISTINCT + + col0 + ( 3 ) FROM tab1 AS cor0
----
6
67
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1770
SELECT 58 DIV - col2 FROM tab0
----
-1
-58
0

skipif mysql # not compatible
query I rowsort label-1770
SELECT 58 / - col2 FROM tab0
----
-1
-58
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1771
SELECT col0 * tab1.col2 DIV col2 AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1771
SELECT col0 * tab1.col2 / col2 AS col0 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col0 * + 55 col0 FROM tab0 AS cor0
----
-31680
-435655
-67375

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

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

query I rowsort
SELECT col0 + col0 - + 11 FROM tab0 AS cor0
----
167
37
59

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

query I rowsort
SELECT DISTINCT - - col0 + + 99 * cor0.col1 * col0 FROM tab1 AS cor0
----
103040
63424
7725

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1778
SELECT + col1 DIV - col0 + 29 AS col2 FROM tab1 cor0
----
21
29
29

skipif mysql # not compatible
query I rowsort label-1778
SELECT + col1 / - col0 + 29 AS col2 FROM tab1 cor0
----
21
29
29

query I rowsort
SELECT + col2 - + col1 * 4 FROM tab1 AS cor0
----
-50
17
44

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

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

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

skipif mysql # not compatible
query I rowsort label-1782
SELECT + CAST ( + 53 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
107
110
149

query I rowsort
SELECT - - col1 + 45 FROM tab2 AS cor0
----
104
62
76

query I rowsort
SELECT ALL + col0 * - 76 FROM tab2 AS cor0
----
-532
-5928
-6004

query I rowsort
SELECT col0 + + 60 AS col0 FROM tab0 AS cor0
----
149
84
95

query I rowsort
SELECT ALL col1 * col2 * col2 FROM tab0 cor0
----
611884
93654
97

query I rowsort
SELECT DISTINCT - col2 * 53 - 30 * col1 AS col1 FROM tab0 AS cor0
----
-2963
-4329
-7076

query I rowsort
SELECT + col2 * 53 FROM tab0 AS cor0
----
1749
4346
53

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

query I rowsort
SELECT col1 * ( - ( col2 ) * + 38 ) AS col0 FROM tab2 AS cor0
----
-24548
-31806
-58292

query I rowsort
SELECT 82 - - col2 FROM tab0 AS cor0
----
115
164
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1792
SELECT - CAST( - col0 AS SIGNED ) - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-1792
SELECT - CAST ( - col0 AS INTEGER ) - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL + col2 + 13 * + cor0.col0 FROM tab0 AS cor0
----
1239
345
456

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 3 col0 FROM tab0 AS cor0
----
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1795
SELECT ALL - CAST( col1 AS SIGNED ) DIV col1 + cor0.col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-1795
SELECT ALL - CAST ( col1 AS INTEGER ) / col1 + cor0.col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT ALL + + 9 * col1 + - col2 FROM tab0 cor0
----
737
741
872

query I rowsort
SELECT + 47 - + cor0.col2 FROM tab0 AS cor0
----
-35
14
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-1798
SELECT DISTINCT col1 * col2 + 21 DIV - col0 FROM tab1
----
1248
1397
570

skipif mysql # not compatible
query I rowsort label-1798
SELECT DISTINCT col1 * col2 + 21 / - col0 FROM tab1
----
1248
1397
570

query I rowsort
SELECT ALL + col1 + - 55 FROM tab0
----
31
36
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-1800
SELECT - col1 + cor0.col1 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-1800
SELECT - col1 + cor0.col1 / cor0.col0 AS col1 FROM tab0 AS cor0
----
-83
-90
-95

query I rowsort
SELECT ALL tab2.col2 - - 64 FROM tab2
----
102
90
91

query I rowsort
SELECT col1 * col1 + - 43 + - ( - col0 ) * + 28 FROM tab2 AS cor0
----
1114
2458
5622

query I rowsort
SELECT ALL ( col0 ) * 60 AS col1 FROM tab2 cor0
----
420
4680
4740

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1804
SELECT - ( + cor0.col0 ) * CAST( NULL AS SIGNED ) + - ( col0 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1804
SELECT - ( + cor0.col0 ) * CAST ( NULL AS INTEGER ) + - ( col0 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 56 + col2 * tab2.col1 AS col0 FROM tab2
----
1478
590
781

query I rowsort
SELECT ( + col1 ) + + col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT + 31 * col2 FROM tab0
----
1023
2542
31

query I rowsort
SELECT + col0 * col1 - col2 AS col0 FROM tab2
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-1809
SELECT col1 + - 66 DIV col1 FROM tab2
----
14
29
58

skipif mysql # not compatible
query I rowsort label-1809
SELECT col1 + - 66 / col1 FROM tab2
----
14
29
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col1 * - col1 col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - ( - 45 ) FROM tab2
----
45
45
45

query I rowsort
SELECT - col1 * col1 - col1 FROM tab1
----
-110
-182
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-1813
SELECT - + col0 + cor0.col0 DIV + 33 FROM tab2 AS cor0
----
-7
-76
-77

skipif mysql # not compatible
query I rowsort label-1813
SELECT - + col0 + cor0.col0 / + 33 FROM tab2 AS cor0
----
-7
-76
-77

query I rowsort
SELECT DISTINCT col2 * + col0 + - col2 * col1 * - col1 FROM tab2 AS cor0
----
13984
26136
92534

query I rowsort
SELECT col0 * + col1 * - cor0.col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + + 79 * col1 + cor0.col2 FROM tab2 AS cor0
----
1381
2476
4687

query I rowsort
SELECT col1 + 35 * - 17 FROM tab1 AS cor0
----
-569
-582
-585

onlyif mysql # use DIV operator for integer division
query I rowsort label-1818
SELECT + + col1 DIV 46 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1818
SELECT + + col1 / 46 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1819
SELECT + col0 DIV 85 AS col0 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1819
SELECT + col0 / 85 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + 11 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT 63 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT 45 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 8a6d20810140ea088e8e0fd74ffb8339

query I rowsort
SELECT - - col0 * + 7 AS col1 FROM tab1 AS cor0
----
21
448
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-1825
SELECT col0 DIV 45 AS col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1825
SELECT col0 / 45 AS col0 FROM tab0
----
0
0
1

query I rowsort
SELECT ALL + ( ( col2 ) ) - + col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - cor0.col0 + - 36 FROM tab2 AS cor0
----
-114
-115
-43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1828
SELECT + CAST( NULL AS SIGNED ) * col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1828
SELECT + CAST ( NULL AS INTEGER ) * col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 24 * + col2 FROM tab2 AS cor0
----
-624
-648
-912

query I rowsort
SELECT DISTINCT - 23 + + 58 FROM tab1 AS cor0
----
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1831
SELECT - CAST( + 37 AS SIGNED ) + col0 + + col2 FROM tab1 AS cor0
----
139
20
84

skipif mysql # not compatible
query I rowsort label-1831
SELECT - CAST ( + 37 AS INTEGER ) + col0 + + col2 FROM tab1 AS cor0
----
139
20
84

query I rowsort
SELECT + ( + col1 ) * + col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL 96 + + cor0.col0 FROM tab0 AS cor0
----
120
131
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-1834
SELECT + 79 * cor0.col2 + - col0 DIV - col0 FROM tab2 AS cor0
----
2055
2134
3003

skipif mysql # not compatible
query I rowsort label-1834
SELECT + 79 * cor0.col2 + - col0 / - col0 FROM tab2 AS cor0
----
2055
2134
3003

onlyif mysql # use DIV operator for integer division
query I rowsort label-1835
SELECT ALL - 36 DIV - col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1835
SELECT ALL - 36 / - col1 FROM tab2
----
0
1
2

query I rowsort
SELECT ALL + 85 * col2 AS col0 FROM tab1
----
4590
4845
8160

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE ( NULL ) >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 73 + - col1 col1 FROM tab1 cor0
----
47
60
63

query I rowsort
SELECT + ( - col2 ) * + col0 + - cor0.col1 * + col1 AS col2 FROM tab1 cor0
----
-3748
-7849
-838

query I rowsort
SELECT + ( 62 ) AS col1 FROM tab0 cor0
----
62
62
62

query I rowsort
SELECT 52 + + col2 FROM tab2 AS cor0
----
78
79
90

query I rowsort
SELECT + + col0 + cor0.col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT ALL ( + 61 ) AS col2 FROM tab2 AS cor0
----
61
61
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1844
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + col2 * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1844
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + col2 * + col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1845
SELECT cor0.col1 DIV 47 AS col0 FROM tab0 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-1845
SELECT cor0.col1 / 47 AS col0 FROM tab0 AS cor0
----
1
1
2

query I rowsort
SELECT - ( + cor0.col0 ) + col2 * - col2 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT ALL + + 22 AS col0 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT 43 * - 27 FROM tab0 AS cor0
----
-1161

query I rowsort
SELECT + col2 * + col2 * col1 FROM tab2 AS cor0
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1850
SELECT ALL CAST( NULL AS SIGNED ) + col2 * col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1850
SELECT ALL CAST ( NULL AS INTEGER ) + col2 * col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 47 + col1 AS col2 FROM tab2 AS cor0
----
-16
-30
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-1852
SELECT ALL - cor0.col2 DIV 17 AS col0 FROM tab0 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-1852
SELECT ALL - cor0.col2 / 17 AS col0 FROM tab0 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL - cor0.col1 - - col2 * - 66 AS col2 FROM tab2 AS cor0
----
-1775
-1813
-2525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 - 48 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 957f4010cec8e565c841d8267fddae0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-1855
SELECT - + cor1.col2 DIV - 68 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-1855
SELECT - + cor1.col2 / - 68 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 14fcfa6c11198893073049d94262832c

query I rowsort
SELECT ALL - - col2 * - col2 * + col1 FROM tab1 cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 AS col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 + - col0 * - col2 - + col1 AS col0 FROM tab0 AS cor0
----
14669
35
3544

query I rowsort
SELECT - cor0.col0 + ( - col2 + - col2 ) FROM tab1 AS cor0
----
-111
-178
-272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 67 + + col2 * + col2 col0 FROM tab1 AS cor0
----
10087
3919
4658

query I rowsort
SELECT 1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 col2 FROM tab2, tab1 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT col0 * - ( tab0.col1 + - col2 ) AS col0 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT - cor0.col0 * cor0.col2 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to b0121644d0817627bc8036c50f8e780d

query I rowsort
SELECT - col2 * 82 AS col1 FROM tab1 cor0
----
-4428
-4674
-7872

query I rowsort
SELECT col0 - 25 FROM tab1
----
-22
39
55

query I rowsort
SELECT tab2.col2 * + col2 + + ( tab2.col1 ) - col0 FROM tab2
----
1382
657
753

query I rowsort
SELECT ALL tab0.col1 - 95 FROM tab0
----
-4
-9
2

query I rowsort
SELECT DISTINCT + col2 + col0 * + col1 AS col1 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT ALL col0 + - ( + col2 + - col2 ) AS col2 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1871
SELECT + 81 DIV 17 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

skipif mysql # not compatible
query I rowsort label-1871
SELECT + 81 / 17 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT cor0.col1 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - cor0.col1 + + col0 * col1 FROM tab2 AS cor0
----
1326
186
4543

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 DISTINCT 13 + - 12 col1 FROM tab0
----
1

query I rowsort
SELECT 49 * + col2 + col0 FROM tab1
----
2649
2857
4784

query I rowsort
SELECT + 85 + + cor0.col0 FROM tab1 cor0
----
149
165
88

query I rowsort
SELECT ALL - + 69 + - col0 * + col2 FROM tab0 AS cor0
----
-104
-7367
-861

query I rowsort
SELECT 96 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
14
63
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-1880
SELECT ALL + - col2 * col1 + - col2 DIV col1 + col1 AS col2 FROM tab1 AS cor0
----
-1242
-1380
-565

skipif mysql # not compatible
query I rowsort label-1880
SELECT ALL + - col2 * col1 + - col2 / col1 + col1 AS col2 FROM tab1 AS cor0
----
-1242
-1380
-565

query I rowsort
SELECT - - 89 * + col2 FROM tab1 cor0
----
4806
5073
8544

query I rowsort
SELECT ALL 13 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT DISTINCT + - 49 * 51 * col0 FROM tab0 AS cor0
----
-222411
-59976
-87465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * + col0 col1 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * + col2 + col2 col1 FROM tab0
----
36
7380
825

query I rowsort
SELECT + col0 * col1 * col0 AS col1 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT + + col0 + cor0.col0 * col0 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1888
SELECT ALL + col2 * - CAST( col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-1888
SELECT ALL + col2 * - CAST ( col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + col0 + - col0 * - col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL - - cor0.col0 * - cor0.col1 + + 73 * + cor0.col2 * + col2 FROM tab2 AS cor0
----
104069
44746
53000

query I rowsort
SELECT col1 * - ( - cor0.col0 ) + col2 * - ( col2 ) FROM tab2 AS cor0
----
-101
-512
3926

query I rowsort
SELECT - col2 - ( col1 ) * + col1 AS col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL + - col0 + - col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT col2 + - ( - col1 ) FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - col1 + ( + col0 * + col0 ) FROM tab1
----
-17
4086
6387

query I rowsort
SELECT cor0.col0 * + col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - + col0 * col1 - + col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * 7 col2 FROM tab0 AS cor0
----
602
637
679

query I rowsort
SELECT ALL + - cor0.col2 * col0 - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL - col0 * 25 + + col1 AS col0 FROM tab0 AS cor0
----
-2134
-514
-778

onlyif mysql # use DIV operator for integer division
query I rowsort label-1901
SELECT - cor0.col1 + - col0 DIV - 13 FROM tab1 AS cor0
----
-26
-6
-7

skipif mysql # not compatible
query I rowsort label-1901
SELECT - cor0.col1 + - col0 / - 13 FROM tab1 AS cor0
----
-26
-6
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1902
SELECT DISTINCT col1 + - CAST( - 40 AS SIGNED ) * cor0.col1 FROM tab1 AS cor0
----
1066
410
533

skipif mysql # not compatible
query I rowsort label-1902
SELECT DISTINCT col1 + - CAST ( - 40 AS INTEGER ) * cor0.col1 FROM tab1 AS cor0
----
1066
410
533

query I rowsort
SELECT - col2 - - 89 AS col0 FROM tab0 cor0
----
56
7
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-1904
SELECT ALL + col1 DIV - col0 + cor0.col0 * cor0.col0 FROM tab2 cor0
----
45
6084
6241

skipif mysql # not compatible
query I rowsort label-1904
SELECT ALL + col1 / - col0 + cor0.col0 * cor0.col0 FROM tab2 cor0
----
45
6084
6241

query I rowsort
SELECT DISTINCT - col0 * - col1 - + cor0.col0 * + cor0.col2 FROM tab1 AS cor0
----
-3008
-6640
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * + tab0.col0 + 24 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 7e3bf5f89d8b09e7db34e587f7779a4e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1907
SELECT ALL CAST( col2 * - col1 AS SIGNED ) AS col1 FROM tab2
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-1907
SELECT ALL CAST ( col2 * - col1 AS INTEGER ) AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL - ( + 48 ) FROM tab0
----
-48
-48
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-1909
SELECT DISTINCT 55 DIV col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1909
SELECT DISTINCT 55 / col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT ( 93 ) * col0 AS col0 FROM tab2 AS cor0
----
651
7254
7347

query I rowsort
SELECT - + col1 + - 22 * + col1 * - ( - 80 ) FROM tab1 AS cor0
----
-17610
-22893
-45786

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - col0 * col1 * - col2 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL + col1 + col1 + col0 AS col1 FROM tab0 AS cor0
----
196
229
271

onlyif mysql # use DIV operator for integer division
query I rowsort label-1916
SELECT ALL - col0 DIV col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-1916
SELECT ALL - col0 / col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT ALL - col1 * + col0 + col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + col2 * col2 + - col0 AS col1 FROM tab1 AS cor0
----
2913
3185
9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-1919
SELECT ALL + - col1 * - col1 + col2 DIV col0 FROM tab0 AS cor0
----
7397
8281
9409

skipif mysql # not compatible
query I rowsort label-1919
SELECT ALL + - col1 * - col1 + col2 / col0 FROM tab0 AS cor0
----
7397
8281
9409

query I rowsort
SELECT 12 + - col0 FROM tab0 AS cor0
----
-12
-23
-77

query I rowsort
SELECT cor0.col1 * col1 * - col1 AS col1 FROM tab1 cor0
----
-1000
-17576
-2197

query I rowsort
SELECT - col2 * 73 * - col1 + col0 FROM tab0 AS cor0
----
207198
544815
7116

query I rowsort
SELECT col0 * + 47 AS col2 FROM tab1 AS cor0
----
141
3008
3760

query I rowsort
SELECT + + col2 * + 48 AS col1 FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT DISTINCT cor0.col1 + col1 * - col1 FROM tab1 cor0
----
-156
-650
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1926
SELECT - col0 + + CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1926
SELECT - col0 + + CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1927
SELECT - - col2 DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-1927
SELECT - - col2 / col0 AS col1 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT ALL + cor0.col1 + + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - + col1 + + cor0.col1 * - cor0.col0 FROM tab1 AS cor0
----
-104
-1053
-650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1930
SELECT DISTINCT + col0 * CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-1930
SELECT DISTINCT + col0 * CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + + col2 + ( + col2 + - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL tab2.col1 + col1 * + ( - col2 ) FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + 18 * col0 + + col0 FROM tab2 AS cor0
----
133
1482
1501

onlyif mysql # use DIV operator for integer division
query I rowsort label-1934
SELECT DISTINCT col0 + cor0.col1 DIV - col0 col1 FROM tab0 AS cor0
----
21
33
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1934
SELECT DISTINCT col0 + cor0.col1 / - col0 col1 FROM tab0 AS cor0
----
21
33
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1935
SELECT ALL - CAST( + col2 AS SIGNED ) - col2 * - 11 FROM tab2 AS cor0
----
260
270
380

skipif mysql # not compatible
query I rowsort label-1935
SELECT ALL - CAST ( + col2 AS INTEGER ) - col2 * - 11 FROM tab2 AS cor0
----
260
270
380

query I rowsort
SELECT + 46 * col0 AS col1 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT DISTINCT 14 + col2 + - col1 FROM tab2 AS cor0
----
-19
10
35

query I rowsort
SELECT DISTINCT 61 FROM tab0, tab1 cor0
----
61

query I rowsort
SELECT + + 10 * 80 AS col0 FROM tab0 AS cor0
----
800
800
800

query I rowsort
SELECT 13 + + 26 + + col0 * ( + cor0.col2 ) AS col1 FROM tab1 cor0
----
201
3687
7719

query I rowsort
SELECT DISTINCT - - 56 * + col2 FROM tab1 AS cor0
----
3024
3192
5376

query I rowsort
SELECT ALL + + ( col2 ) * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + cor0.col1 + + col1 + - col0 * ( + col0 + col0 * col0 ) FROM tab0 AS cor0
----
-14228
-43906
-712708

query I rowsort
SELECT DISTINCT + col0 + - 51 FROM tab0
----
-16
-27
38

query I rowsort
SELECT cor0.col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col2 + - cor0.col0 * + col0 AS col0 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT ( - cor0.col0 * 51 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 8916678cc80c308aeeed27caba930f9a

query I rowsort
SELECT - col0 * + cor0.col0 + col0 AS col1 FROM tab1 cor0
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1, tab0, tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1950
SELECT + col2 + CAST( NULL AS SIGNED ) * 27 * - col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1950
SELECT + col2 + CAST ( NULL AS INTEGER ) * 27 * - col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 61 + 12 AS col0 FROM tab2, tab0 AS cor0
----
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-1952
SELECT ALL col2 DIV 33 col0 FROM tab0 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1952
SELECT ALL col2 / 33 col0 FROM tab0 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * - col0 + + col1 col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + + col1 * col2 + - 95 FROM tab1 AS cor0
----
1153
1309
475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * 46 * - 97 col0 FROM tab1 AS cor0
----
13386
285568
356960

query I rowsort
SELECT - - cor0.col0 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL 86 + + tab2.col1 * tab2.col2 FROM tab2
----
1620
732
923

query I rowsort
SELECT + col1 * + col0 + col1 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT + cor0.col2 * col0 + 35 FROM tab2 AS cor0
----
2063
224
3037

query I rowsort
SELECT col0 * col2 + 11 * col1 AS col0 FROM tab2 AS cor0
----
2677
3189
530

query I rowsort
SELECT - + col2 * col0 + ( col2 ) FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL col2 + + col0 * 33 FROM tab1 AS cor0
----
153
2169
2736

query I rowsort
SELECT - cor0.col2 * + ( - cor0.col0 ) + + col0 * 83 FROM tab2 AS cor0
----
770
8502
9559

query I rowsort
SELECT DISTINCT col0 + + col1 * - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-177480
-329280
-736920

query I rowsort
SELECT ALL - 11 FROM tab2, tab0 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 + + col0 * + col2 col2 FROM tab1 cor0
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1967
SELECT DISTINCT - + CAST( col0 AS SIGNED ) + + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-1967
SELECT DISTINCT - + CAST ( col0 AS INTEGER ) + + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + 66 * col0 AS col1 FROM tab1 cor0
----
198
4224
5280

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2, tab0, tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1970
SELECT - col0 * col2 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1970
SELECT - col0 * col2 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 54 * + col1 + ( - col0 ) FROM tab1 AS cor0
----
1401
476
622

query I rowsort
SELECT - + 16 + col0 AS col1 FROM tab0 AS cor0
----
19
73
8

query I rowsort
SELECT DISTINCT - - 19 * col2 * 5 + col2 FROM tab2 AS cor0
----
2496
2592
3648

query I rowsort
SELECT ALL + + col1 + - col2 - - col0 AS col1 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT ALL - ( - 39 ) FROM tab2
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 col0 FROM tab0, tab0 cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL - col2 * 2 * + col0 AS col2 FROM tab1
----
-15360
-324
-7296

query I rowsort
SELECT + 32 + col1 * 44 FROM tab1 AS cor0
----
1176
472
604

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col1 * - cor0.col1 + - col0 - col2 col2 FROM tab1 AS cor0
----
-1121
-17633
-2373

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - ( col2 ) * - col0 + - 75 FROM tab1
----
3573
7605
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1982
SELECT ALL + CAST( col1 + col0 AS SIGNED ) AS col2 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-1982
SELECT ALL + CAST ( col1 + col0 AS INTEGER ) AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT - 1 + - col2 + ( + col1 ) AS col0 FROM tab0
----
52
8
95

query I rowsort
SELECT DISTINCT + tab0.col1 * - col1 + + col2 AS col0 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT 98 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab2 cor0, tab1 cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT col1 + - col0 * - 3 + + 71 AS col0 FROM tab0
----
229
273
429

query I rowsort
SELECT DISTINCT - - ( col1 ) + - 65 FROM tab2 AS cor0
----
-34
-48
-6

query I rowsort
SELECT DISTINCT - col1 * col0 + + col0 FROM tab1
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 20 col0 FROM tab2 cor0
----
20
20
20

query I rowsort
SELECT ALL - + col0 * - col1 * + col1 + col2 AS col1 FROM tab1 AS cor0
----
13616
2082
6457

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0, tab0 cor2
----
3645 values hashing to e7ea8a30caeb35409d15d2ce0abbd5a6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1994
SELECT DISTINCT col0 + ( 95 ) DIV col0 FROM tab2
----
20
79
80

skipif mysql # not compatible
query I rowsort label-1994
SELECT DISTINCT col0 + ( 95 ) / col0 FROM tab2
----
20
79
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1995
SELECT DISTINCT 77 DIV + 44 AS col1 FROM tab0, tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1995
SELECT DISTINCT 77 / + 44 AS col1 FROM tab0, tab1 AS cor0
----
1

query I rowsort
SELECT ALL - tab1.col0 * tab1.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to f7e57a354e4e5925116b9650d1011609

query I rowsort
SELECT DISTINCT 94 * - col2 * + col2 AS col0 FROM tab0
----
-102366
-632056
-94

query I rowsort
SELECT - ( ( col1 ) ) + col2 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1999
SELECT - CAST( ( col0 ) AS SIGNED ) FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-1999
SELECT - CAST ( ( col0 ) AS INTEGER ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + 3 * + 65 AS col0 FROM tab0 AS cor0
----
195
195
195

query I rowsort
SELECT ALL - 75 * cor0.col0 * cor0.col0 + - ( 3 ) * + col1 AS col0 FROM tab0 AS cor0
----
-43458
-594348
-92166

query I rowsort
SELECT ALL + + 11 - 72 AS col1 FROM tab2 cor0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT ( - 39 ) FROM tab1 AS cor0
----
-39

query I rowsort
SELECT DISTINCT - ( col2 ) * - col1 + col0 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-2005
SELECT - - col2 DIV - col2 + - cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
-3
-63
-63

skipif mysql # not compatible
query I rowsort label-2005
SELECT - - col2 / - col2 + - cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
-3
-63
-63

query I rowsort
SELECT - + col0 * col1 + col1 + col0 AS col0 FROM tab2 AS cor0
----
-1247
-179
-4465

query I rowsort
SELECT col0 + col1 * - col2 * col2 FROM tab1 AS cor0
----
-119728
-32426
-75813

query I rowsort
SELECT + col1 + - col1 * + cor0.col0 * cor0.col1 + + col0 FROM tab0 AS cor0
----
-177394
-329183
-736829

onlyif mysql # use DIV operator for integer division
query I rowsort label-2009
SELECT DISTINCT - - col1 DIV + col1 + + col0 * + col1 + col1 * - col2 * cor0.col2 FROM tab2 AS cor0
----
-22381
-23204
-35281

skipif mysql # not compatible
query I rowsort label-2009
SELECT DISTINCT - - col1 / + col1 + + col0 * + col1 + col1 * - col2 * cor0.col2 FROM tab2 AS cor0
----
-22381
-23204
-35281

query I rowsort
SELECT ALL - + col2 * col2 * - col0 AS col0 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL + tab2.col0 * - tab2.col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT tab2.col1 * col2 + col0 * - col1 AS col0 FROM tab2
----
-3068
-697
620

query I rowsort
SELECT DISTINCT - ( col2 ) + col0 AS col0 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2014
SELECT 1 + 21 DIV col2 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2014
SELECT 1 + 21 / col2 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL 7 - 96 FROM tab0
----
-89
-89
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2016
SELECT - CAST( NULL AS SIGNED ) / + col0 + + col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2016
SELECT - CAST ( NULL AS INTEGER ) / + col0 + + col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 63 - - col0 AS col2 FROM tab2 cor0
----
-56
15
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 - - col1 * - col2 col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT - ( - col1 ) * + col1 + + col0 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT + col2 * col0 + col1 + tab0.col2 FROM tab0
----
133
7471
911

onlyif mysql # use DIV operator for integer division
query I rowsort label-2021
SELECT - 7 DIV col0 AS col2 FROM tab1
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2021
SELECT - 7 / col0 AS col2 FROM tab1
----
-2
0
0

query I rowsort
SELECT DISTINCT + + col0 + + cor0.col1 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL + + col2 * col2 AS col1 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT + + cor0.col0 * col1 + col1 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT - + 54 * - col2 + col1 + - col1 AS col2 FROM tab2 AS cor0
----
1404
1458
2052

query I rowsort
SELECT ALL - col2 * - col1 + - cor0.col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT - 53 * - col2 FROM tab1 AS cor0
----
2862
3021
5088

query I rowsort
SELECT col1 + + col1 + col1 FROM tab0 cor0
----
258
273
291

query I rowsort
SELECT DISTINCT + cor0.col0 + - col2 * col2 AS col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT 58 * col1 * tab1.col0 + - col2 AS col1 FROM tab1
----
37063
4470
60224

query I rowsort
SELECT + 30 * + col2 + + col0 FROM tab1 AS cor0
----
1623
1774
2960

query I rowsort
SELECT + + ( - col1 ) * col2 + + col0 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + + col1 * - col0 * col2 + col1 AS col1 FROM tab1 AS cor0
----
-36470
-4186
-99827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 + col0 * col1 col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT + - ( col0 ) + + col0 * - col2 * col2 AS col0 FROM tab1 AS cor0
----
-208000
-737360
-8751

query I rowsort
SELECT DISTINCT + col1 * col2 + - col0 AS col0 FROM tab0
----
2814
62
7373

query I rowsort
SELECT ALL - col0 + - col1 FROM tab2 WHERE NOT + col1 > NULL
----

query I rowsort
SELECT ALL - tab0.col2 * + col2 + + col0 FROM tab0
----
-1065
-6635
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-2039
SELECT ALL - col0 DIV col0 - + col0 FROM tab0 WHERE - col0 <> ( + col1 )
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-2039
SELECT ALL - col0 / col0 - + col0 FROM tab0 WHERE - col0 <> ( + col1 )
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + tab0.col0 col0 FROM tab0
----
171
36
57

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL NOT IN ( + col1 )
----

query I rowsort
SELECT col2 * tab2.col2 + col0 + + col0 FROM tab2
----
1602
743
832

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL IN ( col2 * col0 )
----

query I rowsort
SELECT DISTINCT col0 * - col0 + + col1 FROM tab1
----
-4086
-6387
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - tab2.col1 col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col1 + col2 + + tab1.col1 * col2 * + col2 FROM tab1
----
119917
32557
75896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col0 col0 FROM tab0 WHERE NOT col2 + - col0 * + col0 + - col1 <> NULL
----

query I rowsort
SELECT - col0 / + col0 AS col1 FROM tab1 WHERE NULL BETWEEN ( NULL ) AND + col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2049
SELECT tab2.col1 * col2 DIV col0 FROM tab2
----
119
19
8

skipif mysql # not compatible
query I rowsort label-2049
SELECT tab2.col1 * col2 / col0 FROM tab2
----
119
19
8

query I rowsort
SELECT col0 * + col2 + + tab2.col2 AS col1 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL + tab0.col0 * + col1 * - tab0.col0 FROM tab0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-2052
SELECT col0 DIV - col1 + - col0 * col1 FROM tab0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-2052
SELECT col0 / - col1 + - col0 * col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL col2 * col2 + tab1.col1 AS col0 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT ALL col0 * + col2 - col2 FROM tab1 WHERE NOT ( - col0 + + col1 * col2 ) = ( NULL )
----

query I rowsort
SELECT - col0 + col0 * col2 FROM tab2
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-2056
SELECT ALL + col0 DIV col1 + + cor0.col0 * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-2056
SELECT ALL + col0 / col1 + + cor0.col0 * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + col2 * col1 + col2 AS col1 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT col2 + - col1 * + col0 AS col2 FROM tab0 cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-2059
SELECT DISTINCT + col1 * + tab0.col1 + + col2 DIV col0 AS col0 FROM tab0 WHERE NOT + col0 * col2 + - col0 >= + col1 + col0 * col0
----
8281
9409

skipif mysql # not compatible
query I rowsort label-2059
SELECT DISTINCT + col1 * + tab0.col1 + + col2 / col0 AS col0 FROM tab0 WHERE NOT + col0 * col2 + - col0 >= + col1 + col0 * col0
----
8281
9409

query I rowsort
SELECT DISTINCT tab1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1
----
54
57
96

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( - tab0.col2 * - col2 )
----

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 cor0 CROSS JOIN tab0
----
24
35
89

query I rowsort
SELECT DISTINCT - col2 * + col2 AS col1 FROM tab2 WHERE NULL = ( - col0 )
----

query I rowsort
SELECT DISTINCT - ( col0 ) + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-2065
SELECT + + 44 DIV - ( + cor0.col1 ) + col2 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2065
SELECT + + 44 / - ( + cor0.col1 ) + col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL col2 + - 67 * col1 FROM tab2 AS cor0
----
-1101
-2050
-3927

query I rowsort
SELECT - - 96 + - 82 AS col0 FROM tab1 AS cor0
----
14
14
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2068
SELECT + - CAST( + col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2068
SELECT + - CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col0 + - 69 * col1 FROM tab1 AS cor0
----
-1791
-626
-817

query I rowsort
SELECT ALL - 76 * - col1 + col1 * - col1 AS col2 FROM tab0 cor0
----
-1365
-2037
-860

query I rowsort
SELECT - - 22 * + col1 + - col0 AS col1 FROM tab2 AS cor0
----
1220
295
675

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT + col0 + + col2 * - 28 AS col0 FROM tab1
----
-1509
-1532
-2608

onlyif mysql # use DIV operator for integer division
query I rowsort label-2074
SELECT + + 25 + + col1 DIV cor0.col0 - + col0 FROM tab2 cor0
----
-53
-54
22

skipif mysql # not compatible
query I rowsort label-2074
SELECT + + 25 + + col1 / cor0.col0 - + col0 FROM tab2 cor0
----
-53
-54
22

query I rowsort
SELECT + col1 + 66 * - col1 FROM tab1 cor0
----
-1690
-650
-845

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 + ( col1 ) col2 FROM tab2 AS cor0
----
112
140
98

query I rowsort
SELECT ALL - - col2 * - col2 + col1 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL - 31 + + ( + cor0.col1 ) * col1 AS col2 FROM tab1 AS cor0
----
138
645
69

query I rowsort
SELECT + 58 + 65 * + col1 - + cor0.col1 FROM tab2 AS cor0
----
1146
2042
3834

onlyif mysql # use DIV operator for integer division
query I rowsort label-2080
SELECT CAST( 40 AS SIGNED ) * col2 DIV + ( + col1 * - col2 + - col1 ) FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2080
SELECT CAST ( 40 AS INTEGER ) * col2 / + ( + col1 * - col2 + - col1 ) FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT - 25 * - col2 AS col0 FROM tab0 cor0
----
2050
25
825

query I rowsort
SELECT ALL - 44 AS col0 FROM tab2
----
-44
-44
-44

query I rowsort
SELECT - + ( 17 ) * - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cf2c17a44041120e507fcd265ec5deea

query I rowsort
SELECT - 63 + + col1 * col2 FROM tab2 AS cor0
----
1471
583
774

query I rowsort
SELECT ALL - col2 * - col2 * + ( + col2 ) AS col0 FROM tab1 cor0
----
157464
185193
884736

query I rowsort
SELECT ALL + 11 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT DISTINCT col2 + - 49 AS col2 FROM tab2 AS cor0
----
-11
-22
-23

query I rowsort
SELECT ALL - col1 + - col1 * 78 * - col1 FROM tab2 AS cor0
----
22525
271459
74927

query I rowsort
SELECT ALL cor0.col2 * ( col2 ) + + col0 * + col0 AS col1 FROM tab1 AS cor0
----
15616
2925
7345

query I rowsort
SELECT DISTINCT - + col2 * 81 FROM tab1 AS cor0
----
-4374
-4617
-7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col1 col0 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + ( - col2 ) * col0 col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT + + col2 + 81 FROM tab0 AS cor0
----
114
163
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * ( col0 ) - - col1 col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-2095
SELECT ALL + cor0.col1 + 85 * col1 + col2 DIV - col1 FROM tab1 AS cor0
----
1111
2234
855

skipif mysql # not compatible
query I rowsort label-2095
SELECT ALL + cor0.col1 + 85 * col1 + col2 / - col1 FROM tab1 AS cor0
----
1111
2234
855

query I rowsort
SELECT col0 * - ( - 72 ) FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT + + col0 * - col1 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col1 * 18 AS col1 FROM tab0 cor0
----
-1548
-1638
-1746

query I rowsort
SELECT DISTINCT + - col0 * 29 FROM tab1 AS cor0
----
-1856
-2320
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-2100
SELECT ALL - col0 DIV col1 col2 FROM tab1 AS cor0
----
-6
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2100
SELECT ALL - col0 / col1 col2 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT ALL + col0 * - col0 - - cor0.col0 * cor0.col1 * col2 FROM tab2 AS cor0
----
113568
44793
5810

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 + col0 col1 FROM tab2 AS cor0
----
16
87
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2104
SELECT ALL - 34 + - 83 DIV col1 FROM tab1 AS cor0
----
-37
-40
-42

skipif mysql # not compatible
query I rowsort label-2104
SELECT ALL - 34 + - 83 / col1 FROM tab1 AS cor0
----
-37
-40
-42

query I rowsort
SELECT DISTINCT - + 56 * - col0 + col0 AS col0 FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT col0 + + tab1.col2 * col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT col1 - 88 * 38 AS col0 FROM tab0
----
-3247
-3253
-3258

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col1 + ( + ( col1 ) * - col2 ) col0 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT 11 + + col0 * col0 AS col2 FROM tab1 AS cor0
----
20
4107
6411

onlyif mysql # use DIV operator for integer division
query I rowsort label-2110
SELECT ALL - cor0.col0 DIV col1 col0 FROM tab2 AS cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2110
SELECT ALL - cor0.col0 / col1 col0 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT + col2 * cor0.col2 * - col0 + 54 AS col1 FROM tab1 AS cor0
----
-207882
-737226
-8694

onlyif mysql # use DIV operator for integer division
query I rowsort label-2112
SELECT ALL 46 DIV col1 + + 1 + - 38 FROM tab2 AS cor0
----
-35
-36
-37

skipif mysql # not compatible
query I rowsort label-2112
SELECT ALL 46 / col1 + + 1 + - 38 FROM tab2 AS cor0
----
-35
-36
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 * - col2 col1 FROM tab0
----
2132
26
858

query I rowsort
SELECT + 49 * tab0.col0 AS col1 FROM tab0
----
1176
1715
4361

query I rowsort
SELECT DISTINCT 51 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
51

query I rowsort
SELECT ALL + 42 * + cor0.col0 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT - - col0 * cor0.col1 + ( + 38 ) AS col0 FROM tab2 AS cor0
----
1381
255
4640

query I rowsort
SELECT DISTINCT - + 22 FROM tab2 cor0
----
-22

query I rowsort
SELECT + + col0 + col0 * - 2 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + tab1.col2 + + tab1.col2 FROM tab1
----
108
114
192

query I rowsort
SELECT - ( tab0.col0 ) * - ( + 16 ) FROM tab0
----
1424
384
560

query I rowsort
SELECT + - col1 * ( 93 + + col0 ) AS col0 FROM tab2 AS cor0
----
-10089
-2924
-3100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 col2 FROM tab2, tab1 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT cor0.col2 * 17 AS col1 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT 18 - + col2 FROM tab0
----
-15
-64
17

query I rowsort
SELECT ( col2 * col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col0 * - col2 + + col1 * + col2 AS col1 FROM tab1
----
-3078
-6432
1242

query I rowsort
SELECT DISTINCT ( - col2 ) * + 67 + 22 * col2 AS col0 FROM tab2
----
-1170
-1215
-1710

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2129
SELECT DISTINCT - + cor0.col2 + + col0 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2129
SELECT DISTINCT - + cor0.col2 + + col0 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 41 * - col1 AS col1 FROM tab1 AS cor0
----
1066
410
533

query I rowsort
SELECT - ( + col1 ) * ( + ( - col1 ) ) + + cor0.col0 * + 21 FROM tab2 AS cor0
----
1108
1948
5119

query I rowsort
SELECT + col2 + - col0 * ( + col2 + col2 ) FROM tab2 AS cor0
----
-351
-4030
-5966

query I rowsort
SELECT DISTINCT + 34 * + col0 + + 30 FROM tab2
----
268
2682
2716

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab2, tab1, tab2 AS cor0, tab1 cor1
----
-26
-27
-38

query I rowsort
SELECT ALL 56 + col0 FROM tab0
----
145
80
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2136
SELECT - col2 + 4 DIV 45 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2136
SELECT - col2 + 4 / 45 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + 7 * - col0 FROM tab0
----
-168
-245
-623

query I rowsort
SELECT DISTINCT ( - ( tab2.col0 ) ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2139
SELECT ALL 90 * tab0.col1 DIV col1 col0 FROM tab0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2139
SELECT ALL 90 * tab0.col1 / col1 col0 FROM tab0
----
90
90
90

query I rowsort
SELECT 62 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT ALL ( + col0 ) * - col2 + 64 FROM tab2 AS cor0
----
-125
-1964
-2938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 * - cor0.col0 col1 FROM tab1 AS cor0
----
-30
-640
-800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2143
SELECT + CAST( NULL AS SIGNED ) * + 68 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2143
SELECT + CAST ( NULL AS INTEGER ) * + 68 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 + - col0 * col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT + tab1.col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL col0 * col1 * + col1 AS col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL - 65 * - 79 + col2 * ( - col1 ) AS col2 FROM tab1
----
3731
3887
4565

onlyif mysql # use DIV operator for integer division
query I rowsort label-2148
SELECT - cor0.col1 DIV 79 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2148
SELECT - cor0.col1 / 79 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * - col2 + - col2 * + col1 FROM tab1 AS cor0
----
-1140
-2496
-2808

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2150
SELECT ALL + CAST( - 12 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-12
-12
-12

skipif mysql # not compatible
query I rowsort label-2150
SELECT ALL + CAST ( - 12 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-12
-12
-12

query I rowsort
SELECT + col0 * + 35 AS col1 FROM tab1 AS cor0
----
105
2240
2800

query I rowsort
SELECT DISTINCT + col0 * col0 * col2 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2153
SELECT ALL - ( col2 ) + - col1 + CAST( NULL AS SIGNED ) * + 84 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2153
SELECT ALL - ( col2 ) + - col1 + CAST ( NULL AS INTEGER ) * + 84 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + 47 FROM tab1 AS cor0
----
57
60
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-2155
SELECT 93 + col1 DIV col1 FROM tab2 AS cor0
----
94
94
94

skipif mysql # not compatible
query I rowsort label-2155
SELECT 93 + col1 / col1 FROM tab2 AS cor0
----
94
94
94

query I rowsort
SELECT ALL + + col1 + col1 * - col0 * + ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
36490
4238
99853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - cor0.col0 * + col2 col2 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT ( + 62 ) AS col1 FROM tab0
----
62

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 * 22 AS col1 FROM tab1 AS cor0
----
-1728
-1995
-7104

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2160
SELECT ALL - cor1.col0 * CAST( NULL AS SIGNED ) + cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2160
SELECT ALL - cor1.col0 * CAST ( NULL AS INTEGER ) + cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2161
SELECT DISTINCT CAST( 31 AS SIGNED ) AS col2 FROM tab0
----
31

skipif mysql # not compatible
query I rowsort label-2161
SELECT DISTINCT CAST ( 31 AS INTEGER ) AS col2 FROM tab0
----
31

query I rowsort
SELECT - col2 * col2 - ( col2 * + col2 ) FROM tab0 AS cor0
----
-13448
-2
-2178

onlyif mysql # use DIV operator for integer division
query I rowsort label-2163
SELECT + col1 DIV + cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-2163
SELECT + col1 / + cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT - + col1 * + cor0.col0 - - col1 AS col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL + + col1 * 65 * + col1 FROM tab0 AS cor0
----
480740
538265
611585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + + 83 * col1 col1 FROM tab2 cor0
----
1490
2580
4975

query I rowsort
SELECT - cor0.col0 * + col2 * - 98 + - col2 * - col0 AS col0 FROM tab0 cor0
----
3465
722502
78408

onlyif mysql # use DIV operator for integer division
query I rowsort label-2168
SELECT + col1 DIV - 28 + 87 AS col0 FROM tab2 AS cor0
----
85
86
87

skipif mysql # not compatible
query I rowsort label-2168
SELECT + col1 / - 28 + 87 AS col0 FROM tab2 AS cor0
----
85
86
87

query I rowsort
SELECT - col2 + - 66 * col1 FROM tab1 cor0
----
-1770
-717
-954

query I rowsort
SELECT + col1 + - col2 * - col0 FROM tab0
----
132
7389
878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2171
SELECT - col1 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2171
SELECT - col1 * - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + - 19 AS col1 FROM tab2 AS cor0
----
-12
59
60

query I rowsort
SELECT + col1 + - 17 AS col1 FROM tab2 AS cor0
----
0
14
42

query I rowsort
SELECT ALL - + cor0.col0 * + cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col0 + col2 * + col2 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT cor0.col1 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT cor0.col2 * - 76 AS col1 FROM tab2 AS cor0
----
-1976
-2052
-2888

query I rowsort
SELECT - col1 + col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-17
4086
6387

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 col1 FROM tab1
----
69
69
69

query I rowsort
SELECT DISTINCT - - col1 * ( + col1 ) AS col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2181
SELECT - col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2181
SELECT - col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( col0 ) = ( NULL )
----

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - 15 + col1 * + col0 AS col2 FROM tab1 AS cor0
----
1025
625
63

query I rowsort
SELECT ALL + ( - col1 ) * + col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2186
SELECT ALL - col1 DIV col1 - - col2 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-2186
SELECT ALL - col1 / col1 - - col2 FROM tab2
----
25
26
37

query I rowsort
SELECT ALL col1 * col0 * col2 AS col2 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 col0 FROM tab0 WHERE NULL <= ( NULL )
----

query I rowsort
SELECT + col0 + - col0 * col2 - col2 FROM tab1
----
-213
-3641
-7696

onlyif mysql # use DIV operator for integer division
query I rowsort label-2190
SELECT DISTINCT col0 * col2 DIV - col1 + - col0 - col1 AS col1 FROM tab2
----
-171
-272
-44

skipif mysql # not compatible
query I rowsort label-2190
SELECT DISTINCT col0 * col2 / - col1 + - col0 - col1 AS col1 FROM tab2
----
-171
-272
-44

query I rowsort
SELECT DISTINCT 65 * - col2 AS col2 FROM tab1
----
-3510
-3705
-6240

query I rowsort
SELECT - ( + col1 ) * col1 + - 63 FROM tab2
----
-1024
-352
-3544

query I rowsort
SELECT ALL 5 * col1 + 88 AS col1 FROM tab2
----
173
243
383

onlyif mysql # use DIV operator for integer division
query I rowsort label-2194
SELECT ALL + 65 + + col2 DIV - 64 AS col0 FROM tab1
----
64
65
65

skipif mysql # not compatible
query I rowsort label-2194
SELECT ALL + 65 + + col2 / - 64 AS col0 FROM tab1
----
64
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 + col1 col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - - 14 * col2 * 26 AS col0 FROM tab0 cor0
----
12012
29848
364

query I rowsort
SELECT ALL + - col0 * col1 - + ( + 40 ) * col0 FROM tab1 AS cor0
----
-198
-3200
-4240

onlyif mysql # use DIV operator for integer division
query I rowsort label-2198
SELECT + + col1 DIV - col2 + ( col1 * + cor0.col1 ) FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-2198
SELECT + + col1 / - col2 + ( col1 * + cor0.col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL - col0 * col1 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 * + 61 col2 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT ALL - col2 + - cor0.col2 * + col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT + col1 + - ( col2 + col0 ) AS col2 FROM tab1
----
-111
-163
-31

query I rowsort
SELECT ALL + col2 * col2 * tab1.col2 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT ALL + col0 - + cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + + 75 * + 98 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f481e8e9f3f8b6773c51686512bee012

query I rowsort
SELECT col1 + - ( - col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col1 + - ( 48 ) * + col1 FROM tab1 AS cor0
----
-1274
-490
-637

query I rowsort
SELECT DISTINCT col1 + 14 AS col1 FROM tab2 AS cor0
----
31
45
73

query I rowsort
SELECT ALL col0 * col0 + - 42 AS col2 FROM tab1 AS cor0
----
-33
4054
6358

query I rowsort
SELECT + 17 - + 95 FROM tab2 AS cor0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 43 ) * - col2 - 53 * + col2 col2 FROM tab0 cor0
----
-3168
-7872
-96

query I rowsort
SELECT DISTINCT + 99 + - col0 * tab1.col1 AS col0 FROM tab1
----
-541
-941
21

query I rowsort
SELECT + ( - col1 ) + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - ( - 69 ) FROM tab0 AS cor0
----
69

query I rowsort
SELECT ALL - col1 * 11 AS col2 FROM tab0 AS cor0
----
-1001
-1067
-946

onlyif mysql # use DIV operator for integer division
query I rowsort label-2216
SELECT ALL - CAST( - ( + col0 ) AS SIGNED ) DIV col0 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2216
SELECT ALL - CAST ( - ( + col0 ) AS INTEGER ) / col0 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ( + 56 ) * + col1 AS col0 FROM tab0 AS cor0
----
4816
5096
5432

query I rowsort
SELECT DISTINCT - col2 * - col1 + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - 66 + - col0 - - col0 * - col2 FROM tab1 AS cor0
----
-231
-3778
-7826

query I rowsort
SELECT ALL col2 * col0 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL + col1 * - col0 * + 67 + - 0 FROM tab1 AS cor0
----
-42880
-5226
-69680

query I rowsort
SELECT + col0 * col0 + ( col1 ) * + col2 AS col0 FROM tab0 AS cor0
----
1322
15383
3414

query I rowsort
SELECT ALL - col2 * col1 + col0 * col1 * - col1 + + ( 93 ) * + col2 FROM tab0 AS cor0
----
-177273
-329319
-736845

query I rowsort
SELECT ALL - col1 + 54 AS col0 FROM tab1
----
28
41
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2225
SELECT DISTINCT CAST( ( - col2 ) * + 11 AS SIGNED ) + col0 AS col1 FROM tab2
----
-208
-290
-339

skipif mysql # not compatible
query I rowsort label-2225
SELECT DISTINCT CAST ( ( - col2 ) * + 11 AS INTEGER ) + col0 AS col1 FROM tab2
----
-208
-290
-339

query I rowsort
SELECT ALL col2 - ( col0 + 15 ) AS col2 FROM tab0
----
-22
-49
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2227
SELECT + tab0.col0 + + 75 DIV - col0 FROM tab0
----
21
33
89

skipif mysql # not compatible
query I rowsort label-2227
SELECT + tab0.col0 + + 75 / - col0 FROM tab0
----
21
33
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2228
SELECT DISTINCT + col2 + - CAST( - col2 AS SIGNED ) - col2 AS col0 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2228
SELECT DISTINCT + col2 + - CAST ( - col2 AS INTEGER ) - col2 AS col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2229
SELECT ALL - col1 DIV + col1 - - ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-2229
SELECT ALL - col1 / + col1 - - ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT DISTINCT cor0.col1 + 97 FROM tab2 AS cor0
----
114
128
156

query I rowsort
SELECT ALL + col2 + - col0 * - col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + 85 * 12 * col2 FROM tab2 AS cor0
----
26520
27540
38760

query I rowsort
SELECT + col1 * + ( - col1 ) FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT + - 41 + + col1 AS col0 FROM tab2 AS cor0
----
-10
-24
18

query I rowsort
SELECT ALL - cor0.col2 * col0 * cor0.col1 + 88 + + col1 * ( 54 * + col0 ) FROM tab2 AS cor0
----
128944
21576
5947

query I rowsort
SELECT DISTINCT + 42 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
131
66
77

query I rowsort
SELECT DISTINCT 25 * col0 * col2 AS col0 FROM tab2
----
4725
50700
75050

query I rowsort
SELECT ALL - + col2 + col2 * col0 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2239
SELECT ALL + - col2 DIV col2 - + 32 DIV cor0.col2 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2239
SELECT ALL + - col2 / col2 - + 32 / cor0.col2 FROM tab1 cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2240
SELECT DISTINCT - - col2 * + col0 - + CAST( col2 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
14022
1881
36

skipif mysql # not compatible
query I rowsort label-2240
SELECT DISTINCT - - col2 * + col0 - + CAST ( col2 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
14022
1881
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) * col0 + + col2 col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL - 31 + col1 + - col2 FROM tab2 AS cor0
----
-27
-52
2

query I rowsort
SELECT col1 + ( + col0 ) * - col0 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT + cor1.col1 * + ( cor1.col1 ) FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 51855bb230a34802a628192d3e332a79

query I rowsort
SELECT - cor0.col1 * - 92 AS col2 FROM tab0 cor0
----
7912
8372
8924

query I rowsort
SELECT DISTINCT - 36 * cor0.col1 FROM tab1, tab2 AS cor0
----
-1116
-2124
-612

query I rowsort
SELECT 79 * - col2 AS col0 FROM tab1
----
-4266
-4503
-7584

query I rowsort
SELECT cor1.col2 * 82 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to fc7359fa9c53f4074f332f1ba2279a33

query I rowsort
SELECT DISTINCT - - col2 + - ( cor0.col2 ) FROM tab1 cor0
----
0

query I rowsort
SELECT ALL 59 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 * 86 col0 FROM tab0 AS cor0
----
-6536
-6536
-6536

query I rowsort
SELECT DISTINCT + - 46 AS col1 FROM tab1 AS cor0
----
-46

query I rowsort
SELECT DISTINCT + + 86 AS col0 FROM tab1 AS cor0
----
86

query I rowsort
SELECT col2 * 69 + col2 FROM tab1
----
3780
3990
6720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2256
SELECT ALL CAST( 35 AS SIGNED ) FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

skipif mysql # not compatible
query I rowsort label-2256
SELECT ALL CAST ( 35 AS INTEGER ) FROM tab0, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 + 99 col0 FROM tab1, tab2 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT + ( - col1 ) * 86 + - cor0.col0 FROM tab0 AS cor0
----
-7420
-7915
-8377

query I rowsort
SELECT - 54 + - cor0.col1 - - 85 FROM tab0, tab1 AS cor0
----
9 values hashing to e25fe3c8de214eab26701350668495ae

query I rowsort
SELECT + 3 * - ( - col2 ) FROM tab2
----
114
78
81

query I rowsort
SELECT DISTINCT - 99 FROM tab0, tab1 AS cor0
----
-99

query I rowsort
SELECT cor0.col2 * - 31 + 78 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to ec2a862e9e5967fab70f52b16bde9b68

query I rowsort
SELECT + 52 * - col0 * + col0 AS col0 FROM tab2 AS cor0
----
-2548
-316368
-324532

query I rowsort
SELECT ( 58 ) FROM tab1
----
58
58
58

query I rowsort
SELECT col0 * + 36 * - col0 + ( + ( col1 ) + ( 21 ) ) AS col0 FROM tab2
----
-1712
-218944
-224638

query I rowsort
SELECT DISTINCT + ( + col0 + col1 ) FROM tab1
----
29
74
93

query I rowsort
SELECT + 1 + 78 FROM tab1 AS cor0
----
79
79
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2268
SELECT ALL col1 DIV 76 - - col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2268
SELECT ALL col1 / 76 - - col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + ( + col0 ) * - col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT 86 + - 37 AS col0 FROM tab1 AS cor0
----
49

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( + col2 AS REAL ) + + cor0.col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - + 57 + + col0 FROM tab0 AS cor0
----
-22
-33
32

query I rowsort
SELECT ALL - - col1 - + cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT + - col2 + - col1 AS col0 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - col2 - - col2 * cor0.col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ( 43 ) FROM tab2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 * - col2 col1 FROM tab0
----
-1175
-6815
-98

query I rowsort
SELECT + 54 * col2 * + tab2.col1 - - col2 AS col1 FROM tab2
----
34922
45225
82862

query I rowsort
SELECT DISTINCT - col2 * tab0.col2 + - col0 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) + col1 * col2 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL - + 79 * + col1 * + 64 FROM tab0 AS cor0
----
-434816
-460096
-490432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 col0 FROM tab2 cor0
----
48
48
48

query I rowsort
SELECT DISTINCT - col0 * col0 * ( - col1 ) + col1 AS col2 FROM tab1 cor0
----
260
40970
83213

query I rowsort
SELECT ALL + - 27 * 4 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 138b59a04a997c6b26705f455586e0d9

query I rowsort
SELECT col2 - - ( cor0.col0 ) FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2286
SELECT DISTINCT - col0 + - 15 * col0 - col1 DIV col0 FROM tab1 AS cor0
----
-1024
-1280
-56

skipif mysql # not compatible
query I rowsort label-2286
SELECT DISTINCT - col0 + - 15 * col0 - col1 / col0 FROM tab1 AS cor0
----
-1024
-1280
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-2287
SELECT ALL col1 + 13 * col0 + col2 DIV + col2 FROM tab1 AS cor0
----
1054
66
843

skipif mysql # not compatible
query I rowsort label-2287
SELECT ALL col1 + 13 * col0 + col2 / + col2 FROM tab1 AS cor0
----
1054
66
843

onlyif mysql # use DIV operator for integer division
query I rowsort label-2288
SELECT - col2 * - col0 + 22 - - col0 * col1 DIV cor0.col0 FROM tab1 AS cor0
----
210
3680
7715

skipif mysql # not compatible
query I rowsort label-2288
SELECT - col2 * - col0 + 22 - - col0 * col1 / cor0.col0 FROM tab1 AS cor0
----
210
3680
7715

query I rowsort
SELECT + col2 + - 74 FROM tab2 AS cor0
----
-36
-47
-48

query I rowsort
SELECT DISTINCT 13 * col1 AS col0 FROM tab2
----
221
403
767

onlyif mysql # use DIV operator for integer division
query I rowsort label-2291
SELECT - 90 DIV - col1 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2291
SELECT - 90 / - col1 FROM tab0
----
0
0
1

query I rowsort
SELECT + 47 * - col1 FROM tab2
----
-1457
-2773
-799

query I rowsort
SELECT DISTINCT - col2 - ( - ( col0 ) ) * - 31 * col0 AS col1 FROM tab0 AS cor0
----
-17889
-245633
-37976

query I rowsort
SELECT - cor0.col2 + ( + 23 ) * + col2 AS col0 FROM tab1 AS cor0
----
1188
1254
2112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col1 * - col2 col2 FROM tab1 AS cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + col1 * + col0 col2 FROM tab1 cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-2297
SELECT + col2 + - cor0.col1 DIV ( col1 ) AS col0 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-2297
SELECT + col2 + - cor0.col1 / ( col1 ) AS col0 FROM tab0 AS cor0
----
0
32
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2298
SELECT ALL + col2 DIV + ( + ( col0 ) + col0 * + cor0.col0 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2298
SELECT ALL + col2 / + ( + ( col0 ) + col0 * + cor0.col0 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 32 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2300
SELECT DISTINCT + - CAST( ( + col0 ) AS SIGNED ) + - cor0.col1 AS col0 FROM tab0 cor0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-2300
SELECT DISTINCT + - CAST ( ( + col0 ) AS INTEGER ) + - cor0.col1 AS col0 FROM tab0 cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 47 col1 FROM tab1 AS cor0
----
-47
-47
-47

query I rowsort
SELECT + 32 + - col0 FROM tab1 AS cor0
----
-32
-48
29

query I rowsort
SELECT DISTINCT 30 FROM tab1, tab0 AS cor0
----
30

query I rowsort
SELECT col1 * - 1 - tab2.col0 AS col2 FROM tab2
----
-137
-38
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2305
SELECT DISTINCT + + CAST( + cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2305
SELECT DISTINCT + + CAST ( + cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + col2 + 98 AS col2 FROM tab0 AS cor0
----
131
180
99

query I rowsort
SELECT - - ( + 34 ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
1190
3026
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2308
SELECT - CAST( NULL AS DECIMAL ) / - cor0.col2 + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2308
SELECT - CAST ( NULL AS REAL ) / - cor0.col2 + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 15 + + 83 * col1 AS col0 FROM tab2 AS cor0
----
1396
2558
4882

query I rowsort
SELECT ALL 64 + 30 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT DISTINCT - - ( + col2 ) + col1 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 * - 76 col2 FROM tab0 AS cor0
----
-608
-608
-608

query I rowsort
SELECT ALL + col1 + col1 * - col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT cor0.col2 + + col1 * col0 * - col0 AS col1 FROM tab0 AS cor0
----
-118824
-49503
-720729

query I rowsort
SELECT DISTINCT col1 + col2 + - col1 AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT col2 * + col0 + col0 + col0 * ( ( + col0 ) ) FROM tab2
----
245
8190
9322

query I rowsort
SELECT DISTINCT col1 * 69 - - col1 AS col0 FROM tab0
----
6020
6370
6790

query I rowsort
SELECT ALL + ( + 32 ) * col0 AS col2 FROM tab1 AS cor0
----
2048
2560
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2319
SELECT + - CAST( - col0 AS SIGNED ) * col2 + 60 col2 FROM tab0 AS cor0
----
7358
852
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2319
SELECT + - CAST ( - col0 AS INTEGER ) * col2 + 60 col2 FROM tab0 AS cor0
----
7358
852
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 28 col0 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT DISTINCT + - ( - col0 ) + - col1 AS col1 FROM tab0 cor0
----
-2
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2322
SELECT - - CAST( NULL AS SIGNED ) + + 42 * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2322
SELECT - - CAST ( NULL AS INTEGER ) + + 42 * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col1 ) + - col1 * + col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL col1 * 44 FROM tab0 AS cor0
----
3784
4004
4268

onlyif mysql # use DIV operator for integer division
query I rowsort label-2325
SELECT DISTINCT + col2 * col2 DIV 49 col0 FROM tab2
----
13
14
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2325
SELECT DISTINCT + col2 * col2 / 49 col0 FROM tab2
----
13
14
29

query I rowsort
SELECT ALL + col0 + cor0.col1 + + col1 AS col2 FROM tab1 cor0
----
106
55
84

query I rowsort
SELECT + 59 + 10 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT ALL + col1 * + col0 + + ( + col1 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT col1 * tab2.col1 + 58 FROM tab2
----
1019
347
3539

onlyif mysql # use DIV operator for integer division
query I rowsort label-2330
SELECT col2 DIV + col1 + + ( tab0.col1 * - col2 ) AS col0 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2330
SELECT col2 / + col1 + + ( tab0.col1 * - col2 ) AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - ( 73 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-73

query I rowsort
SELECT ALL col1 * 42 FROM tab2 AS cor0
----
1302
2478
714

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2333
SELECT col0 * - CAST( NULL AS SIGNED ) * - col1 + - col1 - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2333
SELECT col0 * - CAST ( NULL AS INTEGER ) * - col1 + - col1 - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2334
SELECT DISTINCT + col0 + + CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2334
SELECT DISTINCT + col0 + + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

query I rowsort
SELECT ALL - col0 * + col0 + - cor0.col0 AS col0 FROM tab0 cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL + col2 + - ( 91 ) FROM tab2 AS cor0
----
-53
-64
-65

query I rowsort
SELECT ALL + + cor0.col0 + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 84 * col1 * col1 col1 FROM tab1
----
14196
56784
8400

query I rowsort
SELECT + - 83 * + col0 AS col2 FROM tab2 AS cor0
----
-581
-6474
-6557

query I rowsort
SELECT tab2.col0 + + 23 * + col0 FROM tab2
----
168
1872
1896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2341
SELECT CAST( col1 AS SIGNED ) * col0 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-2341
SELECT CAST ( col1 AS INTEGER ) * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - 16 + - cor0.col0 * + cor0.col0 FROM tab0 AS cor0
----
-1241
-592
-7937

query I rowsort
SELECT DISTINCT col1 * + col1 * + tab1.col2 FROM tab1
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-2344
SELECT ALL - 11 DIV col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2344
SELECT ALL - 11 / col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 2 * col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - ( col1 ) + + col2 * + col0 AS col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT + col2 + + col2 + col1 AS col0 FROM tab2
----
111
85
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2348
SELECT tab1.col1 + + tab1.col2 DIV + col0 FROM tab1
----
10
14
44

skipif mysql # not compatible
query I rowsort label-2348
SELECT tab1.col1 + + tab1.col2 / + col0 FROM tab1
----
10
14
44

query I rowsort
SELECT ALL + + cor0.col0 + - col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL ( 48 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT + col2 * - cor0.col0 + - cor0.col2 FROM tab0 cor0
----
-36
-7380
-825

query I rowsort
SELECT - 28 * + col2 + - cor0.col0 FROM tab0 AS cor0
----
-2385
-63
-948

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col2 col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + - col2 * 83 * col2 + - ( ( + col1 ) ) FROM tab0 AS cor0
----
-180
-558183
-90473

query I rowsort
SELECT - cor0.col2 * + col1 * - col0 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 68 * - cor0.col1 + + col1 col2 FROM tab0 AS cor0
----
-5762
-6097
-6499

query I rowsort
SELECT DISTINCT col2 + + 3 FROM tab1
----
57
60
99

query I rowsort
SELECT - tab1.col2 + ( 0 * tab1.col2 + - ( 28 ) ) AS col1 FROM tab1
----
-124
-82
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * tab1.col0 + + tab1.col1 * col0 col1 FROM tab1
----
0

query I rowsort
SELECT ( + 35 ) * - cor0.col2 FROM tab2 AS cor0
----
-1330
-910
-945

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2361
SELECT col2 - - CAST( col2 AS SIGNED ) AS col2 FROM tab2
----
52
54
76

skipif mysql # not compatible
query I rowsort label-2361
SELECT col2 - - CAST ( col2 AS INTEGER ) AS col2 FROM tab2
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 * + col2 col2 FROM tab0
----
3135
7790
95

query I rowsort
SELECT ALL 61 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT DISTINCT - tab2.col2 * 41 AS col2 FROM tab2
----
-1066
-1107
-1558

query I rowsort
SELECT + 31 * + tab0.col1 FROM tab0
----
2666
2821
3007

onlyif mysql # use DIV operator for integer division
query I rowsort label-2366
SELECT ALL + col2 * 20 + col2 DIV 16 FROM tab0
----
1645
20
662

skipif mysql # not compatible
query I rowsort label-2366
SELECT ALL + col2 * 20 + col2 / 16 FROM tab0
----
1645
20
662

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 69 col0 FROM tab0 AS cor0
----
69
69
69

query I rowsort
SELECT + col2 + - 76 AS col2 FROM tab1 AS cor0
----
-19
-22
20

query I rowsort
SELECT 18 + cor0.col2 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 9343cf91f0c63fe2f828177d690d41cd

query I rowsort
SELECT + 98 + ( - col2 ) FROM tab2 AS cor0
----
60
71
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col0 ) col1 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2372
SELECT ALL - cor0.col0 DIV + col1 - - CAST( 41 * - col1 AS SIGNED ) FROM tab0 AS cor0
----
-3526
-3731
-3977

skipif mysql # not compatible
query I rowsort label-2372
SELECT ALL - cor0.col0 / + col1 - - CAST ( 41 * - col1 AS INTEGER ) FROM tab0 AS cor0
----
-3526
-3731
-3977

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 66 + col1 * col1 col1 FROM tab0 AS cor0
----
7462
8347
9475

query I rowsort
SELECT + col1 + - col0 * + 77 FROM tab1 AS cor0
----
-205
-4918
-6147

query I rowsort
SELECT ALL - ( - col2 ) * + col2 AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT ( tab2.col2 ) AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL - 58 + - tab0.col0 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 2be57073a12c9f445ccd74ae227712be

query I rowsort
SELECT + cor0.col2 + col2 * 67 FROM tab0 AS cor0
----
2244
5576
68

query I rowsort
SELECT - - cor0.col2 + 4 * - col0 - col1 AS col0 FROM tab2 AS cor0
----
-295
-32
-345

query I rowsort
SELECT - col0 + - col0 * + 93 AS col2 FROM tab2 cor0
----
-658
-7332
-7426

onlyif mysql # use DIV operator for integer division
query I rowsort label-2381
SELECT ALL 0 DIV col1 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2381
SELECT ALL 0 / col1 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + col2 * - ( - col1 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 * - 98 col2 FROM tab2 AS cor0
----
-1704
-3065
-5808

query I rowsort
SELECT + col2 * 71 + col2 AS col0 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT DISTINCT + col1 * - 97 AS col2 FROM tab2
----
-1649
-3007
-5723

query I rowsort
SELECT ALL + col0 - col1 * 47 FROM tab2
----
-1450
-2695
-720

query I rowsort
SELECT DISTINCT - tab0.col1 + tab0.col0 + col0 FROM tab0
----
-27
-38
87

query I rowsort
SELECT - 11 * + 53 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c124e8465dc5379e9418d39965c968b1

query I rowsort
SELECT DISTINCT - col1 * tab1.col1 + col0 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT - col1 + - tab0.col1 + + ( col1 ) * - col2 * + col2 AS col2 FROM tab0
----
-291
-612066
-93826

query I rowsort
SELECT - col2 * col2 * - col0 AS col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - + col0 + + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-118
-147
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col0 + 23 + + col2 col1 FROM tab2 AS cor0
----
2077
239
3063

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2394
SELECT col2 + - CAST( col2 AS SIGNED ) + - col1 * cor0.col2 * + ( + col2 ) FROM tab1 AS cor0
----
-119808
-32490
-75816

skipif mysql # not compatible
query I rowsort label-2394
SELECT col2 + - CAST ( col2 AS INTEGER ) + - col1 * cor0.col2 * + ( + col2 ) FROM tab1 AS cor0
----
-119808
-32490
-75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + col0 col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT col0 * + ( - 15 ) * + col1 FROM tab0 AS cor0
----
-121485
-30960
-50925

skipif mysql # not compatible
query I rowsort
SELECT col1 + CAST ( col0 AS REAL ) AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - - col0 + col2 + 95 FROM tab2 AS cor0
----
129
199
212

query I rowsort
SELECT DISTINCT + col0 + + col1 * - 63 FROM tab1 cor0
----
-1635
-566
-739

query I rowsort
SELECT + + col2 * col0 + col2 * col1 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT ALL col1 + + ( + col2 ) FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col0 + col0 col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + - col0 + + ( ( - col0 ) ) AS col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ALL - col2 * col1 * 74 AS col1 FROM tab2 AS cor0
----
-113516
-47804
-61938

query I rowsort
SELECT ALL - 88 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT + + ( cor0.col1 ) * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) * + col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT 36 + - 27 AS col2 FROM tab0 AS cor0
----
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 54 col0 FROM tab2 AS cor0
----
132
133
61

query I rowsort
SELECT + ( - 95 ) FROM tab1 AS cor0
----
-95
-95
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + ( col2 ) + + col2 col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - cor0.col2 * + 17 * col2 AS col2 FROM tab2 AS cor0
----
-11492
-12393
-24548

query I rowsort
SELECT + col2 + - col1 * 81 * + col1 FROM tab1 AS cor0
----
-13593
-54702
-8043

onlyif mysql # use DIV operator for integer division
query I rowsort label-2414
SELECT DISTINCT + + ( cor0.col0 ) DIV cor0.col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2414
SELECT DISTINCT + + ( cor0.col0 ) / cor0.col0 FROM tab1 AS cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2415
SELECT + col2 DIV col1 + 10 * ( col0 ) col0 FROM tab1 AS cor0
----
32
645
807

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2415
SELECT + col2 / col1 + 10 * ( col0 ) col0 FROM tab1 AS cor0
----
32
645
807

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 * col2 + 13 * + col2 col1 FROM tab0 AS cor0
----
1386
3444
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2417
SELECT DISTINCT - col1 - col2 * CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2417
SELECT DISTINCT - col1 - col2 * CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 + col2 + + 81 * col1 * col1 AS col0 FROM tab1 cor0
----
13798
54836
8167

query I rowsort
SELECT DISTINCT - 38 - + col0 AS col2 FROM tab2 AS cor0
----
-116
-117
-45

query I rowsort
SELECT cor0.col2 - - cor0.col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col2 * - col1 + - 78 + + 33 FROM tab0 AS cor0
----
-142
-2883
-7507

query I rowsort
SELECT DISTINCT - 30 * - col2 - cor0.col2 AS col0 FROM tab0 AS cor0
----
2378
29
957

query I rowsort
SELECT - col1 * + col1 - - col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT col2 + col2 + - 85 * - col1 FROM tab0 cor0
----
7376
7899
8247

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col1 AS REAL ) + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 12 - col0 * tab0.col2 AS col2 FROM tab0
----
-47
-7310
-804

query I rowsort
SELECT 53 + + ( tab1.col1 * + col1 ) AS col2 FROM tab1
----
153
222
729

query I rowsort
SELECT 45 * + col0 AS col1 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT DISTINCT + 47 * + cor0.col1 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT - - cor0.col1 * - col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT 96 + col1 * + 4 AS col1 FROM tab1 AS cor0
----
136
148
200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2432
SELECT DISTINCT - - col1 + cor0.col0 * - CAST( - col2 AS SIGNED ) * col0 col0 FROM tab1 AS cor0
----
233482
512
614413

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2432
SELECT DISTINCT - - col1 + cor0.col0 * - CAST ( - col2 AS INTEGER ) * col0 col0 FROM tab1 AS cor0
----
233482
512
614413

query I rowsort
SELECT ALL col0 + - cor0.col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT col2 * - col0 * ( col2 ) FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT 85 + - col0 FROM tab0
----
-4
50
61

query I rowsort
SELECT ALL - + cor0.col1 + col0 * col1 * cor0.col0 AS col2 FROM tab0 AS cor0
----
118728
49450
720720

query I rowsort
SELECT + 35 * cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 04fa8aa97a6e2e14eade6aa358239d6b

query I rowsort
SELECT + 92 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

onlyif mysql # use DIV operator for integer division
query I rowsort label-2440
SELECT ALL col0 DIV col2 + ( col1 ) AS col2 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-2440
SELECT ALL col0 / col2 + ( col1 ) AS col2 FROM tab1
----
11
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2441
SELECT + + CAST( col2 AS SIGNED ) * - cor0.col1 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2441
SELECT + + CAST ( col2 AS INTEGER ) * - cor0.col1 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - col2 * col1 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
-2262
1128
459

query I rowsort
SELECT - col0 * 90 FROM tab1 AS cor0
----
-270
-5760
-7200

onlyif mysql # use DIV operator for integer division
query I rowsort label-2444
SELECT DISTINCT - ( - 71 ) DIV - col0 + + ( + col1 + - col0 ) AS col0 FROM tab2 AS cor0
----
-19
-62
14

skipif mysql # not compatible
query I rowsort label-2444
SELECT DISTINCT - ( - 71 ) / - col0 + + ( + col1 + - col0 ) AS col0 FROM tab2 AS cor0
----
-19
-62
14

query I rowsort
SELECT DISTINCT - 32 * + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-1142
-129
-2715

query I rowsort
SELECT ALL - cor0.col1 + col2 * col2 AS col1 FROM tab1 AS cor0
----
2890
3239
9203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2447
SELECT - CAST( NULL AS SIGNED ) FROM tab0, tab1, tab0 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2447
SELECT - CAST ( NULL AS INTEGER ) FROM tab0, tab1, tab0 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 52 * 40 * tab0.col0 FROM tab0
----
185120
49920
72800

query I rowsort
SELECT DISTINCT + ( 2 ) * cor0.col2 * col0 FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT ALL + - cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT col1 * + 63 + + col0 * col0 FROM tab0 AS cor0
----
13654
5994
7336

query I rowsort
SELECT ALL ( 59 ) AS col0 FROM tab0 AS cor0
----
59
59
59

query I rowsort
SELECT + 52 + col1 AS col0 FROM tab1 AS cor0
----
62
65
78

query I rowsort
SELECT + 61 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1586
610
793

query I rowsort
SELECT + 71 + - 33 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT DISTINCT col0 + + 78 + - col2 * tab0.col2 FROM tab0
----
-6557
-987
112

query I rowsort
SELECT col2 + - tab0.col2 * col1 + + col0 FROM tab0
----
-2781
-61
-7291

query I rowsort
SELECT ALL + 84 * + 26 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 71be0bbe3898e63ed63c2f0ad400ee6d

query I rowsort
SELECT - - ( col1 ) * - col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - - ( + 2 ) FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT ( 5 ) FROM tab0 cor0
----
5

query I rowsort
SELECT DISTINCT 74 * col1 + + col2 * + col2 AS col1 FROM tab0
----
13458
7179
7453

query I rowsort
SELECT ALL tab1.col0 AS col1 FROM tab1, tab0 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT ALL - 3 * - tab1.col0 + + col2 + col0 AS col0 FROM tab1
----
313
416
66

query I rowsort
SELECT DISTINCT + 1 * + col0 + - ( + col2 ) + col1 AS col0 FROM tab2
----
11
111
58

query I rowsort
SELECT col0 * 91 FROM tab1
----
273
5824
7280

query I rowsort
SELECT DISTINCT + 55 FROM tab2, tab1 AS cor0
----
55

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab0 cor2, tab1
----
13122 values hashing to b5bd0c7c5b3804b80b148cad4a98b7fb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( 44 * + col0 ) col2 FROM tab1
----
180224
281600
396

onlyif mysql # use DIV operator for integer division
query I rowsort label-2470
SELECT col0 DIV 93 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2470
SELECT col0 / 93 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - 84 FROM tab2, tab1 AS cor0
----
-84

query I rowsort
SELECT col1 + 78 * + 35 FROM tab2 cor0
----
2747
2761
2789

query I rowsort
SELECT cor0.col2 + col2 * col0 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + + ( + col2 ) * col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + 70 * col2 + + col0 * col1 FROM tab2
----
2107
4003
6422

query I rowsort
SELECT + 25 * - col1 FROM tab0
----
-2150
-2275
-2425

query I rowsort
SELECT 4 * col1 + col0 * ( col2 ) AS col0 FROM tab0
----
1136
423
7662

query I rowsort
SELECT DISTINCT ( col1 ) + col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT - ( - col0 ) * + col2 * ( col1 ) + + col2 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT DISTINCT col2 * - ( - cor0.col1 ) + - 80 FROM tab1 AS cor0
----
1168
1324
490

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2481
SELECT - CAST( - col1 AS SIGNED ) + - col2 * - cor0.col1 FROM tab2 AS cor0
----
1593
663
868

skipif mysql # not compatible
query I rowsort label-2481
SELECT - CAST ( - col1 AS INTEGER ) + - col2 * - cor0.col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - cor0.col1 * ( + col2 ) + + cor0.col1 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2483
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - 37 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2483
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - 37 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 42 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT + - cor0.col0 + 76 * - col1 FROM tab2 AS cor0
----
-1371
-2363
-4562

query I rowsort
SELECT col1 * 20 + col2 FROM tab2 AS cor0
----
1206
378
647

query I rowsort
SELECT cor0.col0 * - 77 FROM tab2 AS cor0
----
-539
-6006
-6083

query I rowsort
SELECT - 72 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

query I rowsort
SELECT ALL - + col0 * ( + col1 ) + + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL - 23 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2491
SELECT - col1 + col2 * CAST( NULL AS SIGNED ) * 20 + - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2491
SELECT - col1 + col2 * CAST ( NULL AS INTEGER ) * 20 + - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 * + ( + col1 ) col2 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL 51 * col2 FROM tab1 AS cor0
----
2754
2907
4896

query I rowsort
SELECT DISTINCT col1 * + col1 + 75 AS col0 FROM tab0 AS cor0
----
7471
8356
9484

query I rowsort
SELECT tab1.col1 - tab1.col2 AS col1 FROM tab1
----
-28
-47
-83

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT - col2 BETWEEN ( NULL ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2497
SELECT + col1 DIV col2 col2 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2497
SELECT + col1 / col2 col2 FROM tab0
----
1
2
97

query I rowsort
SELECT - col1 / + col2 + - col1 AS col0 FROM tab1 WHERE col2 * - col2 > col2
----

query I rowsort
SELECT - col0 + - col1 * - col2 + - col1 FROM tab2
----
1397
550
799

query I rowsort
SELECT DISTINCT - ( col2 ) + + 39 AS col1 FROM tab0
----
-43
38
6

query I rowsort
SELECT col2 * col0 + + 43 FROM tab1 AS cor0
----
205
3691
7723

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 10 col2 FROM tab2 AS cor0
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 * + col1 col0 FROM tab2
----
153
279
531

query I rowsort
SELECT ALL 65 + - col0 AS col1 FROM tab2
----
-13
-14
58

query I rowsort
SELECT DISTINCT + 36 + tab2.col0 * ( col2 ) AS col0 FROM tab2
----
2064
225
3038

query I rowsort
SELECT DISTINCT 1 + + col0 FROM tab2
----
79
8
80

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - tab1.col0 NOT IN ( col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT col1 - + tab2.col1 FROM tab2
----
0
0
0

query I rowsort
SELECT + col2 * col0 * - col0 AS col1 FROM tab2 WHERE NOT + col0 BETWEEN + col0 AND NULL
----

query I rowsort
SELECT col0 * col1 * col2 + tab2.col1 + - col2 FROM tab2
----
119685
51013
5863

query III rowsort
SELECT ALL * FROM tab1 WHERE col2 = - col1 / col0 + + col0
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL NOT BETWEEN - col1 AND ( NULL )
----

query I rowsort
SELECT + col1 * col2 * col2 + - col2 * + col1 * + tab2.col2 FROM tab2 WHERE NOT ( NULL ) = NULL
----

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL = col2 + col2 * - col1 - tab1.col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 WHERE - col1 < ( NULL )
----

query I rowsort
SELECT DISTINCT + col1 * col0 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT col0 - + col0 AS col1 FROM tab1
----
0

query I rowsort
SELECT + col0 FROM tab2 WHERE NOT NULL IN ( col1 - col1 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2519
SELECT ALL CAST( + 59 * col0 AS SIGNED ) FROM tab0
----
1416
2065
5251

skipif mysql # not compatible
query I rowsort label-2519
SELECT ALL CAST ( + 59 * col0 AS INTEGER ) FROM tab0
----
1416
2065
5251

query I rowsort
SELECT ALL - col0 + 8 FROM tab2 AS cor0
----
-70
-71
1

query I rowsort
SELECT - ( 96 ) + - col1 AS col1 FROM tab0 AS cor0
----
-182
-187
-193

query I rowsort
SELECT DISTINCT ( 83 ) + col2 * - col1 AS col2 FROM tab0 cor0
----
-14
-2755
-7379

query I rowsort
SELECT ALL + col1 + 60 AS col1 FROM tab0 AS cor0
----
146
151
157

query I rowsort
SELECT ALL + 2 * - col1 * col2 + + ( ( col2 ) ) AS col0 FROM tab2 AS cor0
----
-1254
-1647
-3042

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2525
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * + col2 + col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2525
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * + col2 + col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - cor0.col1 + - cor0.col1 * + 5 FROM tab0 AS cor0
----
-516
-546
-582

query I rowsort
SELECT DISTINCT + col1 + + col0 + col2 AS col0 FROM tab0 cor0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-2528
SELECT ALL col0 DIV + cor0.col0 + - 76 + - 18 col2 FROM tab0 AS cor0
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2528
SELECT ALL col0 / + cor0.col0 + - 76 + - 18 col2 FROM tab0 AS cor0
----
-93
-93
-93

query I rowsort
SELECT + + 60 AS col2 FROM tab0 AS cor0
----
60
60
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2530
SELECT col0 DIV + col2 AS col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2530
SELECT col0 / + col2 AS col2 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2531
SELECT DISTINCT + + cor0.col0 * CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2531
SELECT DISTINCT + + cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT + + cor0.col2 * - col0 + - col0 AS col2 FROM tab1 AS cor0
----
-165
-3712
-7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2533
SELECT DISTINCT cor0.col2 * - CAST( NULL AS SIGNED ) + col0 + - cor0.col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2533
SELECT DISTINCT cor0.col2 * - CAST ( NULL AS INTEGER ) + col0 + - cor0.col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + col2 * - 87 + 74 FROM tab1 AS cor0
----
-4624
-4885
-8278

query I rowsort
SELECT ALL - col0 * col0 + - 99 AS col1 FROM tab0 cor0
----
-1324
-675
-8020

onlyif mysql # use DIV operator for integer division
query I rowsort label-2536
SELECT - - cor0.col2 DIV 49 + - 2 AS col0 FROM tab2 cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-2536
SELECT - - cor0.col2 / 49 + - 2 AS col0 FROM tab2 cor0
----
-2
-2
-2

query I rowsort
SELECT cor0.col0 + - 69 FROM tab2 AS cor0
----
-62
10
9

query I rowsort
SELECT DISTINCT col0 * - 48 FROM tab1 AS cor0
----
-144
-3072
-3840

query I rowsort
SELECT ALL - col1 + 33 AS col1 FROM tab2 AS cor0
----
-26
16
2

query I rowsort
SELECT ALL cor0.col0 * 27 + col1 - col1 FROM tab2 AS cor0
----
189
2106
2133

query I rowsort
SELECT col0 - + 29 AS col0 FROM tab2 AS cor0
----
-22
49
50

query I rowsort
SELECT ALL col2 * 45 AS col0 FROM tab2 AS cor0
----
1170
1215
1710

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2543
SELECT DISTINCT - - col2 * CAST( + col1 * + col0 AS SIGNED ) + col0 FROM tab0 cor0
----
3430
664207
68136

skipif mysql # not compatible
query I rowsort label-2543
SELECT DISTINCT - - col2 * CAST ( + col1 * + col0 AS INTEGER ) + col0 FROM tab0 cor0
----
3430
664207
68136

query I rowsort
SELECT ALL col1 + - 95 FROM tab2 AS cor0
----
-36
-64
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2545
SELECT DISTINCT - - cor0.col1 + - cor0.col0 - + col2 DIV cor0.col0 AS col1 FROM tab1 AS cor0
----
-54
-68
5

skipif mysql # not compatible
query I rowsort label-2545
SELECT DISTINCT - - cor0.col1 + - cor0.col0 - + col2 / cor0.col0 AS col1 FROM tab1 AS cor0
----
-54
-68
5

query I rowsort
SELECT + col2 * col2 + col1 FROM tab2 cor0
----
1461
735
760

query I rowsort
SELECT - cor0.col0 * col1 + - ( - col1 * + ( + col1 ) ) AS col2 FROM tab1 AS cor0
----
-540
-871
598

query I rowsort
SELECT DISTINCT + col2 * + cor0.col1 + - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-3068
-697
620

onlyif mysql # use DIV operator for integer division
query I rowsort label-2549
SELECT DISTINCT col0 + col1 DIV 61 AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2549
SELECT DISTINCT col0 + col1 / 61 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col1 * - 0 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2551
SELECT ALL - + CAST( NULL AS SIGNED ) + - col0 * - col0 * col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2551
SELECT ALL - + CAST ( NULL AS INTEGER ) + - col0 * - col0 * col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 85 - - col2 * + col0 FROM tab2 AS cor0
----
2113
274
3087

onlyif mysql # use DIV operator for integer division
query I rowsort label-2553
SELECT - + 87 DIV cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
-86
31
81

skipif mysql # not compatible
query I rowsort label-2553
SELECT - + 87 / cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
-86
31
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2554
SELECT DISTINCT - CAST( + col2 AS SIGNED ) * col0 + col1 FROM tab0 AS cor0
----
-706
-7207
62

skipif mysql # not compatible
query I rowsort label-2554
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) * col0 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + + 37 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT DISTINCT - tab2.col0 * + 82 + tab2.col1 AS col0 FROM tab2
----
-543
-6337
-6461

query I rowsort
SELECT DISTINCT + 56 FROM tab1 cor0
----
56

query I rowsort
SELECT DISTINCT + col2 + + col0 + col2 * + ( + col1 ) AS col0 FROM tab1 AS cor0
----
1424
1461
691

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2559
SELECT + - col0 * col0 * + CAST( 26 AS SIGNED ) - + col2 * ( col0 ) AS col1 FROM tab2 cor0
----
-1463
-160212
-165268

skipif mysql # not compatible
query I rowsort label-2559
SELECT + - col0 * col0 * + CAST ( 26 AS INTEGER ) - + col2 * ( col0 ) AS col1 FROM tab2 cor0
----
-1463
-160212
-165268

query I rowsort
SELECT - + col2 - - col1 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT col2 + + col1 AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - 75 * col2 * 98 + + col1 AS col1 FROM tab0 cor0
----
-242464
-602609
-7253

onlyif mysql # use DIV operator for integer division
query I rowsort label-2563
SELECT - col1 * 91 DIV - cor0.col0 + col0 col0 FROM tab2 AS cor0
----
146
410
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2563
SELECT - col1 * 91 / - cor0.col0 + col0 col0 FROM tab2 AS cor0
----
146
410
98

query I rowsort
SELECT - col1 + ( ( col0 ) + + 3 ) AS col1 FROM tab1 AS cor0
----
-20
57
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2565
SELECT - 21 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2565
SELECT - 21 / col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 76 AS REAL ) col2 FROM tab1 AS cor0
----
76
76
76

query I rowsort
SELECT DISTINCT + 52 + col2 AS col1 FROM tab0 cor0
----
134
53
85

query I rowsort
SELECT - 76 FROM tab0, tab1, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to 30b3ee36c95bb84d1f6a640c4d41cf15

query I rowsort
SELECT ALL 90 + - tab1.col0 AS col0 FROM tab1
----
10
26
87

query I rowsort
SELECT - 28 * cor0.col0 * 42 FROM tab0, tab1 AS cor0
----
9 values hashing to 3c74e92c697c1e105e46eeceb4022b67

query I rowsort
SELECT - 81 - + col1 FROM tab2 AS cor0
----
-112
-140
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2572
SELECT CAST( NULL AS SIGNED ) + - col0 * col2 + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2572
SELECT CAST ( NULL AS INTEGER ) + - col0 * col2 + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 46 + 91 AS col0 FROM tab0 AS cor0
----
45

query I rowsort
SELECT ALL - - ( col1 ) * - cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + + cor0.col0 * col0 AS col0 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2576
SELECT ALL + col0 DIV col0 + 55 DIV col2 FROM tab0 cor0
----
1
2
56

skipif mysql # not compatible
query I rowsort label-2576
SELECT ALL + col0 / col0 + 55 / col2 FROM tab0 cor0
----
1
2
56

query I rowsort
SELECT ALL - - 89 * + tab2.col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to fd2c89a00ca89e4521048579f29b09f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2578
SELECT col2 * col2 DIV - 15 FROM tab2 cor0
----
-45
-48
-96

skipif mysql # not compatible
query I rowsort label-2578
SELECT col2 * col2 / - 15 FROM tab2 cor0
----
-45
-48
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2579
SELECT ALL tab0.col1 * - 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-2579
SELECT ALL tab0.col1 * - CAST ( NULL AS INTEGER ) col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 48 - - 13 FROM tab2, tab0 AS cor0
----
61

query I rowsort
SELECT + 83 * 65 AS col0 FROM tab0 AS cor0
----
5395
5395
5395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 42 + ( col2 ) * col2 col2 FROM tab2 AS cor0
----
1486
718
771

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 * cor0.col0 col1 FROM tab2 cor0
----
18
6025
6224

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2584
SELECT ALL + CAST( NULL AS DECIMAL ) + col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2584
SELECT ALL + CAST ( NULL AS REAL ) + col1 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2585
SELECT col2 * 29 DIV + col2 FROM tab0 AS cor0
----
29
29
29

skipif mysql # not compatible
query I rowsort label-2585
SELECT col2 * 29 / + col2 FROM tab0 AS cor0
----
29
29
29

query I rowsort
SELECT ALL - col1 + col2 - ( col2 ) FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2587
SELECT ALL - col1 + + col2 DIV col0 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-2587
SELECT ALL - col1 + + col2 / col0 FROM tab1 AS cor0
----
-10
-12
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col1 col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2589
SELECT ALL + cor0.col1 DIV - 54 - col2 * - col2 AS col2 FROM tab0 AS cor0
----
0
1088
6723

skipif mysql # not compatible
query I rowsort label-2589
SELECT ALL + cor0.col1 / - 54 - col2 * - col2 AS col2 FROM tab0 AS cor0
----
0
1088
6723

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2590
SELECT DISTINCT col1 * ( + 58 ) + - col1 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2590
SELECT DISTINCT col1 * ( + 58 ) + - col1 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 91 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT - + cor0.col1 + - cor0.col1 * col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL - 26 AS col2 FROM tab0 AS cor0
----
-26
-26
-26

query I rowsort
SELECT DISTINCT col2 - + col1 FROM tab0 cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 + - col0 col2 FROM tab2 AS cor0
----
4
5
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2596
SELECT ALL - ( col2 ) * col2 * CAST( - col2 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
157464
185193
884736

skipif mysql # not compatible
query I rowsort label-2596
SELECT ALL - ( col2 ) * col2 * CAST ( - col2 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
157464
185193
884736

query I rowsort
SELECT col0 * cor0.col2 - - col0 * 39 AS col1 FROM tab2 AS cor0
----
462
5070
6083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2598
SELECT DISTINCT CAST( NULL AS SIGNED ) * 28 + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2598
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 28 + col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 84 * 59 AS col1 FROM tab2 AS cor0
----
4956

query I rowsort
SELECT - + 30 * 78 + + col0 AS col0 FROM tab1 AS cor0
----
-2260
-2276
-2337

query I rowsort
SELECT + 14 * 31 FROM tab2 AS cor0
----
434
434
434

query I rowsort
SELECT + col1 - - ( - 31 ) * + col0 * ( 90 * - col2 ) FROM tab2
----
527341
5658179
8375597

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2603
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1, tab2, tab2 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-2603
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab2, tab2 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT + col1 + + col0 * + ( - col2 ) FROM tab1 AS cor0
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 92 col0 FROM tab1
----
-92
-92
-92

query I rowsort
SELECT ALL + ( + col1 ) + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + - 20 * col1 * - 42 FROM tab1 AS cor0
----
10920
21840
8400

query I rowsort
SELECT ALL + 14 FROM tab2 cor0
----
14
14
14

query I rowsort
SELECT ALL - 50 * col2 AS col0 FROM tab1
----
-2700
-2850
-4800

query I rowsort
SELECT - 84 * col0 FROM tab2
----
-588
-6552
-6636

query I rowsort
SELECT ALL + 77 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT DISTINCT - col2 * - 67 + + col0 AS col1 FROM tab2
----
1816
1820
2625

query I rowsort
SELECT + - col2 * col0 + + col0 + - col1 FROM tab2 AS cor0
----
-2009
-213
-2940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 * + col0 col0 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT cor0.col0 + - col1 + col2 AS col2 FROM tab2 AS cor0
----
100
3
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 20 col1 FROM tab1 AS cor0
----
20
20
20

query I rowsort
SELECT 90 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT - cor0.col0 + 51 FROM tab0, tab2 AS cor0
----
9 values hashing to 70b0c4a2bba0a71dfd3196c35075c1bf

query I rowsort
SELECT DISTINCT col0 * col1 * col0 + + 60 * col0 AS col1 FROM tab2
----
110837
1939
363636

query I rowsort
SELECT + cor0.col0 + 55 * col0 AS col0 FROM tab2 AS cor0
----
392
4368
4424

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * - col0 col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ( + col1 ) + col1 * col0 FROM tab0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-2623
SELECT col0 DIV - col1 + col0 * - 47 AS col0 FROM tab0
----
-1128
-1645
-4183

skipif mysql # not compatible
query I rowsort label-2623
SELECT col0 / - col1 + col0 * - 47 AS col0 FROM tab0
----
-1128
-1645
-4183

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2624
SELECT - - col0 * + CAST( 57 AS SIGNED ) FROM tab0 AS cor0
----
1368
1995
5073

skipif mysql # not compatible
query I rowsort label-2624
SELECT - - col0 * + CAST ( 57 AS INTEGER ) FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT ALL - col2 + + ( ( - col1 ) ) AS col2 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2626
SELECT DISTINCT - - col0 * + CAST( col0 AS SIGNED ) * - col0 col2 FROM tab0 AS cor0
----
-13824
-42875
-704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2626
SELECT DISTINCT - - col0 * + CAST ( col0 AS INTEGER ) * - col0 col2 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT DISTINCT col1 * - 12 + col1 * - col2 + - col1 FROM tab1 AS cor0
----
-1417
-1742
-700

query I rowsort
SELECT col1 + col2 + ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
124
134
205

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2629
SELECT ALL - - col2 + CAST( NULL AS DECIMAL ) * 16 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2629
SELECT ALL - - col2 + CAST ( NULL AS REAL ) * 16 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * 88 + col1 col0 FROM tab0 AS cor0
----
-2818
-7125
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2631
SELECT DISTINCT - CAST( 81 AS SIGNED ) + col1 DIV + 46 FROM tab2
----
-80
-81

skipif mysql # not compatible
query I rowsort label-2631
SELECT DISTINCT - CAST ( 81 AS INTEGER ) + col1 / + 46 FROM tab2
----
-80
-81

query I rowsort
SELECT ALL - + col0 + + 35 AS col2 FROM tab2 AS cor0
----
-43
-44
28

query I rowsort
SELECT col2 * 25 - + col0 AS col0 FROM tab1 AS cor0
----
1347
1361
2320

query I rowsort
SELECT ALL ( 83 ) * col0 + 60 AS col0 FROM tab2 AS cor0
----
641
6534
6617

query I rowsort
SELECT ALL 42 * 31 + + col0 FROM tab1 AS cor0
----
1305
1366
1382

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + ( - col2 ) - + col1 col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL - + ( + col2 ) - col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + col1 * - col2 + + col0 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2639
SELECT ALL + - CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2639
SELECT ALL + - CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2640
SELECT DISTINCT + cor0.col1 * + 12 * - col2 + col1 DIV col0 FROM tab2 AS cor0
----
-10040
-18408
-7752

skipif mysql # not compatible
query I rowsort label-2640
SELECT DISTINCT + cor0.col1 * + 12 * - col2 + col1 / col0 FROM tab2 AS cor0
----
-10040
-18408
-7752

query I rowsort
SELECT DISTINCT 87 * - col1 FROM tab1 AS cor0
----
-1131
-2262
-870

query I rowsort
SELECT ALL - 73 + col0 * + col2 FROM tab2 AS cor0
----
116
1955
2929

query I rowsort
SELECT col2 * - col2 + + col1 + ( col1 + cor0.col1 ) FROM tab2 AS cor0
----
-1393
-499
-636

query I rowsort
SELECT DISTINCT cor0.col1 * col1 * - col0 + + 65 FROM tab0 AS cor0
----
-177439
-329250
-736944

query I rowsort
SELECT DISTINCT 68 - - col0 AS col2 FROM tab0
----
103
157
92

query I rowsort
SELECT col1 + ( + col1 ) - 11 FROM tab0
----
161
171
183

query I rowsort
SELECT - ( - 61 ) * - col2 AS col0 FROM tab2
----
-1586
-1647
-2318

query I rowsort
SELECT DISTINCT - 66 * cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
-19074
-229746
-63426

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( + col2 ) + + 54 * + col1 col1 FROM tab0 cor0
----
4611
4832
5237

query I rowsort
SELECT + col2 * - col0 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT + ( col0 ) * - cor0.col1 * col1 + col0 + col1 AS col1 FROM tab2 AS cor0
----
-22735
-271381
-6689

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2652
SELECT - CAST( NULL AS SIGNED ) - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2652
SELECT - CAST ( NULL AS INTEGER ) - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2653
SELECT DISTINCT - 65 DIV col1 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-2653
SELECT DISTINCT - 65 / col1 AS col1 FROM tab0
----
0

query I rowsort
SELECT - - ( 24 ) + - col0 AS col2 FROM tab0 AS cor0
----
-11
-65
0

query I rowsort
SELECT + col0 * 65 + + col0 FROM tab0 AS cor0
----
1584
2310
5874

query I rowsort
SELECT - 88 + col0 * col0 - ( col1 ) AS col1 FROM tab2 AS cor0
----
-70
5937
6136

skipif mysql # not compatible
query I rowsort
SELECT 87 + + cor0.col2 * + CAST ( - col0 + + col0 AS REAL ) FROM tab2 AS cor0
----
87
87
87

query I rowsort
SELECT - cor0.col0 + - col2 * + ( + col1 ) AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

onlyif mysql # use DIV operator for integer division
query I rowsort label-2659
SELECT ALL + 37 DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-2659
SELECT ALL + 37 / col0 AS col1 FROM tab2 AS cor0
----
0
0
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2660
SELECT cor0.col0 + col1 * cor0.col2 + + col1 DIV col0 AS col0 FROM tab0 AS cor0
----
134
2865
7552

skipif mysql # not compatible
query I rowsort label-2660
SELECT cor0.col0 + col1 * cor0.col2 + + col1 / col0 AS col0 FROM tab0 AS cor0
----
134
2865
7552

query I rowsort
SELECT DISTINCT - col1 * col1 + + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT + + col0 + + cor0.col1 * col0 AS col2 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2663
SELECT col1 DIV - ( - col1 ) + - col1 * - 47 FROM tab2
----
1458
2774
800

skipif mysql # not compatible
query I rowsort label-2663
SELECT col1 / - ( - col1 ) + - col1 * - 47 FROM tab2
----
1458
2774
800

query I rowsort
SELECT DISTINCT - col2 * + col2 + col2 + - col1 * 64 AS col1 FROM tab2 cor0
----
-2494
-2686
-4426

query I rowsort
SELECT DISTINCT - col0 - - ( cor0.col0 * + col2 ) FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + 41 AS col0 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 + + 29 * col1 * col0 AS col0 FROM tab1 AS cor0
----
17920
2184
29120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2668
SELECT ALL - - col1 * + ( + col2 * + col1 ) + + 8 * col1 DIV col1 FROM tab2 AS cor0
----
10990
25955
90514

skipif mysql # not compatible
query I rowsort label-2668
SELECT ALL - - col1 * + ( + col2 * + col1 ) + + 8 * col1 / col1 FROM tab2 AS cor0
----
10990
25955
90514

query I rowsort
SELECT DISTINCT + - col0 - - col1 FROM tab0 AS cor0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - ( col1 + - 5 ) col1 FROM tab2 cor0
----
204
3186
806

query I rowsort
SELECT - 85 * col0 AS col2 FROM tab0 AS cor0
----
-2040
-2975
-7565

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2672
SELECT DISTINCT - CAST( 56 AS SIGNED ) - + col1 AS col1 FROM tab2 AS cor0
----
-115
-73
-87

skipif mysql # not compatible
query I rowsort label-2672
SELECT DISTINCT - CAST ( 56 AS INTEGER ) - + col1 AS col1 FROM tab2 AS cor0
----
-115
-73
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 48 col1 FROM tab0 AS cor0
----
48

query I rowsort
SELECT + - ( - col1 ) + - col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - + 36 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

query I rowsort
SELECT ALL - - ( - col0 ) - + col2 * 66 FROM tab0 AS cor0
----
-101
-2202
-5501

query I rowsort
SELECT + ( 39 ) FROM tab1 AS cor0
----
39
39
39

query I rowsort
SELECT DISTINCT 66 * 67 + cor0.col2 AS col0 FROM tab0 AS cor0
----
4423
4455
4504

query I rowsort
SELECT + + 50 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT - cor0.col1 * cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3a68b2420e96feae5e3ca1f4dd4282df

query I rowsort
SELECT - + col0 + col1 * - ( col2 + col2 ) * - ( - col1 ) AS col1 FROM tab1 AS cor0
----
-11464
-32528
-73011

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2682
SELECT + ( - col2 ) + CAST( NULL AS SIGNED ) * ( col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2682
SELECT + ( - col2 ) + CAST ( NULL AS INTEGER ) * ( col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2683
SELECT + ( col0 ) * cor0.col1 DIV + col2 FROM tab1 AS cor0
----
1
10
11

skipif mysql # not compatible
query I rowsort label-2683
SELECT + ( col0 ) * cor0.col1 / + col2 FROM tab1 AS cor0
----
1
10
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col0 + - col1 col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col1 * col1 + - col0 * 62 FROM tab2 AS cor0
----
-1395
-5187
-8317

onlyif mysql # use DIV operator for integer division
query I rowsort label-2686
SELECT ALL - col2 + - tab0.col1 * col2 DIV + col0 FROM tab0
----
-151
-165
-3

skipif mysql # not compatible
query I rowsort label-2686
SELECT ALL - col2 + - tab0.col1 * col2 / + col0 FROM tab0
----
-151
-165
-3

query I rowsort
SELECT col2 * + col1 - col0 AS col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL 31 + tab1.col1 FROM tab1
----
41
44
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2689
SELECT ALL ( + ( cor0.col2 ) ) + 64 DIV - col2 AS col0 FROM tab0 AS cor0
----
-63
32
82

skipif mysql # not compatible
query I rowsort label-2689
SELECT ALL ( + ( cor0.col2 ) ) + 64 / - col2 AS col0 FROM tab0 AS cor0
----
-63
32
82

query I rowsort
SELECT ALL - 66 * col2 FROM tab1 AS cor0
----
-3564
-3762
-6336

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2691
SELECT + CAST( + col0 AS SIGNED ) col2 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2691
SELECT + CAST ( + col0 AS INTEGER ) col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - + ( col2 ) + - col1 + + col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + + cor0.col2 * + col0 + - col1 * - col2 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT ALL + ( + cor0.col0 ) AS col1 FROM tab0 cor0
----
24
35
89

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab1 cor1, tab1 AS cor2
----
3645 values hashing to 028fd38910121a0fa7c5b9a24c207cf0

query I rowsort
SELECT DISTINCT + col2 + - col2 * cor0.col1 * col1 FROM tab0 AS cor0
----
-244035
-678960
-9408

query I rowsort
SELECT col2 * - col1 + col2 AS col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL - 52 * + col0 + col0 FROM tab1 AS cor0
----
-153
-3264
-4080

query I rowsort
SELECT col2 + + col0 * - col1 * + ( - cor0.col0 ) FROM tab1 AS cor0
----
288
41017
83296

query I rowsort
SELECT - + 17 * + col0 FROM tab1 AS cor0
----
-1088
-1360
-51

query I rowsort
SELECT DISTINCT + 66 + col1 AS col0 FROM tab2 AS cor0
----
125
83
97

query I rowsort
SELECT ALL cor0.col1 * col2 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( + col1 ) col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col1 * 95 AS col2 FROM tab2 AS cor0
----
1615
2945
5605

query I rowsort
SELECT cor0.col0 + + ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - - ( col2 ) * + col2 AS col0 FROM tab2 cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col1 AS REAL ) * + col0 AS col1 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2708
SELECT DISTINCT - + col2 + 64 DIV col2 col0 FROM tab1 AS cor0
----
-53
-56
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2708
SELECT DISTINCT - + col2 + 64 / col2 col0 FROM tab1 AS cor0
----
-53
-56
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2709
SELECT DISTINCT - CAST( + col2 AS SIGNED ) + col2 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2709
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) + col2 AS col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2710
SELECT ALL - CAST( + col0 AS SIGNED ) DIV + col2 + ( - col2 ) * col2 AS col0 FROM tab0 AS cor0
----
-1089
-36
-6725

skipif mysql # not compatible
query I rowsort label-2710
SELECT ALL - CAST ( + col0 AS INTEGER ) / + col2 + ( - col2 ) * col2 AS col0 FROM tab0 AS cor0
----
-1089
-36
-6725

query I rowsort
SELECT ALL - + ( col2 ) + col1 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 * col2 col1 FROM tab0 AS cor0
----
2132
26
858

query I rowsort
SELECT DISTINCT + - cor0.col2 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - + 41 AS col2 FROM tab0 AS cor0
----
-41

query I rowsort
SELECT - 58 * + col1 + col2 * 66 AS col0 FROM tab0 AS cor0
----
-2810
-5560
134

query I rowsort
SELECT + + col0 + cor0.col0 * col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + col1 + - 23 FROM tab0 AS cor0
----
63
68
74

query I rowsort
SELECT 48 + col1 AS col0 FROM tab0 AS cor0
----
134
139
145

onlyif mysql # use DIV operator for integer division
query I rowsort label-2719
SELECT ALL - + col1 + cor0.col1 DIV + cor0.col2 + - col1 FROM tab0 AS cor0
----
-170
-181
-97

skipif mysql # not compatible
query I rowsort label-2719
SELECT ALL - + col1 + cor0.col1 / + cor0.col2 + - col1 FROM tab0 AS cor0
----
-170
-181
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + 67 col2 FROM tab0
----
153
158
164

query I rowsort
SELECT ALL + - ( ( + col0 ) ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2722
SELECT - CAST( 91 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-91
-91
-91

skipif mysql # not compatible
query I rowsort label-2722
SELECT - CAST ( 91 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-91
-91
-91

query I rowsort
SELECT 91 * - 93 - - cor0.col1 * 44 FROM tab1 AS cor0
----
-7319
-7891
-8023

query I rowsort
SELECT - - ( col0 ) * + col1 + col1 * col2 FROM tab0 AS cor0
----
15561
3492
4902

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2725
SELECT ( - col2 ) * col2 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2725
SELECT ( - col2 ) * col2 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 17 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT DISTINCT ( col0 ) + + col1 * ( col0 ) FROM tab2
----
1422
224
4680

query I rowsort
SELECT 8 * col0 + + 63 FROM tab1 AS cor0
----
575
703
87

query I rowsort
SELECT ALL + 69 * - col2 FROM tab2
----
-1794
-1863
-2622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col1 ) col2 FROM tab2
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2731
SELECT col2 DIV - ( - cor0.col0 ) FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-2731
SELECT col2 / - ( - cor0.col0 ) FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT DISTINCT - - cor0.col2 * ( - 48 ) + + cor0.col1 AS col2 FROM tab2 cor0
----
-1189
-1265
-1807

query I rowsort
SELECT ALL col2 + - ( col2 ) * - cor0.col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-2734
SELECT + col0 DIV + 58 AS col2 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2734
SELECT + col0 / + 58 AS col2 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT - 75 FROM tab0, tab0 cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT ALL - 1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT - col2 + col1 + - col1 AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT 65 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT ALL + col0 + - ( - tab2.col1 ) + tab2.col1 * + tab2.col0 AS col2 FROM tab2
----
1439
255
4739

query I rowsort
SELECT ALL - + col2 * + 48 AS col0 FROM tab2 AS cor0
----
-1248
-1296
-1824

query I rowsort
SELECT + col0 + ( - cor0.col1 ) * - col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + col0 + 70 + - 58 * col0 AS col2 FROM tab2 AS cor0
----
-329
-4376
-4433

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * cor0.col2 col2 FROM tab0 AS cor0
----
11
363
902

onlyif mysql # use DIV operator for integer division
query I rowsort label-2744
SELECT ALL - tab1.col2 DIV - 76 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2744
SELECT ALL - tab1.col2 / - 76 FROM tab1
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2745
SELECT DISTINCT + 91 DIV + col1 AS col2 FROM tab2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-2745
SELECT DISTINCT + 91 / + col1 AS col2 FROM tab2
----
1
2
5

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

query I rowsort
SELECT - 89 * - col0 FROM tab1 AS cor0
----
267
5696
7120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT - - col0 * + 49 + + col1 FROM tab0 AS cor0
----
1262
1812
4452

query I rowsort
SELECT DISTINCT - col2 * 33 + - cor0.col0 FROM tab0 AS cor0
----
-1113
-2795
-68

query I rowsort
SELECT + col2 + + ( 22 ) AS col0 FROM tab1 cor0
----
118
76
79

query I rowsort
SELECT - col1 - col0 * - col2 * + col1 FROM tab2 AS cor0
----
119593
51017
5828

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2753
SELECT DISTINCT + + col2 * + CAST( NULL AS SIGNED ) + + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2753
SELECT DISTINCT + + col2 * + CAST ( NULL AS INTEGER ) + + col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2754
SELECT - col1 + - CAST( NULL AS DECIMAL ) * + cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2754
SELECT - col1 + - CAST ( NULL AS REAL ) * + cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2755
SELECT CAST( NULL AS DECIMAL ) + 58 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2755
SELECT CAST ( NULL AS REAL ) + 58 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col0 + 59 + + col1 FROM tab0 AS cor0
----
169
191
239

query I rowsort
SELECT ALL col2 * + ( - col2 * col0 ) FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT - 92 * + 98 * - col1 FROM tab0
----
775376
820456
874552

onlyif mysql # use DIV operator for integer division
query I rowsort label-2759
SELECT ALL + ( + 93 ) DIV + col2 AS col0 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2759
SELECT ALL + ( + 93 ) / + col2 AS col0 FROM tab1
----
0
1
1

query I rowsort
SELECT - 99 * - 81 AS col2 FROM tab0 AS cor0
----
8019
8019
8019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT - col0 + 78 + - col1 * - col0 * + col2 AS col1 FROM tab0 AS cor0
----
3438
664107
68166

query I rowsort
SELECT + 34 + - 12 * + col2 FROM tab1 AS cor0
----
-1118
-614
-650

query I rowsort
SELECT col2 * + col1 + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - col0 * col2 + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1260
-1368
-15219

onlyif mysql # use DIV operator for integer division
query I rowsort label-2766
SELECT - cor0.col1 + col1 DIV col0 AS col0 FROM tab0 AS cor0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-2766
SELECT - cor0.col1 + col1 / col0 AS col0 FROM tab0 AS cor0
----
-83
-90
-95

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 WHERE NULL > + col0
----

query I rowsort
SELECT ALL col1 * + col1 + + col2 + - col1 FROM tab0 AS cor0
----
7343
8272
9313

onlyif mysql # use DIV operator for integer division
query I rowsort label-2769
SELECT + col0 DIV - cor0.col0 + - cor0.col2 + + col2 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2769
SELECT + col0 / - cor0.col0 + - cor0.col2 + + col2 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT + tab0.col2 * + tab0.col2 * - col0 AS col1 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 AS col0 FROM tab2 cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2772
SELECT - cor0.col2 DIV col1 + - col0 FROM tab2 AS cor0
----
-7
-78
-81

skipif mysql # not compatible
query I rowsort label-2772
SELECT - cor0.col2 / col1 + - col0 FROM tab2 AS cor0
----
-7
-78
-81

query I rowsort
SELECT DISTINCT - col0 + + cor0.col0 * + col2 * col1 FROM tab0 AS cor0
----
3360
664029
68088

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 - + col2 * col2 col0 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT - col1 * col0 * - col1 AS col2 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL col0 - col0 * + col0 * + col1 AS col2 FROM tab2
----
-106018
-1512
-358878

query I rowsort
SELECT col0 + - col0 + + ( col2 ) AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT - + col2 + + 71 FROM tab0 AS cor0
----
-11
38
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 40 col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 01aad4539198a6509248e086869f90a6

query I rowsort
SELECT ALL - + col2 + - ( + col0 + col1 ) * col1 AS col2 FROM tab1 AS cor0
----
-1305
-797
-808

onlyif mysql # use DIV operator for integer division
query I rowsort label-2781
SELECT ALL 92 DIV col1 + col1 FROM tab0
----
87
92
97

skipif mysql # not compatible
query I rowsort label-2781
SELECT ALL 92 / col1 + col1 FROM tab0
----
87
92
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2782
SELECT DISTINCT col1 DIV + 41 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-2782
SELECT DISTINCT col1 / + 41 AS col0 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * ( - col0 ) col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT col1 * 63 AS col1 FROM tab2
----
1071
1953
3717

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-2786
SELECT col1 DIV ( - ( col1 ) ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2786
SELECT col1 / ( - ( col1 ) ) FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2787
SELECT ALL + - col1 DIV + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2787
SELECT ALL + - col1 / + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( col1 ) - - col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL ( - 62 ) + cor0.col1 * 21 AS col2 FROM tab2 AS cor0
----
1177
295
589

query I rowsort
SELECT 16 * col0 * col0 - col0 AS col2 FROM tab1 AS cor0
----
102320
141
65472

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2791
SELECT - col2 / + cor0.col2 + + CAST( NULL AS SIGNED ) / - cor0.col1 - + col1 * ( - 59 + cor0.col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2791
SELECT - col2 / + cor0.col2 + + CAST ( NULL AS INTEGER ) / - cor0.col1 - + col1 * ( - 59 + cor0.col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col1 + ( - col1 * + col1 ) + 37 col0 FROM tab1 AS cor0
----
-561
577
908

query I rowsort
SELECT 15 + col2 - 25 AS col0 FROM tab1 AS cor0
----
44
47
86

query I rowsort
SELECT ALL - + 10 * col2 AS col2 FROM tab0 AS cor0
----
-10
-330
-820

query I rowsort
SELECT DISTINCT - - 71 + cor0.col0 FROM tab0 cor0
----
106
160
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2796
SELECT 85 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2796
SELECT 85 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 46 * + col1 + ( ( col2 ) ) - + col2 * col0 * col0 AS col0 FROM tab1 AS cor0
----
-1628
-233875
-614902

query I rowsort
SELECT DISTINCT - - cor0.col0 * + col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + - cor0.col1 + - col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2800
SELECT col1 * col2 DIV col0 + - col2 AS col2 FROM tab2
----
-30
-7
92

skipif mysql # not compatible
query I rowsort label-2800
SELECT col1 * col2 / col0 + - col2 AS col2 FROM tab2
----
-30
-7
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * cor0.col2 + col0 * col2 col2 FROM tab1 cor0
----
1566
4218
8928

onlyif mysql # use DIV operator for integer division
query I rowsort label-2802
SELECT DISTINCT - + col2 DIV col2 + col0 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-2802
SELECT DISTINCT - + col2 / col2 + col0 FROM tab0 AS cor0
----
23
34
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2803
SELECT - col1 * - CAST( NULL AS SIGNED ) + + 60 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2803
SELECT - col1 * - CAST ( NULL AS INTEGER ) + + 60 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + col0 * - col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT tab2.col0 * cor0.col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 7ccaf24f2c8d9f29787f37bd29e709d9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2806
SELECT tab0.col0 DIV + col0 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2806
SELECT tab0.col0 / + col0 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT col0 * - col1 + - tab1.col1 * - col1 AS col0 FROM tab1
----
-540
-871
598

query I rowsort
SELECT ALL ( col1 ) + col1 * col0 * tab2.col1 AS col1 FROM tab2
----
22848
271577
6758

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2809
SELECT DISTINCT col2 * + col0 + CAST( 61 AS SIGNED ) FROM tab0
----
7359
853
96

skipif mysql # not compatible
query I rowsort label-2809
SELECT DISTINCT col2 * + col0 + CAST ( 61 AS INTEGER ) FROM tab0
----
7359
853
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2810
SELECT - - 2 + + col2 DIV col0 FROM tab1 AS cor0
----
2
20
3

skipif mysql # not compatible
query I rowsort label-2810
SELECT - - 2 + + col2 / col0 FROM tab1 AS cor0
----
2
20
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2811
SELECT ALL col0 * - ( col1 ) + 97 + + 2 DIV col0 AS col0 FROM tab2 AS cor0
----
-120
-1246
-4505

skipif mysql # not compatible
query I rowsort label-2811
SELECT ALL col0 * - ( col1 ) + 97 + + 2 / col0 AS col0 FROM tab2 AS cor0
----
-120
-1246
-4505

query I rowsort
SELECT ALL - col0 + - 22 FROM tab1 AS cor0
----
-102
-25
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2813
SELECT ALL + + CAST( ( - col0 ) AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2813
SELECT ALL + + CAST ( ( - col0 ) AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2814
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2814
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL + col1 * - 97 * col1 AS col1 FROM tab2 AS cor0
----
-28033
-337657
-93217

query I rowsort
SELECT DISTINCT tab0.col2 * + 58 + col0 AS col2 FROM tab0
----
1938
4845
93

query I rowsort
SELECT ALL - - 28 * col1 + - col2 FROM tab0 AS cor0
----
2375
2466
2715

query I rowsort
SELECT ALL - - ( 92 ) AS col1 FROM tab0 AS cor0
----
92
92
92

query I rowsort
SELECT + - col2 * col1 * - cor0.col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + ( + cor0.col2 ) + col0 * col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT 99 + col2 * + col2 FROM tab0 AS cor0
----
100
1188
6823

onlyif mysql # use DIV operator for integer division
query I rowsort label-2822
SELECT ALL + col1 + + col2 DIV - cor0.col1 AS col1 FROM tab2 AS cor0
----
15
31
59

skipif mysql # not compatible
query I rowsort label-2822
SELECT ALL + col1 + + col2 / - cor0.col1 AS col1 FROM tab2 AS cor0
----
15
31
59

query I rowsort
SELECT - + 64 + 27 FROM tab0 AS cor0
----
-37
-37
-37

query I rowsort
SELECT cor2.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT DISTINCT - + 58 + + col2 FROM tab2 AS cor0
----
-20
-31
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-2826
SELECT ALL - col2 DIV - cor0.col0 - - 80 FROM tab0 AS cor0
----
80
80
81

skipif mysql # not compatible
query I rowsort label-2826
SELECT ALL - col2 / - cor0.col0 - - 80 FROM tab0 AS cor0
----
80
80
81

query I rowsort
SELECT DISTINCT + 13 + - col2 * + col2 FROM tab1 AS cor0
----
-2903
-3236
-9203

query I rowsort
SELECT DISTINCT - + 24 + col1 AS col0 FROM tab1 AS cor0
----
-11
-14
2

query I rowsort
SELECT ALL + - 85 * - col2 AS col1 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT ALL 30 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT + - 11 + col0 * 28 AS col2 FROM tab1 AS cor0
----
1781
2229
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - cor0.col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 54 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT tab0.col0 * - tab0.col2 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 18f45a7edd86e3eccc832dcdb6123662

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2835
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 23 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2835
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 23 AS col1 FROM tab0
----
NULL

query I rowsort
SELECT - col2 + col2 + + ( + col0 ) * ( + col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col2 * + col0 - - col0 * + col0 FROM tab0 AS cor0
----
-216
1190
623

query I rowsort
SELECT - col1 + + 58 FROM tab1 AS cor0
----
32
45
48

query I rowsort
SELECT col2 * + ( + col1 + + col1 * + col1 ) AS col0 FROM tab1 AS cor0
----
17472
37908
6270

query I rowsort
SELECT col1 * col1 + col2 + + col1 FROM tab0
----
7515
8454
9507

query I rowsort
SELECT - + col2 + col1 * 13 * - col2 AS col0 FROM tab1 AS cor0
----
-16320
-18306
-7467

query I rowsort
SELECT + col0 * - ( + ( col2 ) ) + + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL - + col0 + + col0 * + col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT 0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) * - col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col1 * col0 * cor0.col2 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - col2 - 57 * - col2 AS col0 FROM tab2
----
1456
1512
2128

query I rowsort
SELECT ALL + col0 - - 71 FROM tab1
----
135
151
74

query I rowsort
SELECT ALL col0 * - 67 + col0 - col0 FROM tab1
----
-201
-4288
-5360

query I rowsort
SELECT ALL - col2 * + 80 * - col0 AS col0 FROM tab2
----
15120
162240
240160

query I rowsort
SELECT - col0 - ( 5 ) AS col0 FROM tab0
----
-29
-40
-94

query I rowsort
SELECT + col2 * + 38 + col2 + - col2 * 7 FROM tab2
----
1216
832
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-2853
SELECT - col2 DIV + 12 AS col2 FROM tab0
----
-2
-6
0

skipif mysql # not compatible
query I rowsort label-2853
SELECT - col2 / + 12 AS col2 FROM tab0
----
-2
-6
0

query I rowsort
SELECT + ( col2 ) + tab0.col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL 88 + + col0 * col1 FROM tab0 AS cor0
----
2152
3483
8187

query I rowsort
SELECT DISTINCT + - ( - col0 ) * cor0.col1 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ( col1 ) + + col2 * + cor0.col2 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2858
SELECT ALL + - col0 DIV 65 FROM tab2 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2858
SELECT ALL + - col0 / 65 FROM tab2 cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2859
SELECT col2 DIV 29 + col1 AS col0 FROM tab1 AS cor0
----
11
16
27

skipif mysql # not compatible
query I rowsort label-2859
SELECT col2 / 29 + col1 AS col0 FROM tab1 AS cor0
----
11
16
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-2860
SELECT 35 DIV col1 AS col1 FROM tab1 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2860
SELECT 35 / col1 AS col1 FROM tab1 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort
SELECT + col1 + - CAST ( - 10 AS REAL ) FROM tab2 AS cor0
----
27
41
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-2862
SELECT - col1 DIV - col1 col1 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2862
SELECT - col1 / - col1 col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2863
SELECT col0 + + col0 DIV - col0 FROM tab0 cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-2863
SELECT col0 + + col0 / - col0 FROM tab0 cor0
----
23
34
88

query I rowsort
SELECT - cor0.col0 + cor0.col0 * + cor0.col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT - 55 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT col2 + + ( + cor0.col2 ) * cor0.col1 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL + 93 * - col2 + col0 AS col0 FROM tab0 AS cor0
----
-3045
-58
-7537

query I rowsort
SELECT - 22 * + col2 + + 60 * 10 AS col2 FROM tab0 AS cor0
----
-1204
-126
578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * cor0.col0 + + col2 col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL 33 + - tab2.col1 AS col2 FROM tab2
----
-26
16
2

query I rowsort
SELECT ALL + - 49 FROM tab1 cor0
----
-49
-49
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 - col2 col1 FROM tab0 AS cor0
----
-57
-8
24

query I rowsort
SELECT DISTINCT + col2 + col0 + col1 * - col0 FROM tab2 AS cor0
----
-1226
-183
-4498

onlyif mysql # use DIV operator for integer division
query I rowsort label-2874
SELECT ALL + - col1 - col1 DIV + ( col0 ) FROM tab0 AS cor0
----
-89
-92
-99

skipif mysql # not compatible
query I rowsort label-2874
SELECT ALL + - col1 - col1 / + ( col0 ) FROM tab0 AS cor0
----
-89
-92
-99

query I rowsort
SELECT - col2 * - col2 + tab1.col2 AS col2 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT DISTINCT col1 + + cor0.col0 * col0 AS col2 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT ALL - 2 + col0 * + col0 AS col2 FROM tab0 AS cor0
----
1223
574
7919

query I rowsort
SELECT col2 + + col0 + col0 FROM tab1
----
185
256
60

query I rowsort
SELECT - col1 * - col2 + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT - - col0 * + col0 + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL 92 + col2 AS col2 FROM tab0
----
125
174
93

query I rowsort
SELECT tab2.col2 + col0 * - 29 AS col1 FROM tab2
----
-176
-2236
-2253

query I rowsort
SELECT ALL - col2 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL cor1.col2 * + ( 78 ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c76ec430055dd44467be5334c4e32bb3

query I rowsort
SELECT DISTINCT - 12 + col1 FROM tab0 AS cor0
----
74
79
85

query I rowsort
SELECT DISTINCT + - ( + 0 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + col2 + cor0.col1 * + col0 AS col0 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 9 * + col2 col0 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT col0 + 89 * + 46 AS col0 FROM tab2
----
4101
4172
4173

query I rowsort
SELECT ALL tab0.col2 * + tab0.col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 0 + - col0 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2892
SELECT ALL CAST( NULL AS SIGNED ) * 77 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2892
SELECT ALL CAST ( NULL AS INTEGER ) * 77 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 - + col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT 84 * - col0 AS col2 FROM tab0 AS cor0
----
-2016
-2940
-7476

query I rowsort
SELECT DISTINCT ( col1 ) * - cor0.col0 - - ( + 87 ) AS col1 FROM tab2 AS cor0
----
-1256
-130
-4515

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2896
SELECT ALL CAST( + col1 AS SIGNED ) * - col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-2896
SELECT ALL CAST ( + col1 AS INTEGER ) * - col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 ) col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT - + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ALL - cor0.col0 + + 17 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to a09e464ca18382f30ae1be50f076bc12

query I rowsort
SELECT - ( + col1 ) * col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - 84 + - col1 FROM tab0
----
-170
-175
-181

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 972d282d6d92f451c90dc8ca51a18f3e

query I rowsort
SELECT + 8 + cor0.col1 FROM tab2 AS cor0
----
25
39
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2904
SELECT - CAST( + 22 AS SIGNED ) col0 FROM tab1, tab1 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2904
SELECT - CAST ( + 22 AS INTEGER ) col0 FROM tab1, tab1 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

query I rowsort
SELECT + tab2.col1 * + 52 + - col2 AS col1 FROM tab2
----
1585
3042
846

onlyif mysql # use DIV operator for integer division
query I rowsort label-2906
SELECT + col2 + - tab2.col1 DIV col0 FROM tab2
----
23
26
38

skipif mysql # not compatible
query I rowsort label-2906
SELECT + col2 + - tab2.col1 / col0 FROM tab2
----
23
26
38

query I rowsort
SELECT DISTINCT + col0 + + 38 FROM tab1 AS cor0
----
102
118
41

query I rowsort
SELECT + 97 + + ( cor0.col2 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 14561337eff8bca3dfc6285f01b9755b

query I rowsort
SELECT + col0 + cor0.col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT DISTINCT + 81 + - col2 AS col0 FROM tab1 cor0
----
-15
24
27

query I rowsort
SELECT - 19 + col2 AS col1 FROM tab2 AS cor0
----
19
7
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2912
SELECT ALL - - CAST( NULL AS SIGNED ) * - 55 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2912
SELECT ALL - - CAST ( NULL AS INTEGER ) * - 55 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( 31 ) AS col1 FROM tab1 AS cor0
----
31
31
31

query I rowsort
SELECT DISTINCT + + ( col2 ) * cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + 74 * 95 FROM tab1 AS cor0
----
7030
7030
7030

query I rowsort
SELECT DISTINCT - + cor0.col2 + + 36 * + col1 AS col1 FROM tab2 AS cor0
----
1089
2098
574

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 30 * + 35 col1 FROM tab2 cor0
----
-1050
-1050
-1050

query I rowsort
SELECT 31 + 52 FROM tab0, tab2 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT DISTINCT col0 * col2 + - ( + col2 ) * - 42 FROM tab0
----
10742
2178
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2920
SELECT DISTINCT col1 * tab0.col0 + - 39 / col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2920
SELECT DISTINCT col1 * tab0.col0 + - 39 / col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL

query I rowsort
SELECT + - 96 * col1 AS col1 FROM tab2 AS cor0
----
-1632
-2976
-5664

onlyif mysql # use DIV operator for integer division
query I rowsort label-2922
SELECT 64 DIV col1 FROM tab1
----
2
4
6

skipif mysql # not compatible
query I rowsort label-2922
SELECT 64 / col1 FROM tab1
----
2
4
6

query I rowsort
SELECT 24 * col1 AS col0 FROM tab0
----
2064
2184
2328

query I rowsort
SELECT col1 * tab1.col0 * - col2 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT + 5 + col0 AS col1 FROM tab2 AS cor0
----
12
83
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-2926
SELECT ALL + col1 * - col1 + + col0 DIV col0 - + col0 FROM tab0
----
-7419
-8369
-9443

skipif mysql # not compatible
query I rowsort label-2926
SELECT ALL + col1 * - col1 + + col0 / col0 - + col0 FROM tab0
----
-7419
-8369
-9443

query I rowsort
SELECT col0 * 62 + - col1 + - col0 * - col0 FROM tab1 AS cor0
----
11347
169
8054

query I rowsort
SELECT - col0 * - 13 FROM tab2 AS cor0
----
1014
1027
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2929
SELECT col0 * 14 + 2 + - col0 DIV + 28 col0 FROM tab2 AS cor0
----
100
1092
1106

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2929
SELECT col0 * 14 + 2 + - col0 / + 28 col0 FROM tab2 AS cor0
----
100
1092
1106

query I rowsort
SELECT - + col0 + ( - 20 ) AS col0 FROM tab1 AS cor0
----
-100
-23
-84

query I rowsort
SELECT + col2 * + tab2.col2 * col1 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT + col2 + 55 * - col1 FROM tab0 AS cor0
----
-4697
-4923
-5334

query I rowsort
SELECT col0 * + ( + col2 * col0 + 97 ) AS col0 FROM tab1 AS cor0
----
239680
622160
777

onlyif mysql # use DIV operator for integer division
query I rowsort label-2934
SELECT col2 DIV - 69 - col0 FROM tab1 AS cor0
----
-3
-64
-81

skipif mysql # not compatible
query I rowsort label-2934
SELECT col2 / - 69 - col0 FROM tab1 AS cor0
----
-3
-64
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - 64 col0 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT + col1 + col0 * col2 * + ( + col0 * col1 ) FROM tab0 AS cor0
----
118922
1634774
59106593

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2937
SELECT CAST( col1 AS SIGNED ) * - col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-2937
SELECT CAST ( col1 AS INTEGER ) * - col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col2 * - col0 + + col2 * col2 FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT ALL col2 * + col0 + col0 * 22 - col1 AS col0 FROM tab2 cor0
----
312
3685
4723

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2940
SELECT CAST( col1 AS SIGNED ) * + col1 col2 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2940
SELECT CAST ( col1 AS INTEGER ) * + col1 col2 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-2941
SELECT + cor0.col2 DIV + col1 + 97 FROM tab2 AS cor0
----
97
97
99

skipif mysql # not compatible
query I rowsort label-2941
SELECT + cor0.col2 / + col1 + 97 FROM tab2 AS cor0
----
97
97
99

query I rowsort
SELECT DISTINCT + ( 73 ) AS col1 FROM tab2
----
73

query I rowsort
SELECT DISTINCT - 22 + 55 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
33

query I rowsort
SELECT 12 * + col1 AS col1 FROM tab0 cor0
----
1032
1092
1164

query I rowsort
SELECT ALL 48 * col0 AS col1 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT + - 37 AS col0 FROM tab1 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL + - 39 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT DISTINCT - col2 * - col0 + ( + col0 + col2 ) * col0 FROM tab2 AS cor0
----
10140
12245
427

query I rowsort
SELECT ALL + 97 + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-192
-3384
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL 94 * + col1 AS col1 FROM tab2 cor0
----
1598
2914
5546

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab1 AS cor0 WHERE ( NULL ) BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2953
SELECT col2 DIV tab0.col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2953
SELECT col2 / tab0.col1 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2954
SELECT DISTINCT col0 * col2 DIV col1 + + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-156
-3284
-7090

skipif mysql # not compatible
query I rowsort label-2954
SELECT DISTINCT col0 * col2 / col1 + + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-156
-3284
-7090

query I rowsort
SELECT 36 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT - col2 * - tab0.col2 AS col2 FROM tab0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2957
SELECT + ( col2 ) + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2957
SELECT + ( col2 ) + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 63 - + col1 FROM tab1
----
37
50
53

query I rowsort
SELECT DISTINCT + - col0 * 85 AS col0 FROM tab2 AS cor0
----
-595
-6630
-6715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 79 ) col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

onlyif mysql # use DIV operator for integer division
query I rowsort label-2961
SELECT - tab2.col0 + col1 DIV - col0 AS col2 FROM tab2
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-2961
SELECT - tab2.col0 + col1 / - col0 AS col2 FROM tab2
----
-11
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - tab0.col0 ) col1 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2963
SELECT DISTINCT - CAST( + col2 AS SIGNED ) * + col1 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-2963
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) * + col1 FROM tab0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2964
SELECT CAST( NULL AS SIGNED ) + col1 + col2 * cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2964
SELECT CAST ( NULL AS INTEGER ) + col1 + col2 * cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor2.col1 + + 37 AS col2 FROM tab2, tab0 AS cor0, tab0 cor1, tab1 cor2
----
81 values hashing to 28409514907581224f203c46c89228f8

query I rowsort
SELECT - ( + col1 ) + col1 * ( - col1 * col1 + cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-203904
-28985
-4284

query I rowsort
SELECT - + col1 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT - col1 + ( col2 ) AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - col1 + - 61 + col2 AS col2 FROM tab0 AS cor0
----
-114
-157
-70

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col0 * + CAST ( col1 AS REAL ) AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 * col2 + - 34 * - col2 FROM tab0 AS cor0
----
10086
1914
69

query I rowsort
SELECT DISTINCT + col2 * 5 AS col0 FROM tab2 cor0
----
130
135
190

query I rowsort
SELECT + - col1 + 26 * col1 FROM tab1 cor0
----
250
325
650

query I rowsort
SELECT DISTINCT - - cor0.col2 + ( - 99 ) AS col1 FROM tab2 cor0
----
-61
-72
-73

query I rowsort
SELECT ALL + + col0 * 2 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - col0 * col0 + 33 AS col1 FROM tab1 AS cor0
----
-4063
-6367
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2977
SELECT ALL + + CAST( NULL AS DECIMAL ) * ( + col0 ) + col2 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-2977
SELECT ALL + + CAST ( NULL AS REAL ) * ( + col0 ) + col2 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col2 + - cor0.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to b99df4a6c8c75ad7d5da47a123cc190f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2979
SELECT ALL - cor0.col2 + CAST( NULL AS DECIMAL ) col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2979
SELECT ALL - cor0.col2 + CAST ( NULL AS REAL ) col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - + 2 * 69 + - col0 AS col1 FROM tab1 AS cor0
----
-141
-202
-218

query I rowsort
SELECT DISTINCT - cor0.col0 * + col2 + col1 + cor0.col2 * 73 AS col2 FROM tab2 AS cor0
----
-211
-71
1813

query I rowsort
SELECT DISTINCT - ( - 29 ) FROM tab0 AS cor0
----
29

query I rowsort
SELECT ( 13 ) FROM tab1 AS cor0
----
13
13
13

query I rowsort
SELECT + 68 * + col2 + - col0 AS col0 FROM tab1 AS cor0
----
3669
3812
6448

query I rowsort
SELECT ALL - - 70 * cor0.col1 + col1 AS col0 FROM tab0 AS cor0
----
6106
6461
6887

query I rowsort
SELECT ALL + col0 * + col1 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - col0 * - 36 FROM tab0
----
1260
3204
864

query I rowsort
SELECT DISTINCT col2 + + cor0.col0 - - cor0.col1 AS col1 FROM tab0 AS cor0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-2989
SELECT - - 52 + col2 DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
52
52
54

skipif mysql # not compatible
query I rowsort label-2989
SELECT - - 52 + col2 / cor0.col1 AS col1 FROM tab2 AS cor0
----
52
52
54

query I rowsort
SELECT 23 * col1 + col0 * - col2 FROM tab1
----
-3418
-7381
436

onlyif mysql # use DIV operator for integer division
query I rowsort label-2991
SELECT col0 - + col1 DIV - col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-2991
SELECT col0 - + col1 / - col0 FROM tab0
----
27
37
90

query I rowsort
SELECT + col1 + ( - 20 ) FROM tab2 AS cor0
----
-3
11
39

query I rowsort
SELECT ALL - - col2 * - col2 + 73 * col2 * - col1 FROM tab0 AS cor0
----
-208263
-551450
-7082

query I rowsort
SELECT DISTINCT + - col1 * col2 - 43 FROM tab1 AS cor0
----
-1291
-1447
-613

query I rowsort
SELECT - 98 + + col1 * + tab0.col0 AS col0 FROM tab0
----
1966
3297
8001

query I rowsort
SELECT 69 + col1 FROM tab2
----
100
128
86

query I rowsort
SELECT - col0 + ( - col2 ) * col2 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT ALL - col0 * col1 + 39 AS col2 FROM tab2
----
-1304
-178
-4563

query I rowsort
SELECT + col0 + - col0 * col2 AS col1 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT ALL - col1 * - 59 * + col0 + - col0 * + 19 FROM tab2 AS cor0
----
12670
270036
77736

query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 - - 81 AS col2 FROM tab0 AS cor0
----
115
72
88

query I rowsort
SELECT DISTINCT + col0 + ( cor0.col1 ) AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - + cor0.col1 * - col1 * col2 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
-86
-91
-97

query I rowsort
SELECT + + cor0.col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 21 + 93 col0 FROM tab2 AS cor0
----
639
660
891

query I rowsort
SELECT + 41 * + col2 FROM tab1
----
2214
2337
3936

query I rowsort
SELECT 44 * col2 AS col2 FROM tab0
----
1452
3608
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-3009
SELECT + col1 + - cor0.col1 DIV col1 FROM tab1 cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-3009
SELECT + col1 + - cor0.col1 / col1 FROM tab1 cor0
----
12
25
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3010
SELECT ALL - CAST( NULL AS SIGNED ) + col0 * + tab1.col1 * + tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3010
SELECT ALL - CAST ( NULL AS INTEGER ) + col0 * + tab1.col1 * + tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - 46 * 35 FROM tab1
----
-1610
-1610
-1610

query I rowsort
SELECT ALL - + cor0.col1 * 18 * col1 + + col0 + - cor0.col0 FROM tab1 AS cor0
----
-12168
-1800
-3042

query I rowsort
SELECT DISTINCT + ( col1 ) + col1 * - col1 + + col0 * - col1 FROM tab0
----
-12707
-16289
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3014
SELECT - CAST( NULL AS SIGNED ) / tab2.col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3014
SELECT - CAST ( NULL AS INTEGER ) / tab2.col1 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 * + col0 + - col0 AS col2 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT ( col1 ) + - 3 FROM tab0 AS cor0
----
83
88
94

query I rowsort
SELECT + col1 * - col1 + 1 AS col0 FROM tab2 AS cor0
----
-288
-3480
-960

query I rowsort
SELECT + 98 + col2 AS col0 FROM tab2 AS cor0
----
124
125
136

query I rowsort
SELECT + + 21 * col2 FROM tab0 AS cor0
----
1722
21
693

query I rowsort
SELECT DISTINCT + 71 AS col0 FROM tab1 AS cor0
----
71

query I rowsort
SELECT ALL + 73 * + col2 FROM tab2 AS cor0
----
1898
1971
2774

query I rowsort
SELECT + + col2 * - 45 AS col2 FROM tab2 cor0
----
-1170
-1215
-1710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( + 25 ) * col0 col0 FROM tab0 AS cor0
----
-2225
-600
-875

onlyif mysql # use DIV operator for integer division
query I rowsort label-3024
SELECT DISTINCT - col0 * col0 DIV + col1 AS col2 FROM tab1 AS cor0
----
-409
-492
0

skipif mysql # not compatible
query I rowsort label-3024
SELECT DISTINCT - col0 * col0 / + col1 AS col2 FROM tab1 AS cor0
----
-409
-492
0

query I rowsort
SELECT + 3 * + cor0.col2 FROM tab0 AS cor0
----
246
3
99

query I rowsort
SELECT ALL col1 + col2 * cor0.col2 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT + col1 * col1 + col2 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1, tab0 cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3029
SELECT ALL CAST( NULL AS SIGNED ) + + col2 - - col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3029
SELECT ALL CAST ( NULL AS INTEGER ) + + col2 - - col2 AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3030
SELECT DISTINCT CAST( NULL AS DECIMAL ) col2 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3030
SELECT DISTINCT CAST ( NULL AS REAL ) col2 FROM tab2
----
NULL

query I rowsort
SELECT + 29 * 37 FROM tab2
----
1073
1073
1073

onlyif mysql # use DIV operator for integer division
query I rowsort label-3032
SELECT - 52 DIV - tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3032
SELECT - 52 / - tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col1 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT cor0.col1 + + col1 + - col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col2 + col2 * + 46 AS col2 FROM tab2 cor0
----
1170
1215
1710

query I rowsort
SELECT DISTINCT + col2 * col1 * + col0 AS col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT - col0 * + ( + cor0.col0 ) FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-3038
SELECT DISTINCT col2 DIV col2 col1 FROM tab0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3038
SELECT DISTINCT col2 / col2 col1 FROM tab0
----
1

query I rowsort
SELECT + col1 * - col1 + + col2 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT col2 + - col1 * + col1 * - col2 AS col2 FROM tab2
----
11020
25974
90532

query I rowsort
SELECT ALL col0 * + col0 * + col0 + - col2 FROM tab0 AS cor0
----
13791
42874
704887

query I rowsort
SELECT - cor0.col0 + col1 * cor0.col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT col0 * + col1 + + col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
15561
3492
4902

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL IN ( col0 + + col2 ) OR ( + cor0.col0 ) BETWEEN ( NULL ) AND col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + col1 col1 FROM tab0 cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3046
SELECT + col0 DIV - col0 col2 FROM tab2 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3046
SELECT + col0 / - col0 col2 FROM tab2 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 + col1 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT col0 * + col2 + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT + ( - col0 ) * + cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL - col0 * col2 - - col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL + - col2 + col1 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3052
SELECT + + cor0.col2 + + col1 DIV + col1 AS col1 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-3052
SELECT + + cor0.col2 + + col1 / + col1 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT + ( ( col1 ) ) * tab1.col0 * + tab1.col0 FROM tab1
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-3054
SELECT - 11 DIV - col0 AS col0 FROM tab1
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3054
SELECT - 11 / - col0 AS col0 FROM tab1
----
0
0
3

query I rowsort
SELECT ALL - + col1 * cor0.col1 AS col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + col0 + col2 + col0 AS col2 FROM tab0 AS cor0
----
260
71
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3057
SELECT ALL + + col0 + - col1 DIV col1 AS col2 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-3057
SELECT ALL + + col0 + - col1 / col1 AS col2 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT - 40 * - col1 * + col2 + - cor0.col2 FROM tab0 AS cor0
----
113487
298398
3879

query I rowsort
SELECT ALL + col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT - cor0.col0 * + col2 + col1 + - col0 FROM tab2 AS cor0
----
-165
-2047
-3064

onlyif mysql # use DIV operator for integer division
query I rowsort label-3061
SELECT - col2 DIV col1 + + col0 FROM tab2 AS cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-3061
SELECT - col2 / col1 + + col0 FROM tab2 AS cor0
----
7
77
78

query I rowsort
SELECT DISTINCT + - cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - + cor0.col2 + - col2 * col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ( 64 * + col1 ) + tab1.col2 AS col0 FROM tab1
----
1718
697
928

onlyif mysql # use DIV operator for integer division
query I rowsort label-3065
SELECT 75 + + col2 DIV col0 FROM tab2
----
75
75
78

skipif mysql # not compatible
query I rowsort label-3065
SELECT 75 + + col2 / col0 FROM tab2
----
75
75
78

query I rowsort
SELECT ALL - tab2.col1 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT 19 * + col1 + col2 AS col0 FROM tab2
----
1147
361
616

query I rowsort
SELECT DISTINCT col0 * - col0 * ( + col1 ) AS col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT + + cor1.col1 * + 97 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2b09d307c7546cb3d4041d6634f6d651

query I rowsort
SELECT 30 * + col2 + + col1 AS col1 FROM tab0
----
1076
127
2551

query I rowsort
SELECT ALL + ( col2 ) + + cor0.col2 AS col2 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + cor0.col2 - - col1 col1 FROM tab0 AS cor0
----
152
255
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 * - col2 col1 FROM tab0 AS cor0
----
-2772
-6888
-84

query I rowsort
SELECT - col2 * - col1 + col2 * + cor0.col0 FROM tab0 cor0
----
132
14760
3630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3075
SELECT col0 * + col2 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3075
SELECT col0 * + col2 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 15 + col0 AS col1 FROM tab0 AS cor0
----
104
39
50

query I rowsort
SELECT DISTINCT - + 91 * + col1 - col0 FROM tab0 AS cor0
----
-7850
-8370
-8862

onlyif mysql # use DIV operator for integer division
query I rowsort label-3078
SELECT DISTINCT tab0.col1 + col0 DIV col2 AS col0 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-3078
SELECT DISTINCT tab0.col1 + col0 / col2 AS col0 FROM tab0
----
132
86
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-3079
SELECT DISTINCT col2 + - 60 DIV - col0 + - col2 * - 23 FROM tab1
----
1316
1368
2304

skipif mysql # not compatible
query I rowsort label-3079
SELECT DISTINCT col2 + - 60 / - col0 + - col2 * - 23 FROM tab1
----
1316
1368
2304

query I rowsort
SELECT + + cor0.col2 - + col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - - col1 + - cor0.col0 + - cor0.col0 FROM tab1 AS cor0
----
-118
-147
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-3082
SELECT ALL col0 DIV + col1 FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3082
SELECT ALL col0 / + col1 FROM tab1 cor0
----
0
6
6

query I rowsort
SELECT col0 + - 76 FROM tab1 cor0
----
-12
-73
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3084
SELECT ALL - + col1 DIV + col1 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3084
SELECT ALL - + col1 / + col1 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + - col2 - - 46 AS col0 FROM tab0 AS cor0
----
-36
13
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3086
SELECT ALL + col1 DIV - ( col1 * + col1 ) FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3086
SELECT ALL + col1 / - ( col1 * + col1 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 + - col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3088
SELECT DISTINCT + + cor0.col2 DIV col1 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-3088
SELECT DISTINCT + + cor0.col2 / col1 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT - - col1 * 68 FROM tab0 AS cor0
----
5848
6188
6596

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - col0 AS REAL ) + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - col1 + - col0 + + col0 AS col1 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT DISTINCT - + 43 DIV ( - col0 ) + col2 AS col2 FROM tab0 AS cor0
----
2
34
82

skipif mysql # not compatible
query I rowsort label-3092
SELECT DISTINCT - + 43 / ( - col0 ) + col2 AS col2 FROM tab0 AS cor0
----
2
34
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3093
SELECT 30 * + col1 + col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
1770
508
930

skipif mysql # not compatible
query I rowsort label-3093
SELECT 30 * + col1 + col2 / - col1 AS col1 FROM tab2 AS cor0
----
1770
508
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3094
SELECT DISTINCT - ( - cor0.col1 ) DIV 8 AS col2 FROM tab1, tab2 AS cor0
----
2
3
7

skipif mysql # not compatible
query I rowsort label-3094
SELECT DISTINCT - ( - cor0.col1 ) / 8 AS col2 FROM tab1, tab2 AS cor0
----
2
3
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3095
SELECT DISTINCT + + 47 DIV - col1 col1 FROM tab2 AS cor0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3095
SELECT DISTINCT + + 47 / - col1 col1 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT + col2 + - 70 * + cor0.col1 FROM tab1 AS cor0
----
-1766
-643
-814

query I rowsort
SELECT DISTINCT + 43 * - 57 FROM tab1 cor0
----
-2451

query I rowsort
SELECT ALL - - col2 * cor0.col0 + + col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT col2 + col0 * + col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT 92 * 89 AS col1 FROM tab2 AS cor0
----
8188

query I rowsort
SELECT ALL 8 * 60 + col1 * 69 + + col0 AS col1 FROM tab0 cor0
----
6438
6848
7208

query I rowsort
SELECT + cor0.col0 * col0 - + cor0.col0 * col0 * cor0.col2 FROM tab0 AS cor0
----
-18432
-641601
0

query I rowsort
SELECT - 87 + cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b5840f953a8b956d9fa4d9569e30e014

query I rowsort
SELECT + 92 * col2 - col0 AS col0 FROM tab1 AS cor0
----
4965
5180
8752

query I rowsort
SELECT col1 + + col0 * + col0 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT col2 * cor0.col2 * + col1 AS col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT + + col0 * - col1 + + col0 + + cor0.col0 FROM tab1 AS cor0
----
-512
-72
-880

query I rowsort
SELECT - - col0 + col2 + 7 FROM tab2 AS cor0
----
111
124
41

query I rowsort
SELECT + + ( - col1 ) * + col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 - col1 * + cor0.col1 col0 FROM tab1 AS cor0
----
-53
-648
-86

query I rowsort
SELECT ALL + tab1.col1 + col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT col1 + - 49 FROM tab2
----
-18
-32
10

query I rowsort
SELECT DISTINCT + col2 + + ( 15 ) AS col1 FROM tab0
----
16
48
97

query I rowsort
SELECT ALL - col1 * ( + 62 ) + + col1 * - ( + 21 + + tab1.col0 ) * + col1 FROM tab1
----
-17836
-17875
-9120

query I rowsort
SELECT DISTINCT col1 * - 81 + 99 * col1 * - 33 FROM tab1 AS cor0
----
-33480
-43524
-87048

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
91

query I rowsort
SELECT col1 + - 92 AS col1 FROM tab0 AS cor0
----
-1
-6
5

query I rowsort
SELECT DISTINCT col0 * - col0 + cor0.col2 FROM tab1 cor0
----
-4039
-6304
45

query I rowsort
SELECT + 91 + + 69 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to ac5ffad908886e53c315f058c5fe2210

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3120
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3120
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + col0 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL col2 * + 46 + col0 - ( - col1 ) AS col2 FROM tab0 AS cor0
----
1628
178
3952

query I rowsort
SELECT + 65 + ( + col1 ) FROM tab1 AS cor0
----
75
78
91

query I rowsort
SELECT DISTINCT col1 * + col1 AS col2 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT - col0 - + ( ( + col1 ) ) FROM tab1
----
-29
-74
-93

query I rowsort
SELECT + tab1.col0 + col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + cor0.col0 * 43 FROM tab0 cor0
----
1032
1505
3827

query I rowsort
SELECT + col2 * 12 - + col0 AS col1 FROM tab1
----
1072
620
645

query I rowsort
SELECT + 32 FROM tab1, tab1 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3129
SELECT DISTINCT 29 DIV + col2 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3129
SELECT DISTINCT 29 / + col2 AS col1 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT + col2 * + col0 + + col0 DIV 78 FROM tab1 AS cor0
----
162
3648
7681

skipif mysql # not compatible
query I rowsort label-3130
SELECT + col2 * + col0 + + col0 / 78 FROM tab1 AS cor0
----
162
3648
7681

query I rowsort
SELECT + col1 * - 18 FROM tab0
----
-1548
-1638
-1746

query I rowsort
SELECT DISTINCT + col2 * - tab1.col2 * col0 AS col1 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3133
SELECT ( + col1 ) * 40 + - ( col2 ) DIV ( + col0 + + col0 ) AS col2 FROM tab2 AS cor0
----
1239
2360
680

skipif mysql # not compatible
query I rowsort label-3133
SELECT ( + col1 ) * 40 + - ( col2 ) / ( + col0 + + col0 ) AS col2 FROM tab2 AS cor0
----
1239
2360
680

query I rowsort
SELECT + col1 * col1 + ( - col0 ) FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT 31 * col0 * + col1 AS col1 FROM tab1
----
19840
2418
32240

query I rowsort
SELECT ALL 67 + + tab0.col2 * col1 AS col1 FROM tab0
----
164
2905
7529

query I rowsort
SELECT 5 - - tab2.col0 AS col2 FROM tab2
----
12
83
84

query I rowsort
SELECT + 13 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 15 col2 FROM tab1
----
-15
-15
-15

query I rowsort
SELECT - - 78 FROM tab0, tab0 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3141
SELECT DISTINCT - 27 + + tab2.col0 * CAST( NULL AS DECIMAL ) + + 12 FROM tab2, tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3141
SELECT DISTINCT - 27 + + tab2.col0 * CAST ( NULL AS REAL ) + + 12 FROM tab2, tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT col1 * 5 FROM tab2 AS cor0
----
155
295
85

query I rowsort
SELECT cor0.col0 + ( + cor0.col2 ) AS col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3144
SELECT DISTINCT + col0 * CAST( 13 AS SIGNED ) + + col0 AS col2 FROM tab0 AS cor0
----
1246
336
490

skipif mysql # not compatible
query I rowsort label-3144
SELECT DISTINCT + col0 * CAST ( 13 AS INTEGER ) + + col0 AS col2 FROM tab0 AS cor0
----
1246
336
490

query I rowsort
SELECT DISTINCT col2 * 19 FROM tab0 cor0
----
1558
19
627

query I rowsort
SELECT - + col0 + 82 + + col0 FROM tab2 cor0
----
82
82
82

query I rowsort
SELECT + col0 + - 87 * + col2 * + cor0.col0 FROM tab0 AS cor0
----
-3010
-634837
-68880

query I rowsort
SELECT + col0 * - 95 + 37 * - col2 + col0 * + cor0.col2 FROM tab2 AS cor0
----
-1475
-5909
-6344

query I rowsort
SELECT DISTINCT + cor0.col1 + col1 * - col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + + col0 * cor0.col1 + col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-3151
SELECT + col0 DIV ( 69 ) AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3151
SELECT + col0 / ( 69 ) AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + col2 + 96 * 31 * col0 AS col1 FROM tab1 AS cor0
----
190521
238176
8982

query I rowsort
SELECT ALL col2 * + ( col0 ) AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL + - cor0.col2 * 21 AS col2 FROM tab0 AS cor0
----
-1722
-21
-693

query I rowsort
SELECT - col1 * - 80 + col0 FROM tab0
----
6904
7369
7795

query I rowsort
SELECT ( + col1 ) * + col2 * + 30 + - 17 * col0 * + col0 FROM tab1
----
-52532
-71360
41967

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT col1 DIV 42 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3157
SELECT col1 / 42 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3158
SELECT cor1.col0 - 44 DIV 56 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif mysql # not compatible
query I rowsort label-3158
SELECT cor1.col0 - 44 / 56 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT col2 + - 98 FROM tab0 AS cor0
----
-16
-65
-97

query I rowsort
SELECT DISTINCT col2 + + ( cor0.col0 ) * ( 61 ) AS col1 FROM tab0 AS cor0
----
1497
2136
5511

query I rowsort
SELECT DISTINCT - + 73 + - col1 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-173
-242
-749

query I rowsort
SELECT + + ( 78 ) * - col2 AS col2 FROM tab2 AS cor0
----
-2028
-2106
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-3163
SELECT ( col1 ) DIV + col0 col2 FROM tab2 AS cor0
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3163
SELECT ( col1 ) / + col0 col2 FROM tab2 AS cor0
----
0
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3164
SELECT ALL - 23 * col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3164
SELECT ALL - 23 * col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 73 * col0 AS col1 FROM tab1 AS cor0
----
-219
-4672
-5840

query I rowsort
SELECT ALL - + 28 * col2 + - 47 AS col2 FROM tab2 AS cor0
----
-1111
-775
-803

query I rowsort
SELECT DISTINCT + + col0 * + cor0.col1 * - 60 AS col0 FROM tab2 AS cor0
----
-13020
-276120
-80580

query I rowsort
SELECT - 96 + 60 * col1 + - tab1.col2 AS col2 FROM tab1
----
1410
447
588

query I rowsort
SELECT col2 + + col1 - tab1.col0 * col1 AS col2 FROM tab1
----
-573
-931
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3170
SELECT tab2.col0 * - col2 + + col2 DIV + col1 FROM tab2
----
-189
-2028
-3000

skipif mysql # not compatible
query I rowsort label-3170
SELECT tab2.col0 * - col2 + + col2 / + col1 FROM tab2
----
-189
-2028
-3000

query III rowsort
SELECT * FROM tab0 WHERE NOT col0 IN ( - col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT col0 * col0 + + col2 AS col1 FROM tab1
----
4153
63
6496

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT - col0 < ( col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL <> ( col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col0 * - col1 col0 FROM tab2 WHERE col2 * - col1 + col0 NOT BETWEEN + col0 AND NULL
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT + col2 + col2 + col1 * - col1 AS col0 FROM tab2
----
-213
-3429
-907

query I rowsort
SELECT - tab0.col2 + - col0 + - col1 FROM tab0
----
-133
-143
-262

query I rowsort
SELECT ALL col2 + col2 * - col1 + col0 FROM tab0
----
-2781
-61
-7291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col0 + col1 - col2 col1 FROM tab1
----
-25
-3
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + tab2.col2 col0 FROM tab2
----
1534
646
837

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL IN ( + col2 + + col0 * - col2 )
----

query I rowsort
SELECT ALL col2 - - col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT col1 * col2 + + tab1.col1 * tab1.col2 + + col0 * col0 AS col0 FROM tab1
----
2817
5236
8896

onlyif mysql # use DIV operator for integer division
query I rowsort label-3184
SELECT + col1 - col0 DIV tab0.col2 FROM tab0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-3184
SELECT + col1 - col0 / tab0.col2 FROM tab0
----
62
86
90

query I rowsort
SELECT ALL - tab2.col1 + - col2 + col2 AS col2 FROM tab2 WHERE ( col1 ) BETWEEN NULL AND ( col2 * + col2 )
----

query I rowsort
SELECT - col2 AS col0 FROM tab2 WHERE ( col0 * + col2 ) IN ( col2 * - col0 )
----

query I rowsort
SELECT DISTINCT tab0.col1 * col1 + col2 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT col2 - - col0 * col2 * + col1 FROM tab0
----
3396
664200
68145

query III rowsort
SELECT ALL * FROM tab2 WHERE + col0 < col2 * col0
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col1 * + col2 + + col0 * - col0 FROM tab0
----
-1128
-459
2262

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT col2 NOT BETWEEN ( col2 * col1 ) AND NULL
----

query I rowsort
SELECT col1 + + col2 * col1 AS col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT col0 * col1 * - col0 AS col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT - col2 * + tab0.col0 * - col1 AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT - tab0.col1 * + col0 * - col1 AS col0 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT col0 * tab0.col2 * col2 AS col1 FROM tab0
----
26136
35
598436

query I rowsort
SELECT ALL + col1 * col2 * + tab1.col0 AS col1 FROM tab1
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3199
SELECT DISTINCT - col2 + CAST( + col1 AS SIGNED ) + - col0 AS col1 FROM tab0
----
-80
29
61

skipif mysql # not compatible
query I rowsort label-3199
SELECT DISTINCT - col2 + CAST ( + col1 AS INTEGER ) + - col0 AS col1 FROM tab0
----
-80
29
61

query I rowsort
SELECT ALL col2 + col2 * col1 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - + col1 + 42 FROM tab1 AS cor0
----
16
29
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col1 col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT - - 56 * - cor0.col0 + + col2 FROM tab0 AS cor0
----
-1311
-1959
-4902

query I rowsort
SELECT - 70 * col2 FROM tab1 AS cor0
----
-3780
-3990
-6720

query I rowsort
SELECT + ( 20 ) + + cor0.col2 * + col0 AS col2 FROM tab2 AS cor0
----
2048
209
3022

query I rowsort
SELECT DISTINCT - - col2 + col2 * col0 FROM tab1 cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-3207
SELECT DISTINCT col2 + col2 DIV + cor0.col0 FROM tab0 cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-3207
SELECT DISTINCT col2 + col2 / + cor0.col0 FROM tab0 cor0
----
1
34
82

query I rowsort
SELECT ALL - - 62 - col0 FROM tab1 AS cor0
----
-18
-2
59

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT ALL - col2 * - col1 + - col1 AS col0 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL col1 * - col2 - col0 AS col1 FROM tab2 AS cor0
----
-1612
-725
-844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 67 * - col2 + + ( - col0 ) col2 FROM tab0 cor0
----
-102
-2235
-5583

query I rowsort
SELECT + cor0.col1 * - col2 + + col0 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL ( + col2 + col0 ) * + col2 * col2 FROM tab1
----
1622016
166212
393129

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + cor0.col1 + + 33 AS col1 FROM tab0 AS cor0
----
119
124
130

onlyif mysql # use DIV operator for integer division
query I rowsort label-3217
SELECT + ( col2 ) + + cor0.col0 * 77 DIV col2 AS col0 FROM tab0 cor0
----
165
2696
89

skipif mysql # not compatible
query I rowsort label-3217
SELECT + ( col2 ) + + cor0.col0 * 77 / col2 AS col0 FROM tab0 cor0
----
165
2696
89

query I rowsort
SELECT + cor0.col1 * + col2 + col2 * col2 FROM tab0 cor0
----
14186
3927
98

query I rowsort
SELECT ALL + 28 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT DISTINCT + cor0.col1 + col1 * - col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - col1 + + col0 * - 71 AS col1 FROM tab0 AS cor0
----
-1790
-2582
-6410

query I rowsort
SELECT - 65 + col2 * - cor0.col1 * - col0 AS col1 FROM tab2 AS cor0
----
119587
50969
5794

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 + + 14 + 63 * + col2 col0 FROM tab0 AS cor0
----
12642
174
4931

query I rowsort
SELECT col1 + col0 * col1 + - col1 * - col2 AS col0 FROM tab2 AS cor0
----
1085
2006
6195

query I rowsort
SELECT col0 * + col2 + ( + col0 + col0 ) FROM tab2 AS cor0
----
203
2184
3160

query I rowsort
SELECT ALL + 20 - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 1f0287a96b5df5b8dd08f00515886dd4

query I rowsort
SELECT ( 24 ) AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

onlyif mysql # use DIV operator for integer division
query I rowsort label-3228
SELECT ALL + - col1 DIV ( 22 ) FROM tab0 AS cor0
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-3228
SELECT ALL + - col1 / ( 22 ) FROM tab0 AS cor0
----
-3
-4
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3229
SELECT DISTINCT - - 67 DIV col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3229
SELECT DISTINCT - - 67 / col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - tab0.col0 * 58 AS col0 FROM tab0
----
-1392
-2030
-5162

query I rowsort
SELECT ALL - ( + cor0.col1 ) + col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + - col0 + cor0.col0 + + col2 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - 26 * col2 FROM tab2 AS cor0
----
-676
-702
-988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3234
SELECT - CAST( NULL AS DECIMAL ) + 58 / col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3234
SELECT - CAST ( NULL AS REAL ) + 58 / col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + col0 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col0 + - col2 * - col2 FROM tab0 AS cor0
----
-34
1065
6635

onlyif mysql # use DIV operator for integer division
query I rowsort label-3237
SELECT col0 DIV + 93 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3237
SELECT col0 / + 93 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3238
SELECT ALL - col2 * - col1 - col0 DIV col0 col1 FROM tab1
----
1247
1403
569

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3238
SELECT ALL - col2 * - col1 - col0 / col0 col1 FROM tab1
----
1247
1403
569

query I rowsort
SELECT + col1 * + 4 * col0 AS col0 FROM tab2
----
18408
5372
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3240
SELECT - + CAST( col0 AS SIGNED ) * cor0.col0 * ( 65 ) + col2 AS col2 FROM tab0 AS cor0
----
-37407
-514783
-79624

skipif mysql # not compatible
query I rowsort label-3240
SELECT - + CAST ( col0 AS INTEGER ) * cor0.col0 * ( 65 ) + col2 AS col2 FROM tab0 AS cor0
----
-37407
-514783
-79624

query I rowsort
SELECT ALL 5 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

onlyif mysql # use DIV operator for integer division
query I rowsort label-3242
SELECT DISTINCT cor0.col0 * - col2 + + col1 + - col1 DIV - col0 AS col0 FROM tab2 AS cor0
----
-154
-1969
-2985

skipif mysql # not compatible
query I rowsort label-3242
SELECT DISTINCT cor0.col0 * - col2 + + col1 + - col1 / - col0 AS col0 FROM tab2 AS cor0
----
-154
-1969
-2985

query I rowsort
SELECT ALL + col1 * + 37 AS col1 FROM tab1 AS cor0
----
370
481
962

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab2 AS cor3
----
3645 values hashing to 713ff9f9cde43214a064a8e6ada00f4e

query I rowsort
SELECT ALL 32 + - ( - col2 ) FROM tab2
----
58
59
70

query I rowsort
SELECT ALL + col1 * - col0 * - col1 + - col0 FROM tab0
----
177480
329280
736920

query I rowsort
SELECT ALL 73 + - col0 AS col2 FROM tab2
----
-5
-6
66

query I rowsort
SELECT - 15 + col1 AS col2 FROM tab2 cor0
----
16
2
44

query I rowsort
SELECT ALL - ( + col1 ) * - col1 + 18 AS col0 FROM tab0
----
7414
8299
9427

onlyif mysql # use DIV operator for integer division
query I rowsort label-3250
SELECT col2 * + col0 + + col1 + col1 DIV 30 AS col1 FROM tab1
----
188
3658
7693

skipif mysql # not compatible
query I rowsort label-3250
SELECT col2 * + col0 + + col1 + col1 / 30 AS col1 FROM tab1
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3251
SELECT DISTINCT + + CAST( - col0 AS SIGNED ) + - col2 FROM tab1 AS cor0
----
-121
-176
-57

skipif mysql # not compatible
query I rowsort label-3251
SELECT DISTINCT + + CAST ( - col0 AS INTEGER ) + - col2 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3252
SELECT + CAST( 95 AS SIGNED ) * + col2 FROM tab1 AS cor0
----
5130
5415
9120

skipif mysql # not compatible
query I rowsort label-3252
SELECT + CAST ( 95 AS INTEGER ) * + col2 FROM tab1 AS cor0
----
5130
5415
9120

query I rowsort
SELECT - - 95 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to 9896fbc7c98abe84cb585e6f5f25b58a

query I rowsort
SELECT col1 + + ( tab0.col0 + 3 * 53 ) FROM tab0
----
269
291
339

query I rowsort
SELECT + col1 * + col1 * col1 AS col2 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL 69 * col2 + col2 FROM tab2
----
1820
1890
2660

query I rowsort
SELECT ALL 77 + cor0.col1 AS col2 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 792da2f82494f8f0f5838381e8625905

query I rowsort
SELECT - 75 - col2 FROM tab1
----
-129
-132
-171

query I rowsort
SELECT ALL - cor0.col1 * 75 AS col0 FROM tab1 AS cor0
----
-1950
-750
-975

query I rowsort
SELECT + col0 * + col0 * ( ( col0 ) ) + tab2.col0 AS col2 FROM tab2
----
350
474630
493118

query I rowsort
SELECT + col1 * + col1 + col2 * + col1 AS col2 FROM tab0
----
10234
15743
9506

query I rowsort
SELECT col2 + col2 * + ( col0 ) FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT 49 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3
----
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-3264
SELECT DISTINCT - col0 DIV cor0.col0 - col1 * col0 * col2 AS col2 FROM tab0 AS cor0
----
-3396
-664119
-68113

skipif mysql # not compatible
query I rowsort label-3264
SELECT DISTINCT - col0 / cor0.col0 - col1 * col0 * col2 AS col2 FROM tab0 AS cor0
----
-3396
-664119
-68113

query I rowsort
SELECT DISTINCT + col1 * ( col0 ) FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - col2 + ( 56 + - col0 ) AS col2 FROM tab1 AS cor0
----
-1
-120
-65

query I rowsort
SELECT ALL col0 * - 57 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-145
-3638
-4547

query I rowsort
SELECT DISTINCT + col1 * col0 - col2 FROM tab0 AS cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * 0 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 * + ( + 24 ) * col1 AS col2 FROM tab1 AS cor0
----
-15360
-1872
-24960

query I rowsort
SELECT col1 + - 60 * + col2 FROM tab0 AS cor0
----
-1894
-4829
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3272
SELECT ALL col2 * CAST( cor0.col2 AS SIGNED ) AS col2 FROM tab2 cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-3272
SELECT ALL col2 * CAST ( cor0.col2 AS INTEGER ) AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL + - col2 - col0 * + ( + col1 ) FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT + 92 * - 11 AS col0 FROM tab1, tab1 cor0, tab2 cor1
----
-1012

query I rowsort
SELECT - + cor0.col1 - + col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - + col2 + col1 * + 94 FROM tab1 cor0
----
1126
2390
883

onlyif mysql # use DIV operator for integer division
query I rowsort label-3277
SELECT DISTINCT 59 * + tab1.col2 + - col1 DIV col0 + - col0 AS col0 FROM tab1
----
3175
3299
5584

skipif mysql # not compatible
query I rowsort label-3277
SELECT DISTINCT 59 * + tab1.col2 + - col1 / col0 + - col0 AS col0 FROM tab1
----
3175
3299
5584

query I rowsort
SELECT 4 * + 70 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to db41d8333300eb72d54aed1c44f7600c

query I rowsort
SELECT ALL - col0 + - col2 - - ( + cor0.col0 ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT cor0.col0 * + 77 AS col1 FROM tab1 AS cor0
----
231
4928
6160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + col2 * + cor0.col2 - col1 col2 FROM tab1 AS cor0
----
10451
3809
4294

query I rowsort
SELECT + col0 * col1 + + col2 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - col2 + + 14 + col0 FROM tab0 AS cor0
----
21
48
5

query I rowsort
SELECT ALL col2 + 12 FROM tab2 AS cor0
----
38
39
50

query I rowsort
SELECT + - col0 + ( col2 ) * col0 FROM tab2 cor0
----
182
1950
2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3286
SELECT + col0 / CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3286
SELECT + col0 / CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col0 ) + 49 col2 FROM tab0
----
-40
14
25

query I rowsort
SELECT + + col2 * + 15 + cor0.col0 AS col2 FROM tab0 AS cor0
----
1319
50
519

query I rowsort
SELECT ALL 76 + + col0 FROM tab0
----
100
111
165

query I rowsort
SELECT ALL col0 + 86 * + col0 FROM tab2 AS cor0
----
609
6786
6873

query I rowsort
SELECT DISTINCT + - 61 * col1 - - col0 FROM tab0 AS cor0
----
-5222
-5462
-5882

query I rowsort
SELECT - + col1 * + 3 AS col1 FROM tab1 cor0
----
-30
-39
-78

query I rowsort
SELECT ALL + + ( + cor0.col0 ) + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL cor0.col0 * - 18 FROM tab1 AS cor0
----
-1152
-1440
-54

query I rowsort
SELECT 69 + + ( cor0.col2 ) FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT ALL + col1 + col1 + - col2 FROM tab1 AS cor0
----
-2
-37
-70

query I rowsort
SELECT DISTINCT - - col0 * 61 + col0 AS col1 FROM tab2 AS cor0
----
434
4836
4898

query I rowsort
SELECT DISTINCT - col2 + + ( col2 ) * + ( + col2 ) FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT ALL 37 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT ALL 95 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT + col2 + - tab2.col0 * col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT ALL - - col2 * + col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT cor0.col1 * 93 FROM tab2 AS cor0
----
1581
2883
5487

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3304
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2, tab1, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3304
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2, tab1, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT 93 FROM tab2, tab2 AS cor0
----
93

query I rowsort
SELECT DISTINCT + 4 FROM tab0, tab2 AS cor0
----
4

query I rowsort
SELECT DISTINCT col0 * 60 AS col1 FROM tab0 cor0
----
1440
2100
5340

query I rowsort
SELECT + 34 * col1 FROM tab2 AS cor0
----
1054
2006
578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT col0 * 35 AS col0 FROM tab0
----
1225
3115
840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 48 col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
48

query I rowsort
SELECT ALL 57 * + tab1.col1 FROM tab1
----
1482
570
741

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3313
SELECT - CAST( tab1.col0 AS SIGNED ) * cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to ec78515ecc610830fe02f4a5c8d4e4d5

skipif mysql # not compatible
query I rowsort label-3313
SELECT - CAST ( tab1.col0 AS INTEGER ) * cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to ec78515ecc610830fe02f4a5c8d4e4d5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3314
SELECT + - col0 - + col0 * 64 DIV - cor0.col1 FROM tab0 AS cor0
----
-12
-27
-7

skipif mysql # not compatible
query I rowsort label-3314
SELECT + - col0 - + col0 * 64 / - cor0.col1 FROM tab0 AS cor0
----
-12
-27
-7

query I rowsort
SELECT + cor0.col0 + - 31 * + col2 FROM tab0 AS cor0
----
-2453
-999
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - 55 col1 FROM tab0 AS cor0
----
-4730
-5005
-5335

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3317
SELECT col2 + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3317
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-3318
SELECT + col1 * - ( - col1 ) + cor0.col1 * - col1 DIV col1 AS col1 FROM tab1 AS cor0
----
156
650
90

skipif mysql # not compatible
query I rowsort label-3318
SELECT + col1 * - ( - col1 ) + cor0.col1 * - col1 / col1 AS col1 FROM tab1 AS cor0
----
156
650
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3319
SELECT + 0 + col1 * cor0.col1 DIV - col0 FROM tab0 AS cor0
----
-268
-308
-93

skipif mysql # not compatible
query I rowsort label-3319
SELECT + 0 + col1 * cor0.col1 / - col0 FROM tab0 AS cor0
----
-268
-308
-93

query I rowsort
SELECT - ( 42 ) + + col0 * + col1 + col1 * col0 AS col2 FROM tab1 AS cor0
----
114
1238
2038

query I rowsort
SELECT + col0 + + ( col0 ) * - 95 * 83 + + col1 * ( - 49 * + col0 + + col0 * - cor0.col1 ) FROM tab1 cor0
----
-29502
-542336
-695200

query I rowsort
SELECT 29 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT - 30 * + col2 * col2 + col1 FROM tab0 AS cor0
----
-201629
-32584
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3324
SELECT - - 38 DIV + col1 FROM tab1 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3324
SELECT - - 38 / + col1 FROM tab1 AS cor0
----
1
2
3

query I rowsort
SELECT col0 + ( col2 ) AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col0 - - cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + + 15 * - col0 + cor0.col0 * cor0.col2 FROM tab0 AS cor0
----
-490
432
5963

query I rowsort
SELECT ALL tab0.col0 * col0 - + 97 * col1 FROM tab0
----
-7766
-8184
-906

onlyif mysql # use DIV operator for integer division
query I rowsort label-3329
SELECT - col2 + + col0 DIV cor0.col0 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3329
SELECT - col2 + + col0 / cor0.col0 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT DISTINCT - col0 + ( + col1 ) * - tab1.col0 AS col1 FROM tab1
----
-1120
-704
-81

query I rowsort
SELECT - - col2 * ( col1 ) + + col0 * 6 AS col1 FROM tab0 AS cor0
----
2982
307
7996

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3332
SELECT + col1 + CAST( - 62 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
24
29
35

skipif mysql # not compatible
query I rowsort label-3332
SELECT + col1 + CAST ( - 62 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
24
29
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * col1 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - + 59 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 1e6537c922fa953e0fd2f59430803703

query I rowsort
SELECT - - col1 * - 55 + col2 AS col2 FROM tab1 cor0
----
-1376
-493
-619

query I rowsort
SELECT - + col1 + + 18 AS col2 FROM tab0 AS cor0
----
-68
-73
-79

query I rowsort
SELECT ALL + col2 * - 93 + col1 AS col2 FROM tab1 cor0
----
-4996
-5291
-8915

query I rowsort
SELECT - col1 * - col2 * - col2 - 61 FROM tab2
----
-22660
-24609
-39945

query I rowsort
SELECT + col0 - 97 FROM tab1
----
-17
-33
-94

query I rowsort
SELECT - 66 * + 86 AS col0 FROM tab0 AS cor0
----
-5676
-5676
-5676

onlyif mysql # use DIV operator for integer division
query I rowsort label-3341
SELECT - cor0.col0 + + col0 DIV + ( + col0 ) AS col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-3341
SELECT - cor0.col0 + + col0 / + ( + col0 ) AS col1 FROM tab2 AS cor0
----
-6
-77
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3342
SELECT DISTINCT + + 38 * col0 + col1 * 83 * + cor0.col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3342
SELECT DISTINCT + + 38 * col0 + col1 * 83 * + cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 + - cor0.col2 AS col1 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT + col1 + col2 - 16 FROM tab0 AS cor0
----
103
157
82

query I rowsort
SELECT - col1 + col2 - ( + cor0.col1 ) * - col1 AS col2 FROM tab0 AS cor0
----
7343
8272
9313

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 43 ) col2 FROM tab1
----
43
43
43

query I rowsort
SELECT DISTINCT - 1 * - tab1.col1 * col0 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3349
SELECT DISTINCT - + 73 * cor0.col1 DIV cor0.col1 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-14
-42
-56

skipif mysql # not compatible
query I rowsort label-3349
SELECT DISTINCT - + 73 * cor0.col1 / cor0.col1 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-14
-42
-56

query I rowsort
SELECT ALL + col0 * col0 + - 2 * ( + col2 ) AS col0 FROM tab1 AS cor0
----
-99
3982
6208

query I rowsort
SELECT ALL - 41 FROM tab2, tab2 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3352
SELECT DISTINCT - + col0 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3352
SELECT DISTINCT - + col0 / cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT - col1 - - cor0.col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + col1 * col2 - + col0 AS col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + col2 + col1 * + col1 AS col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT - - ( + col0 ) + 79 FROM tab1 AS cor0
----
143
159
82

query I rowsort
SELECT ALL + col1 * - col1 + cor0.col0 FROM tab1 cor0
----
-36
-673
-89

query I rowsort
SELECT ALL col2 * - col1 + - 17 FROM tab1 AS cor0
----
-1265
-1421
-587

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3359
SELECT + - col2 * - CAST( NULL AS SIGNED ) + + col1 * col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3359
SELECT + - col2 * - CAST ( NULL AS INTEGER ) + + col1 * col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + ( - 45 ) col0 FROM tab2 AS cor0
----
-1395
-2655
-765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * cor0.col2 * col0 + col1 col0 FROM tab1 AS cor0
----
233482
512
614413

query I rowsort
SELECT + cor0.col2 * ( col1 ) + col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - + col2 * + cor0.col1 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - - col2 + col0 + col0 FROM tab2 AS cor0
----
182
196
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 20 col0 FROM tab0
----
-20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3366
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3366
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col2 * 5 AS col0 FROM tab0 cor0
----
165
410
5

query I rowsort
SELECT ALL ( col2 ) * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3369
SELECT + col0 + 83 DIV + col1 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3369
SELECT + col0 + 83 / + col1 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + 57 AS col1 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT - + ( - 45 ) * col2 FROM tab1 AS cor0
----
2430
2565
4320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3372
SELECT DISTINCT - ( col0 ) + col1 + - CAST( - col0 AS SIGNED ) * col1 AS col1 FROM tab1 cor0
----
101
586
973

skipif mysql # not compatible
query I rowsort label-3372
SELECT DISTINCT - ( col0 ) + col1 + - CAST ( - col0 AS INTEGER ) * col1 AS col1 FROM tab1 cor0
----
101
586
973

query I rowsort
SELECT ALL + + 0 - col2 * - col2 * + cor0.col0 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3374
SELECT DISTINCT CAST( NULL AS DECIMAL ) - - ( - col0 ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3374
SELECT DISTINCT CAST ( NULL AS REAL ) - - ( - col0 ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3375
SELECT ALL col0 DIV col0 + + col0 AS col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3375
SELECT ALL col0 / col0 + + col0 AS col2 FROM tab1
----
4
65
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3376
SELECT - col1 * CAST( NULL AS SIGNED ) + tab0.col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3376
SELECT - col1 * CAST ( NULL AS INTEGER ) + tab0.col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 66 col1 FROM tab0
----
2178
5412
66

query I rowsort
SELECT + + ( - 44 ) + col1 AS col2 FROM tab2 AS cor0
----
-13
-27
15

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 cor2
----
3645 values hashing to c04c36412775e8805d6b3befa2f52917

query I rowsort
SELECT ALL col1 * col2 * 13 FROM tab0
----
1261
36894
97006

query I rowsort
SELECT col2 + col0 * - ( - col2 * + 56 ) FROM tab1
----
204345
430176
9126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 col1 FROM tab0
----
110
132
180

query I rowsort
SELECT - - cor0.col2 + ( + col1 ) * col1 FROM tab2 cor0
----
327
3507
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3384
SELECT DISTINCT CAST( col2 AS SIGNED ) * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-3384
SELECT DISTINCT CAST ( col2 AS INTEGER ) * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col0 * 72 + col1 FROM tab0 AS cor0
----
1814
2617
6499

query I rowsort
SELECT + 29 + col0 * cor0.col2 AS col1 FROM tab1 AS cor0
----
191
3677
7709

query I rowsort
SELECT ALL + col1 + 39 FROM tab0 cor0
----
125
130
136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3388
SELECT DISTINCT - + CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3388
SELECT DISTINCT - + CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3389
SELECT ( cor0.col0 ) * - col2 DIV CAST( cor0.col2 AS SIGNED ) col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3389
SELECT ( cor0.col0 ) * - col2 / CAST ( cor0.col2 AS INTEGER ) col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - + cor0.col1 + - 41 AS col1 FROM tab0 cor0
----
-127
-132
-138

query I rowsort
SELECT + - col0 + col1 * col0 FROM tab0 cor0
----
2040
3360
8010

query I rowsort
SELECT col2 * 15 FROM tab2 cor0
----
390
405
570

query I rowsort
SELECT 34 + 86 * - col2 FROM tab0 AS cor0
----
-2804
-52
-7018

query I rowsort
SELECT - 43 * col2 FROM tab1 AS cor0
----
-2322
-2451
-4128

query I rowsort
SELECT ALL + - col0 * + col0 + - ( - col1 ) AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL - col2 * col0 * - ( col2 * col1 ) + + col0 FROM tab1 AS cor0
----
2079424
227451
9584720

onlyif mysql # use DIV operator for integer division
query I rowsort label-3397
SELECT ALL + - col2 DIV + col0 AS col1 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3397
SELECT ALL + - col2 / + col0 AS col1 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + tab2.col0 * 9 FROM tab2, tab0 AS cor0
----
9 values hashing to 7d61f430b3f73ad1ee93cde0973b3fa7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3399
SELECT ALL + + 27 + - cor0.col2 * col1 DIV col0 + col1 FROM tab2 AS cor0
----
-61
36
67

skipif mysql # not compatible
query I rowsort label-3399
SELECT ALL + + 27 + - cor0.col2 * col1 / col0 + col1 FROM tab2 AS cor0
----
-61
36
67

query I rowsort
SELECT ALL - - col2 * col0 + - 50 FROM tab1 cor0
----
112
3598
7630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3401
SELECT + 96 DIV - col2 + ( col2 ) * col0 AS col1 FROM tab0 AS cor0
----
-61
7297
790

skipif mysql # not compatible
query I rowsort label-3401
SELECT + 96 / - col2 + ( col2 ) * col0 AS col1 FROM tab0 AS cor0
----
-61
7297
790

query I rowsort
SELECT ALL - + col1 + col1 * - col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT - + 91 + col2 FROM tab2 AS cor0
----
-53
-64
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-3404
SELECT DISTINCT - + col2 * col0 + - ( + col2 ) DIV col1 - - 86 * cor0.col1 FROM tab2 cor0
----
-1542
2477
3046

skipif mysql # not compatible
query I rowsort label-3404
SELECT DISTINCT - + col2 * col0 + - ( + col2 ) / col1 - - 86 * cor0.col1 FROM tab2 cor0
----
-1542
2477
3046

query I rowsort
SELECT ALL + - 20 + - col0 AS col2 FROM tab2 AS cor0
----
-27
-98
-99

query I rowsort
SELECT col2 * + cor0.col0 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col1 * col2 + + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + + col0 * + ( 91 ) FROM tab2 cor0
----
637
7098
7189

query I rowsort
SELECT col2 * - ( + col2 ) AS col1 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT 70 - + tab0.col2 AS col1 FROM tab0
----
-12
37
69

query I rowsort
SELECT - col0 * + cor0.col2 + - col1 AS col0 FROM tab2 cor0
----
-2087
-220
-3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * col0 * - col1 + col0 col1 FROM tab2
----
-106018
-1512
-358878

query I rowsort
SELECT ( col0 ) + - col2 * + col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + cor0.col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3415
SELECT + CAST( NULL AS SIGNED ) * col0 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3415
SELECT + CAST ( NULL AS INTEGER ) * col0 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 71 col0 FROM tab0, tab2 AS cor0
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3417
SELECT DISTINCT CAST( - col0 AS SIGNED ) + tab1.col1 AS col2 FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-3417
SELECT DISTINCT CAST ( - col0 AS INTEGER ) + tab1.col1 AS col2 FROM tab1
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 + - col0 col2 FROM tab0 AS cor0
----
-10
44
55

query I rowsort
SELECT + cor0.col2 * - col1 * + 9 + - col0 AS col2 FROM tab1 cor0
----
-11312
-12639
-5194

query I rowsort
SELECT + 65 * + col1 AS col2 FROM tab0
----
5590
5915
6305

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
3645 values hashing to b8435223668db186a5012e4112253f28

query I rowsort
SELECT ALL + col0 * + col1 + - tab0.col2 + col2 * + 59 AS col0 FROM tab0
----
12855
3453
3978

query I rowsort
SELECT ALL 88 + - col1 FROM tab0
----
-3
-9
2

query I rowsort
SELECT + 70 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT ALL - col1 * + col0 * - cor0.col1 + col2 AS col2 FROM tab0 AS cor0
----
177537
329316
737091

query I rowsort
SELECT DISTINCT 51 * + col2 AS col1 FROM tab2 AS cor0
----
1326
1377
1938

query I rowsort
SELECT ALL + 94 + col0 FROM tab2 cor0
----
101
172
173

query I rowsort
SELECT DISTINCT + + 99 + col0 FROM tab0 AS cor0
----
123
134
188

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL ( 16 + col0 ) FROM tab0
----
105
40
51

query I rowsort
SELECT ALL + col2 * col1 + col0 AS col1 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT col2 * + col0 * col0 + - col1 AS col2 FROM tab0 AS cor0
----
1128
18922
649431

onlyif mysql # use DIV operator for integer division
query I rowsort label-3433
SELECT DISTINCT + cor0.col1 DIV - 7 AS col1 FROM tab1 AS cor0
----
-1
-3

skipif mysql # not compatible
query I rowsort label-3433
SELECT DISTINCT + cor0.col1 / - 7 AS col1 FROM tab1 AS cor0
----
-1
-3

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
86
91
97

query I rowsort
SELECT + 98 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT DISTINCT 84 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
84

query I rowsort
SELECT ALL 99 + + 91 * - col2 + col2 * - 25 FROM tab1 AS cor0
----
-11037
-6165
-6513

query I rowsort
SELECT ALL + 40 * - col1 - - col0 AS col2 FROM tab2 AS cor0
----
-1233
-2282
-601

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * col0 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ( 34 ) + col1 AS col1 FROM tab2
----
51
65
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3441
SELECT CAST( NULL AS SIGNED ) + - col1 * col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3441
SELECT CAST ( NULL AS INTEGER ) + - col1 * col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 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 ALL ( 98 ) col2 FROM tab1
----
98
98
98

query I rowsort
SELECT + 2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT DISTINCT + - ( col2 ) + col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) * col1 + - ( 87 ) + - col0 col2 FROM tab1 cor0
----
-1207
-168
-791

query I rowsort
SELECT ALL 14 * col0 AS col1 FROM tab0 AS cor0
----
1246
336
490

onlyif mysql # use DIV operator for integer division
query I rowsort label-3448
SELECT DISTINCT - col0 DIV 11 FROM tab0 cor0
----
-2
-3
-8

skipif mysql # not compatible
query I rowsort label-3448
SELECT DISTINCT - col0 / 11 FROM tab0 cor0
----
-2
-3
-8

query I rowsort
SELECT DISTINCT + - 22 * - 82 + col2 AS col2 FROM tab1 AS cor0
----
1858
1861
1900

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col0 * - cor0.col2 + col0 * ( col2 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( + col2 + + col1 ) * ( 0 ) * + col0 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 * ( - col2 ) FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL + ( col0 ) * - col1 * + 56 FROM tab1
----
-35840
-4368
-58240

query I rowsort
SELECT ALL - + 52 * col2 * ( col0 * + col2 ) FROM tab1 AS cor0
----
-10812672
-38338560
-454896

query I rowsort
SELECT + col2 + cor0.col2 * + col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT + + 78 * col0 FROM tab1 AS cor0
----
234
4992
6240

query I rowsort
SELECT ALL - + 44 * + col1 AS col2 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT DISTINCT col0 + + 4 * 30 FROM tab2
----
127
198
199

query I rowsort
SELECT - 69 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

query I rowsort
SELECT col0 * col0 + - 52 AS col0 FROM tab2
----
-3
6032
6189

query I rowsort
SELECT col1 * 74 AS col1 FROM tab0
----
6364
6734
7178

query I rowsort
SELECT cor0.col1 + col1 * col0 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3464
SELECT DISTINCT + col1 * - CAST( NULL AS DECIMAL ) + col1 + col2 col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3464
SELECT DISTINCT + col1 * - CAST ( NULL AS REAL ) + col1 + col2 col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + - col1 * ( col0 ) AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL col0 * 10 FROM tab0 cor0
----
240
350
890

query I rowsort
SELECT ALL + col1 + ( col1 ) * col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + - cor0.col1 + - col2 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL - + col1 * ( col1 * cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT + + cor0.col1 + - 96 AS col0 FROM tab2 AS cor0
----
-37
-65
-79

query I rowsort
SELECT - - 84 * ( + col0 ) FROM tab2 AS cor0
----
588
6552
6636

query I rowsort
SELECT ALL + col0 * 7 FROM tab2 AS cor0
----
49
546
553

query I rowsort
SELECT ALL + 38 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-3268
-3458
-3686

query I rowsort
SELECT - ( + col1 ) * col2 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT + col2 * col1 + + cor0.col1 * cor0.col0 * col2 + - col2 FROM tab1 cor0
----
100992
36993
5562

query I rowsort
SELECT DISTINCT - ( col2 ) * - col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 31 + 8 AS col0 FROM tab0 AS cor0
----
-23

query I rowsort
SELECT ALL + - col1 * + 45 FROM tab0 AS cor0
----
-3870
-4095
-4365

query I rowsort
SELECT 82 + col1 * col0 FROM tab2 AS cor0
----
1425
299
4684

query I rowsort
SELECT - col0 + col1 + - col2 AS col0 FROM tab1 cor0
----
-111
-163
-31

query I rowsort
SELECT DISTINCT tab2.col2 + ( - col2 + col1 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL tab0.col2 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL col2 * - col0 + - col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT - col2 * - col2 + col0 AS col0 FROM tab1
----
2919
3313
9296

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL NOT BETWEEN ( NULL ) AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col0 * col0 * col1 col2 FROM tab0
----
118826
49569
720893

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 - col0 AS col0 FROM tab2 WHERE NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL cor0.col0 + - col0 * + col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT ( NULL ) = NULL
----

query I rowsort
SELECT ALL + col1 + col2 AS col1 FROM tab1 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT ALL col0 * + cor0.col0 * - col1 + + col2 AS col1 FROM tab2 AS cor0
----
-106059
-1492
-358930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col1 + col2 col1 FROM tab1 AS cor0 WHERE NOT NULL < ( NULL )
----

query I rowsort
SELECT ALL col0 + col1 * - col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT ALL col2 + col0 * + col1 + + col0 * col0 FROM tab2
----
10712
293
7622

query I rowsort
SELECT ALL - col0 + - col1 * + col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT ALL + col1 * - tab0.col0 + col2 FROM tab0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-3498
SELECT + col2 * + col2 DIV col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3498
SELECT + col2 * + col2 / col2 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3499
SELECT col1 + cor0.col1 - col0 DIV col1 FROM tab2 cor0
----
117
30
62

skipif mysql # not compatible
query I rowsort label-3499
SELECT col1 + cor0.col1 - col0 / col1 FROM tab2 cor0
----
117
30
62

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT + col1 BETWEEN NULL AND ( col0 / col1 ) AND ( NULL ) NOT BETWEEN NULL AND col0 OR NOT NULL = - col0 + cor0.col1 / col1
----

query I rowsort
SELECT ALL - - col0 * - col0 + col2 * col2 AS col1 FROM tab1 AS cor0
----
-847
2816
2907

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col1 + + col2 col2 FROM tab2
----
26
27
38

query I rowsort
SELECT + col2 + + col1 * col1 + + col2 FROM tab1
----
214
361
784

query I rowsort
SELECT ALL - + col0 * - col0 + col1 AS col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT + col1 * + col1 + - col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NULL >= NULL OR NOT NULL IN ( + col0 + - col1 / + col1 )
----

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT + cor0.col1 * + col0 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + col2 + - col0 - + col1 * col2 FROM tab2 AS cor0
----
-1586
-687
-817

query I rowsort
SELECT - + 3 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 65b7e16aaa7821ace3a45a9846ffa166

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3511
SELECT ALL col2 * - tab0.col2 * - CAST( NULL AS SIGNED ) + + tab0.col1 - col1 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3511
SELECT ALL col2 * - tab0.col2 * - CAST ( NULL AS INTEGER ) + + tab0.col1 - col1 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + col2 * - 47 FROM tab1 AS cor0
----
-2484
-2622
-4416

query I rowsort
SELECT + col2 * col2 * - 74 FROM tab2 AS cor0
----
-106856
-50024
-53946

query I rowsort
SELECT + col1 * + ( col2 ) AS col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col2 + - 82 AS col2 FROM tab0 AS cor0
----
-49
-81
0

query I rowsort
SELECT + + col1 + - ( col2 + + col0 ) AS col1 FROM tab0 cor0
----
-80
29
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-3517
SELECT + col0 + ( + cor0.col1 ) DIV - col2 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-3517
SELECT + col0 + ( + cor0.col1 ) / - col2 FROM tab0 AS cor0
----
-62
22
88

query I rowsort
SELECT ALL + col2 FROM tab0 WHERE ( - col2 ) > + col2
----

query I rowsort
SELECT + col2 * col0 + + tab0.col2 * col0 + col2 * col1 * - col1 FROM tab0
----
-242484
-664446
-9339

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 WHERE - col0 * col2 IN ( col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - tab2.col0 col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT tab2.col2 + + col1 + col1 FROM tab2
----
144
72
89

query I rowsort
SELECT - col1 - - col0 * - col1 FROM tab1
----
-104
-1053
-650

query I rowsort
SELECT ALL tab2.col1 - col2 * col1 AS col2 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT ALL - col1 + + col0 * col1 AS col2 FROM tab2
----
1326
186
4543

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col2 + - col0 * col2 + col1 * col0 IN ( col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL col0 - - col2 AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT col1 / + col1 + - col2 FROM tab1 WHERE NULL = - col1
----

query I rowsort
SELECT + col0 - - tab0.col1 * - col1 * - col1 FROM tab0
----
636080
753660
912708

query I rowsort
SELECT + col1 * - 87 + - col0 FROM tab2 AS cor0
----
-1558
-2704
-5211

onlyif mysql # use DIV operator for integer division
query I rowsort label-3531
SELECT col1 DIV 35 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3531
SELECT col1 / 35 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - + cor0.col0 + col2 * - col0 AS col1 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-3533
SELECT DISTINCT - col1 DIV - ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-3533
SELECT DISTINCT - col1 / - ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3534
SELECT ALL + - col2 DIV cor0.col1 + - 76 DIV - cor0.col1 FROM tab2 AS cor0
----
1
2
2

skipif mysql # not compatible
query I rowsort label-3534
SELECT ALL + - col2 / cor0.col1 + - 76 / - cor0.col1 FROM tab2 AS cor0
----
1
2
2

query I rowsort
SELECT ALL + col1 * + col1 - col1 FROM tab2 AS cor0
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * + col1 col0 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - col0 * cor0.col1 col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + + col0 * + col2 + col2 * col0 AS col2 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT ALL col1 * - 24 + + col1 * cor0.col2 * 42 FROM tab0 AS cor0
----
117132
1746
311220

query I rowsort
SELECT ALL - col0 + + 95 AS col1 FROM tab0 AS cor0
----
6
60
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3541
SELECT + CAST( - cor1.col1 AS SIGNED ) col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3541
SELECT + CAST ( - cor1.col1 AS INTEGER ) col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT + + col2 * col1 + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3543
SELECT ALL + ( col0 ) * ( cor0.col2 ) - col0 * - ( - col2 + - col1 ) * + CAST( - cor0.col0 AS SIGNED ) FROM tab2 cor0
----
3031
346257
519168

skipif mysql # not compatible
query I rowsort label-3543
SELECT ALL + ( col0 ) * ( cor0.col2 ) - col0 * - ( - col2 + - col1 ) * + CAST ( - cor0.col0 AS INTEGER ) FROM tab2 cor0
----
3031
346257
519168

query I rowsort
SELECT DISTINCT col0 * col0 + col1 AS col1 FROM tab0 AS cor0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + + col0 col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3546
SELECT - CAST( NULL AS SIGNED ) * 74 + cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3546
SELECT - CAST ( NULL AS INTEGER ) * 74 + cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + + 37 + col1 AS col1 FROM tab1 AS cor0
----
47
50
63

query I rowsort
SELECT ALL + cor0.col2 * + col1 AS col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT 83 * col0 * - 63 + + tab2.col2 AS col0 FROM tab2
----
-36576
-407836
-413053

query I rowsort
SELECT 3 AS col0 FROM tab2 cor0
----
3
3
3

query I rowsort
SELECT DISTINCT col2 * col0 * tab0.col1 + col0 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT + col2 + ( + 59 + col2 ) AS col0 FROM tab1 cor0
----
167
173
251

query I rowsort
SELECT ALL + col2 * col1 - 51 AS col1 FROM tab0 AS cor0
----
2787
46
7411

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab0, tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT 75 * col1 + col0 + + ( col1 + - 93 ) * + col2 FROM tab0
----
6243
6750
7314

onlyif mysql # use DIV operator for integer division
query I rowsort label-3556
SELECT - col2 + 37 DIV + col0 FROM tab2
----
-22
-26
-38

skipif mysql # not compatible
query I rowsort label-3556
SELECT - col2 + 37 / + col0 FROM tab2
----
-22
-26
-38

query I rowsort
SELECT ALL + 99 - 64 * cor0.col0 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 474688e4cdd28d40c269a9c81daef2bc

query I rowsort
SELECT DISTINCT + col1 * + 41 FROM tab0
----
3526
3731
3977

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3559
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 61 col2 FROM tab0, tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3559
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 61 col2 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT col2 + ( - tab2.col2 * col0 ) FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT + col0 * - ( - col1 ) + col1 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3562
SELECT + col0 * + col0 + col2 DIV col1 AS col0 FROM tab2 cor0
----
49
6084
6243

skipif mysql # not compatible
query I rowsort label-3562
SELECT + col0 * + col0 + col2 / col1 AS col0 FROM tab2 cor0
----
49
6084
6243

query I rowsort
SELECT DISTINCT - + col0 * ( col1 ) + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - - col2 * + col1 * - col0 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab0, tab2 AS cor0, tab2 cor1, tab2 AS cor2
----
26
27
38

query I rowsort
SELECT + + cor0.col0 * + 51 AS col2 FROM tab2 AS cor0
----
357
3978
4029

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1, tab0 cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3568
SELECT + CAST( 10 AS SIGNED ) * + col0 FROM tab0 AS cor0
----
240
350
890

skipif mysql # not compatible
query I rowsort label-3568
SELECT + CAST ( 10 AS INTEGER ) * + col0 FROM tab0 AS cor0
----
240
350
890

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3569
SELECT ALL + CAST( NULL AS SIGNED ) / col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3569
SELECT ALL + CAST ( NULL AS INTEGER ) / col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( col1 ) + col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col0 + + col2 * ( 13 ) AS col0 FROM tab1 AS cor0
----
1328
705
805

query I rowsort
SELECT ALL 47 + col0 * ( - col1 ) AS col1 FROM tab0 AS cor0
----
-2017
-3348
-8052

query I rowsort
SELECT DISTINCT - + 69 * col1 * col1 AS col1 FROM tab0 AS cor0
----
-510324
-571389
-649221

onlyif mysql # use DIV operator for integer division
query I rowsort label-3574
SELECT ALL col0 DIV + col2 AS col1 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3574
SELECT ALL col0 / + col2 AS col1 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT col0 + col1 * col1 * + cor0.col2 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT 5 * - col2 * + ( col1 ) FROM tab1 cor0
----
-2850
-6240
-7020

query I rowsort
SELECT ALL - 58 * col0 AS col0 FROM tab1 AS cor0
----
-174
-3712
-4640

query I rowsort
SELECT DISTINCT 49 + - col1 FROM tab2 AS cor0
----
-10
18
32

query I rowsort
SELECT DISTINCT col0 * 33 AS col2 FROM tab1
----
2112
2640
99

query I rowsort
SELECT - tab2.col2 * - 33 FROM tab2
----
1254
858
891

query I rowsort
SELECT - 93 + col0 AS col1 FROM tab0 AS cor0
----
-4
-58
-69

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 29 + + col1 col2 FROM tab1 AS cor0
----
-16
-19
-3

query I rowsort
SELECT ALL - + 90 * + col1 AS col1 FROM tab1 AS cor0
----
-1170
-2340
-900

query I rowsort
SELECT ALL + 75 + + col0 FROM tab0 AS cor0
----
110
164
99

query I rowsort
SELECT + col2 * col0 + + cor0.col0 * - cor0.col2 AS col1 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + ( - col1 ) * + 74 col2 FROM tab2 AS cor0
----
-1296
-2321
-4392

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3588
SELECT ALL CAST( NULL AS DECIMAL ) * 95 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3588
SELECT ALL CAST ( NULL AS REAL ) * 95 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 * - col1 + col2 * + col1 col1 FROM tab1 AS cor0
----
350
832
962

query I rowsort
SELECT DISTINCT - 97 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2
----
-97

query I rowsort
SELECT DISTINCT - 4 FROM tab2, tab1 AS cor0
----
-4

query I rowsort
SELECT + 98 + 44 AS col1 FROM tab2 AS cor0
----
142
142
142

query I rowsort
SELECT - col1 + 73 * col1 * col2 FROM tab0
----
207088
544635
6984

query I rowsort
SELECT col0 * col2 * + col2 + - 85 FROM tab2
----
113991
5018
52643

query I rowsort
SELECT + 75 FROM tab0, tab0 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT + + col2 * - col1 * + 30 AS col2 FROM tab0 AS cor0
----
-223860
-2910
-85140

onlyif mysql # use DIV operator for integer division
query I rowsort label-3597
SELECT col2 + + col2 + 17 * col2 DIV - col1 FROM tab0 AS cor0
----
149
2
60

skipif mysql # not compatible
query I rowsort label-3597
SELECT col2 + + col2 + 17 * col2 / - col1 FROM tab0 AS cor0
----
149
2
60

query I rowsort
SELECT tab0.col0 * col2 * - col1 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3599
SELECT 78 * - ( tab0.col0 ) * CAST( ( col2 ) * 29 AS SIGNED ) + + ( tab0.col2 ) * col0 AS col2 FROM tab0
----
-16500778
-1790712
-79135

skipif mysql # not compatible
query I rowsort label-3599
SELECT 78 * - ( tab0.col0 ) * CAST ( ( col2 ) * 29 AS INTEGER ) + + ( tab0.col2 ) * col0 AS col2 FROM tab0
----
-16500778
-1790712
-79135

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3600
SELECT - - col2 + - CAST( col2 AS SIGNED ) * - cor0.col2 AS col0 FROM tab1 cor0
----
2970
3306
9312

skipif mysql # not compatible
query I rowsort label-3600
SELECT - - col2 + - CAST ( col2 AS INTEGER ) * - cor0.col2 AS col0 FROM tab1 cor0
----
2970
3306
9312

query I rowsort
SELECT - col2 * 56 AS col0 FROM tab1 AS cor0
----
-3024
-3192
-5376

query I rowsort
SELECT DISTINCT + col1 * - col0 + + 53 * col0 FROM tab0 cor0
----
-1540
-3382
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 77 col2 FROM tab1 AS cor0
----
-1001
-2002
-770

onlyif mysql # use DIV operator for integer division
query I rowsort label-3604
SELECT + col2 + + col0 DIV col2 AS col1 FROM tab1
----
54
58
96

skipif mysql # not compatible
query I rowsort label-3604
SELECT + col2 + + col0 / col2 AS col1 FROM tab1
----
54
58
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3605
SELECT CAST( NULL AS SIGNED ) + + 9 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3605
SELECT CAST ( NULL AS INTEGER ) + + 9 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col1 * 77 + col1 * - col2 + 93 FROM tab0
----
-362
3877
7465

onlyif mysql # use DIV operator for integer division
query I rowsort label-3607
SELECT ALL + col2 DIV - CAST( - col2 * + col1 AS SIGNED ) + 10 DIV - col2 col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3607
SELECT ALL + col2 / - CAST ( - col2 * + col1 AS INTEGER ) + 10 / - col2 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * cor0.col2 + + 55 FROM tab0 AS cor0
----
7353
847
90

query I rowsort
SELECT DISTINCT + cor0.col0 + + 69 FROM tab1 AS cor0
----
133
149
72

query I rowsort
SELECT + + col1 - - col0 AS col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3611
SELECT + col0 * + CAST( cor0.col0 AS SIGNED ) - - col1 col1 FROM tab0 cor0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3611
SELECT + col0 * + CAST ( cor0.col0 AS INTEGER ) - - col1 col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT 19 FROM tab2, tab2 cor0, tab2 AS cor1
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 + 74 col0 FROM tab1, tab2, tab0 AS cor0, tab0
----
81 values hashing to e93a1105612f05014e18906360dcc8ea

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT col1 * 20 + + col1 FROM tab1 cor0
----
210
273
546

query I rowsort
SELECT col1 + + col0 - + col2 AS col2 FROM tab0 AS cor0
----
131
77
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 * col1 + col2 col0 FROM tab2 AS cor0
----
1360
2563
769

query I rowsort
SELECT + - 96 + - col2 * col0 AS col1 FROM tab2 AS cor0
----
-2124
-285
-3098

query I rowsort
SELECT - + cor0.col1 * - col2 + col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - col1 * + col2 - col2 AS col2 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT ( col0 ) * + col0 + - 93 FROM tab1 cor0
----
-84
4003
6307

query I rowsort
SELECT - 55 - + col0 FROM tab0 AS cor0
----
-144
-79
-90

query I rowsort
SELECT - ( - 72 ) * - cor0.col2 FROM tab1 AS cor0
----
-3888
-4104
-6912

onlyif mysql # use DIV operator for integer division
query I rowsort label-3624
SELECT ALL + 52 * + col1 DIV ( col1 ) + col2 * cor0.col1 FROM tab2 cor0
----
1586
698
889

skipif mysql # not compatible
query I rowsort label-3624
SELECT ALL + 52 * + col1 / ( col1 ) + col2 * cor0.col1 FROM tab2 cor0
----
1586
698
889

query I rowsort
SELECT ALL + 44 + col2 AS col0 FROM tab0 AS cor0
----
126
45
77

query I rowsort
SELECT + 69 AS col0 FROM tab0 cor0
----
69
69
69

query I rowsort
SELECT DISTINCT + + 71 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
71

query I rowsort
SELECT DISTINCT - 30 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-30

onlyif mysql # use DIV operator for integer division
query I rowsort label-3629
SELECT - - col0 DIV 96 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3629
SELECT - - col0 / 96 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3630
SELECT DISTINCT + tab0.col0 DIV 29 AS col2 FROM tab0, tab0 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3630
SELECT DISTINCT + tab0.col0 / 29 AS col2 FROM tab0, tab0 AS cor0
----
0
1
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3631
SELECT ALL - col2 + + tab2.col0 DIV col1 AS col0 FROM tab2
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-3631
SELECT ALL - col2 + + tab2.col0 / col1 AS col0 FROM tab2
----
-25
-27
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3632
SELECT ALL + CAST( + col2 AS SIGNED ) + - col2 col2 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3632
SELECT ALL + CAST ( + col2 AS INTEGER ) + - col2 col2 FROM tab2
----
0
0
0

query I rowsort
SELECT + col2 * + col1 - col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT ALL + cor0.col2 * col2 - - ( col0 ) FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT 40 * col0 AS col1 FROM tab2 cor0
----
280
3120
3160

onlyif mysql # use DIV operator for integer division
query I rowsort label-3636
SELECT col1 * col1 DIV - cor0.col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-3636
SELECT col1 * col1 / - cor0.col1 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3637
SELECT ALL col1 DIV col1 + tab0.col1 AS col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3637
SELECT ALL col1 / col1 + tab0.col1 AS col2 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT 30 * + 1 * + col1 + + 59 * 20 + tab2.col2 * - col2 * - col2 AS col0 FROM tab2
----
20526
21793
56562

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3639
SELECT + CAST( NULL AS SIGNED ) + + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3639
SELECT + CAST ( NULL AS INTEGER ) + + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3640
SELECT tab2.col0 + + col2 DIV - col1 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-3640
SELECT tab2.col0 + + col2 / - col1 FROM tab2
----
7
77
78

query I rowsort
SELECT DISTINCT + 45 + - tab0.col2 * tab0.col1 FROM tab0
----
-2793
-52
-7417

query I rowsort
SELECT + - col0 * col0 + + 75 AS col1 FROM tab1 AS cor0
----
-4021
-6325
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3643
SELECT ALL + col0 DIV - col0 + - col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-3643
SELECT ALL + col0 / - col0 + - col2 FROM tab1 AS cor0
----
-55
-58
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3644
SELECT ALL col2 * - col0 + + CAST( col1 * - col0 AS SIGNED ) FROM tab0 AS cor0
----
-15397
-2856
-3430

skipif mysql # not compatible
query I rowsort label-3644
SELECT ALL col2 * - col0 + + CAST ( col1 * - col0 AS INTEGER ) FROM tab0 AS cor0
----
-15397
-2856
-3430

query I rowsort
SELECT ALL - cor0.col2 * + col2 + + col2 * - 19 * col2 + ( + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
-13461
-14549
-28863

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col0 FROM tab1
----
44
44
44

query I rowsort
SELECT - 44 * + col2 FROM tab0 AS cor0
----
-1452
-3608
-44

query I rowsort
SELECT DISTINCT + + 58 * - col2 AS col2 FROM tab2 AS cor0
----
-1508
-1566
-2204

query I rowsort
SELECT - 16 + + col1 FROM tab2 cor0
----
1
15
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * - cor0.col1 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - ( - col1 ) * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 + cor0.col0 col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 27 + - cor0.col2 FROM tab1 AS cor0
----
-27
-30
-69

query I rowsort
SELECT + col0 * + col1 + + ( col1 ) FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3655
SELECT 13 DIV - col0 + + 69 FROM tab1 AS cor0
----
65
69
69

skipif mysql # not compatible
query I rowsort label-3655
SELECT 13 / - col0 + + 69 FROM tab1 AS cor0
----
65
69
69

query I rowsort
SELECT DISTINCT + - cor0.col0 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col0 + col2 * - col2 - col2 AS col1 FROM tab2 cor0
----
-1403
-624
-749

query I rowsort
SELECT + - col0 + + 95 + col2 FROM tab1 AS cor0
----
111
146
88

query I rowsort
SELECT DISTINCT - col2 + + col0 * + col0 * - col0 - - col2 * tab2.col0 FROM tab2
----
-181
-472550
-490075

query I rowsort
SELECT DISTINCT col0 + - ( ( col2 ) ) * col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT col1 + col0 * + col0 AS col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT - cor0.col2 + 4 * col2 AS col0 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT col2 * + col1 + - col1 - - col0 FROM tab2 cor0
----
1553
708
813

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( col1 AS REAL ) + + col0 * + col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + 71 * - col1 AS col2 FROM tab1 AS cor0
----
-1846
-710
-923

query I rowsort
SELECT 90 FROM tab0, tab2 cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # use DIV operator for integer division
query I rowsort label-3667
SELECT ALL col1 * tab0.col2 DIV col2 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3667
SELECT ALL col1 * tab0.col2 / col2 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + col1 * - 66 * tab2.col0 - + tab2.col0 FROM tab2
----
-14329
-303810
-88717

query I rowsort
SELECT cor0.col1 * + col1 + - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-540
-871
598

query I rowsort
SELECT ALL col0 * 16 FROM tab2
----
112
1248
1264

query I rowsort
SELECT DISTINCT - col1 + + col1 * - col0 * + col1 FROM tab0 AS cor0
----
-177590
-329412
-737100

query I rowsort
SELECT ALL + - 5 + 58 AS col2 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT ALL - + ( col2 ) * - cor0.col0 + + col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 14 col0 FROM tab1 cor0
----
14
14
14

query I rowsort
SELECT - col0 * + col0 + + col2 * 11 * cor0.col2 AS col1 FROM tab0 cor0
----
-1214
11403
66043

query I rowsort
SELECT + 70 * col2 + + col0 AS col0 FROM tab2 AS cor0
----
1897
1898
2739

onlyif mysql # use DIV operator for integer division
query I rowsort label-3677
SELECT 53 DIV 23 + - col1 AS col0 FROM tab0 AS cor0
----
-84
-89
-95

skipif mysql # not compatible
query I rowsort label-3677
SELECT 53 / 23 + - col1 AS col0 FROM tab0 AS cor0
----
-84
-89
-95

query I rowsort
SELECT - ( col1 ) * + cor0.col2 - col1 AS col0 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - col0 * col0 + col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + - ( 57 ) * - col0 - 20 AS col1 FROM tab0 AS cor0
----
1348
1975
5053

query I rowsort
SELECT 85 + - 64 AS col1 FROM tab2 AS cor0
----
21
21
21

query I rowsort
SELECT + - col0 - cor0.col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + col0 + ( col0 ) AS col0 FROM tab1 cor0
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3684
SELECT - CAST( NULL AS SIGNED ) FROM tab0, tab2 cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3684
SELECT - CAST ( NULL AS INTEGER ) FROM tab0, tab2 cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3685
SELECT - ( + col0 ) + col1 * + CAST( + col2 AS SIGNED ) + col1 * + tab2.col1 AS col2 FROM tab2
----
1791
4937
856

skipif mysql # not compatible
query I rowsort label-3685
SELECT - ( + col0 ) + col1 * + CAST ( + col2 AS INTEGER ) + col1 * + tab2.col1 AS col2 FROM tab2
----
1791
4937
856

query I rowsort
SELECT - col2 + - col0 + cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
2781
61
7291

onlyif mysql # use DIV operator for integer division
query I rowsort label-3687
SELECT + + col2 DIV + col0 + col1 + col2 * + col0 FROM tab1 AS cor0
----
206
3658
7694

skipif mysql # not compatible
query I rowsort label-3687
SELECT + + col2 / + col0 + col1 + col2 * + col0 FROM tab1 AS cor0
----
206
3658
7694

onlyif mysql # use DIV operator for integer division
query I rowsort label-3688
SELECT DISTINCT + col2 + - tab2.col2 DIV - tab2.col0 FROM tab2
----
26
30
38

skipif mysql # not compatible
query I rowsort label-3688
SELECT DISTINCT + col2 + - tab2.col2 / - tab2.col0 FROM tab2
----
26
30
38

query I rowsort
SELECT + 89 + + col1 * col2 * + col2 + 59 FROM tab1
----
119956
32638
75964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3690
SELECT CAST( NULL AS DECIMAL ) / tab1.col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3690
SELECT CAST ( NULL AS REAL ) / tab1.col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + + ( 93 ) * col1 + col0 FROM tab2 cor0
----
1698
2917
5591

query I rowsort
SELECT DISTINCT + + col1 * col1 - - col0 * col1 FROM tab0 AS cor0
----
12804
16380
9460

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3693
SELECT ALL col2 + - CAST( col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-3693
SELECT ALL col2 + - CAST ( col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + col2 + + col2 + 82 AS col0 FROM tab0 AS cor0
----
148
246
84

query I rowsort
SELECT ALL - + col0 * - col1 + 84 AS col2 FROM tab2 AS cor0
----
1427
301
4686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3696
SELECT + ( + col2 ) + + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3696
SELECT + ( + col2 ) + + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 38 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3698
SELECT - col1 DIV col0 + 91 col2 FROM tab1
----
83
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3698
SELECT - col1 / col0 + 91 col2 FROM tab1
----
83
91
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-3699
SELECT DISTINCT + col2 DIV col2 col1 FROM tab1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3699
SELECT DISTINCT + col2 / col2 col1 FROM tab1
----
1

query I rowsort
SELECT ALL cor0.col0 - ( + col0 ) * col1 * - ( col0 ) AS col2 FROM tab0 AS cor0
----
118860
49560
720900

onlyif mysql # use DIV operator for integer division
query I rowsort label-3701
SELECT DISTINCT + col1 DIV + 50 AS col1 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3701
SELECT DISTINCT + col1 / + 50 AS col1 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT + ( + col0 ) * - col1 + + tab1.col2 AS col2 FROM tab1
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 5 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT DISTINCT - col2 * + cor0.col2 + cor0.col1 * + col0 AS col2 FROM tab1 cor0
----
-2609
-2838
-8176

onlyif mysql # use DIV operator for integer division
query I rowsort label-3705
SELECT + - cor0.col2 DIV col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3705
SELECT + - cor0.col2 / col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - 10 * + cor0.col2 * col0 FROM tab2 AS cor0
----
-1890
-20280
-30020

query I rowsort
SELECT DISTINCT + 39 + - cor0.col1 FROM tab2 AS cor0
----
-20
22
8

query I rowsort
SELECT + col0 + - col1 * col0 AS col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - - col1 + - ( - col0 * - col2 + - 97 ) FROM tab1 AS cor0
----
-3541
-39
-7570

query I rowsort
SELECT - ( - col2 ) * col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3711
SELECT DISTINCT - CAST( - 96 AS SIGNED ) + + col0 FROM tab0 AS cor0
----
120
131
185

skipif mysql # not compatible
query I rowsort label-3711
SELECT DISTINCT - CAST ( - 96 AS INTEGER ) + + col0 FROM tab0 AS cor0
----
120
131
185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col1 FROM tab1 AS cor0
----
-82

query I rowsort
SELECT ALL - 11 AS col1 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 7120875811e4d19a19b69cd34b6bc202

query I rowsort
SELECT - 51 + - col2 * - col0 FROM tab1 AS cor0
----
111
3597
7629

onlyif mysql # use DIV operator for integer division
query I rowsort label-3715
SELECT ALL - ( col1 ) + + col2 DIV - ( + col2 + + col0 ) AS col0 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3715
SELECT ALL - ( col1 ) + + col2 / - ( + col2 + + col0 ) AS col0 FROM tab1 cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + 62 col0 FROM tab1 AS cor0
----
116
119
158

query I rowsort
SELECT + ( 67 ) FROM tab1
----
67
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3718
SELECT ALL 84 DIV + col0 AS col0 FROM tab1
----
1
1
28

skipif mysql # not compatible
query I rowsort label-3718
SELECT ALL 84 / + col0 AS col0 FROM tab1
----
1
1
28

query I rowsort
SELECT DISTINCT - ( - tab1.col1 ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT col1 * col0 + + col0 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + cor0.col2 * cor0.col1 - - col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT + + col1 * col2 + + cor0.col2 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT ALL col0 * col1 * + ( 70 ) FROM tab2
----
15190
322140
94010

onlyif mysql # use DIV operator for integer division
query I rowsort label-3724
SELECT 56 + col0 DIV - col2 AS col0 FROM tab1
----
55
56
56

skipif mysql # not compatible
query I rowsort label-3724
SELECT 56 + col0 / - col2 AS col0 FROM tab1
----
55
56
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3725
SELECT 11 * - tab0.col1 + - CAST( + col0 + col1 AS SIGNED ) col0 FROM tab0
----
-1056
-1181
-1199

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3725
SELECT 11 * - tab0.col1 + - CAST ( + col0 + col1 AS INTEGER ) col0 FROM tab0
----
-1056
-1181
-1199

query I rowsort
SELECT ( col2 ) - - col0 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT - col1 * - ( + 71 ) * + tab2.col2 FROM tab2
----
108914
45866
59427

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 DISTINCT - 51 - col0 AS col1 FROM tab2 cor0
----
-129
-130
-58

query I rowsort
SELECT DISTINCT - col2 * + 21 FROM tab1
----
-1134
-1197
-2016

query I rowsort
SELECT + col2 * 99 AS col0 FROM tab0
----
3267
8118
99

query I rowsort
SELECT + 86 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

query I rowsort
SELECT 61 AS col0 FROM tab1, tab0 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 9b52d3939da22c8931e3d5a72ddfb1b1

query I rowsort
SELECT - 48 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT DISTINCT 30 AS col2 FROM tab1, tab0 AS cor0
----
30

query I rowsort
SELECT ( - col2 ) + - col2 AS col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT + col0 * 98 FROM tab0 AS cor0
----
2352
3430
8722

query I rowsort
SELECT - - col0 - col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + 30 * - col2 col1 FROM tab2 AS cor0
----
-1102
-754
-783

onlyif mysql # use DIV operator for integer division
query I rowsort label-3740
SELECT + 95 DIV col0 FROM tab2
----
1
1
13

skipif mysql # not compatible
query I rowsort label-3740
SELECT + 95 / col0 FROM tab2
----
1
1
13

skipif mysql # not compatible
query I rowsort
SELECT 40 * - col2 * - CAST ( col2 AS REAL ) AS col1 FROM tab1
----
116640
129960
368640

onlyif mysql # use DIV operator for integer division
query I rowsort label-3742
SELECT DISTINCT col2 + 30 * - col1 + col2 DIV - col1 AS col0 FROM tab1 AS cor0
----
-248
-301
-728

skipif mysql # not compatible
query I rowsort label-3742
SELECT DISTINCT col2 + 30 * - col1 + col2 / - col1 AS col0 FROM tab1 AS cor0
----
-248
-301
-728

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 + col1 * + col0 FROM tab2 cor0
----
1054
1989
6136

onlyif mysql # use DIV operator for integer division
query I rowsort label-3744
SELECT - - col0 * + cor0.col0 - + col0 DIV col2 FROM tab0 AS cor0
----
1190
576
7920

skipif mysql # not compatible
query I rowsort label-3744
SELECT - - col0 * + cor0.col0 - + col0 / col2 FROM tab0 AS cor0
----
1190
576
7920

query I rowsort
SELECT DISTINCT + col0 * - ( - col0 ) - - col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT - col2 + 96 * + col0 * - cor0.col0 FROM tab2 AS cor0
----
-4731
-584090
-599174

query I rowsort
SELECT DISTINCT - + cor0.col0 * col1 + 2 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-526
-848
30

query I rowsort
SELECT DISTINCT + 47 - col1 AS col1 FROM tab0
----
-39
-44
-50

onlyif mysql # use DIV operator for integer division
query I rowsort label-3749
SELECT + col2 DIV + col2 + col0 * 63 + col0 AS col0 FROM tab0
----
1537
2241
5697

skipif mysql # not compatible
query I rowsort label-3749
SELECT + col2 / + col2 + col0 * 63 + col0 AS col0 FROM tab0
----
1537
2241
5697

query I rowsort
SELECT - col1 * col2 + col1 * col1 AS col0 FROM tab2
----
-357
124
1947

query I rowsort
SELECT ALL - col1 - col2 * - ( + tab1.col2 ) * - tab1.col0 AS col1 FROM tab1
----
-207946
-737293
-8774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 * + col0 - - 78 * col1 * + col2 col1 FROM tab0
----
221844
583816
8266

query I rowsort
SELECT ALL + col2 + 64 FROM tab0
----
146
65
97

query I rowsort
SELECT - col2 + + col0 * - col2 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT + col0 + - 51 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT - col0 * 8 AS col2 FROM tab2 AS cor0
----
-56
-624
-632

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - tab1.col2 * col2 - + ( + col1 ) AS col1 FROM tab1
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-3759
SELECT - 39 DIV col0 - col1 AS col2 FROM tab2 AS cor0
----
-17
-36
-59

skipif mysql # not compatible
query I rowsort label-3759
SELECT - 39 / col0 - col1 AS col2 FROM tab2 AS cor0
----
-17
-36
-59

query I rowsort
SELECT - cor0.col0 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL + - ( - col2 ) AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - + 11 * col1 AS col1 FROM tab0 AS cor0
----
-1001
-1067
-946

query I rowsort
SELECT ALL 50 * - col1 AS col0 FROM tab1 cor0
----
-1300
-500
-650

query I rowsort
SELECT DISTINCT col2 * col2 * tab2.col0 AS col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - ( col0 ) * col0 + col1 AS col2 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT col1 * tab1.col0 * + col1 AS col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT DISTINCT - 44 + + col1 * + col1 AS col2 FROM tab2 AS cor0
----
245
3437
917

onlyif mysql # use DIV operator for integer division
query I rowsort label-3768
SELECT - 31 DIV - col1 FROM tab1 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3768
SELECT - 31 / - col1 FROM tab1 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - 29 * cor0.col2 FROM tab2 AS cor0
----
-1102
-754
-783

query I rowsort
SELECT ALL - 30 + - col0 FROM tab0 AS cor0
----
-119
-54
-65

query I rowsort
SELECT ALL 16 + col0 AS col2 FROM tab1 cor0
----
19
80
96

query I rowsort
SELECT DISTINCT col0 * col2 * + col0 FROM tab2 AS cor0
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - col2 * + col0 col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT + - col0 - - cor0.col2 * col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - col0 * col2 * + col2 + col1 * + col2 AS col0 FROM tab2 AS cor0
----
-113430
-4266
-51194

query I rowsort
SELECT DISTINCT - + col2 + - ( + col1 ) * + col2 * col1 AS col0 FROM tab0 AS cor0
----
-244101
-679124
-9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-3777
SELECT DISTINCT - + 26 + 33 DIV + cor0.col0 FROM tab0 AS cor0
----
-25
-26

skipif mysql # not compatible
query I rowsort label-3777
SELECT DISTINCT - + 26 + 33 / + cor0.col0 FROM tab0 AS cor0
----
-25
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor2.col0 col1 FROM tab0, tab1 AS cor0, tab1 cor1, tab2, tab2 AS cor2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col2 ) + col1 col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT 56 AS col1 FROM tab2, tab1 AS cor0
----
56

query I rowsort
SELECT ALL - - ( + ( + col2 ) ) * - col0 - col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL cor0.col1 * + col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col1 AS REAL ) AS col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT - 19 * col1 AS col0 FROM tab1
----
-190
-247
-494

onlyif mysql # use DIV operator for integer division
query I rowsort label-3785
SELECT DISTINCT - ( col0 + + col1 ) DIV - col0 AS col1 FROM tab2
----
1
5

skipif mysql # not compatible
query I rowsort label-3785
SELECT DISTINCT - ( col0 + + col1 ) / - col0 AS col1 FROM tab2
----
1
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 * ( col1 ) * col2 - col2 col0 FROM tab0
----
611802
93621
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3787
SELECT CAST( NULL AS SIGNED ) * - col0 - + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3787
SELECT CAST ( NULL AS INTEGER ) * - col0 - + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + col0 ) + + col0 * tab0.col0 AS col2 FROM tab0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3789
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-3789
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
NULL

query I rowsort
SELECT DISTINCT - col0 * 36 FROM tab0
----
-1260
-3204
-864

query I rowsort
SELECT ALL 72 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3792
SELECT ALL + CAST( NULL AS SIGNED ) * - 66 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3792
SELECT ALL + CAST ( NULL AS INTEGER ) * - 66 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - 81 ) * - col2 AS col2 FROM tab2 AS cor0
----
2106
2187
3078

query I rowsort
SELECT DISTINCT + 13 FROM tab2, tab2 cor0
----
13

query I rowsort
SELECT - col2 + + col0 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + col0 + col1 * - cor0.col0 FROM tab1 cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-3797
SELECT DISTINCT 70 DIV col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-3797
SELECT DISTINCT 70 / col1 FROM tab0
----
0

query I rowsort
SELECT 21 * + col2 + 29 FROM tab1
----
1163
1226
2045

query I rowsort
SELECT + ( + col0 ) + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + - cor0.col0 * col2 + - col1 * col0 FROM tab0 AS cor0
----
-15397
-2856
-3430

query I rowsort
SELECT + 69 + + cor0.col0 FROM tab1 AS cor0
----
133
149
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-3802
SELECT + col0 + - col1 * col1 + col0 DIV - cor0.col1 AS col2 FROM tab1 AS cor0
----
-42
-673
-95

skipif mysql # not compatible
query I rowsort label-3802
SELECT + col0 + - col1 * col1 + col0 / - cor0.col1 AS col2 FROM tab1 AS cor0
----
-42
-673
-95

query I rowsort
SELECT DISTINCT - + col0 + col0 AS col2 FROM tab2 cor0
----
0

query I rowsort
SELECT DISTINCT col0 * + col0 * 18 + - col1 - + cor0.col2 FROM tab2 AS cor0
----
109427
112283
824

query I rowsort
SELECT ALL - - col0 + - 67 AS col0 FROM tab2 AS cor0
----
-60
11
12

query I rowsort
SELECT col2 + 48 AS col0 FROM tab0 AS cor0
----
130
49
81

query I rowsort
SELECT DISTINCT col2 + - ( col0 * col0 ) FROM tab1 AS cor0
----
-4039
-6304
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3808
SELECT ALL + col2 * + CAST( + 66 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
12474
133848
198132

skipif mysql # not compatible
query I rowsort label-3808
SELECT ALL + col2 * + CAST ( + 66 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
12474
133848
198132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + - col0 * + 95 + col2 col0 FROM tab1 AS cor0
----
-228
-5959
-7424

query I rowsort
SELECT + + col1 + + cor0.col2 * 75 AS col2 FROM tab2 AS cor0
----
2009
2056
2867

onlyif mysql # use DIV operator for integer division
query I rowsort label-3811
SELECT col1 * ( - tab2.col2 ) DIV + col1 - - col2 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3811
SELECT col1 * ( - tab2.col2 ) / + col1 - - col2 AS col0 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3812
SELECT col0 * CAST( NULL AS SIGNED ) * ( col2 ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3812
SELECT col0 * CAST ( NULL AS INTEGER ) * ( col2 ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3813
SELECT col1 DIV col2 + - ( - col0 ) FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-3813
SELECT col1 / col2 + - ( - col0 ) FROM tab0 AS cor0
----
132
26
90

query I rowsort
SELECT + col0 + col2 + - 22 AS col0 FROM tab1 AS cor0
----
154
35
99

query I rowsort
SELECT ALL 62 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT col2 + - ( - 12 ) * col1 AS col1 FROM tab0 cor0
----
1065
1165
1174

query I rowsort
SELECT ALL col2 * 57 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT DISTINCT + + 13 * 97 AS col1 FROM tab1 AS cor0
----
1261

onlyif mysql # use DIV operator for integer division
query I rowsort label-3819
SELECT col2 DIV 46 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3819
SELECT col2 / 46 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 60 * - col1 * - col0 AS col0 FROM tab1 AS cor0
----
38400
4680
62400

query I rowsort
SELECT - ( 25 ) FROM tab0 cor0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT - 97 FROM tab1 cor0
----
-97

query I rowsort
SELECT ( - 92 ) * + cor0.col0 FROM tab1 AS cor0
----
-276
-5888
-7360

query I rowsort
SELECT DISTINCT - 50 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-50

query I rowsort
SELECT ALL 91 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT - 76 FROM tab2, tab1, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to 30b3ee36c95bb84d1f6a640c4d41cf15

query I rowsort
SELECT + cor0.col1 * col0 + col0 * col1 AS col0 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT + + col2 * - cor0.col2 + - col2 * - col0 * col0 FROM tab2 AS cor0
----
157508
235714
594

query I rowsort
SELECT ALL - 31 * + col2 + tab0.col0 AS col1 FROM tab0
----
-2453
-999
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3830
SELECT ALL 76 * col0 DIV col2 + col0 DIV + col0 + col2 AS col1 FROM tab0
----
165
2662
89

skipif mysql # not compatible
query I rowsort label-3830
SELECT ALL 76 * col0 / col2 + col0 / + col0 + col2 AS col1 FROM tab0
----
165
2662
89

query I rowsort
SELECT DISTINCT + col2 + 15 AS col1 FROM tab1
----
111
69
72

query I rowsort
SELECT col2 * - cor0.col0 - 91 FROM tab0 AS cor0
----
-126
-7389
-883

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 * + 71 col1 FROM tab2 AS cor0
----
1245
2228
4215

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3834
SELECT ALL CAST( NULL AS SIGNED ) + + col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3834
SELECT ALL CAST ( NULL AS INTEGER ) + + col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3835
SELECT DISTINCT + + col2 DIV 91 AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3835
SELECT DISTINCT + + col2 / 91 AS col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT col1 - + col0 * + 43 FROM tab1
----
-103
-2742
-3427

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 + col0 * col2 col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3838
SELECT - col1 * - col2 + + CAST( NULL AS SIGNED ) * cor0.col2 + - col1 / ( col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3838
SELECT - col1 * - col2 + + CAST ( NULL AS INTEGER ) * cor0.col2 + - col1 / ( col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3839
SELECT + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3839
SELECT + CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3840
SELECT DISTINCT + 84 DIV col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3840
SELECT DISTINCT + 84 / col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT 52 * - col0 AS col1 FROM tab1 AS cor0
----
-156
-3328
-4160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3842
SELECT ALL + + 66 * cor0.col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3842
SELECT ALL + + 66 * cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 49 * + col2 + + 64 AS col2 FROM tab2 AS cor0
----
1338
1387
1926

query I rowsort
SELECT ALL 16 * + col1 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1456
1820
730

query I rowsort
SELECT DISTINCT + ( + col2 ) + + cor0.col1 * - col1 FROM tab1 AS cor0
----
-43
-622
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 86 col1 FROM tab2 AS cor0
----
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-3847
SELECT + col0 DIV - col0 + + tab2.col2 + - tab2.col0 FROM tab2
----
-42
-53
19

skipif mysql # not compatible
query I rowsort label-3847
SELECT + col0 / - col0 + + tab2.col2 + - tab2.col0 FROM tab2
----
-42
-53
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT - col0 DIV 41 AS col1 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3848
SELECT - col0 / 41 AS col1 FROM tab1 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3849
SELECT DISTINCT col1 DIV + col0 + + 46 * cor0.col2 FROM tab2 cor0
----
1196
1246
1748

skipif mysql # not compatible
query I rowsort label-3849
SELECT DISTINCT col1 / + col0 + + 46 * cor0.col2 FROM tab2 cor0
----
1196
1246
1748

query I rowsort
SELECT col0 + ( - 50 ) * - col1 AS col0 FROM tab0 AS cor0
----
4324
4639
4885

query I rowsort
SELECT ALL + + col0 * ( + col0 + - col1 ) AS col1 FROM tab2 AS cor0
----
-168
1482
4898

onlyif mysql # use DIV operator for integer division
query I rowsort label-3852
SELECT DISTINCT - cor0.col0 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3852
SELECT DISTINCT - cor0.col0 / col2 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT - - col2 * 6 * col2 + col1 - col1 AS col0 FROM tab0 AS cor0
----
40344
6
6534

query I rowsort
SELECT + tab0.col1 * - col1 + col1 * - col0 FROM tab0
----
-12804
-16380
-9460

onlyif mysql # use DIV operator for integer division
query I rowsort label-3855
SELECT + 71 DIV - col1 + + col2 FROM tab1
----
50
52
91

skipif mysql # not compatible
query I rowsort label-3855
SELECT + 71 / - col1 + + col2 FROM tab1
----
50
52
91

query I rowsort
SELECT col2 + col0 - - tab0.col0 FROM tab0
----
260
71
81

query I rowsort
SELECT DISTINCT + col1 + tab1.col1 * + 34 * 61 - tab1.col2 AS col0 FROM tab1
----
20693
26879
53896

query I rowsort
SELECT ALL - + 82 + col0 FROM tab0 AS cor0
----
-47
-58
7

query I rowsort
SELECT col1 * - col2 * - col2 + ( + cor0.col2 ) * - col2 * ( col0 * col1 ) FROM tab1 AS cor0
----
-151632
-2046870
-9464832

query I rowsort
SELECT ALL - 31 * col1 * - col0 FROM tab1 AS cor0
----
19840
2418
32240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 92 * 4 + - col1 * col2 col2 FROM tab1 cor0
----
-1036
-202
-880

query I rowsort
SELECT ALL 3 + col1 * col2 AS col0 FROM tab1 AS cor0
----
1251
1407
573

query I rowsort
SELECT DISTINCT 53 + + col1 * col0 FROM tab0 AS cor0
----
2117
3448
8152

query I rowsort
SELECT + col2 * + col0 + col1 * col2 AS col1 FROM tab1 cor0
----
1566
4218
8928

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) * + col2 + + ( ( - col1 ) ) * cor0.col2 * + col0 col0 FROM tab1 AS cor0
----
-1296
-33231
-90624

onlyif mysql # use DIV operator for integer division
query I rowsort label-3866
SELECT + col0 DIV ( - col0 ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3866
SELECT + col0 / ( - col0 ) FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3867
SELECT DISTINCT - ( + col0 ) + + cor0.col1 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3867
SELECT DISTINCT - ( + col0 ) + + cor0.col1 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 * - ( col0 + cor0.col1 ) * 53 FROM tab0 AS cor0
----
192390
6996
782280

query I rowsort
SELECT DISTINCT 72 * - col2 FROM tab1 AS cor0
----
-3888
-4104
-6912

onlyif mysql # use DIV operator for integer division
query I rowsort label-3870
SELECT ALL - col1 DIV 54 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3870
SELECT ALL - col1 / 54 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 2 * 33 + + col1 FROM tab2 AS cor0
----
125
83
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3872
SELECT DISTINCT ( - col0 ) + - col0 * - CAST( + ( + col2 ) AS SIGNED ) * - col2 FROM tab1 cor0
----
-208000
-737360
-8751

skipif mysql # not compatible
query I rowsort label-3872
SELECT DISTINCT ( - col0 ) + - col0 * - CAST ( + ( + col2 ) AS INTEGER ) * - col2 FROM tab1 cor0
----
-208000
-737360
-8751

query I rowsort
SELECT col2 * col1 - col1 * tab2.col0 FROM tab2
----
-3068
-697
620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3874
SELECT + + CAST( NULL AS SIGNED ) + col1 * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3874
SELECT + + CAST ( NULL AS INTEGER ) + col1 * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 26 - - ( cor0.col2 ) FROM tab1 AS cor0
----
122
80
83

query I rowsort
SELECT DISTINCT col2 * ( - col0 * - ( 30 ) ) FROM tab1
----
109440
230400
4860

query I rowsort
SELECT + - 55 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 25 col1 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT ALL + + col1 * col0 - col1 * + cor0.col1 FROM tab1 AS cor0
----
-598
540
871

query I rowsort
SELECT ALL + 75 * - col0 FROM tab0 cor0
----
-1800
-2625
-6675

onlyif mysql # use DIV operator for integer division
query I rowsort label-3881
SELECT ALL - col2 DIV - col1 - - col0 AS col2 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3881
SELECT ALL - col2 / - col1 - - col0 AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - + col0 * + col1 + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col0 + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL + 19 * col1 - - col0 * + col2 FROM tab0 cor0
----
1878
2426
9027

query I rowsort
SELECT ALL - cor0.col2 + + col1 AS col1 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT + + 21 + col0 FROM tab0 AS cor0
----
110
45
56

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0, tab1 cor2
----
3645 values hashing to 25b043ae64f25e8f205735b09d2d3d6a

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 cor1, tab1, tab1 AS cor2
----
3645 values hashing to f1666fadc663c90ea9374fcb108b4477

query I rowsort
SELECT DISTINCT 71 AS col2 FROM tab1, tab1 cor0
----
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3890
SELECT DISTINCT + col0 DIV col1 + col0 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3890
SELECT DISTINCT + col0 / col1 + col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT cor0.col0 + 24 + - col2 FROM tab0 AS cor0
----
15
31
58

query I rowsort
SELECT ALL + col2 * 2 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3893
SELECT + col2 DIV - col1 + col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3893
SELECT + col2 / - col1 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col0 * + ( - col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3895
SELECT + col2 DIV col1 AS col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3895
SELECT + col2 / col1 AS col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT ALL + col1 + + 67 * 56 AS col1 FROM tab1 AS cor0
----
3762
3765
3778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3897
SELECT DISTINCT + - ( col0 ) * col0 + CAST( ( - col1 ) AS SIGNED ) FROM tab0 cor0
----
-1322
-662
-8012

skipif mysql # not compatible
query I rowsort label-3897
SELECT DISTINCT + - ( col0 ) * col0 + CAST ( ( - col1 ) AS INTEGER ) FROM tab0 cor0
----
-1322
-662
-8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3898
SELECT - - CAST( col0 AS SIGNED ) + - col1 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-3898
SELECT - - CAST ( col0 AS INTEGER ) + - col1 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL - - col0 * - 10 + + col0 AS col0 FROM tab2 AS cor0
----
-63
-702
-711

onlyif mysql # use DIV operator for integer division
query I rowsort label-3900
SELECT DISTINCT col1 DIV 73 + col2 + col2 * - col0 AS col0 FROM tab1
----
-108
-3591
-7584

skipif mysql # not compatible
query I rowsort label-3900
SELECT DISTINCT col1 / 73 + col2 + col2 * - col0 AS col0 FROM tab1
----
-108
-3591
-7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3901
SELECT + - col0 + CAST( 97 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
17
33
94

skipif mysql # not compatible
query I rowsort label-3901
SELECT + - col0 + CAST ( 97 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
17
33
94

query I rowsort
SELECT - col2 + - cor0.col1 * + 40 FROM tab2 AS cor0
----
-1267
-2386
-718

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 * - col1 * - cor0.col1 col2 FROM tab1 AS cor0
----
13533
2054
6410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3904
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab0, tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3904
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab0, tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 * - cor0.col2 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 68d2de039a9324060ea47276d4b8723f

query I rowsort
SELECT DISTINCT ( col2 ) * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col1 * col2 + 28 AS col1 FROM tab1 AS cor0
----
-1220
-1376
-542

onlyif mysql # use DIV operator for integer division
query I rowsort label-3908
SELECT + 21 DIV + col1 + col2 + - 36 FROM tab1
----
18
23
61

skipif mysql # not compatible
query I rowsort label-3908
SELECT + 21 / + col1 + col2 + - 36 FROM tab1
----
18
23
61

query I rowsort
SELECT ( + tab1.col0 + + col0 ) * 10 FROM tab1
----
1280
1600
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-3910
SELECT 94 + tab2.col2 DIV + 4 FROM tab2
----
100
100
103

skipif mysql # not compatible
query I rowsort label-3910
SELECT 94 + tab2.col2 / + 4 FROM tab2
----
100
100
103

query I rowsort
SELECT 23 * + col1 AS col0 FROM tab1
----
230
299
598

query I rowsort
SELECT cor1.col0 * cor0.col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 7ccaf24f2c8d9f29787f37bd29e709d9

query I rowsort
SELECT col0 + - col1 * 8 AS col1 FROM tab1 cor0
----
-16
-205
-24

query I rowsort
SELECT - - col2 * cor0.col0 + col0 * col0 FROM tab2 AS cor0
----
238
8112
9243

onlyif mysql # use DIV operator for integer division
query I rowsort label-3915
SELECT - - cor0.col1 + col1 DIV 98 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3915
SELECT - - cor0.col1 + col1 / 98 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL col2 * - col1 + + col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3917
SELECT - cor1.col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3917
SELECT - cor1.col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT - ( tab2.col0 * col2 ) AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - ( col0 ) + col1 - - 0 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + - col0 * - col1 + - 48 * ( + col1 ) AS col1 FROM tab2 AS cor0
----
-1271
1770
527

query I rowsort
SELECT + col1 * - cor0.col2 + + 5 - col2 AS col0 FROM tab2 AS cor0
----
-1555
-679
-859

query I rowsort
SELECT + 66 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

query I rowsort
SELECT ALL - col0 + ( + tab1.col2 ) AS col0 FROM tab1
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3924
SELECT ALL - CAST( 17 AS SIGNED ) * tab2.col0 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 0fa6a00820e44fd2e619208103dc6a9b

skipif mysql # not compatible
query I rowsort label-3924
SELECT ALL - CAST ( 17 AS INTEGER ) * tab2.col0 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 0fa6a00820e44fd2e619208103dc6a9b

onlyif mysql # use DIV operator for integer division
query I rowsort label-3925
SELECT DISTINCT - 50 DIV cor0.col1 AS col1 FROM tab1, tab1 AS cor0
----
-1
-3
-5

skipif mysql # not compatible
query I rowsort label-3925
SELECT DISTINCT - 50 / cor0.col1 AS col1 FROM tab1, tab1 AS cor0
----
-1
-3
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3926
SELECT - col1 + - CAST( NULL AS SIGNED ) * 46 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3926
SELECT - col1 + - CAST ( NULL AS INTEGER ) * 46 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col2 * ( ( col2 ) ) * ( col0 ) AS col0 FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT - col1 * - ( + col1 ) * - col0 + - 88 * 30 FROM tab0 AS cor0
----
-180144
-331955
-739649

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 + col1 * - col1 * col0 - col1 col1 FROM tab1 AS cor0
----
-12493
-1976
-5770

query I rowsort
SELECT + - ( - 47 ) * col2 FROM tab1 AS cor0
----
2538
2679
4512

query I rowsort
SELECT - + col1 * 14 FROM tab2 AS cor0
----
-238
-434
-826

onlyif mysql # use DIV operator for integer division
query I rowsort label-3932
SELECT - - col0 + col2 DIV - 11 AS col1 FROM tab0 AS cor0
----
21
35
82

skipif mysql # not compatible
query I rowsort label-3932
SELECT - - col0 + col2 / - 11 AS col1 FROM tab0 AS cor0
----
21
35
82

query I rowsort
SELECT + col2 + col1 * + col0 * col0 FROM tab2 AS cor0
----
106135
1546
358982

query I rowsort
SELECT + col2 + col1 * - ( col0 ) AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - - cor0.col1 + - col1 * 91 + cor0.col2 FROM tab0 AS cor0
----
-7707
-8108
-8729

query I rowsort
SELECT + - cor0.col2 * - col1 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + 83 - + col0 FROM tab2 AS cor0
----
4
5
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3938
SELECT ALL - 27 DIV 44 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3938
SELECT ALL - 27 / 44 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT - ( col1 ) * ( col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3940
SELECT ALL + 61 DIV - col2 AS col2 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3940
SELECT ALL + 61 / - col2 AS col2 FROM tab1
----
-1
-1
0

query I rowsort
SELECT DISTINCT + 76 FROM tab1, tab1 cor0
----
76

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT + col1 * + ( col1 ) + - col2 + col2 * col1 FROM tab0 AS cor0
----
10201
15661
9505

query I rowsort
SELECT - col2 + - ( - col2 ) + + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col0 * col0 AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT - ( 70 ) + col1 * col0 * - col1 FROM tab1 cor0
----
-13590
-2098
-6470

onlyif mysql # use DIV operator for integer division
query I rowsort label-3947
SELECT DISTINCT + - col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-3947
SELECT DISTINCT + - col1 / + col0 AS col2 FROM tab2 AS cor0
----
-4
0

query I rowsort
SELECT DISTINCT col0 - - 66 FROM tab0 AS cor0
----
101
155
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 - cor0.col0 col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col1 * col0 + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + - 86 AS col2 FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to 1ef7453f3d4bc7d93f06fc98b5d59841

query I rowsort
SELECT + - ( + col2 ) AS col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ( 8 ) * + cor0.col0 AS col2 FROM tab0 AS cor0
----
192
280
712

query I rowsort
SELECT - + col2 * cor0.col1 AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT 72 * col1 AS col2 FROM tab0 cor0
----
6192
6552
6984

onlyif mysql # use DIV operator for integer division
query I rowsort label-3956
SELECT ALL 91 + + col0 DIV ( col2 * cor0.col0 ) AS col0 FROM tab0 AS cor0
----
91
91
92

skipif mysql # not compatible
query I rowsort label-3956
SELECT ALL 91 + + col0 / ( col2 * cor0.col0 ) AS col0 FROM tab0 AS cor0
----
91
91
92

query I rowsort
SELECT DISTINCT - col0 + + col0 AS col0 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL 74 * - col0 + - ( 55 + col1 ) * col1 AS col2 FROM tab1 AS cor0
----
-2328
-5386
-6804

query I rowsort
SELECT ALL - tab2.col2 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 * - 3 + col0 col0 FROM tab2 cor0
----
-18
-43
59

query I rowsort
SELECT - - col1 + + col2 * - col1 + - 48 * + col0 AS col2 FROM tab1 AS cor0
----
-1522
-3632
-5075

query I rowsort
SELECT + + cor0.col2 * cor0.col1 + ( - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3963
SELECT - 85 DIV tab0.col0 FROM tab0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-3963
SELECT - 85 / tab0.col0 FROM tab0
----
-2
-3
0

query I rowsort
SELECT + ( - 46 ) FROM tab0
----
-46
-46
-46

query I rowsort
SELECT DISTINCT - - 1 AS col2 FROM tab1, tab2, tab0 AS cor0, tab0
----
1

query I rowsort
SELECT + col2 - - cor0.col1 * + col1 * 27 AS col1 FROM tab0 AS cor0
----
199725
223669
254044

query I rowsort
SELECT DISTINCT + col1 * + cor0.col2 + - col0 * col1 AS col0 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT ALL cor0.col1 - + col2 * - col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT + + cor0.col2 * + col2 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-157464
-185193
-884736

query I rowsort
SELECT DISTINCT + 91 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 86 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * + cor0.col0 col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT col2 * + col1 + + col1 * col1 AS col0 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT - + col1 + + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT + col1 + + ( + 94 ) + + col1 * cor0.col0 AS col2 FROM tab1 cor0
----
1147
198
744

query I rowsort
SELECT DISTINCT col1 + 47 FROM tab0 AS cor0
----
133
138
144

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3977
SELECT DISTINCT - col2 * + CAST( col0 AS SIGNED ) AS col2 FROM tab2 cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-3977
SELECT DISTINCT - col2 * + CAST ( col0 AS INTEGER ) AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - col1 + 30 * 30 + + col2 FROM tab0 AS cor0
----
1019
1073
998

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * - col2 col1 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3980
SELECT DISTINCT + col1 * cor0.col2 + col0 DIV col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

skipif mysql # not compatible
query I rowsort label-3980
SELECT DISTINCT + col1 * cor0.col2 + col0 / col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + col0 * + tab0.col2 + col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 AS col0 FROM tab1
----
188
3658
7693

query I rowsort
SELECT ALL - col2 + col2 * - tab0.col2 AS col1 FROM tab0
----
-1122
-2
-6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-3984
SELECT 32 + col2 DIV - col1 AS col0 FROM tab0
----
32
32
32

skipif mysql # not compatible
query I rowsort label-3984
SELECT 32 + col2 / - col1 AS col0 FROM tab0
----
32
32
32

query I rowsort
SELECT + 50 + - col1 FROM tab0
----
-36
-41
-47

query I rowsort
SELECT DISTINCT + 64 + - col2 FROM tab2
----
26
37
38

query I rowsort
SELECT ALL + col0 * - col1 + 21 FROM tab1 AS cor0
----
-1019
-57
-619

query I rowsort
SELECT - - col1 + col2 * 52 AS col2 FROM tab0 AS cor0
----
149
1802
4355

onlyif mysql # use DIV operator for integer division
query I rowsort label-3989
SELECT DISTINCT + col1 + + 32 DIV 86 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3989
SELECT DISTINCT + col1 + + 32 / 86 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ( col1 * + col2 ) + ( - 68 ) AS col1 FROM tab0
----
2770
29
7394

query I rowsort
SELECT DISTINCT + 63 * + 45 FROM tab0 cor0
----
2835

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col0 ) * col1 col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - 85 * col1 + + ( + 14 ) * - col1 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT 4 + col0 FROM tab0 AS cor0
----
28
39
93

query I rowsort
SELECT DISTINCT + 18 * col2 - + col0 FROM tab0 AS cor0
----
-17
1387
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 14 + col0 col1 FROM tab0 AS cor0
----
10
21
75

query I rowsort
SELECT DISTINCT - 66 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-5676
-6006
-6402

query I rowsort
SELECT ALL 82 * + col2 AS col1 FROM tab0 AS cor0
----
2706
6724
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3999
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3999
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4000
SELECT DISTINCT + CAST( - 33 AS SIGNED ) * + col0 AS col2 FROM tab1 cor0
----
-2112
-2640
-99

skipif mysql # not compatible
query I rowsort label-4000
SELECT DISTINCT + CAST ( - 33 AS INTEGER ) * + col0 AS col2 FROM tab1 cor0
----
-2112
-2640
-99

query I rowsort
SELECT - + 64 + col0 * + col0 FROM tab1 AS cor0
----
-55
4032
6336

query I rowsort
SELECT + ( - col2 ) * col2 + - col2 FROM tab1 cor0
----
-2970
-3306
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 col0 FROM tab1 AS cor0
----
45
45
45

query I rowsort
SELECT + - ( ( + col1 ) ) + 29 AS col2 FROM tab0 cor0
----
-57
-62
-68

query I rowsort
SELECT ( col2 ) - cor0.col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - ( + col2 ) + + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - col1 * + cor0.col1 + - col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT + + 64 + + col0 AS col2 FROM tab2 AS cor0
----
142
143
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 + col2 col0 FROM tab0 AS cor0
----
246
3
99

query I rowsort
SELECT col0 * col0 * - col0 + 69 FROM tab1 AS cor0
----
-262075
-511931
42

query I rowsort
SELECT - 42 + ( - col2 * col0 ) + 36 * col1 * ( col1 ) FROM tab0
----
265422
290776
338647

query I rowsort
SELECT + - col2 * - ( col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + col0 + - col0 - - col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4014
SELECT + col0 / - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4014
SELECT + col0 / - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4015
SELECT ALL - CAST( NULL AS SIGNED ) + 69 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4015
SELECT ALL - CAST ( NULL AS INTEGER ) + 69 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 33 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT DISTINCT col2 + - col0 + + ( col1 ) AS col1 FROM tab2
----
-24
51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4018
SELECT ALL - col1 * col0 DIV - col0 + col2 AS col1 FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-4018
SELECT ALL - col1 * col0 / - col0 + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL - col2 * col0 + - tab2.col1 + - col0 FROM tab2
----
-2165
-227
-3098

query I rowsort
SELECT - tab0.col1 * + col0 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col1 * col0 - col2 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT + col1 * - 35 AS col2 FROM tab1
----
-350
-455
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-4023
SELECT + tab1.col0 DIV + col1 col2 FROM tab1
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4023
SELECT + tab1.col0 / + col1 col2 FROM tab1
----
0
6
6

query I rowsort
SELECT + col2 * 48 + + col2 FROM tab1 AS cor0
----
2646
2793
4704

query I rowsort
SELECT - - cor0.col2 * 62 FROM tab2, tab0 AS cor0
----
9 values hashing to 2253134c947121439ced3971be638e48

query I rowsort
SELECT DISTINCT + 51 * + 14 FROM tab1 AS cor0
----
714

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to 57708840c4ff70ecdca82ffd05259432

query I rowsort
SELECT DISTINCT 28 FROM tab2, tab2 AS cor0
----
28

query I rowsort
SELECT ( + 74 ) * - col1 + + col0 * col2 AS col0 FROM tab1
----
-1762
2908
6718

query I rowsort
SELECT ALL - tab0.col1 * - 0 - + tab0.col1 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 col1 FROM tab0, tab0 AS cor0
----
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4032
SELECT + 26 DIV col1 FROM tab1
----
1
2
2

skipif mysql # not compatible
query I rowsort label-4032
SELECT + 26 / col1 FROM tab1
----
1
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-4033
SELECT DISTINCT - 96 DIV 45 FROM tab0
----
-2

skipif mysql # not compatible
query I rowsort label-4033
SELECT DISTINCT - 96 / 45 FROM tab0
----
-2

query I rowsort
SELECT tab0.col1 * - 92 AS col2 FROM tab0
----
-7912
-8372
-8924

query I rowsort
SELECT - col2 * 21 + + col1 AS col0 FROM tab0 AS cor0
----
-1631
-607
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + ( tab0.col0 ) - - ( col1 + col2 ) * + 25 * tab0.col0 col2 FROM tab0
----
384923
71338
85688

query I rowsort
SELECT DISTINCT cor0.col1 + - 16 + + 38 AS col1 FROM tab1, tab1 AS cor0
----
32
35
48

query I rowsort
SELECT - + cor0.col1 * + col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 14 * + col0 AS col0 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT ALL + 58 * col1 * + col2 AS col1 FROM tab2
----
37468
48546
88972

query I rowsort
SELECT DISTINCT 74 * col2 AS col0 FROM tab0
----
2442
6068
74

query I rowsort
SELECT + cor0.col0 + ( col0 ) * - col1 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col1 col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4044
SELECT - col1 * + CAST( col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-4044
SELECT - col1 * + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT col1 + 38 * col1 FROM tab0 AS cor0
----
3354
3549
3783

query I rowsort
SELECT + cor0.col0 * ( 71 ) FROM tab0 AS cor0
----
1704
2485
6319

query I rowsort
SELECT - col1 * ( col2 ) * col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + + col2 + 21 * col1 AS col0 FROM tab0 AS cor0
----
1839
1993
2038

query I rowsort
SELECT DISTINCT col1 + cor0.col0 * - cor0.col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL - 71 - - col2 AS col2 FROM tab1 AS cor0
----
-14
-17
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4051
SELECT ( - col2 ) + CAST( + col0 * col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
2031
3394
8017

skipif mysql # not compatible
query I rowsort label-4051
SELECT ( - col2 ) + CAST ( + col0 * col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4052
SELECT ALL 97 DIV tab1.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to da1ea41a6dc33de7ea521730073a7eee

skipif mysql # not compatible
query I rowsort label-4052
SELECT ALL 97 / tab1.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to da1ea41a6dc33de7ea521730073a7eee

query I rowsort
SELECT - 22 + col0 AS col1 FROM tab1
----
-19
42
58

query I rowsort
SELECT DISTINCT + ( - col0 ) + col2 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT tab0.col2 + + tab0.col1 * + col1 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT + col0 - tab0.col0 * tab0.col0 FROM tab0
----
-1190
-552
-7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4057
SELECT + 21 + col0 * + CAST( col0 AS SIGNED ) * col1 FROM tab0
----
118846
49557
720832

skipif mysql # not compatible
query I rowsort label-4057
SELECT + 21 + col0 * + CAST ( col0 AS INTEGER ) * col1 FROM tab0
----
118846
49557
720832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( - 2 ) col2 FROM tab2, tab2 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

query I rowsort
SELECT DISTINCT 25 + + col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
187
3673
7705

onlyif mysql # use DIV operator for integer division
query I rowsort label-4060
SELECT col1 * + col0 * cor0.col0 + col2 DIV col0 col0 FROM tab1 AS cor0
----
252
40960
83201

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4060
SELECT col1 * + col0 * cor0.col0 + col2 / col0 col0 FROM tab1 AS cor0
----
252
40960
83201

query I rowsort
SELECT ALL + + col2 * + col2 + + ( + col0 ) AS col2 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT + 52 * cor0.col2 AS col0 FROM tab1 AS cor0
----
2808
2964
4992

query I rowsort
SELECT - 34 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 04947e895a04c00ea3cab9af228c0c43

query I rowsort
SELECT ALL col2 * 50 - col2 FROM tab0
----
1617
4018
49

query I rowsort
SELECT DISTINCT 50 * + 50 AS col1 FROM tab0, tab2 AS cor0
----
2500

onlyif mysql # use DIV operator for integer division
query I rowsort label-4066
SELECT - col1 DIV + ( col2 ) col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4066
SELECT - col1 / + ( col2 ) col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col0 - - 24 AS col2 FROM tab2
----
102
103
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 17 col2 FROM tab0
----
1513
408
595

query I rowsort
SELECT - col2 * - col0 - col0 * - col1 AS col1 FROM tab1
----
240
4288
8720

query I rowsort
SELECT tab2.col2 + col1 - + ( col0 ) FROM tab2
----
-24
51
7

query I rowsort
SELECT col2 + 31 + + col2 AS col2 FROM tab1
----
139
145
223

query I rowsort
SELECT ALL + col1 * 49 FROM tab1 AS cor0
----
1274
490
637

query I rowsort
SELECT ALL - ( 84 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT DISTINCT col1 + ( + col2 + - 79 ) AS col2 FROM tab1 AS cor0
----
-12
1
30

query I rowsort
SELECT DISTINCT - cor0.col0 + col1 * - col2 - col0 AS col2 FROM tab1 AS cor0
----
-1408
-1410
-698

query I rowsort
SELECT + ( - 45 ) * col2 + ( col0 ) FROM tab2 AS cor0
----
-1092
-1208
-1631

query I rowsort
SELECT cor0.col2 * + col2 * + cor0.col0 + + 60 FROM tab1 cor0
----
207996
737340
8808

query I rowsort
SELECT ALL + + 75 * + col2 FROM tab2 cor0
----
1950
2025
2850

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT DISTINCT - cor0.col1 * col0 + + col2 DIV - cor0.col0 + col2 AS col0 FROM tab0 cor0
----
-2032
-3394
-8017

skipif mysql # not compatible
query I rowsort label-4079
SELECT DISTINCT - cor0.col1 * col0 + + col2 / - cor0.col0 + col2 AS col0 FROM tab0 cor0
----
-2032
-3394
-8017

query I rowsort
SELECT ALL col1 + + 19 AS col1 FROM tab1 AS cor0
----
29
32
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4081
SELECT + ( - col2 ) - col2 DIV + 58 AS col1 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-4081
SELECT + ( - col2 ) - col2 / + 58 AS col1 FROM tab0 AS cor0
----
-1
-33
-83

query I rowsort
SELECT - tab1.col1 * - tab1.col0 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 - - col0 * col2 * tab0.col2 FROM tab0
----
26169
36
598518

query I rowsort
SELECT ALL - 25 + col1 AS col2 FROM tab0 AS cor0
----
61
66
72

query I rowsort
SELECT DISTINCT - - 18 + ( + col2 ) FROM tab1 AS cor0
----
114
72
75

query I rowsort
SELECT DISTINCT - + col0 + col2 * + col0 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + col1 col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL 34 * - ( + col2 ) * - ( - col0 ) - - col1 * col0 FROM tab2 AS cor0
----
-100725
-6209
-64350

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4089
SELECT ALL CAST( NULL AS SIGNED ) * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4089
SELECT ALL CAST ( NULL AS INTEGER ) * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + + col2 - col2 * + col1 * - ( cor0.col0 ) FROM tab2 AS cor0
----
119756
51151
5893

query I rowsort
SELECT 80 * col0 - col2 * 40 FROM tab1 AS cor0
----
-1920
2560
2840

query I rowsort
SELECT ALL + 15 * - ( + col2 * col1 ) AS col1 FROM tab1
----
-18720
-21060
-8550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 7 col1 FROM tab2
----
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 + col2 * + col0 col1 FROM tab1 AS cor0
----
255
3741
7773

query I rowsort
SELECT DISTINCT + + 21 * col0 AS col0 FROM tab0 AS cor0
----
1869
504
735

query I rowsort
SELECT DISTINCT + + 31 * - col2 FROM tab0 cor0
----
-1023
-2542
-31

query I rowsort
SELECT - col0 + + 70 * col1 FROM tab2 AS cor0
----
1111
2163
4052

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 89 col1 FROM tab1 AS cor0
----
-89
-89
-89

query I rowsort
SELECT + ( + cor0.col1 ) + - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + col0 * cor0.col1 + col0 * + cor0.col1 AS col1 FROM tab1 cor0
----
1280
156
2080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 92 + col0 col1 FROM tab1 AS cor0
----
-12
-28
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4102
SELECT - + col0 * col0 DIV col2 + col2 FROM tab1 AS cor0
----
-14
30
54

skipif mysql # not compatible
query I rowsort label-4102
SELECT - + col0 * col0 / col2 + col2 FROM tab1 AS cor0
----
-14
30
54

query I rowsort
SELECT ALL - tab0.col0 + col1 * col1 * + col1 AS col0 FROM tab0
----
636032
753482
912638

query I rowsort
SELECT ALL col2 + col0 * tab0.col0 + + col2 FROM tab0
----
1227
642
8085

query I rowsort
SELECT DISTINCT ( tab1.col0 ) + + col2 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL col0 + + 9 FROM tab0
----
33
44
98

query I rowsort
SELECT col2 + 67 * col2 + col1 FROM tab2
----
1827
1867
2601

onlyif mysql # use DIV operator for integer division
query I rowsort label-4108
SELECT DISTINCT ( col2 ) DIV - col0 + + col1 + - col0 FROM tab1
----
-54
-68
5

skipif mysql # not compatible
query I rowsort label-4108
SELECT DISTINCT ( col2 ) / - col0 + + col1 + - col0 FROM tab1
----
-54
-68
5

query I rowsort
SELECT ALL col1 + col1 + + col0 FROM tab1
----
106
55
84

query I rowsort
SELECT ALL - 2 + - col0 FROM tab2
----
-80
-81
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * col1 col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - col2 + + col1 + col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL - col0 * + cor0.col0 - + col0 AS col1 FROM tab2 AS cor0
----
-56
-6162
-6320

skipif mysql # not compatible
query I rowsort
SELECT ALL + + col2 * - CAST ( - col0 AS REAL ) FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col1 FROM tab1
----
65
65
65

query I rowsort
SELECT 94 + + col2 FROM tab2
----
120
121
132

query I rowsort
SELECT + - col1 * col1 + - col1 * - col2 FROM tab2 AS cor0
----
-124
-1947
357

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4118
SELECT + + col2 + + CAST( + col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-4118
SELECT + + col2 + + CAST ( + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - cor2.col2 * cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 637f447b50df39d6c6026933fe1e66f4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4120
SELECT col2 DIV col1 + 65 FROM tab1
----
67
70
72

skipif mysql # not compatible
query I rowsort label-4120
SELECT col2 / col1 + 65 FROM tab1
----
67
70
72

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab0, tab1, tab2 AS cor0
----
86

query I rowsort
SELECT ALL col1 + + col0 * + ( 73 ) AS col1 FROM tab0
----
1838
2652
6588

query I rowsort
SELECT - + cor0.col2 * + col1 + col2 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - + col2 * + ( + col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + tab1.col1 + col1 AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT + + col0 * 35 - - col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1299
1552
1670

query I rowsort
SELECT + col0 + + 95 FROM tab0 AS cor0
----
119
130
184

query I rowsort
SELECT col0 + + 4 * col0 FROM tab1 AS cor0
----
15
320
400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4129
SELECT + + col0 * CAST( col2 AS SIGNED ) * col2 + + ( - 90 ) col1 FROM tab0 AS cor0
----
-55
26046
598346

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4129
SELECT + + col0 * CAST ( col2 AS INTEGER ) * col2 + + ( - 90 ) col1 FROM tab0 AS cor0
----
-55
26046
598346

query I rowsort
SELECT ALL + - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 51 ) * col0 col0 FROM tab1
----
-153
-3264
-4080

query I rowsort
SELECT col1 * + 76 AS col0 FROM tab1 AS cor0
----
1976
760
988

query I rowsort
SELECT 47 + - cor0.col2 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
47
47
47

query I rowsort
SELECT ALL - + ( - col1 ) + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT 65 * col2 FROM tab1 AS cor0
----
3510
3705
6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col0 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - ( + col1 ) * - 47 FROM tab2 AS cor0
----
1457
2773
799

query I rowsort
SELECT DISTINCT 58 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-3132
-3306
-5568

onlyif mysql # use DIV operator for integer division
query I rowsort label-4139
SELECT + 63 DIV col1 AS col1 FROM tab2 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4139
SELECT + 63 / col1 AS col1 FROM tab2 AS cor0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4140
SELECT ALL - + 13 DIV col0 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4140
SELECT ALL - + 13 / col0 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - col1 * + col0 * 66 + col2 FROM tab1 AS cor0
----
-42183
-5094
-68544

query I rowsort
SELECT ALL ( col2 ) + + col0 * - col1 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4143
SELECT DISTINCT - + ( - col2 ) + ( - ( col2 ) ) DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-4143
SELECT DISTINCT - + ( - col2 ) + ( - ( col2 ) ) / - cor0.col0 AS col2 FROM tab2 AS cor0
----
26
30
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4144
SELECT DISTINCT cor0.col2 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4144
SELECT DISTINCT cor0.col2 / cor0.col1 AS col0 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT + col2 + + ( ( col0 ) ) FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL cor0.col2 + + cor0.col0 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL + + ( + cor1.col1 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT col2 * col0 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - ( - col0 ) + - col2 * col1 + - col0 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) * col2 col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col1 + cor0.col2 + cor0.col0 AS col2 FROM tab2 AS cor0
----
134
163
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4152
SELECT - CAST( NULL AS SIGNED ) + 92 + - cor0.col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4152
SELECT - CAST ( NULL AS INTEGER ) + 92 + - cor0.col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * + cor0.col2 * col2 + - cor0.col2 FROM tab1 AS cor0
----
157410
185136
884640

query I rowsort
SELECT - - tab1.col0 AS col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + ( - tab0.col2 ) * - col2 * tab0.col2 AS col2 FROM tab0
----
1
35937
551368

query I rowsort
SELECT ALL - 67 * 30 * col2 AS col2 FROM tab2
----
-52260
-54270
-76380

query I rowsort
SELECT + - 12 * 60 + cor0.col1 FROM tab0 cor0
----
-623
-629
-634

query I rowsort
SELECT ( 15 ) * - col0 + - ( col1 ) * - col2 AS col1 FROM tab2
----
-539
364
732

query I rowsort
SELECT ALL - + 12 * - col1 * + col0 AS col1 FROM tab2 AS cor0
----
16116
2604
55224

query I rowsort
SELECT 4 * - col1 AS col0 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT ALL - 87 * cor0.col0 + col0 AS col2 FROM tab1 AS cor0
----
-258
-5504
-6880

onlyif mysql # use DIV operator for integer division
query I rowsort label-4162
SELECT ALL - col0 DIV 60 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4162
SELECT ALL - col0 / 60 FROM tab2 AS cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT - + ( col1 ) * cor0.col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + - ( ( col0 ) ) * - col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ( col2 ) + col0 + - cor0.col1 * + col1 * - col2 AS col0 FROM tab0 cor0
----
244125
679213
9445

onlyif mysql # use DIV operator for integer division
query I rowsort label-4166
SELECT DISTINCT - ( ( col1 ) ) DIV cor0.col2 AS col0 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4166
SELECT DISTINCT - ( ( col1 ) ) / cor0.col2 AS col0 FROM tab1 cor0
----
0

query I rowsort
SELECT ( - cor1.col0 ) FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT + 12 + + cor1.col2 * - cor1.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 cor2
----
81 values hashing to 976e8a595271498a4b2ebd3c50e46e75

query I rowsort
SELECT ALL - 17 + + tab2.col1 + col2 FROM tab2
----
38
41
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 col2 FROM tab0
----
53
9
96

query I rowsort
SELECT 23 * 54 * - col0 FROM tab0
----
-110538
-29808
-43470

query I rowsort
SELECT ALL - 91 * ( + col2 ) FROM tab2 cor0
----
-2366
-2457
-3458

query I rowsort
SELECT DISTINCT col2 * + tab0.col1 + col0 * tab0.col0 FROM tab0
----
1322
15383
3414

onlyif mysql # use DIV operator for integer division
query I rowsort label-4174
SELECT - col2 + - col0 * - col1 DIV col1 col1 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4174
SELECT - col2 + - col0 * - col1 / col1 col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - col1 + + col0 + col0 FROM tab1
----
-20
118
147

query I rowsort
SELECT ALL 97 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT DISTINCT + cor0.col1 + 92 AS col0 FROM tab0, tab2 AS cor0
----
109
123
151

query I rowsort
SELECT 33 * + col1 - - col2 FROM tab1
----
387
525
912

query I rowsort
SELECT ALL col2 * - ( - col1 ) + + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + col1 col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT DISTINCT 12 - cor1.col2 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
-42
-45
-84

query I rowsort
SELECT ALL + col1 * 5 * col2 FROM tab0 AS cor0
----
14190
37310
485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + ( - col0 ) col2 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + col2 - col1 * + col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT - col2 * - 49 FROM tab0 cor0
----
1617
4018
49

query I rowsort
SELECT col0 * col0 + 60 FROM tab1 cor0
----
4156
6460
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-4187
SELECT DISTINCT - + col1 DIV + 16 AS col2 FROM tab2 AS cor0
----
-1
-3

skipif mysql # not compatible
query I rowsort label-4187
SELECT DISTINCT - + col1 / + 16 AS col2 FROM tab2 AS cor0
----
-1
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4188
SELECT ALL + col2 * + col2 + col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
2917
3250
9217

skipif mysql # not compatible
query I rowsort label-4188
SELECT ALL + col2 * + col2 + col1 / cor0.col1 AS col2 FROM tab1 AS cor0
----
2917
3250
9217

query I rowsort
SELECT DISTINCT + col0 - - col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + col1 * col0 * 18 AS col1 FROM tab1 AS cor0
----
11520
1404
18720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4191
SELECT DISTINCT col0 + + CAST( col1 AS SIGNED ) FROM tab0 cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-4191
SELECT DISTINCT col0 + + CAST ( col1 AS INTEGER ) FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - cor0.col2 - col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4193
SELECT ALL + col1 DIV 25 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4193
SELECT ALL + col1 / 25 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4194
SELECT ALL col1 * + CAST( NULL AS SIGNED ) * - 42 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4194
SELECT ALL col1 * + CAST ( NULL AS INTEGER ) * - 42 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + + ( 48 ) AS col1 FROM tab2 AS cor0
----
126
127
55

query I rowsort
SELECT ALL + col0 * 12 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT - col1 * 81 AS col1 FROM tab2 cor0
----
-1377
-2511
-4779

query I rowsort
SELECT DISTINCT - 26 + - col2 FROM tab0 AS cor0
----
-108
-27
-59

query I rowsort
SELECT ALL cor0.col1 * 51 + + cor0.col0 FROM tab1 AS cor0
----
1329
574
743

query I rowsort
SELECT DISTINCT + + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - - col2 + + 5 * + col1 + col0 * + cor0.col1 * col1 FROM tab0 AS cor0
----
177967
329801
737546

query I rowsort
SELECT + ( - col0 ) + + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 * + col0 col2 FROM tab0 AS cor0
----
1848
2695
6853

query I rowsort
SELECT ALL - + col1 - + 46 FROM tab1 AS cor0
----
-56
-59
-72

query I rowsort
SELECT ALL + - ( + col2 ) * - col2 * + ( + col2 ) AS col0 FROM tab0 AS cor0
----
1
35937
551368

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4206
SELECT - CAST( NULL AS SIGNED ) - + 88 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4206
SELECT - CAST ( NULL AS INTEGER ) - + 88 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + ( - col2 + - ( + 76 ) ) FROM tab0 AS cor0
----
-12956
-3597
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4208
SELECT + col2 - tab1.col0 DIV col0 AS col0 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4208
SELECT + col2 - tab1.col0 / col0 AS col0 FROM tab1
----
53
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - 76 ) col1 FROM tab0 AS cor0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - + 56 AS col1 FROM tab2 AS cor0
----
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-4211
SELECT ALL + 78 * col0 + - col1 * ( - col1 ) DIV - ( cor0.col1 ) + col2 * + col0 FROM tab0 AS cor0
----
14149
2578
2668

skipif mysql # not compatible
query I rowsort label-4211
SELECT ALL + 78 * col0 + - col1 * ( - col1 ) / - ( cor0.col1 ) + col2 * + col0 FROM tab0 AS cor0
----
14149
2578
2668

query I rowsort
SELECT 25 + col2 FROM tab1 AS cor0
----
121
79
82

query I rowsort
SELECT DISTINCT col2 * col1 * + col0 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT + 83 + + col0 AS col2 FROM tab0 AS cor0
----
107
118
172

query I rowsort
SELECT ALL - 7 + - col1 * col1 FROM tab2 AS cor0
----
-296
-3488
-968

query I rowsort
SELECT + - 90 + - col0 + col1 AS col0 FROM tab2 AS cor0
----
-109
-152
-66

query I rowsort
SELECT + cor0.col1 * col1 + col2 + col2 * col0 AS col1 FROM tab1 AS cor0
----
3805
7945
892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col1 FROM tab2 cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4219
SELECT + + 16 DIV + cor1.col1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab2 cor2
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

skipif mysql # not compatible
query I rowsort label-4219
SELECT + + 16 / + cor1.col1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab2 cor2
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

query I rowsort
SELECT ALL - col1 * - col0 - + col1 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-4221
SELECT - col0 + col2 DIV 1 FROM tab2
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-4221
SELECT - col0 + col2 / 1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col0 + + col0 * col1 * col0 FROM tab2
----
106176
1526
359034

query I rowsort
SELECT DISTINCT + col2 * col1 + + col1 FROM tab0 cor0
----
194
2924
7553

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab0 AS cor0 WHERE NULL IN ( - cor0.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4225
SELECT ALL tab1.col0 DIV col2 AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4225
SELECT ALL tab1.col0 / col2 AS col0 FROM tab1
----
0
0
1

query I rowsort
SELECT + tab1.col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT + col2 * - col2 * col0 AS col2 FROM tab1
----
-207936
-737280
-8748

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL <> + col0 OR ( NULL ) BETWEEN NULL AND + cor0.col0 * col1 - col1 * + col1
----

query I rowsort
SELECT - 17 * + col0 FROM tab0 AS cor0
----
-1513
-408
-595

onlyif mysql # use DIV operator for integer division
query I rowsort label-4230
SELECT ALL + + col0 DIV cor0.col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4230
SELECT ALL + + col0 / cor0.col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT ALL + 39 * cor0.col1 FROM tab2 AS cor0
----
1209
2301
663

query I rowsort
SELECT DISTINCT 52 * col2 AS col2 FROM tab1 AS cor0
----
2808
2964
4992

query I rowsort
SELECT col0 + - cor0.col0 * + col1 AS col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 WHERE NULL BETWEEN ( NULL ) AND col1
----

query I rowsort
SELECT tab1.col0 + - col0 * tab1.col2 + col0 * - col2 FROM tab1
----
-15280
-321
-7232

query I rowsort
SELECT DISTINCT - col0 * col0 * col1 AS col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT + col1 * - tab1.col0 * col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT - col1 AS col1 FROM tab2 WHERE NOT NULL NOT BETWEEN ( col0 ) AND + col2 * col1 + + col2
----

query I rowsort
SELECT tab0.col0 + - col0 * + col1 AS col2 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + col1 * tab2.col1 * + col0 AS col0 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - tab0.col1 * - col0 - tab0.col0 AS col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT tab2.col1 - col0 * - col2 FROM tab2
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-4243
SELECT DISTINCT - col1 DIV col1 - 38 FROM tab2 AS cor0
----
-39

skipif mysql # not compatible
query I rowsort label-4243
SELECT DISTINCT - col1 / col1 - 38 FROM tab2 AS cor0
----
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + col0 + - col0 col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 + col0 FROM tab0 cor0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4246
SELECT DISTINCT col1 * - col2 + CAST( NULL AS SIGNED ) - - 55 * + col2 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4246
SELECT DISTINCT col1 * - col2 + CAST ( NULL AS INTEGER ) - - 55 * + col2 AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col2 + - col0 * + 44 FROM tab1 AS cor0
----
-186
-2873
-3616

query I rowsort
SELECT DISTINCT + col1 + col1 * tab1.col1 FROM tab1
----
110
182
702

query I rowsort
SELECT col0 - col2 * tab2.col1 AS col1 FROM tab2
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 * + col0 col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT - col0 * + col0 * col1 AS col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT col2 + - col2 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * col1 FROM tab1 AS cor0 WHERE ( - col1 - - col2 ) <> NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 cor0 WHERE NOT ( NULL ) = NULL
----

query I rowsort
SELECT col1 * cor0.col1 + cor0.col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - col2 * + col2 + col1 * + col0 * col1 AS col1 FROM tab2
----
21387
270842
5998

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( NULL ) NOT BETWEEN col2 * col0 * col1 + + col2 AND ( NULL )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL BETWEEN col0 + col2 AND NULL
----

query I rowsort
SELECT col1 * + tab2.col0 - col0 FROM tab2
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-4260
SELECT ALL - tab0.col1 + - col1 DIV + tab0.col1 + - col2 FROM tab0
----
-120
-174
-99

skipif mysql # not compatible
query I rowsort label-4260
SELECT ALL - tab0.col1 + - col1 / + tab0.col1 + - col2 FROM tab0
----
-120
-174
-99

query I rowsort
SELECT + col2 * col2 + col0 + + col0 FROM tab2
----
1602
743
832

query I rowsort
SELECT + tab0.col2 * col1 * - col2 + + col2 * col1 + col0 FROM tab0
----
-604333
-90792
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab0 WHERE + col0 >= col1
----

query I rowsort
SELECT ALL col1 + + tab2.col2 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT - col2 * col2 - tab1.col1 FROM tab1
----
-2942
-3259
-9229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 * + cor0.col2 col2 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT DISTINCT + - 41 AS col0 FROM tab1 cor0
----
-41

query I rowsort
SELECT 62 * col2 AS col1 FROM tab0 AS cor0
----
2046
5084
62

query I rowsort
SELECT DISTINCT - ( col1 ) * 40 AS col0 FROM tab2 AS cor0
----
-1240
-2360
-680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * cor0.col0 * + col2 col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4271
SELECT ALL col2 + + col2 DIV CAST( ( - col1 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4271
SELECT ALL col2 + + col2 / CAST ( ( - col1 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4272
SELECT ALL cor0.col0 + CAST( col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-4272
SELECT ALL cor0.col0 + CAST ( col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + col1 * ( - col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - - col2 + 21 FROM tab0 AS cor0
----
103
22
54

query I rowsort
SELECT - col1 + + 75 * - col0 FROM tab0 AS cor0
----
-1886
-2722
-6766

query I rowsort
SELECT ALL 97 + - col0 FROM tab0 AS cor0
----
62
73
8

query I rowsort
SELECT ALL + cor0.col1 + 82 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT ALL col1 + + 78 AS col1 FROM tab2 AS cor0
----
109
137
95

query I rowsort
SELECT - col2 * col2 + - col1 + + col0 FROM tab0 AS cor0
----
-1151
-63
-6726

query I rowsort
SELECT ALL col1 + 17 FROM tab2
----
34
48
76

query I rowsort
SELECT 4 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT - col1 * col1 + - col0 * - 35 + - 23 AS col0 FROM tab0 AS cor0
----
-5189
-6579
-8207

query I rowsort
SELECT DISTINCT + ( 56 ) * col2 FROM tab2 cor0
----
1456
1512
2128

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4284
SELECT - col0 / + col0 + + cor0.col0 * + col1 * cor0.col0 + - col2 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4284
SELECT - col0 / + col0 + + cor0.col0 * + col1 * cor0.col0 + - col2 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( col1 ) + - col2 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT col1 + - col2 * - cor0.col0 + + col1 AS col2 FROM tab2 AS cor0
----
2146
251
3036

query I rowsort
SELECT DISTINCT col0 * - 53 FROM tab0
----
-1272
-1855
-4717

query I rowsort
SELECT ( + 64 * col0 ) AS col2 FROM tab0
----
1536
2240
5696

onlyif mysql # use DIV operator for integer division
query I rowsort label-4289
SELECT - 87 DIV + col1 FROM tab1 AS cor0
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-4289
SELECT - 87 / + col1 FROM tab1 AS cor0
----
-3
-6
-8

query I rowsort
SELECT DISTINCT - ( - col1 ) + col2 * + col0 AS col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - 37 + + col2 FROM tab0
----
-36
-4
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4292
SELECT 57 DIV - 35 + - col2 FROM tab1
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4292
SELECT 57 / - 35 + - col2 FROM tab1
----
-55
-58
-97

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) + + cor0.col1 AS col2 FROM tab1, tab2 cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 + 28 * + col1 col0 FROM tab0
----
2412
2552
2720

query I rowsort
SELECT 30 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4296
SELECT DISTINCT + 30 DIV col1 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-4296
SELECT DISTINCT + 30 / col1 FROM tab2
----
0
1

query I rowsort
SELECT ALL - 82 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4298
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4298
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 23 * col2 AS col1 FROM tab2
----
598
621
874

query I rowsort
SELECT ALL + - 58 + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-220
-3706
-7738

query I rowsort
SELECT - + 49 AS col0 FROM tab2 AS cor0
----
-49
-49
-49

query I rowsort
SELECT + + col1 + + col1 * + 89 AS col1 FROM tab0 AS cor0
----
7740
8190
8730

query I rowsort
SELECT - 33 + + col2 AS col0 FROM tab1 AS cor0
----
21
24
63

query I rowsort
SELECT ALL col1 * 57 + tab2.col0 AS col2 FROM tab2
----
1048
1774
3441

onlyif mysql # use DIV operator for integer division
query I rowsort label-4305
SELECT - col2 * col0 DIV - col0 AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4305
SELECT - col2 * col0 / - col0 AS col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4306
SELECT cor0.col0 DIV + col1 + cor0.col2 * 66 AS col2 FROM tab1 AS cor0
----
3564
3768
6342

skipif mysql # not compatible
query I rowsort label-4306
SELECT cor0.col0 / + col1 + cor0.col2 * 66 AS col2 FROM tab1 AS cor0
----
3564
3768
6342

query I rowsort
SELECT ALL - col2 * col0 + - col1 * col2 + - ( col0 + + tab1.col1 ) AS col2 FROM tab1
----
-1595
-4292
-9021

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 39 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4309
SELECT col2 * + CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4309
SELECT col2 * + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 * - col0 + + col0 + + 97 AS col2 FROM tab2 AS cor0
----
-113
-1167
-4427

query I rowsort
SELECT + 88 * + col1 AS col2 FROM tab2 AS cor0
----
1496
2728
5192

query I rowsort
SELECT + ( + 97 ) + - cor0.col1 AS col2 FROM tab1 AS cor0
----
71
84
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4313
SELECT + CAST( 41 AS SIGNED ) * col1 + - col1 FROM tab2 AS cor0
----
1240
2360
680

skipif mysql # not compatible
query I rowsort label-4313
SELECT + CAST ( 41 AS INTEGER ) * col1 + - col1 FROM tab2 AS cor0
----
1240
2360
680

query I rowsort
SELECT ALL - col2 * col1 + + col2 * col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL + 23 * + col0 * col0 + 45 * - 48 FROM tab1 AS cor0
----
-1953
145040
92048

query I rowsort
SELECT 8 * 60 FROM tab2 AS cor0
----
480
480
480

onlyif mysql # use DIV operator for integer division
query I rowsort label-4317
SELECT ALL - - col1 + col0 + col1 DIV ( col0 + col0 ) AS col2 FROM tab1 AS cor0
----
33
74
93

skipif mysql # not compatible
query I rowsort label-4317
SELECT ALL - - col1 + col0 + col1 / ( col0 + col0 ) AS col2 FROM tab1 AS cor0
----
33
74
93

query I rowsort
SELECT + ( + ( + col0 ) ) * + 13 + - 54 FROM tab1 AS cor0
----
-15
778
986

query I rowsort
SELECT ALL tab0.col2 * - col2 * col1 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - 26 + col1 col0 FROM tab0
----
146
156
168

onlyif mysql # use DIV operator for integer division
query I rowsort label-4321
SELECT + col1 * 84 + - col0 DIV cor0.col1 + col2 AS col1 FROM tab0 AS cor0
----
7257
7726
8149

skipif mysql # not compatible
query I rowsort label-4321
SELECT + col1 * 84 + - col0 / cor0.col1 + col2 AS col1 FROM tab0 AS cor0
----
7257
7726
8149

query I rowsort
SELECT ALL col1 + ( + ( cor0.col1 ) * + col1 ) AS col0 FROM tab2 cor0
----
306
3540
992

query I rowsort
SELECT + - col1 + - 92 + col2 AS col1 FROM tab0 AS cor0
----
-101
-145
-188

query I rowsort
SELECT DISTINCT + 77 * col0 AS col1 FROM tab1 AS cor0
----
231
4928
6160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4325
SELECT ALL + CAST( col2 AS SIGNED ) * col2 + 20 * - col1 AS col0 FROM tab1 AS cor0
----
2396
3049
8956

skipif mysql # not compatible
query I rowsort label-4325
SELECT ALL + CAST ( col2 AS INTEGER ) * col2 + 20 * - col1 AS col0 FROM tab1 AS cor0
----
2396
3049
8956

skipif mysql # not compatible
query I rowsort
SELECT ALL + + col0 * col2 + - col0 - CAST ( + col2 AS REAL ) * col2 FROM tab1 AS cor0
----
-1616
-2757
335

query I rowsort
SELECT ALL - + col0 - col1 AS col1 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + - ( - 35 ) + col0 AS col1 FROM tab2 AS cor0
----
113
114
42

query I rowsort
SELECT + - 30 * 47 FROM tab1 AS cor0
----
-1410
-1410
-1410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4330
SELECT + - CAST( - col2 AS SIGNED ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4330
SELECT + - CAST ( - col2 AS INTEGER ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - cor0.col2 + 16 * - col2 * + ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-122976
-2646
-58425

query I rowsort
SELECT - - col2 * ( col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT 53 * + 3 AS col1 FROM tab0 cor0
----
159
159
159

query I rowsort
SELECT ALL - 25 + 64 FROM tab1 AS cor0
----
39
39
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-4335
SELECT DISTINCT - + cor0.col2 DIV + 23 col0 FROM tab1 cor0
----
-2
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4335
SELECT DISTINCT - + cor0.col2 / + 23 col0 FROM tab1 cor0
----
-2
-4

query I rowsort
SELECT DISTINCT + col0 * + 47 AS col0 FROM tab0
----
1128
1645
4183

query I rowsort
SELECT DISTINCT col2 * col0 * 16 AS col1 FROM tab0
----
116768
12672
560

query I rowsort
SELECT - - 33 + + col2 FROM tab0 AS cor0
----
115
34
66

query I rowsort
SELECT - cor0.col1 * col0 + + 6 * + col2 * + col0 AS col2 FROM tab0 AS cor0
----
-3185
2688
35689

query I rowsort
SELECT + cor0.col0 * - col0 - col2 FROM tab0 cor0
----
-1226
-609
-8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-4341
SELECT - ( col2 ) DIV - 19 + col2 * col1 FROM tab0 AS cor0
----
2839
7466
97

skipif mysql # not compatible
query I rowsort label-4341
SELECT - ( col2 ) / - 19 + col2 * col1 FROM tab0 AS cor0
----
2839
7466
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4342
SELECT ALL - CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4342
SELECT ALL - CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col2 + - col1 * col0 AS col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - col1 * col1 + col0 + + col2 FROM tab2 AS cor0
----
-172
-3377
-927

onlyif mysql # use DIV operator for integer division
query I rowsort label-4345
SELECT DISTINCT ( + 0 ) DIV - cor0.col0 + - 8 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-8

skipif mysql # not compatible
query I rowsort label-4345
SELECT DISTINCT ( + 0 ) / - cor0.col0 + - 8 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-8

query I rowsort
SELECT ALL + col2 * + col0 + - ( - col1 + col2 ) FROM tab0 AS cor0
----
131
7307
845

query I rowsort
SELECT DISTINCT col0 * col2 + + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT + col2 * 85 - col2 FROM tab2 AS cor0
----
2184
2268
3192

query I rowsort
SELECT ALL cor0.col1 + 3 FROM tab2 AS cor0
----
20
34
62

query I rowsort
SELECT + 45 * + col0 + col0 - - tab0.col1 AS col1 FROM tab0
----
1190
1707
4185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4351
SELECT - col2 * - col2 + CAST( NULL AS SIGNED ) + col2 * col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4351
SELECT - col2 * - col2 + CAST ( NULL AS INTEGER ) + col2 * col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 - col0 * + col0 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT - 85 * + col2 * 85 AS col1 FROM tab1
----
-390150
-411825
-693600

onlyif mysql # use DIV operator for integer division
query I rowsort label-4354
SELECT 39 - col2 DIV 82 FROM tab0
----
38
39
39

skipif mysql # not compatible
query I rowsort label-4354
SELECT 39 - col2 / 82 FROM tab0
----
38
39
39

query I rowsort
SELECT col1 + col0 + ( col2 ) FROM tab2
----
134
163
65

query I rowsort
SELECT DISTINCT col2 - + col0 * - col1 FROM tab1
----
1136
132
697

query I rowsort
SELECT DISTINCT col2 + col1 * 9 AS col1 FROM tab2
----
191
306
557

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4358
SELECT + col0 + CAST( - ( + col0 ) AS SIGNED ) * 7 col1 FROM tab2
----
-42
-468
-474

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4358
SELECT + col0 + CAST ( - ( + col0 ) AS INTEGER ) * 7 col1 FROM tab2
----
-42
-468
-474

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + 84 + + col2 col2 FROM tab0 AS cor0
----
50
77
93

query I rowsort
SELECT col0 + ( + 13 ) AS col2 FROM tab1 AS cor0
----
16
77
93

query I rowsort
SELECT ALL col0 + col0 * col0 AS col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT - - cor0.col0 * - col0 + - 95 FROM tab2 AS cor0
----
-144
-6179
-6336

query I rowsort
SELECT DISTINCT - col1 + col2 * - 75 * + col0 FROM tab2 AS cor0
----
-14206
-152159
-225167

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

query I rowsort
SELECT + + cor0.col2 + - cor0.col2 * + col0 AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col0 ) * col1 col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + col1 * - col2 + col2 FROM tab1 cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-4368
SELECT DISTINCT - 42 DIV 36 FROM tab1, tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4368
SELECT DISTINCT - 42 / 36 FROM tab1, tab1 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4369
SELECT DISTINCT + col2 + col0 * + ( + col0 ) DIV tab1.col0 AS col2 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-4369
SELECT DISTINCT + col2 + col0 * + ( + col0 ) / tab1.col0 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - col1 * col0 + col2 * + col1 FROM tab2
----
-3068
-697
620

query I rowsort
SELECT - + 2 * + cor0.col0 FROM tab0 AS cor0
----
-178
-48
-70

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT ALL + + 64 FROM tab2 AS cor0
----
64
64
64

query I rowsort
SELECT + 49 * + col1 FROM tab2 AS cor0
----
1519
2891
833

query I rowsort
SELECT ALL + col1 * cor0.col0 * - 64 FROM tab2 AS cor0
----
-13888
-294528
-85952

onlyif mysql # use DIV operator for integer division
query I rowsort label-4376
SELECT ALL - 21 DIV col0 AS col2 FROM tab1 AS cor0
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-4376
SELECT ALL - 21 / col0 AS col2 FROM tab1 AS cor0
----
-7
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4378
SELECT ALL - + col1 + + CAST( - 2 AS SIGNED ) FROM tab1 AS cor0
----
-12
-15
-28

skipif mysql # not compatible
query I rowsort label-4378
SELECT ALL - + col1 + + CAST ( - 2 AS INTEGER ) FROM tab1 AS cor0
----
-12
-15
-28

query I rowsort
SELECT + col1 + 62 * col0 AS col2 FROM tab1 AS cor0
----
212
3978
4973

query I rowsort
SELECT DISTINCT - col1 * + 87 AS col1 FROM tab2 cor0
----
-1479
-2697
-5133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col2 FROM tab0, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL + col1 * col0 + + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4383
SELECT DISTINCT + 49 + col0 + col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4383
SELECT DISTINCT + 49 + col0 + col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - tab2.col0 * - col2 * col2 FROM tab2
----
114076
5103
52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * cor0.col0 col1 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4386
SELECT DISTINCT + CAST( - 14 AS SIGNED ) FROM tab0 cor0
----
-14

skipif mysql # not compatible
query I rowsort label-4386
SELECT DISTINCT + CAST ( - 14 AS INTEGER ) FROM tab0 cor0
----
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 + - col0 col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL + 29 + col1 AS col0 FROM tab1 AS cor0
----
39
42
55

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1, tab2 cor0, tab1 AS cor1
----
-7
-78
-79

query I rowsort
SELECT ALL 18 * 84 + col1 - 14 FROM tab0 cor0
----
1584
1589
1595

query I rowsort
SELECT ALL col2 * col2 + col1 * + col2 + col2 AS col2 FROM tab0
----
14268
3960
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4392
SELECT ALL cor0.col0 DIV ( cor0.col0 ) + - tab0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 10bac43160b3d70080a08eaaac560e9e

skipif mysql # not compatible
query I rowsort label-4392
SELECT ALL cor0.col0 / ( cor0.col0 ) + - tab0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 10bac43160b3d70080a08eaaac560e9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4393
SELECT - + col1 + - col0 DIV col1 AS col1 FROM tab1 AS cor0
----
-16
-19
-26

skipif mysql # not compatible
query I rowsort label-4393
SELECT - + col1 + - col0 / col1 AS col1 FROM tab1 AS cor0
----
-16
-19
-26

query I rowsort
SELECT DISTINCT + + 18 * col1 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT - col1 + + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ( - col0 ) + + cor0.col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - + 8 * + col1 * + ( + col0 + col1 * ( - col2 ) ) AS col1 FROM tab2 cor0
----
205840
687232
77112

query I rowsort
SELECT DISTINCT + - col2 * 14 FROM tab0 AS cor0
----
-1148
-14
-462

query I rowsort
SELECT ALL cor0.col0 - 76 AS col2 FROM tab1 AS cor0
----
-12
-73
4

query I rowsort
SELECT ALL col1 + + ( + cor0.col1 ) * col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col2 * + col2 + 11 FROM tab0 cor0
----
1100
12
6735

query I rowsort
SELECT DISTINCT - col2 - col0 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL cor0.col2 * + ( + 35 ) FROM tab0 AS cor0
----
1155
2870
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4404
SELECT col1 + 15 * - ( - col0 * - CAST( NULL AS SIGNED ) ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4404
SELECT col1 + 15 * - ( - col0 * - CAST ( NULL AS INTEGER ) ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 + + cor0.col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1128
-490
-7830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4406
SELECT ALL col1 * CAST( + col1 AS SIGNED ) FROM tab2 cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-4406
SELECT ALL col1 * CAST ( + col1 AS INTEGER ) FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT ALL col0 * - 71 AS col1 FROM tab1 AS cor0
----
-213
-4544
-5680

query I rowsort
SELECT col2 + - 25 * + col2 AS col0 FROM tab1 AS cor0
----
-1296
-1368
-2304

query I rowsort
SELECT ALL - cor0.col2 + 26 * - col2 AS col1 FROM tab2 AS cor0
----
-1026
-702
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4410
SELECT ALL + col0 / col2 + CAST( NULL AS SIGNED ) * ( col2 + - ( 14 ) ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4410
SELECT ALL + col0 / col2 + CAST ( NULL AS INTEGER ) * ( col2 + - ( 14 ) ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 48 * tab1.col1 + + col2 AS col2 FROM tab1
----
-1194
-423
-528

query I rowsort
SELECT DISTINCT cor0.col2 * 87 FROM tab1 AS cor0
----
4698
4959
8352

query I rowsort
SELECT DISTINCT + 16 + - col0 FROM tab0
----
-19
-73
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4414
SELECT ALL - col0 DIV - col2 + + ( - col0 ) AS col2 FROM tab0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-4414
SELECT ALL - col0 / - col2 + + ( - col0 ) AS col2 FROM tab0
----
-24
-88
0

query I rowsort
SELECT DISTINCT ( - tab2.col1 ) AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-17
-31
-59

query I rowsort
SELECT DISTINCT 4 * cor1.col0 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
140
356
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4417
SELECT - col0 * - 17 + cor0.col1 DIV + col1 FROM tab0 AS cor0
----
1514
409
596

skipif mysql # not compatible
query I rowsort label-4417
SELECT - col0 * - 17 + cor0.col1 / + col1 FROM tab0 AS cor0
----
1514
409
596

query I rowsort
SELECT ALL col0 * 69 FROM tab0
----
1656
2415
6141

query I rowsort
SELECT + + 19 * col0 + cor0.col1 * ( - col0 ) + col2 FROM tab0 AS cor0
----
-1575
-2729
-6326

query I rowsort
SELECT col0 * ( col1 ) * + col0 AS col1 FROM tab0
----
118825
49536
720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-4421
SELECT DISTINCT + col2 DIV 34 FROM tab1
----
1
2

skipif mysql # not compatible
query I rowsort label-4421
SELECT DISTINCT + col2 / 34 FROM tab1
----
1
2

query I rowsort
SELECT ALL + tab2.col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT col0 + + col0 * + 52 * col0 AS col2 FROM tab2
----
2555
316446
324611

query I rowsort
SELECT + col0 * col2 + tab1.col2 AS col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL - col2 * col2 * + 63 FROM tab1
----
-183708
-204687
-580608

query I rowsort
SELECT + col2 * ( - col0 ) * col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT - 48 + + col0 AS col0 FROM tab0 AS cor0
----
-13
-24
41

query I rowsort
SELECT ( col2 ) + col2 * + col2 * col1 FROM tab2
----
22626
24586
39910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 + + ( + col1 ) col1 FROM tab2
----
-17
-45
-59

query I rowsort
SELECT + col2 + - 86 FROM tab2
----
-48
-59
-60

query I rowsort
SELECT ALL + 1 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT 16 * tab2.col1 AS col0 FROM tab2
----
272
496
944

query I rowsort
SELECT ALL + 85 + col1 * 79 FROM tab2 AS cor0
----
1428
2534
4746

query I rowsort
SELECT + 11 + - col0 AS col0 FROM tab0 AS cor0
----
-13
-24
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col0 col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL 97 * col0 + - 89 * + col1 * col1 FROM tab1 AS cor0
----
-2692
-59873
-7281

query I rowsort
SELECT - + col2 + - col1 * - 81 * 63 FROM tab2 AS cor0
----
158166
301051
86713

query I rowsort
SELECT ALL - + 85 * - col2 - - 73 FROM tab2 cor0
----
2283
2368
3303

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4439
SELECT ALL + CAST( - 57 AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

skipif mysql # not compatible
query I rowsort label-4439
SELECT ALL + CAST ( - 57 AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT DISTINCT - 14 * + col0 + + col1 AS col1 FROM tab1 AS cor0
----
-1107
-16
-886

query I rowsort
SELECT - ( 94 ) * + col0 FROM tab2
----
-658
-7332
-7426

query I rowsort
SELECT ALL - ( + 17 + - col1 ) AS col1 FROM tab0
----
69
74
80

query I rowsort
SELECT - 28 * - col2 AS col1 FROM tab2
----
1064
728
756

query I rowsort
SELECT + ( tab1.col1 ) * - col1 AS col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - tab1.col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 + col0 * - col0 col0 FROM tab0 AS cor0
----
-1261
-612
-7957

query I rowsort
SELECT 53 * col2 + col1 FROM tab1 AS cor0
----
2888
3031
5101

query I rowsort
SELECT + col1 * - cor0.col2 + + col0 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT - 0 + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + + col2 * - col0 + - col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT - + cor0.col0 * col0 + - 31 * + col1 AS col1 FROM tab0 AS cor0
----
-10742
-3242
-4232

query I rowsort
SELECT ALL - + col1 - col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4453
SELECT DISTINCT cor0.col2 + col0 * 81 DIV - col0 FROM tab1 cor0
----
-24
-27
15

skipif mysql # not compatible
query I rowsort label-4453
SELECT DISTINCT cor0.col2 + col0 * 81 / - col0 FROM tab1 cor0
----
-24
-27
15

query I rowsort
SELECT ( + 23 ) * col1 AS col1 FROM tab0
----
1978
2093
2231

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-4456
SELECT - - cor0.col2 * col1 DIV ( + 27 * - col0 ) + - col0 AS col2 FROM tab0 AS cor0
----
-28
-35
-92

skipif mysql # not compatible
query I rowsort label-4456
SELECT - - cor0.col2 * col1 / ( + 27 * - col0 ) + - col0 AS col2 FROM tab0 AS cor0
----
-28
-35
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL col2 + + col0 * CAST ( 45 AS REAL ) col0 FROM tab2 AS cor0
----
342
3536
3593

query I rowsort
SELECT DISTINCT - - col2 * col1 * - ( col2 ) AS col1 FROM tab2 cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + col0 + + col0 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - col2 * - ( 94 * + col1 ) FROM tab0 AS cor0
----
266772
701428
9118

query I rowsort
SELECT + + col2 + 29 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT + - col0 + - col0 * 46 AS col1 FROM tab1 AS cor0
----
-141
-3008
-3760

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 cor0.col0 * cor0.col2 FROM tab1, tab2 cor0
----
9 values hashing to 41d4c126bfd4bfab59ba5e83427c98e0

query I rowsort
SELECT - col2 + + 40 * cor0.col0 FROM tab0 AS cor0
----
1399
3478
927

query I rowsort
SELECT - col1 * + 33 FROM tab1
----
-330
-429
-858

onlyif mysql # use DIV operator for integer division
query I rowsort label-4467
SELECT col0 DIV + 55 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4467
SELECT col0 / + 55 FROM tab1
----
0
1
1

query I rowsort
SELECT - col0 + 14 AS col0 FROM tab0 AS cor0
----
-10
-21
-75

query I rowsort
SELECT - + 70 + col1 FROM tab1 AS cor0
----
-44
-57
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 * + ( - 57 ) col2 FROM tab0
----
1368
1995
5073

query I rowsort
SELECT cor0.col1 + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4472
SELECT ALL - + CAST( 47 AS SIGNED ) FROM tab0 AS cor0
----
-47
-47
-47

skipif mysql # not compatible
query I rowsort label-4472
SELECT ALL - + CAST ( 47 AS INTEGER ) FROM tab0 AS cor0
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 41 * 38 col0 FROM tab0 AS cor0
----
1558
1558
1558

query I rowsort
SELECT DISTINCT ( col0 ) + col1 * + 61 AS col2 FROM tab1 AS cor0
----
1589
674
873

query I rowsort
SELECT ALL - ( 80 ) FROM tab2 AS cor0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - 41 FROM tab0, tab2 AS cor0
----
-41

query I rowsort
SELECT - + col2 * col1 * - col2 AS col0 FROM tab2 AS cor0
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 79 * col1 col2 FROM tab2 AS cor0
----
-1326
-2418
-4602

query I rowsort
SELECT - 81 * 33 AS col1 FROM tab0 AS cor0
----
-2673
-2673
-2673

onlyif mysql # use DIV operator for integer division
query I rowsort label-4480
SELECT ALL + 66 DIV - col0 + col1 + 36 DIV ( - col1 ) AS col0 FROM tab0 AS cor0
----
84
91
96

skipif mysql # not compatible
query I rowsort label-4480
SELECT ALL + 66 / - col0 + col1 + 36 / ( - col1 ) AS col0 FROM tab0 AS cor0
----
84
91
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4481
SELECT CAST( cor0.col0 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-4481
SELECT CAST ( cor0.col0 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL ( col2 ) - col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - ( - col0 ) + + 86 AS col2 FROM tab0 AS cor0
----
110
121
175

query I rowsort
SELECT ALL + 34 * + 77 FROM tab2, tab1 cor0 CROSS JOIN tab1
----
27 values hashing to 52b15f2c846513e0d9708cae4b18823c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4485
SELECT DISTINCT 94 DIV tab1.col2 + - tab1.col2 AS col2 FROM tab1
----
-53
-56
-96

skipif mysql # not compatible
query I rowsort label-4485
SELECT DISTINCT 94 / tab1.col2 + - tab1.col2 AS col2 FROM tab1
----
-53
-56
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4486
SELECT CAST( + 46 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
-1426
-2714
-782

skipif mysql # not compatible
query I rowsort label-4486
SELECT CAST ( + 46 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT DISTINCT - col0 * col2 - - col2 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-4488
SELECT ALL + + col2 - - 43 DIV 2 FROM tab0 AS cor0
----
103
22
54

skipif mysql # not compatible
query I rowsort label-4488
SELECT ALL + + col2 - - 43 / 2 FROM tab0 AS cor0
----
103
22
54

query I rowsort
SELECT DISTINCT + 64 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
64

query I rowsort
SELECT ALL - 74 * - cor0.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to afd7c553b02fa284f153ad0489b14692

query I rowsort
SELECT - 45 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT 13 * + 63 AS col0 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 29a1c54004d50ba4bd3eecd969e890c8

query I rowsort
SELECT tab0.col0 * 62 + - 37 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 8569f9b3a17e3529500c5051f438f693

query I rowsort
SELECT - col1 + + ( ( + col1 ) ) * 5 AS col1 FROM tab2
----
124
236
68

query I rowsort
SELECT + col2 * col2 - - col0 * col1 * - tab2.col0 FROM tab2
----
-104653
-358280
-790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 - col0 * col1 col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - cor0.col2 * + 52 AS col1 FROM tab2 AS cor0
----
-1352
-1404
-1976

onlyif mysql # use DIV operator for integer division
query I rowsort label-4498
SELECT - col1 + + CAST( + col0 + + col2 AS SIGNED ) DIV - 76 FROM tab1 AS cor0
----
-11
-15
-26

skipif mysql # not compatible
query I rowsort label-4498
SELECT - col1 + + CAST ( + col0 + + col2 AS INTEGER ) / - 76 FROM tab1 AS cor0
----
-11
-15
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * col0 col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + - col1 * cor0.col0 + - col2 * col2 AS col0 FROM tab2 AS cor0
----
-2787
-5278
-946

query I rowsort
SELECT DISTINCT col0 + col1 + - ( col1 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 65 + col2 AS col1 FROM tab0
----
147
66
98

query I rowsort
SELECT col1 * + col1 + col1 AS col1 FROM tab1
----
110
182
702

query I rowsort
SELECT col2 + col0 + 0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col1 * col1 * col1 + cor0.col2 AS col2 FROM tab1 cor0
----
1057
17630
2293

query I rowsort
SELECT ALL col2 + + cor0.col2 + - col1 FROM tab0 AS cor0
----
-20
-95
73

query I rowsort
SELECT + col2 * - ( - ( + col0 ) ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + - 33 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT ALL + col1 + + col0 - + col1 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL + col2 * + col1 - col0 FROM tab2 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT + col0 + col1 + col0 * col1 FROM tab2
----
1439
255
4739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 * col2 + - col2 col2 FROM tab0
----
-26169
-36
-598518

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col0 + + col1 col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT col1 + col0 * tab0.col1 * + col1 FROM tab0 WHERE ( - col1 ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - col0 + + tab1.col0 * col0 FROM tab1
----
4032
6
6320

query I rowsort
SELECT 70 + col1 * col2 FROM tab1 AS cor0
----
1318
1474
640

query I rowsort
SELECT + ( col1 ) * col0 * col0 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
118922
49622
720902

query I rowsort
SELECT ALL - - 47 * col2 * ( col2 + + col1 ) FROM tab0 AS cor0
----
184569
4606
666742

query I rowsort
SELECT + + col0 + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4520
SELECT ALL - + CAST( cor0.col2 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif mysql # not compatible
query I rowsort label-4520
SELECT ALL - + CAST ( cor0.col2 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL - col2 * col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - - 16 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT col0 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT 39 * + col1 AS col1 FROM tab1 AS cor0
----
1014
390
507

query I rowsort
SELECT + col0 * + col2 - + ( - col2 + - col1 ) * + 50 FROM tab0 cor0
----
15948
4935
6742

query I rowsort
SELECT ALL + ( col1 ) * ( 59 ) + col2 AS col1 FROM tab2 cor0
----
1041
1856
3507

query I rowsort
SELECT DISTINCT + + ( - col0 ) - - 11 AS col1 FROM tab2 AS cor0
----
-67
-68
4

query I rowsort
SELECT + col0 + 26 FROM tab0 AS cor0
----
115
50
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4529
SELECT + cor0.col2 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4529
SELECT + cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * 62 FROM tab2 AS cor0
----
1054
1922
3658

query I rowsort
SELECT ALL - 70 * col2 - col2 AS col1 FROM tab1 AS cor0
----
-3834
-4047
-6816

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - col1 AS REAL ) * + cor0.col0 + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + col1 * ( - col1 ) AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4534
SELECT - - CAST( NULL AS SIGNED ) * 37 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4534
SELECT - - CAST ( NULL AS INTEGER ) * 37 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( 75 ) FROM tab0
----
75

query I rowsort
SELECT - 11 * - col2 * col0 FROM tab0 AS cor0
----
385
80278
8712

onlyif mysql # use DIV operator for integer division
query I rowsort label-4537
SELECT DISTINCT col1 DIV + col0 col2 FROM tab0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4537
SELECT DISTINCT col1 / + col0 col2 FROM tab0
----
1
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4538
SELECT ALL - - CAST( NULL AS SIGNED ) * + cor0.col0 col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4538
SELECT ALL - - CAST ( NULL AS INTEGER ) * + cor0.col0 col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT col0 * 16 AS col1 FROM tab1
----
1024
1280
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 14 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT - cor0.col2 + + cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL col0 - - col1 * tab0.col1 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT - tab2.col1 - - col1 FROM tab2
----
0

query I rowsort
SELECT - tab1.col2 + col2 - - col0 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT - col2 * col1 + col2 + - col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + col1 + + col0 + - col1 AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT col2 * col0 * col1 - tab2.col1 AS col2 FROM tab2
----
119593
51017
5828

query I rowsort
SELECT ALL - col2 + + col0 - + col0 * - col1 AS col2 FROM tab0
----
2055
3429
8106

query I rowsort
SELECT + col0 + - col1 - + col0 * col0 FROM tab2
----
-6065
-6179
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-4550
SELECT + col1 DIV col0 + - col2 AS col2 FROM tab1
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-4550
SELECT + col1 / col0 + - col2 AS col2 FROM tab1
----
-46
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4551
SELECT - CAST( - col1 * + col0 + + col0 AS SIGNED ) FROM tab2
----
1264
210
4524

skipif mysql # not compatible
query I rowsort label-4551
SELECT - CAST ( - col1 * + col0 + + col0 AS INTEGER ) FROM tab2
----
1264
210
4524

query I rowsort
SELECT ( 89 * col2 ) AS col1 FROM tab1
----
4806
5073
8544

query I rowsort
SELECT ALL ( - 96 ) + col2 FROM tab2
----
-58
-69
-70

query I rowsort
SELECT DISTINCT ( - col1 ) * col2 + col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL cor1.col1 * + cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4a2f25e7025075a0ce048be425c35957

query I rowsort
SELECT + col1 + cor0.col0 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - col1 + col1 * col0 + - col2 AS col2 FROM tab0 AS cor0
----
1945
3297
7926

query I rowsort
SELECT ALL - col0 * col0 + + col1 FROM tab1 cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 - + col1 FROM tab2 AS cor0
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col2 FROM tab0 WHERE NOT ( NULL ) IN ( tab0.col1 + col1 * - col0 )
----

query I rowsort
SELECT DISTINCT col2 * col1 + tab2.col1 FROM tab2 WHERE col2 BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL IN ( - col2 / - col2 )
----

query I rowsort
SELECT col1 * cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL cor0.col1 * - col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT col1 * - col2 * - col1 AS col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL + col0 * - col1 * col2 + col2 AS col2 FROM tab1 AS cor0
----
-36423
-4158
-99744

query I rowsort
SELECT DISTINCT - col2 - - col0 * + col1 * - col1 FROM tab1 cor0
----
-13616
-2082
-6457

query I rowsort
SELECT + cor0.col0 * + col2 AS col1 FROM tab0 AS cor0 WHERE NOT NULL BETWEEN + col2 AND NULL
----

query I rowsort
SELECT ALL col2 - col0 * + col1 FROM tab2
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2 WHERE NOT - col2 IN ( - col0 - + col1 )
----
26
27
38

query I rowsort
SELECT col1 + col0 AS col2 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN NULL AND - col2
----

query I rowsort
SELECT + tab1.col1 - col1 * col2 AS col2 FROM tab1
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 - - col2 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 * + tab0.col2 * + col1 + col2 + col0 FROM tab0
----
-61
-611713
-93597

query I rowsort
SELECT col1 + + col2 + + col1 FROM tab1
----
106
122
77

query I rowsort
SELECT DISTINCT tab1.col0 + col2 AS col1 FROM tab1 WHERE NOT ( - col0 ) <> NULL
----

query I rowsort
SELECT - tab1.col0 + col1 * - col1 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT tab0.col1 + tab0.col2 * tab0.col0 + + col1 AS col2 FROM tab0 WHERE col2 NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT - col2 * col0 + - col0 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT - - col1 + + col2 + col1 AS col1 FROM tab1 AS cor0
----
106
122
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4581
SELECT - col2 DIV - col0 col1 FROM tab1 AS cor0
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4581
SELECT - col2 / - col0 col1 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-4582
SELECT DISTINCT + col2 + col2 DIV col0 AS col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-4582
SELECT DISTINCT + col2 + col2 / col0 AS col0 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT - - cor0.col0 + col0 * + col2 AS col1 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4584
SELECT - - col1 * + col1 + col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
7397
8282
9410

skipif mysql # not compatible
query I rowsort label-4584
SELECT - - col1 * + col1 + col0 / + col0 AS col0 FROM tab0 AS cor0
----
7397
8282
9410

query I rowsort
SELECT DISTINCT cor0.col0 + col0 AS col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + tab2.col0 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4587
SELECT ALL col2 + tab1.col0 * col0 DIV + col0 AS col1 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-4587
SELECT ALL col2 + tab1.col0 * col0 / + col0 AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT col1 * - col0 + + tab0.col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - 49 * + col2 AS col1 FROM tab0 AS cor0
----
-1617
-4018
-49

query I rowsort
SELECT + ( col0 ) - + cor0.col2 AS col1 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( 64 AS REAL ) * - cor0.col2 col0 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT + - col2 - - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4593
SELECT DISTINCT - + CAST( 14 AS SIGNED ) * col2 AS col2 FROM tab1 AS cor0
----
-1344
-756
-798

skipif mysql # not compatible
query I rowsort label-4593
SELECT DISTINCT - + CAST ( 14 AS INTEGER ) * col2 AS col2 FROM tab1 AS cor0
----
-1344
-756
-798

query I rowsort
SELECT - - ( 39 ) + + col2 FROM tab0 AS cor0
----
121
40
72

query I rowsort
SELECT DISTINCT + 72 * 3 * - col0 + 8 AS col0 FROM tab0 AS cor0
----
-19216
-5176
-7552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4596
SELECT + CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4596
SELECT + CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4597
SELECT 26 DIV col2 AS col0 FROM tab0 cor0
----
0
0
26

skipif mysql # not compatible
query I rowsort label-4597
SELECT 26 / col2 AS col0 FROM tab0 cor0
----
0
0
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4598
SELECT ALL - 31 + col1 DIV + cor0.col0 FROM tab2 AS cor0
----
-27
-31
-31

skipif mysql # not compatible
query I rowsort label-4598
SELECT ALL - 31 + col1 / + cor0.col0 FROM tab2 AS cor0
----
-27
-31
-31

query I rowsort
SELECT ( + col1 ) * - col2 + - 49 FROM tab2 AS cor0
----
-1583
-695
-886

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) + 56 col1 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT 21 + col1 + col2 FROM tab0
----
119
140
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4602
SELECT DISTINCT - + cor1.col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4602
SELECT DISTINCT - + cor1.col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + col0 + tab2.col0 + - col2 * + 31 AS col1 FROM tab2
----
-1020
-650
-823

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab0, tab1 AS cor0
----
-90

query I rowsort
SELECT ALL + 55 + - ( - col0 ) FROM tab1
----
119
135
58

query I rowsort
SELECT col1 + - col2 + + tab1.col2 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL + col2 * - ( + col0 ) * col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - + col1 * + tab1.col1 col2 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT DISTINCT + col2 * - 25 + col2 * col2 * cor0.col2 FROM tab1 AS cor0
----
156114
183768
882336

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4610
SELECT DISTINCT - col1 * CAST( NULL AS SIGNED ) + + col2 + cor0.col1 / col2 col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4610
SELECT DISTINCT - col1 * CAST ( NULL AS INTEGER ) + + col2 + cor0.col1 / col2 col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col1 * + 51 FROM tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT 26 * col2 + - col0 FROM tab0
----
-9
2043
834

onlyif mysql # use DIV operator for integer division
query I rowsort label-4613
SELECT - col2 + - col2 DIV + ( - tab1.col2 ) AS col2 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-4613
SELECT - col2 + - col2 / + ( - tab1.col2 ) AS col2 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT + col0 * col2 + ( + col2 ) * - col1 AS col0 FROM tab0
----
-164
-2046
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4615
SELECT col1 DIV + 6 AS col0 FROM tab1
----
1
2
4

skipif mysql # not compatible
query I rowsort label-4615
SELECT col1 / + 6 AS col0 FROM tab1
----
1
2
4

query I rowsort
SELECT col0 * tab1.col2 + 54 AS col0 FROM tab1
----
216
3702
7734

query I rowsort
SELECT col0 + + 65 AS col1 FROM tab2 AS cor0
----
143
144
72

query I rowsort
SELECT ALL col0 + cor0.col2 * col1 * col2 + 34 FROM tab2 cor0
----
22640
24661
39996

query I rowsort
SELECT DISTINCT - 52 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-52

query I rowsort
SELECT + - cor0.col0 + - 94 AS col0 FROM tab0 cor0
----
-118
-129
-183

query I rowsort
SELECT ALL col2 * - ( + col0 ) * col0 + col0 FROM tab2 AS cor0
----
-1316
-158106
-237079

query I rowsort
SELECT ALL - col2 - - 66 AS col0 FROM tab2 cor0
----
28
39
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4623
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab2 cor0, tab0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-4623
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab2 cor0, tab0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT - tab1.col0 * tab1.col2 FROM tab1, tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 + - col2 ) col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4626
SELECT - + col1 DIV - 46 FROM tab0 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-4626
SELECT - + col1 / - 46 FROM tab0 AS cor0
----
1
1
2

query I rowsort
SELECT + 84 FROM tab0, tab2 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4628
SELECT 26 DIV col1 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4628
SELECT 26 / col1 AS col0 FROM tab2
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

onlyif mysql # use DIV operator for integer division
query I rowsort label-4630
SELECT + cor0.col2 DIV col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
103
56
62

skipif mysql # not compatible
query I rowsort label-4630
SELECT + cor0.col2 / col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
103
56
62

query I rowsort
SELECT DISTINCT - - col0 + cor0.col1 * col2 * col1 AS col0 FROM tab1 AS cor0
----
16304
36507
5764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 43 * + col0 col1 FROM tab1 AS cor0
----
-129
-2752
-3440

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 col2 * + 87 col2 FROM tab1 AS cor0
----
4698
4959
8352

query I rowsort
SELECT ALL - + cor0.col1 * - col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col1 * - 87 * - col0 FROM tab1 AS cor0
----
55680
6786
90480

onlyif mysql # use DIV operator for integer division
query I rowsort label-4637
SELECT + col0 * col2 + tab0.col2 DIV 62 AS col1 FROM tab0
----
35
7299
792

skipif mysql # not compatible
query I rowsort label-4637
SELECT + col0 * col2 + tab0.col2 / 62 AS col1 FROM tab0
----
35
7299
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4638
SELECT + col2 DIV + col0 + + 3 * col0 FROM tab1 AS cor0
----
192
241
27

skipif mysql # not compatible
query I rowsort label-4638
SELECT + col2 / + col0 + + 3 * col0 FROM tab1 AS cor0
----
192
241
27

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 cor1.col1 AS col2 FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT cor0.col1 * - 78 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 4b75ab975e01e2dbc86ec170cd7164d7

query I rowsort
SELECT - 52 * - col1 FROM tab2 AS cor0
----
1612
3068
884

query I rowsort
SELECT cor0.col0 + + ( 58 ) FROM tab2, tab2 AS cor0
----
9 values hashing to ed2018dec6b071f154fd8cf9a42cc36c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4644
SELECT DISTINCT + col2 * col1 DIV ( col2 * - col2 + + col1 ) col0 FROM tab2 AS cor0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4644
SELECT DISTINCT + col2 * col1 / ( col2 * - col2 + + col1 ) col0 FROM tab2 AS cor0
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4645
SELECT - cor0.col2 + + ( + cor0.col0 ) DIV - col1 FROM tab1 AS cor0
----
-102
-54
-63

skipif mysql # not compatible
query I rowsort label-4645
SELECT - cor0.col2 + + ( + cor0.col0 ) / - col1 FROM tab1 AS cor0
----
-102
-54
-63

query I rowsort
SELECT DISTINCT cor0.col1 + 58 AS col0 FROM tab0 AS cor0
----
144
149
155

query I rowsort
SELECT ALL col0 * + 66 AS col1 FROM tab1 AS cor0
----
198
4224
5280

onlyif mysql # use DIV operator for integer division
query I rowsort label-4648
SELECT 50 DIV tab1.col0 + + 74 * col1 AS col2 FROM tab1
----
1940
740
962

skipif mysql # not compatible
query I rowsort label-4648
SELECT 50 / tab1.col0 + + 74 * col1 AS col2 FROM tab1
----
1940
740
962

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab0, tab2, tab2 cor0
----
82

query I rowsort
SELECT DISTINCT + 10 + - ( col2 ) * + col2 FROM tab0 AS cor0
----
-1079
-6714
9

query I rowsort
SELECT ALL - cor0.col1 + - col0 * - col1 * col2 AS col2 FROM tab0 cor0
----
3298
664027
68026

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4652
SELECT - CAST( - col1 AS SIGNED ) * col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4652
SELECT - CAST ( - col1 AS INTEGER ) * col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - + col1 * cor0.col0 + col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 44 col2 FROM tab0
----
1452
3608
44

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab2, tab1 cor0, tab0 AS cor1
----
-24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4656
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4656
SELECT DISTINCT CAST ( NULL AS REAL ) AS col2 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4657
SELECT ALL CAST( NULL AS SIGNED ) + col0 * col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4657
SELECT ALL CAST ( NULL AS INTEGER ) + col0 * col1 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 11 + cor0.col0 FROM tab2, tab0 AS cor0
----
100
35
46

query I rowsort
SELECT - ( - col0 + col0 ) AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4660
SELECT + 52 + col0 DIV + col2 FROM tab1 AS cor0
----
52
52
53

skipif mysql # not compatible
query I rowsort label-4660
SELECT + 52 + col0 / + col2 FROM tab1 AS cor0
----
52
52
53

query I rowsort
SELECT cor0.col0 * + col0 + - cor0.col0 * + col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4662
SELECT 96 DIV + ( col1 ) FROM tab2 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-4662
SELECT 96 / + ( col1 ) FROM tab2 AS cor0
----
1
3
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4663
SELECT + - cor0.col0 DIV - col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4663
SELECT + - cor0.col0 / - col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4664
SELECT ALL CAST( - ( - col2 ) AS SIGNED ) + - 42 AS col0 FROM tab2
----
-15
-16
-4

skipif mysql # not compatible
query I rowsort label-4664
SELECT ALL CAST ( - ( - col2 ) AS INTEGER ) + - 42 AS col0 FROM tab2
----
-15
-16
-4

query I rowsort
SELECT ALL + ( + col0 ) + + col0 * + col1 AS col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT + - ( - 63 ) FROM tab2, tab0, tab1 AS cor0
----
63

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 - - 31 * + col1 * - col0 FROM tab2 AS cor0
----
-144196
-42279
-7564

query I rowsort
SELECT DISTINCT - col1 + 81 FROM tab1
----
55
68
71

query I rowsort
SELECT - - col1 * + 21 FROM tab2 AS cor0
----
1239
357
651

query I rowsort
SELECT + + col2 * + 71 + - col2 FROM tab1 AS cor0
----
3780
3990
6720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4671
SELECT - CAST( col0 * - col2 AS SIGNED ) + - tab1.col2 FROM tab1
----
108
3591
7584

skipif mysql # not compatible
query I rowsort label-4671
SELECT - CAST ( col0 * - col2 AS INTEGER ) + - tab1.col2 FROM tab1
----
108
3591
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) + col2 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - 34 * - col1 + + col2 FROM tab2
----
1081
2032
616

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4674
SELECT DISTINCT - col0 + col2 + - CAST( NULL AS SIGNED ) * col1 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4674
SELECT DISTINCT - col0 + col2 + - CAST ( NULL AS INTEGER ) * col1 AS col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL - col1 * col0 - + col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT ALL + + 82 * col1 FROM tab0 AS cor0
----
7052
7462
7954

query I rowsort
SELECT ALL - 10 * col0 FROM tab1 AS cor0
----
-30
-640
-800

query I rowsort
SELECT ALL + col0 * col2 + 22 FROM tab2 cor0
----
2050
211
3024

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4679
SELECT ALL + col1 * + col0 + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4679
SELECT ALL + col1 * + col0 + CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 25 - + col1 FROM tab2 AS cor0
----
-34
-6
8

query I rowsort
SELECT DISTINCT + 28 + - col0 FROM tab0 AS cor0
----
-61
-7
4

query I rowsort
SELECT - ( + col2 ) + - ( col0 ) FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT - col2 + - cor0.col2 * ( cor0.col0 + col1 ) AS col0 FROM tab2 AS cor0
----
-1053
-3588
-3686

query I rowsort
SELECT ALL ( + cor0.col1 ) + 85 * 7 AS col1 FROM tab0 AS cor0
----
681
686
692

query I rowsort
SELECT ALL - col2 * + col2 + col0 AS col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-4686
SELECT cor0.col0 DIV 25 AS col0 FROM tab1 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-4686
SELECT cor0.col0 / 25 AS col0 FROM tab1 AS cor0
----
0
2
3

query I rowsort
SELECT ALL - col2 * - 44 FROM tab0 AS cor0
----
1452
3608
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( - col1 ) col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - - col1 - + ( 18 * col2 ) AS col0 FROM tab1 AS cor0
----
-1016
-1715
-946

query I rowsort
SELECT ALL - 34 AS col2 FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT DISTINCT - 82 + col0 FROM tab0 cor0
----
-47
-58
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4692
SELECT DISTINCT + - 78 * cor0.col0 * col1 + col0 DIV col1 AS col2 FROM tab2 cor0
----
-104750
-16926
-358955

skipif mysql # not compatible
query I rowsort label-4692
SELECT DISTINCT + - 78 * cor0.col0 * col1 + col0 / col1 AS col2 FROM tab2 cor0
----
-104750
-16926
-358955

query I rowsort
SELECT - 77 * col1 + + col0 FROM tab1 AS cor0
----
-1999
-706
-921

query I rowsort
SELECT ALL - - ( - 72 ) - col2 * - col2 * + 40 AS col2 FROM tab1 AS cor0
----
116568
129888
368568

query I rowsort
SELECT + 16 + + cor0.col2 FROM tab2 AS cor0
----
42
43
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - 7 ) col1 FROM tab2 AS cor0
----
7

query I rowsort
SELECT - - col1 * col0 * - col0 + col2 FROM tab0 AS cor0
----
-118824
-49503
-720729

query I rowsort
SELECT ALL + col0 * - col2 - col2 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT 1 + - 46 * col2 AS col2 FROM tab2 AS cor0
----
-1195
-1241
-1747

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4700
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 98 + + cor0.col0 AS col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4700
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 98 + + cor0.col0 AS col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT - ( - col0 ) + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL 19 * 71 AS col1 FROM tab0, tab2 cor0, tab1 cor1
----
27 values hashing to 603ac117297b5ad0d4c934943eb93cb7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4704
SELECT + 38 DIV + col0 + col1 FROM tab0
----
87
91
98

skipif mysql # not compatible
query I rowsort label-4704
SELECT + 38 / + col0 + col1 FROM tab0
----
87
91
98

query I rowsort
SELECT ALL + 40 * + col0 + cor0.col1 - col1 AS col2 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT - 14 * + 34 AS col1 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 6a3693c1d33f4d429c77b9c2bab075be

query I rowsort
SELECT DISTINCT + - cor0.col0 AS col1 FROM tab1 cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - ( + 76 + + col2 ) col2 FROM tab2 AS cor0
----
-110
-180
-193

query I rowsort
SELECT + col2 * - 15 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1344
-756
-798

query I rowsort
SELECT DISTINCT - 93 AS col1 FROM tab2, tab0 AS cor0
----
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4711
SELECT DISTINCT + CAST( col1 AS SIGNED ) DIV cor0.col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4711
SELECT DISTINCT + CAST ( col1 AS INTEGER ) / cor0.col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT - + ( col0 ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT - 17 + + col1 AS col2 FROM tab0 AS cor0
----
69
74
80

query I rowsort
SELECT ALL - ( + col2 ) * - cor0.col2 + + 55 FROM tab1 AS cor0
----
2971
3304
9271

query I rowsort
SELECT - 86 * col1 AS col0 FROM tab1 AS cor0
----
-1118
-2236
-860

onlyif mysql # use DIV operator for integer division
query I rowsort label-4716
SELECT ALL + col1 * - col0 - + cor0.col0 DIV - col0 FROM tab2 AS cor0
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-4716
SELECT ALL + col1 * - col0 - + cor0.col0 / - col0 FROM tab2 AS cor0
----
-1342
-216
-4601

query I rowsort
SELECT + - col1 + - col1 * cor0.col1 FROM tab2 cor0
----
-306
-3540
-992

onlyif mysql # use DIV operator for integer division
query I rowsort label-4718
SELECT DISTINCT + + ( + col0 ) DIV 43 AS col0 FROM tab0 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-4718
SELECT DISTINCT + + ( + col0 ) / 43 AS col0 FROM tab0 AS cor0
----
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 * cor0.col1 * + col0 col1 FROM tab0 AS cor0
----
142416
234255
558831

query I rowsort
SELECT - 21 * 38 + - col2 FROM tab0
----
-799
-831
-880

query I rowsort
SELECT - 47 * col0 AS col0 FROM tab0 AS cor0
----
-1128
-1645
-4183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 * col1 + 42 col2 FROM tab0 AS cor0
----
2020
3340
8050

query I rowsort
SELECT ( + col1 ) * cor0.col2 + - ( col1 ) + ( col0 + + col2 * col2 ) AS col0 FROM tab1 AS cor0
----
10531
3873
4297

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 43cd4d6bf46fb9ce15caf369cb36598e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4725
SELECT - col1 * + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4725
SELECT - col1 * + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col0 + col0 * - col1 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-119730
-51113
-5866

query I rowsort
SELECT ALL - tab0.col0 + + tab0.col1 FROM tab0, tab1 cor0
----
9 values hashing to c99cbeca6e6fdb3507b2e08470c1cda6

query I rowsort
SELECT DISTINCT 82 * col2 FROM tab1
----
4428
4674
7872

query I rowsort
SELECT + - col2 + - 78 AS col1 FROM tab0 AS cor0
----
-111
-160
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4730
SELECT + col2 / - CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4730
SELECT + col2 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4731
SELECT + col2 / CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4731
SELECT + col2 / CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 78 + col2 + + col0 AS col0 FROM tab1 AS cor0
----
135
199
254

query I rowsort
SELECT 87 AS col2 FROM tab0, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 969f31ae779866644763e8a07f1ec501

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4734
SELECT - col2 + CAST( + col2 + + col1 AS SIGNED ) * col0 FROM tab2 AS cor0
----
379
4307
6604

skipif mysql # not compatible
query I rowsort label-4734
SELECT - col2 + CAST ( + col2 + + col1 AS INTEGER ) * col0 FROM tab2 AS cor0
----
379
4307
6604

query I rowsort
SELECT ALL + col1 + - col2 * - ( - col1 ) AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL - - col2 + 48 FROM tab2 AS cor0
----
74
75
86

query I rowsort
SELECT DISTINCT col0 * + col0 + - col2 + cor0.col1 FROM tab2 AS cor0
----
53
6117
6220

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + 48 AS REAL ) FROM tab1 AS cor0
----
-48

query I rowsort
SELECT ALL + - col0 - + col1 * col1 FROM tab1 AS cor0
----
-164
-249
-679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 64 + 78 col0 FROM tab1 AS cor0
----
14
14
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-4741
SELECT ALL + col1 DIV + col2 - - col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4741
SELECT ALL + col1 / + col2 - - col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col0 + 95 AS col0 FROM tab2 AS cor0
----
102
173
174

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4743
SELECT ALL + - CAST( cor0.col1 AS SIGNED ) * + col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-4743
SELECT ALL + - CAST ( cor0.col1 AS INTEGER ) * + col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + + col2 * - col0 + 22 * col0 AS col2 FROM tab2 AS cor0
----
-1264
-312
-35

query I rowsort
SELECT - + col2 * + col0 + + cor0.col0 FROM tab1 cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL - col1 - col1 * 88 FROM tab2
----
-1513
-2759
-5251

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - col0 col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4748
SELECT + - col1 * ( ( col0 ) + CAST( - col1 AS SIGNED ) ) FROM tab2 AS cor0
----
-1054
-1121
744

skipif mysql # not compatible
query I rowsort label-4748
SELECT + - col1 * ( ( col0 ) + CAST ( - col1 AS INTEGER ) ) FROM tab2 AS cor0
----
-1054
-1121
744

query I rowsort
SELECT DISTINCT - + cor0.col2 * + col2 * col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT 37 + cor0.col0 * + cor0.col2 AS col1 FROM tab1, tab0, tab2 AS cor0
----
2065
226
3039

query I rowsort
SELECT - - col2 + 1 * col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4752
SELECT DISTINCT cor0.col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4752
SELECT DISTINCT cor0.col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + 37 * col1 * - col1 FROM tab2
----
-10693
-128797
-35557

query I rowsort
SELECT - ( - col1 ) + - col1 + col1 * col1 AS col2 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4755
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4755
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4756
SELECT DISTINCT col1 * col2 DIV col2 - + col2 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-4756
SELECT DISTINCT col1 * col2 / col2 - + col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + 12 * - tab0.col1 FROM tab0
----
-1032
-1092
-1164

query I rowsort
SELECT col0 + - col0 * - col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - col0 * - col0 * col0 + col2 * ( cor0.col2 * cor0.col2 ) AS col0 FROM tab1 AS cor0
----
1396736
157491
447337

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to b8cf3a0d946da15d11bb8abf87d58a6b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4761
SELECT ALL col2 + - CAST( - col1 + + col2 AS SIGNED ) * ( - col0 ) FROM tab2 cor0
----
-1
-2548
1697

skipif mysql # not compatible
query I rowsort label-4761
SELECT ALL col2 + - CAST ( - col1 + + col2 AS INTEGER ) * ( - col0 ) FROM tab2 cor0
----
-1
-2548
1697

query I rowsort
SELECT ALL col2 * 35 AS col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT + - col1 * 99 + col1 FROM tab2 cor0
----
-1666
-3038
-5782

query I rowsort
SELECT DISTINCT col2 + + 46 * 99 + - col2 AS col2 FROM tab1
----
4554

query I rowsort
SELECT ALL ( + 97 ) FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to f1d3319b9491f64621f2dbb0808458ca

query I rowsort
SELECT - col1 * - cor0.col1 + + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT - tab1.col0 * + col2 - col1 AS col0 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT - tab2.col0 + 6 * - col2 + col2 * + col2 FROM tab2
----
1137
442
560

query I rowsort
SELECT + + cor0.col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4770
SELECT - + col0 * ( col0 ) + col0 * CAST( NULL AS SIGNED ) + 8 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4770
SELECT - + col0 * ( col0 ) + col0 * CAST ( NULL AS INTEGER ) + 8 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - cor0.col1 * + 76 FROM tab2 AS cor0
----
1292
2356
4484

query I rowsort
SELECT - col1 * - 90 AS col0 FROM tab2 cor0
----
1530
2790
5310

onlyif mysql # use DIV operator for integer division
query I rowsort label-4773
SELECT ALL + + col1 DIV + 46 AS col0 FROM tab0 cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-4773
SELECT ALL + + col1 / + 46 AS col0 FROM tab0 cor0
----
1
1
2

query I rowsort
SELECT DISTINCT 3 - 84 FROM tab2, tab2 AS cor0
----
-81

query I rowsort
SELECT DISTINCT - col1 * + col1 + col1 + col1 * 9 AS col1 FROM tab0
----
-6536
-7371
-8439

query I rowsort
SELECT ALL col1 * + col2 * + ( 85 ) + col0 * + ( col1 ) FROM tab0 AS cor0
----
11640
243294
642369

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + col1 + + 77 col0 FROM tab1 AS cor0
----
144
157
186

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 + col0 AS col1 FROM tab2 cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4779
SELECT DISTINCT - col1 + col0 + - CAST( ( col1 ) AS SIGNED ) FROM tab2 AS cor0
----
-40
-55
45

skipif mysql # not compatible
query I rowsort label-4779
SELECT DISTINCT - col1 + col0 + - CAST ( ( col1 ) AS INTEGER ) FROM tab2 AS cor0
----
-40
-55
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * col2 + ( col0 ) col2 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT 44 * ( tab2.col0 ) FROM tab2
----
308
3432
3476

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 + col0 ) col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT col2 * - col2 + col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL col2 + col2 + col0 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT DISTINCT col1 + col0 * col2 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL 11 AS col1 FROM tab1 cor0
----
11
11
11

query I rowsort
SELECT ALL + - col1 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-4788
SELECT col1 * col2 + + col0 DIV - tab2.col0 FROM tab2
----
1533
645
836

skipif mysql # not compatible
query I rowsort label-4788
SELECT col1 * col2 + + col0 / - tab2.col0 FROM tab2
----
1533
645
836

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4789
SELECT + CAST( - 28 AS SIGNED ) FROM tab0 AS cor0
----
-28
-28
-28

skipif mysql # not compatible
query I rowsort label-4789
SELECT + CAST ( - 28 AS INTEGER ) FROM tab0 AS cor0
----
-28
-28
-28

query I rowsort
SELECT + 93 + 88 AS col2 FROM tab0 AS cor0
----
181
181
181

query I rowsort
SELECT - - cor0.col2 + 82 * - col1 FROM tab2 AS cor0
----
-1356
-2515
-4812

query I rowsort
SELECT ALL + + tab2.col2 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + col1 + ( tab0.col2 * - col0 ) AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL + + 23 + + ( + col0 * col1 ) AS col0 FROM tab1 AS cor0
----
101
1063
663

query I rowsort
SELECT - 12 * + col1 AS col1 FROM tab1 AS cor0
----
-120
-156
-312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4796
SELECT CAST( + col2 AS SIGNED ) * col1 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-4796
SELECT CAST ( + col2 AS INTEGER ) * col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + - col1 + + 57 AS col2 FROM tab1 AS cor0
----
31
44
47

query I rowsort
SELECT DISTINCT - 1 AS col2 FROM tab2 cor0
----
-1

query I rowsort
SELECT ALL - col0 * + col0 * + col0 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT 5 * + 51 AS col2 FROM tab1 AS cor0
----
255
255
255

onlyif mysql # use DIV operator for integer division
query I rowsort label-4801
SELECT ALL col1 DIV col0 + col1 FROM tab1 cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-4801
SELECT ALL col1 / col0 + col1 FROM tab1 cor0
----
10
13
34

query I rowsort
SELECT ALL + - col2 * col2 * col0 - col0 AS col1 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT DISTINCT - 61 + + col1 - col0 * col1 FROM tab2 AS cor0
----
-1387
-247
-4604

onlyif mysql # use DIV operator for integer division
query I rowsort label-4804
SELECT DISTINCT - cor0.col0 DIV col0 AS col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4804
SELECT DISTINCT - cor0.col0 / col0 AS col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + 59 + - col1 * 85 * col0 AS col1 FROM tab1 AS cor0
----
-54341
-6571
-88341

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4806
SELECT DISTINCT + + col0 + + CAST( col1 * + col1 AS SIGNED ) FROM tab1 AS cor0
----
164
249
679

skipif mysql # not compatible
query I rowsort label-4806
SELECT DISTINCT + + col0 + + CAST ( col1 * + col1 AS INTEGER ) FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - - col1 * col2 + - ( - col1 + - ( + col0 ) ) * col1 FROM tab2 AS cor0
----
2015
2278
9617

query I rowsort
SELECT DISTINCT col2 * + cor0.col0 + - 20 FROM tab1 AS cor0
----
142
3628
7660

query I rowsort
SELECT DISTINCT - col2 + - col0 * - col0 FROM tab0 cor0
----
1224
543
7839

query I rowsort
SELECT + - col0 * col2 * col2 AS col0 FROM tab2 cor0
----
-114076
-5103
-52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4811
SELECT ALL - col0 * - CAST( NULL AS SIGNED ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4811
SELECT ALL - col0 * - CAST ( NULL AS INTEGER ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + - 60 AS col1 FROM tab1 AS cor0
----
-57
20
4

query I rowsort
SELECT - col0 * + 87 AS col2 FROM tab2 AS cor0
----
-609
-6786
-6873

onlyif mysql # use DIV operator for integer division
query I rowsort label-4814
SELECT + col1 - - col0 DIV 20 AS col0 FROM tab1 AS cor0
----
13
17
26

skipif mysql # not compatible
query I rowsort label-4814
SELECT + col1 - - col0 / 20 AS col0 FROM tab1 AS cor0
----
13
17
26

query I rowsort
SELECT - col2 * - 72 + - col0 * cor0.col1 * cor0.col2 FROM tab1 AS cor0
----
-32376
-324
-92928

query I rowsort
SELECT + - col0 * - 93 FROM tab2 cor0
----
651
7254
7347

skipif mysql # not compatible
query I rowsort
SELECT - col0 + - CAST ( - 49 AS REAL ) * + col1 * col0 AS col1 FROM tab1 AS cor0
----
31296
3819
50880

onlyif mysql # use DIV operator for integer division
query I rowsort label-4818
SELECT - 41 + col1 DIV - col0 AS col2 FROM tab2 cor0
----
-41
-41
-45

skipif mysql # not compatible
query I rowsort label-4818
SELECT - 41 + col1 / - col0 AS col2 FROM tab2 cor0
----
-41
-41
-45

query I rowsort
SELECT ( col1 ) + - cor0.col1 * col0 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-4820
SELECT - + ( - col0 ) DIV - col0 + - col1 FROM tab2 cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-4820
SELECT - + ( - col0 ) / - col0 + - col1 FROM tab2 cor0
----
-18
-32
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( ( + col2 ) ) * col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT ( + col1 ) * cor0.col1 * - col2 + col0 FROM tab2 cor0
----
-10903
-25940
-90428

query I rowsort
SELECT DISTINCT - + ( + 53 ) * col1 - + col2 AS col0 FROM tab2 AS cor0
----
-1670
-3153
-939

query I rowsort
SELECT - ( - cor0.col0 ) + + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col2 * col0 * col2 + + col0 + - col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT col0 * - 57 AS col2 FROM tab2
----
-399
-4446
-4503

query I rowsort
SELECT - ( cor0.col0 ) + 79 FROM tab2 AS cor0
----
0
1
72

query I rowsort
SELECT - 92 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

onlyif mysql # use DIV operator for integer division
query I rowsort label-4830
SELECT ALL - cor0.col0 DIV cor0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

skipif mysql # not compatible
query I rowsort label-4830
SELECT ALL - cor0.col0 / cor0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT DISTINCT cor0.col2 * - tab2.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 99e52647357b835698a6730896ff820d

query I rowsort
SELECT + - col2 * cor0.col0 AS col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL col2 + col2 + col0 FROM tab1
----
111
178
272

query I rowsort
SELECT ALL - 43 * + tab1.col2 + - col2 * - col0 FROM tab1
----
-2160
1197
3552

query I rowsort
SELECT col0 - - ( col1 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - cor0.col1 * + col0 + col0 * col0 - + col2 * col2 AS col1 FROM tab2 AS cor0
----
-897
3454
806

query I rowsort
SELECT + col1 * + ( col1 ) + - col1 FROM tab2 cor0
----
272
3422
930

query I rowsort
SELECT 21 * tab0.col2 AS col0 FROM tab0
----
1722
21
693

query I rowsort
SELECT DISTINCT col0 + - col0 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col0 + + col0 - col0 * - col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 31 * - col0 AS col0 FROM tab1
----
-1984
-2480
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT - cor0.col0 * col1 + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT + - 65 AS col2 FROM tab2 AS cor0
----
-65
-65
-65

query I rowsort
SELECT ( tab0.col0 ) + col2 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL + ( 11 ) * - col1 - - col0 FROM tab0
----
-1032
-912
-922

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4847
SELECT DISTINCT + - col1 * cor0.col2 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4847
SELECT DISTINCT + - col1 * cor0.col2 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + 9 + - col1 AS col0 FROM tab0 AS cor0
----
-77
-82
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-4849
SELECT - - col2 DIV - col2 + + 24 FROM tab0 AS cor0
----
23
23
23

skipif mysql # not compatible
query I rowsort label-4849
SELECT - - col2 / - col2 + + 24 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT - - 32 * col2 + + col1 * - col2 FROM tab2 AS cor0
----
-702
27
570

query I rowsort
SELECT DISTINCT col2 * + 24 * - 35 AS col2 FROM tab0
----
-27720
-68880
-840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4852
SELECT DISTINCT + col2 DIV - 57 col1 FROM tab1
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4852
SELECT DISTINCT + col2 / - 57 col1 FROM tab1
----
-1
0

query I rowsort
SELECT col1 + tab2.col1 * col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT - tab1.col0 + - col0 AS col2 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT - col0 - ( - 84 ) AS col2 FROM tab2
----
5
6
77

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, 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-4857
SELECT + col2 + + CAST( 19 AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
1773
489
666

skipif mysql # not compatible
query I rowsort label-4857
SELECT + col2 + + CAST ( 19 AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
1773
489
666

query I rowsort
SELECT + col0 + ( col1 ) * col2 AS col0 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT + - col1 - 35 AS col0 FROM tab2 AS cor0
----
-52
-66
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4860
SELECT - CAST( - 32 AS SIGNED ) - - col1 * - cor0.col2 * - col0 FROM tab0 AS cor0
----
3427
664150
68144

skipif mysql # not compatible
query I rowsort label-4860
SELECT - CAST ( - 32 AS INTEGER ) - - col1 * - cor0.col2 * - col0 FROM tab0 AS cor0
----
3427
664150
68144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col0 FROM tab0 cor0
----
41
41
41

query I rowsort
SELECT DISTINCT + - 56 * 23 AS col1 FROM tab1 cor0
----
-1288

query I rowsort
SELECT + + col0 + col1 * + col1 AS col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT - 63 * - col2 - + col0 FROM tab0 AS cor0
----
2055
28
5077

query I rowsort
SELECT DISTINCT + - cor0.col1 AS col0 FROM tab2, tab0, tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4866
SELECT ALL + + col1 DIV + col0 + - col2 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-4866
SELECT ALL + + col1 / + col0 + - col2 FROM tab2 AS cor0
----
-23
-26
-38

query I rowsort
SELECT DISTINCT - ( ( col1 ) ) * col1 - col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL - ( + 95 ) + + col0 FROM tab0 cor0
----
-6
-60
-71

query I rowsort
SELECT + col1 * - 85 - - col0 AS col1 FROM tab2 cor0
----
-1366
-2628
-4937

onlyif mysql # use DIV operator for integer division
query I rowsort label-4870
SELECT ALL + col1 * + col2 + col0 DIV 30 FROM tab0 AS cor0
----
2838
7464
98

skipif mysql # not compatible
query I rowsort label-4870
SELECT ALL + col1 * + col2 + col0 / 30 FROM tab0 AS cor0
----
2838
7464
98

query I rowsort
SELECT + 36 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4872
SELECT DISTINCT + CAST( NULL AS SIGNED ) / 14 + - col0 * ( col2 ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4872
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / 14 + - col0 * ( col2 ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - ( tab2.col0 ) * col2 AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL - 56 * col1 AS col1 FROM tab2 AS cor0
----
-1736
-3304
-952

query I rowsort
SELECT - ( - 30 ) FROM tab1 AS cor0
----
30
30
30

query I rowsort
SELECT - 5 FROM tab0, tab0 cor0
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT - 4 * - col1 AS col2 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT DISTINCT - + col0 * col1 + cor0.col0 AS col2 FROM tab1 cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - cor0.col0 col2 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL 65 + cor0.col1 FROM tab0 cor0
----
151
156
162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4882
SELECT DISTINCT + CAST( NULL AS SIGNED ) / - col2 - tab0.col2 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4882
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / - col2 - tab0.col2 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT - col1 + + col0 * col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT ALL + ( col0 ) + ( col1 ) FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4885
SELECT col0 DIV - cor0.col1 + + col2 * + col0 FROM tab1 AS cor0
----
162
3642
7674

skipif mysql # not compatible
query I rowsort label-4885
SELECT col0 / - cor0.col1 + + col2 * + col0 FROM tab1 AS cor0
----
162
3642
7674

query I rowsort
SELECT ALL + + 45 * col2 FROM tab1 AS cor0
----
2430
2565
4320

query I rowsort
SELECT col2 + - 21 AS col2 FROM tab0
----
-20
12
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-4888
SELECT + tab2.col2 + + col1 + + col2 DIV - ( 71 ) FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-4888
SELECT + tab2.col2 + + col1 + + col2 / - ( 71 ) FROM tab2
----
55
58
85

query I rowsort
SELECT - ( tab2.col2 ) * col0 + - 27 FROM tab2
----
-2055
-216
-3029

query I rowsort
SELECT col2 + tab2.col0 - col1 FROM tab2
----
100
3
45

query I rowsort
SELECT + col1 * col2 * - col0 + col0 AS col2 FROM tab1
----
-36416
-4209
-99760

query I rowsort
SELECT DISTINCT + col0 * col0 - - tab1.col1 * tab1.col1 FROM tab1
----
4196
6569
685

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col0 col1 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + 72 col1 FROM tab1 AS cor0
----
-24
15
18

query I rowsort
SELECT DISTINCT + - col1 + + col0 * + col0 AS col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT + + col1 * cor0.col1 + - col0 AS col0 FROM tab0 AS cor0
----
7372
8192
9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4897
SELECT ALL - + col1 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4897
SELECT ALL - + col1 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + - 37 * - 67 FROM tab1 AS cor0
----
2383
2422
2425

query I rowsort
SELECT DISTINCT col0 + - ( 70 ) AS col0 FROM tab0 AS cor0
----
-35
-46
19

query I rowsort
SELECT + - col1 + + ( + col0 ) * - cor0.col2 FROM tab1 cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL - col2 * 52 + ( + col1 * ( ( - col0 ) ) ) FROM tab1 AS cor0
----
-2886
-3604
-6032

query I rowsort
SELECT + 71 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT DISTINCT col1 * ( cor0.col0 ) + - col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT + 75 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT ALL - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4906
SELECT DISTINCT + CAST( 70 AS SIGNED ) FROM tab0, tab2 cor0
----
70

skipif mysql # not compatible
query I rowsort label-4906
SELECT DISTINCT + CAST ( 70 AS INTEGER ) FROM tab0, tab2 cor0
----
70

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 cor2, tab2 AS cor3
----
3645 values hashing to f1fc3f16747aca82b54b2b759d1f5ea2

query I rowsort
SELECT cor0.col0 + - 49 * + col2 AS col0 FROM tab0 AS cor0
----
-14
-1593
-3929

query I rowsort
SELECT col0 + - col0 * - cor0.col1 * + col1 FROM tab2 AS cor0
----
22910
271596
6734

query I rowsort
SELECT col0 * + 1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4911
SELECT + col1 DIV + col0 col2 FROM tab0 cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4911
SELECT + col1 / + col0 col2 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT ALL + col2 * + 4 FROM tab2
----
104
108
152

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4913
SELECT ALL + col1 * - CAST( + col2 + - col0 AS SIGNED ) * - col2 FROM tab2 AS cor0
----
-26486
-79768
16740

skipif mysql # not compatible
query I rowsort label-4913
SELECT ALL + col1 * - CAST ( + col2 + - col0 AS INTEGER ) * - col2 FROM tab2 AS cor0
----
-26486
-79768
16740

query I rowsort
SELECT ALL 78 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT ALL col0 * - 91 FROM tab1
----
-273
-5824
-7280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4916
SELECT - + CAST( NULL AS SIGNED ) + 97 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4916
SELECT - + CAST ( NULL AS INTEGER ) + 97 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4917
SELECT + col0 DIV col0 + + col0 + - col0 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4917
SELECT + col0 / col0 + + col0 + - col0 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT 47 * + tab0.col2 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 69758f34a678a3e97f0d13446975629b

query I rowsort
SELECT col0 + + 88 FROM tab0
----
112
123
177

onlyif mysql # use DIV operator for integer division
query I rowsort label-4920
SELECT 64 - col0 DIV col0 AS col1 FROM tab1 AS cor0
----
63
63
63

skipif mysql # not compatible
query I rowsort label-4920
SELECT 64 - col0 / col0 AS col1 FROM tab1 AS cor0
----
63
63
63

query I rowsort
SELECT 12 * col0 - col2 * ( - 35 + - col1 ) AS col1 FROM tab1
----
3330
3333
5568

query I rowsort
SELECT + 93 + - col0 - ( ( - col0 ) ) FROM tab1 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4923
SELECT DISTINCT - col1 * 24 DIV + col1 col1 FROM tab1
----
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4923
SELECT DISTINCT - col1 * 24 / + col1 col1 FROM tab1
----
-24

query I rowsort
SELECT DISTINCT - 18 * - ( + col1 ) AS col2 FROM tab1
----
180
234
468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4925
SELECT + CAST( NULL AS SIGNED ) / col2 + - col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4925
SELECT + CAST ( NULL AS INTEGER ) / col2 + - col1 AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4926
SELECT DISTINCT col0 DIV col1 + - tab0.col2 + col2 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4926
SELECT DISTINCT col0 / col1 + - tab0.col2 + col2 FROM tab0
----
0

query I rowsort
SELECT - col0 + + col2 * ( + col2 ) * - col0 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT col2 + - cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT - 22 * col0 FROM tab0 AS cor0
----
-1958
-528
-770

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 * - ( col0 ) FROM tab2 AS cor0
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col1 * - 73 col0 FROM tab2 cor0
----
1320
2270
4385

query I rowsort
SELECT + 94 + col2 FROM tab2 cor0
----
120
121
132

query I rowsort
SELECT DISTINCT + 16 + - col0 AS col2 FROM tab0 AS cor0
----
-19
-73
-8

query I rowsort
SELECT ALL col1 * - 56 AS col1 FROM tab1 AS cor0
----
-1456
-560
-728

query I rowsort
SELECT ALL + col2 * col1 + 55 * + col0 AS col1 FROM tab1 AS cor0
----
1569
4090
5648

query I rowsort
SELECT + + cor0.col0 - col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL + col1 + + col0 AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL 41 - 39 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT + - cor0.col0 + 60 FROM tab2 AS cor0
----
-18
-19
53

query I rowsort
SELECT - - col0 * + 1 + col2 + + col2 FROM tab1 AS cor0
----
111
178
272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col2 + 74 col2 FROM tab0 AS cor0
----
-718
-7224
39

query I rowsort
SELECT col2 + - 22 * 93 AS col1 FROM tab1 cor0
----
-1950
-1989
-1992

query I rowsort
SELECT col1 - 82 AS col2 FROM tab1 AS cor0
----
-56
-69
-72

query I rowsort
SELECT + col1 * cor0.col1 + col2 * col1 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT - cor0.col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT + col2 + 23 FROM tab1 cor0
----
119
77
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 * - col2 col2 FROM tab0 AS cor0
----
-1312
-16
-528

onlyif mysql # use DIV operator for integer division
query I rowsort label-4948
SELECT ALL + + col0 DIV 51 AS col1 FROM tab2 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4948
SELECT ALL + + col0 / 51 AS col1 FROM tab2 cor0
----
0
1
1

query I rowsort
SELECT col2 * col1 + + col2 * ( col1 ) FROM tab0 AS cor0
----
14924
194
5676

query I rowsort
SELECT 16 AS col0 FROM tab1 cor0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT + + 10 * 38 AS col2 FROM tab0 AS cor0
----
380

query I rowsort
SELECT ALL - ( 41 ) + col2 * - col1 AS col0 FROM tab2 cor0
----
-1575
-687
-878

onlyif mysql # use DIV operator for integer division
query I rowsort label-4954
SELECT DISTINCT - + 37 + - 25 DIV col0 FROM tab2 AS cor0
----
-37
-40

skipif mysql # not compatible
query I rowsort label-4954
SELECT DISTINCT - + 37 + - 25 / col0 FROM tab2 AS cor0
----
-37
-40

query I rowsort
SELECT ALL - col2 * + ( - col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4956
SELECT - CAST( NULL AS SIGNED ) + - 29 - col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4956
SELECT - CAST ( NULL AS INTEGER ) + - 29 - col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + + col1 + + col2 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + + ( 12 ) FROM tab1 AS cor0
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( + ( + col0 ) ) + + col1 col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - col0 * 5 AS col0 FROM tab1
----
-15
-320
-400

query I rowsort
SELECT DISTINCT - + ( - ( + col1 ) ) + + col1 * - col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL - + cor0.col0 * + 12 FROM tab2 AS cor0
----
-84
-936
-948

query I rowsort
SELECT ALL + 56 + col2 AS col1 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT DISTINCT 76 * + col1 FROM tab2
----
1292
2356
4484

query I rowsort
SELECT - 17 + 24 FROM tab0, tab1 cor0 CROSS JOIN tab1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

onlyif mysql # use DIV operator for integer division
query I rowsort label-4966
SELECT DISTINCT + col1 DIV + col2 + col2 + tab0.col2 FROM tab0
----
165
68
99

skipif mysql # not compatible
query I rowsort label-4966
SELECT DISTINCT + col1 / + col2 + col2 + tab0.col2 FROM tab0
----
165
68
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4967
SELECT DISTINCT + col0 DIV + cor0.col1 + + col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4967
SELECT DISTINCT + col0 / + cor0.col1 + + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col2 * + ( + col2 ) * col2 + - col1 * + col0 AS col2 FROM tab2 AS cor0
----
12974
19466
53529

onlyif mysql # use DIV operator for integer division
query I rowsort label-4969
SELECT + col1 - - 20 DIV tab2.col1 FROM tab2
----
18
31
59

skipif mysql # not compatible
query I rowsort label-4969
SELECT + col1 - - 20 / tab2.col1 FROM tab2
----
18
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4970
SELECT DISTINCT + col1 / CAST( NULL AS DECIMAL ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4970
SELECT DISTINCT + col1 / CAST ( NULL AS REAL ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT ALL - col0 + ( 14 ) FROM tab2 AS cor0
----
-64
-65
7

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( cor0.col1 AS REAL ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL + + col1 * + 77 * + col0 AS col2 FROM tab1 AS cor0
----
49280
6006
80080

query I rowsort
SELECT DISTINCT - + col0 * + ( col0 ) + - col2 * 85 FROM tab0 cor0
----
-1310
-14891
-3381

onlyif mysql # use DIV operator for integer division
query I rowsort label-4975
SELECT DISTINCT - col0 + + col0 DIV - col2 FROM tab1 AS cor0
----
-3
-65
-80

skipif mysql # not compatible
query I rowsort label-4975
SELECT DISTINCT - col0 + + col0 / - col2 FROM tab1 AS cor0
----
-3
-65
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4976
SELECT ALL CAST( NULL AS SIGNED ) * - 72 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4976
SELECT ALL CAST ( NULL AS INTEGER ) * - 72 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * col1 * col2 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT - 56 + 19 FROM tab1 AS cor0
----
-37
-37
-37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4979
SELECT ALL + + CAST( NULL AS SIGNED ) + + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4979
SELECT ALL + + CAST ( NULL AS INTEGER ) + + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab1.col0 * col0 * col0 + tab1.col2 * - tab1.col0 FROM tab1
----
-189
-265792
-519680

query I rowsort
SELECT - col0 + col2 * - 75 * - 99 FROM tab2 AS cor0
----
192972
200468
282071

query I rowsort
SELECT ALL + 34 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT ALL col0 + - col1 * - tab1.col2 AS col0 FROM tab1
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 col2 FROM tab0
----
58
58
58

query I rowsort
SELECT DISTINCT - 53 * col1 AS col2 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT DISTINCT - col0 * + col1 + 76 FROM tab0 AS cor0
----
-1988
-3319
-8023

onlyif mysql # use DIV operator for integer division
query I rowsort label-4987
SELECT + + col0 * cor0.col2 + 77 DIV - col0 FROM tab2 cor0
----
178
2028
3002

skipif mysql # not compatible
query I rowsort label-4987
SELECT + + col0 * cor0.col2 + 77 / - col0 FROM tab2 cor0
----
178
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4988
SELECT ALL + - col2 + CAST( NULL AS SIGNED ) * col1 * cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4988
SELECT ALL + - col2 + CAST ( NULL AS INTEGER ) * col1 * cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col2 * + col1 + - ( - col2 ) * 9 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
-304
-915
7

query I rowsort
SELECT ALL + + col0 - + col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col2 * 64 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT - + col2 + - ( col1 ) * col1 FROM tab1 AS cor0
----
-157
-265
-730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4993
SELECT col1 + CAST( NULL AS SIGNED ) * col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4993
SELECT col1 + CAST ( NULL AS INTEGER ) * col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * - col2 * - 37 + col0 + - 51 col1 FROM tab0 AS cor0
----
21
248826
40266

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4995
SELECT DISTINCT - - col0 + CAST( - 13 + col2 AS SIGNED ) * + 90 FROM tab0 AS cor0
----
-1045
1824
6299

skipif mysql # not compatible
query I rowsort label-4995
SELECT DISTINCT - - col0 + CAST ( - 13 + col2 AS INTEGER ) * + 90 FROM tab0 AS cor0
----
-1045
1824
6299

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - 97 col1 FROM tab1 AS cor0
----
-71
-84
-87

query I rowsort
SELECT + col2 * col1 + + col0 AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL + 87 + + col1 FROM tab0
----
173
178
184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4999
SELECT - col0 * CAST( NULL AS SIGNED ) * + col1 col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4999
SELECT - col0 * CAST ( NULL AS INTEGER ) * + col1 col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 92 * col0 + - col0 AS col0 FROM tab0
----
-2232
-3255
-8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - col0 col1 FROM tab0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5002
SELECT DISTINCT + 83 DIV + col0 + tab1.col0 * col0 AS col1 FROM tab1
----
36
4097
6401

skipif mysql # not compatible
query I rowsort label-5002
SELECT DISTINCT + 83 / + col0 + tab1.col0 * col0 AS col1 FROM tab1
----
36
4097
6401

query I rowsort
SELECT DISTINCT - 54 * + 5 AS col2 FROM tab0
----
-270

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5004
SELECT + CAST( NULL AS SIGNED ) + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5004
SELECT + 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 ALL - col1 - + cor0.col2 col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT - 87 - + col2 AS col1 FROM tab0 AS cor0
----
-120
-169
-88

query I rowsort
SELECT ALL - ( col1 ) * col1 + - ( col0 ) AS col1 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT + + col1 * - col0 + + 39 FROM tab1 cor0
----
-1001
-39
-601

query I rowsort
SELECT + 72 - col2 FROM tab0 AS cor0
----
-10
39
71

query I rowsort
SELECT - - col1 + cor0.col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + 31 + + col2 AS col0 FROM tab1 cor0
----
127
85
88

query I rowsort
SELECT + 10 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT DISTINCT - col1 * col0 + + tab1.col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col0 * col2 + cor0.col0 * col0 AS col0 FROM tab2 cor0
----
-140
3239
4056

query I rowsort
SELECT col0 * ( + 96 + col1 ) FROM tab1 AS cor0
----
366
6784
8720

query I rowsort
SELECT ALL - cor0.col1 * ( col1 + - col0 ) AS col2 FROM tab1 AS cor0
----
-598
540
871

onlyif mysql # use DIV operator for integer division
query I rowsort label-5017
SELECT DISTINCT + col0 * col1 DIV - col0 + cor0.col0 col0 FROM tab0 AS cor0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5017
SELECT DISTINCT + col0 * col1 / - col0 + cor0.col0 col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT - col2 + + col1 * col1 AS col2 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT cor0.col2 * ( - col1 + - col0 * - 19 ) FROM tab1 AS cor0
----
144672
1674
68742

query I rowsort
SELECT DISTINCT - col1 * col2 * 73 AS col1 FROM tab2 AS cor0
----
-111982
-47158
-61101

query I rowsort
SELECT DISTINCT col0 * - ( 12 ) * + col0 FROM tab0 AS cor0
----
-14700
-6912
-95052

onlyif mysql # use DIV operator for integer division
query I rowsort label-5022
SELECT DISTINCT + 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-5022
SELECT DISTINCT + col0 + + col0 / + ( col1 ) col1 FROM tab1 AS cor0
----
3
70
86

query I rowsort
SELECT ALL col2 + ( + 66 ) * - col2 FROM tab1 AS cor0
----
-3510
-3705
-6240

onlyif mysql # use DIV operator for integer division
query I rowsort label-5024
SELECT ALL - 46 DIV col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5024
SELECT ALL - 46 / col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col1 + 56 * - cor0.col0 AS col2 FROM tab2 cor0
----
-361
-4309
-4407

query I rowsort
SELECT - - col2 + col0 * - ( col1 ) AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab2 cor2
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

query I rowsort
SELECT + ( - cor0.col0 ) * col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - col0 * ( 91 ) AS col2 FROM tab1
----
-273
-5824
-7280

query I rowsort
SELECT - 94 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5032
SELECT + 89 + col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
90
90
90

skipif mysql # not compatible
query I rowsort label-5032
SELECT + 89 + col0 / + col0 AS col1 FROM tab1 AS cor0
----
90
90
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5033
SELECT ( + col2 ) DIV + col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5033
SELECT ( + col2 ) / + col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + 36 + col1 * col2 AS col1 FROM tab1 cor0
----
1284
1440
606

query I rowsort
SELECT DISTINCT col0 * - ( + col0 ) * col1 AS col1 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-5036
SELECT ALL col0 DIV + col1 AS col2 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-5036
SELECT ALL col0 / + col1 AS col2 FROM tab1
----
0
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5037
SELECT DISTINCT ( ( col1 ) ) DIV + col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-5037
SELECT DISTINCT ( ( col1 ) ) / + col2 FROM tab1
----
0

query I rowsort
SELECT ALL + 32 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

onlyif mysql # use DIV operator for integer division
query I rowsort label-5039
SELECT - - col0 DIV + col1 col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5039
SELECT - - col0 / + col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * col1 * + col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT - col0 * + 80 FROM tab1 AS cor0
----
-240
-5120
-6400

query I rowsort
SELECT 61 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
143
62
94

query I rowsort
SELECT ALL - 65 FROM tab0 cor0
----
-65
-65
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5044
SELECT + col1 * col0 + 67 DIV + col1 AS col0 FROM tab1 cor0
----
1045
646
80

skipif mysql # not compatible
query I rowsort label-5044
SELECT + col1 * col0 + 67 / + col1 AS col0 FROM tab1 cor0
----
1045
646
80

query I rowsort
SELECT col1 + + col1 * col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col1 * cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT col0 + + col1 * + 7 * - col1 AS col1 FROM tab0 AS cor0
----
-51748
-57878
-65828

query I rowsort
SELECT - 50 * col0 FROM tab2 AS cor0
----
-350
-3900
-3950

query I rowsort
SELECT + col1 * - col2 * 94 FROM tab0 AS cor0
----
-266772
-701428
-9118

query I rowsort
SELECT + 67 + col1 * - ( col1 ) FROM tab1 AS cor0
----
-102
-33
-609

query I rowsort
SELECT - - 96 * col1 AS col2 FROM tab2 cor0
----
1632
2976
5664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 19 * cor0.col1 col0 FROM tab1 AS cor0
----
-190
-247
-494

query I rowsort
SELECT ALL col1 * - col0 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1326
-186
-4543

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 62 * + col0 col1 FROM tab0 AS cor0
----
1488
2170
5518

query I rowsort
SELECT + - 50 * col2 * - col0 AS col2 FROM tab0 AS cor0
----
1750
364900
39600

query I rowsort
SELECT DISTINCT col1 * col0 - cor0.col0 * - 43 FROM tab1 cor0
----
207
3392
4480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 15 col2 FROM tab2 cor0
----
-15
-15
-15

onlyif mysql # use DIV operator for integer division
query I rowsort label-5058
SELECT ALL col2 * col1 DIV col1 + + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

skipif mysql # not compatible
query I rowsort label-5058
SELECT ALL col2 * col1 / col1 + + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col1 * + cor0.col2 + col2 * col1 FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5060
SELECT DISTINCT col0 + col2 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5060
SELECT DISTINCT col0 + col2 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col1 + - ( col2 ) AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL + - col0 * - 2 AS col2 FROM tab2 cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5063
SELECT ALL - col0 DIV cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5063
SELECT ALL - col0 / cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 * 61 + - 3 + col2 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-2299
1218
23

query I rowsort
SELECT DISTINCT cor0.col0 * 1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5066
SELECT - col2 + + cor0.col0 * col0 + CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5066
SELECT - col2 + + cor0.col0 * col0 + CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 50 + col2 * col2 FROM tab1 AS cor0
----
2966
3299
9266

query I rowsort
SELECT DISTINCT - + col0 + col1 * - col0 FROM tab2 AS cor0
----
-1422
-224
-4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + col1 * + col1 col1 FROM tab2 cor0
----
3559
368
968

query I rowsort
SELECT - col2 * col0 + col1 * 7 AS col1 FROM tab0 AS cor0
----
-190
-6661
644

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 * - col2 col0 FROM tab1 cor0
----
159
3584
7600

query I rowsort
SELECT ALL + + 74 * col2 + - col1 FROM tab0 AS cor0
----
-23
2356
5977

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( col0 AS REAL ) * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT cor0.col1 + col0 * col2 * 35 + + col0 * + col0 AS col0 FROM tab2 cor0
----
111328
6695
77123

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 + - col2 + + col2 * - ( col0 ) col0 FROM tab1 AS cor0
----
-201
-3690
-7761

query I rowsort
SELECT ALL 93 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT DISTINCT - + col2 * - col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - ( col2 ) * col2 + + col0 * col2 + col1 * ( - 88 + + col1 ) * col2 FROM tab1
----
-44061
-89802
-95136

query I rowsort
SELECT - 46 * + col0 FROM tab0 AS cor0
----
-1104
-1610
-4094

query I rowsort
SELECT 86 * + cor0.col1 FROM tab2 AS cor0
----
1462
2666
5074

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 35 * + tab1.col2 col2 FROM tab1
----
1944
2052
3456

query I rowsort
SELECT ALL col2 * + col2 * col2 + col1 AS col2 FROM tab1
----
157490
185203
884749

query I rowsort
SELECT DISTINCT + col1 + - 39 AS col1 FROM tab0
----
47
52
58

query I rowsort
SELECT ALL col0 + - col0 + 97 AS col0 FROM tab0 cor0
----
97
97
97

query I rowsort
SELECT ALL + - cor1.col2 + - cor1.col1 * + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c690d63923cd3fd1d8d9a2d7a8199f4c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5086
SELECT ALL + 12 DIV + tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5086
SELECT ALL + 12 / + tab0.col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5087
SELECT - 50 * col1 + col0 DIV + 69 AS col2 FROM tab0
----
-4300
-4549
-4850

skipif mysql # not compatible
query I rowsort label-5087
SELECT - 50 * col1 + col0 / + 69 AS col2 FROM tab0
----
-4300
-4549
-4850

query I rowsort
SELECT - col1 + + 83 AS col1 FROM tab0
----
-14
-3
-8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5089
SELECT - col0 * col0 + - tab1.col0 / col0 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5089
SELECT - col0 * col0 + - tab1.col0 / col0 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 63 * + 56 AS col1 FROM tab0, tab1 AS cor0
----
-3528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 + 9 * col0 col1 FROM tab0
----
2280
3710
8900

query I rowsort
SELECT DISTINCT col2 - + 34 FROM tab0
----
-1
-33
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 * + col1 col2 FROM tab1
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 - + cor0.col2 col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL + + col1 * 15 * cor0.col2 AS col2 FROM tab0 cor0
----
111930
1455
42570

query I rowsort
SELECT - + col0 * 0 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col2 * + cor0.col1 - + col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT - 14 * + tab1.col1 FROM tab1, tab0 cor0
----
9 values hashing to fc03bc64ab1475535aa30b761cdafa2c

query I rowsort
SELECT - col1 + ( ( - col1 ) ) + - col1 FROM tab1
----
-30
-39
-78

query I rowsort
SELECT ALL + 69 FROM tab2, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT DISTINCT - 21 + cor0.col1 FROM tab0 AS cor0
----
65
70
76

query I rowsort
SELECT DISTINCT + col2 - col1 * - col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT cor0.col0 * - 17 + cor0.col2 FROM tab2 AS cor0
----
-1300
-1305
-92

query I rowsort
SELECT ALL + - col2 * - col2 + + col2 FROM tab1 AS cor0
----
2970
3306
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 - col0 col2 FROM tab1 AS cor0
----
-159
-175
-98

query I rowsort
SELECT DISTINCT 89 + + 7 * col1 FROM tab2
----
208
306
502

query I rowsort
SELECT ALL 20 + + ( - col0 ) * - ( col0 ) * - tab0.col1 AS col2 FROM tab0
----
-118805
-49516
-720791

query I rowsort
SELECT ALL 19 * - 50 * - col1 + 61 * - 43 FROM tab2 AS cor0
----
13527
26827
53427

query I rowsort
SELECT ALL - 15 + col1 FROM tab0 AS cor0
----
71
76
82

query I rowsort
SELECT ALL - col1 + col2 + - col0 AS col2 FROM tab1 AS cor0
----
-17
25
3

query I rowsort
SELECT - col2 * - col0 - - cor0.col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5112
SELECT ALL CAST( NULL AS SIGNED ) * cor0.col0 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5112
SELECT ALL CAST ( NULL AS INTEGER ) * cor0.col0 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 51 + + 15 FROM tab0 AS cor0
----
66
66
66

query I rowsort
SELECT ALL - - col2 * + ( col2 + col2 ) FROM tab2 AS cor0
----
1352
1458
2888

query I rowsort
SELECT col2 * - col0 + - col2 AS col1 FROM tab2 cor0
----
-2054
-216
-3040

query I rowsort
SELECT ALL - ( - 92 ) * - col2 * + 87 AS col2 FROM tab0 AS cor0
----
-264132
-656328
-8004

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5117
SELECT DISTINCT + CAST( + cor0.col0 AS SIGNED ) + - cor0.col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5117
SELECT DISTINCT + CAST ( + cor0.col0 AS INTEGER ) + - cor0.col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - cor0.col2 * 67 + col1 AS col0 FROM tab0 AS cor0
----
-2125
-5403
30

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) + + col0 * - col2 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL - 44 + col0 * - col2 * 43 FROM tab2 AS cor0
----
-129130
-8171
-87248

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5121
SELECT - col1 + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5121
SELECT - col1 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( 32 + - col2 ) FROM tab0
----
-1
-50
31

query I rowsort
SELECT + ( + 11 + col2 ) FROM tab1
----
107
65
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5124
SELECT - CAST( NULL AS SIGNED ) * 38 col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5124
SELECT - CAST ( NULL AS INTEGER ) * 38 col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + ( ( col2 ) ) * - ( - col2 ) FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL 88 * col0 + col1 FROM tab1 AS cor0
----
290
5642
7053

query I rowsort
SELECT + 21 + + col0 FROM tab1 cor0
----
101
24
85

query I rowsort
SELECT + - col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + col1 + - col1 * - ( + cor0.col2 ) AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT + + 13 + col2 FROM tab2 AS cor0
----
39
40
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 67 col2 FROM tab0 AS cor0
----
67
67
67

query I rowsort
SELECT ALL + ( col1 ) * cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-5133
SELECT 59 DIV + col0 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-78
-79
1

skipif mysql # not compatible
query I rowsort label-5133
SELECT 59 / + col0 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-78
-79
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5134
SELECT - + col1 DIV cor0.col1 AS col1 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5134
SELECT - + col1 / cor0.col1 AS col1 FROM tab1 cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5135
SELECT tab0.col2 - tab0.col1 DIV - tab0.col2 AS col2 FROM tab0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-5135
SELECT tab0.col2 - tab0.col1 / - tab0.col2 AS col2 FROM tab0
----
35
83
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 * - col2 col1 FROM tab1 AS cor0
----
-2430
-2565
-4320

query I rowsort
SELECT ALL - col2 + col0 * - col1 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL 50 + - col0 AS col1 FROM tab1
----
-14
-30
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 - + col1 col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL - + col1 + col0 AS col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col1 * col1 + col0 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-514
3548
7511

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + ( cor0.col0 ) + col2 col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT DISTINCT - col2 * + ( + col2 ) + - col1 * + col2 * + col2 FROM tab0 AS cor0
----
-618608
-94743
-98

query I rowsort
SELECT - - col2 + + cor0.col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - - col1 + - col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + ( col0 + + 68 ) * tab2.col1 AS col1 FROM tab2
----
2325
2499
8614

query I rowsort
SELECT - + 13 * col1 + col1 AS col0 FROM tab0 AS cor0
----
-1032
-1092
-1164

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5148
SELECT - - CAST( ( col2 ) AS SIGNED ) + col2 FROM tab1 AS cor0
----
108
114
192

skipif mysql # not compatible
query I rowsort label-5148
SELECT - - CAST ( ( col2 ) AS INTEGER ) + col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-5149
SELECT + col0 DIV - col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5149
SELECT + col0 / - col1 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 + - col2 col2 FROM tab1 AS cor0
----
-49
-52
-91

query I rowsort
SELECT - cor0.col2 - col2 AS col2 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT - - 83 + - col1 FROM tab0 AS cor0
----
-14
-3
-8

query I rowsort
SELECT 41 AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT + - col0 * col2 + - col0 - col0 * - 11 FROM tab0 AS cor0
----
-552
-6408
315

query I rowsort
SELECT ALL + 60 FROM tab0, tab0 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT col1 * + col1 + 70 AS col2 FROM tab0 AS cor0
----
7466
8351
9479

onlyif mysql # use DIV operator for integer division
query I rowsort label-5157
SELECT DISTINCT - 94 * col0 DIV + col2 - 20 * col2 FROM tab1 AS cor0
----
-1085
-1245
-1998

skipif mysql # not compatible
query I rowsort label-5157
SELECT DISTINCT - 94 * col0 / + col2 - 20 * col2 FROM tab1 AS cor0
----
-1085
-1245
-1998

query I rowsort
SELECT - 17 * + col0 FROM tab2 AS cor0
----
-119
-1326
-1343

query I rowsort
SELECT - + ( - col2 ) - + cor0.col2 * - col0 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT col2 * + 97 + - col2 * + col2 AS col1 FROM tab0
----
1230
2112
96

query I rowsort
SELECT ALL col0 + col2 * ( col2 + col0 ) AS col0 FROM tab2
----
2782
4525
925

query I rowsort
SELECT ALL + - 46 * col2 FROM tab2 AS cor0
----
-1196
-1242
-1748

query I rowsort
SELECT - col0 + - cor0.col2 * + cor0.col1 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT - ( - tab2.col2 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT - col2 + 70 FROM tab1
----
-26
13
16

query I rowsort
SELECT col1 * ( - 10 * - col2 ) + 84 FROM tab2 AS cor0
----
15424
6544
8454

query I rowsort
SELECT ALL - col1 * - col1 + col0 AS col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT - col0 + 78 FROM tab0 AS cor0
----
-11
43
54

query I rowsort
SELECT ALL col1 + - cor0.col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT - cor0.col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT ALL - + 70 + col2 AS col1 FROM tab0 AS cor0
----
-37
-69
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 col1 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5174
SELECT CAST( col1 AS SIGNED ) 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-5174
SELECT CAST ( col1 AS INTEGER ) col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col0 * 22 AS col1 FROM tab0 cor0
----
1958
528
770

query I rowsort
SELECT DISTINCT + + 36 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1116
-2124
-612

query I rowsort
SELECT + - col2 * ( col1 ) + col1 * + col0 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT DISTINCT + - 79 AS col2 FROM tab0 AS cor0
----
-79

query I rowsort
SELECT 74 + - col0 * - col0 * 4 FROM tab2 AS cor0
----
24410
25038
270

query I rowsort
SELECT ALL + + 2 FROM tab0 cor0
----
2
2
2

query I rowsort
SELECT - ( 54 ) * - col0 AS col0 FROM tab0 cor0
----
1296
1890
4806

query I rowsort
SELECT 27 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT ALL - col1 - col1 AS col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT - - 88 - + cor0.col1 * col0 * col2 AS col0 FROM tab0 AS cor0
----
-3307
-664030
-68024

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 + col0 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - 96 + col0 + + ( 71 ) * + col1 FROM tab2 AS cor0
----
1190
2112
4171

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5187
SELECT DISTINCT - col0 - - col2 * CAST( NULL AS SIGNED ) * - ( cor0.col0 ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5187
SELECT DISTINCT - col0 - - col2 * CAST ( NULL AS INTEGER ) * - ( cor0.col0 ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 21 * col1 * col0 FROM tab0 AS cor0
----
170079
43344
71295

query I rowsort
SELECT - 61 * - col2 * + col0 - - ( - col1 ) AS col0 FROM tab2 cor0
----
11498
123649
183105

onlyif mysql # use DIV operator for integer division
query I rowsort label-5190
SELECT col2 DIV - col2 + - 81 FROM tab1 AS cor0
----
-82
-82
-82

skipif mysql # not compatible
query I rowsort label-5190
SELECT col2 / - col2 + - 81 FROM tab1 AS cor0
----
-82
-82
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5191
SELECT - cor0.col0 * col1 - - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5191
SELECT - cor0.col0 * col1 - - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 34 + + col1 FROM tab2 AS cor0
----
-17
-3
25

query I rowsort
SELECT ALL col1 + - cor0.col1 * - 14 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT + col1 + ( ( cor0.col1 ) + - 68 * + col1 ) AS col1 FROM tab2 cor0
----
-1122
-2046
-3894

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * - 57 + - ( - col0 + col1 ) * 93 col0 FROM tab2 AS cor0
----
-465
5130
6735

query I rowsort
SELECT DISTINCT - 19 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5197
SELECT col1 - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5197
SELECT col1 - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col0 * - 77 + - col0 AS col2 FROM tab2 AS cor0
----
-546
-6084
-6162

query I rowsort
SELECT - col1 + + 50 AS col1 FROM tab1 AS cor0
----
24
37
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 col2 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1, tab1 cor2
----
243 values hashing to e66ab27a87265a824a995a30a8bc15c5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5201
SELECT - col2 * CAST( + ( col2 ) AS SIGNED ) FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-5201
SELECT - col2 * CAST ( + ( col2 ) AS INTEGER ) FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - + cor0.col1 + 78 * + col2 FROM tab1 AS cor0
----
4186
4436
7475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - 15 - - cor0.col0 col1 FROM tab2 AS cor0
----
122
23
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5204
SELECT + cor0.col1 DIV col0 + cor0.col0 * + cor0.col1 FROM tab0 cor0
----
2067
3397
8100

skipif mysql # not compatible
query I rowsort label-5204
SELECT + cor0.col1 / col0 + cor0.col0 * + cor0.col1 FROM tab0 cor0
----
2067
3397
8100

query I rowsort
SELECT - col2 - cor0.col0 AS col1 FROM tab0 cor0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5206
SELECT - - col1 + + CAST( 42 AS SIGNED ) FROM tab0 AS cor0
----
128
133
139

skipif mysql # not compatible
query I rowsort label-5206
SELECT - - col1 + + CAST ( 42 AS INTEGER ) FROM tab0 AS cor0
----
128
133
139

onlyif mysql # use DIV operator for integer division
query I rowsort label-5207
SELECT 99 DIV + tab0.col2 AS col0 FROM tab0
----
1
3
99

skipif mysql # not compatible
query I rowsort label-5207
SELECT 99 / + tab0.col2 AS col0 FROM tab0
----
1
3
99

query I rowsort
SELECT DISTINCT + col2 * 40 FROM tab1 cor0
----
2160
2280
3840

query I rowsort
SELECT + col0 * 53 + - col1 - + col0 FROM tab2 AS cor0
----
333
3997
4091

query I rowsort
SELECT col1 + col2 - + col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 * + 41 + - col2 * - col0 + - col1 AS col0 FROM tab2 AS cor0
----
-1229
-129
-254

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5212
SELECT CAST( + col1 AS SIGNED ) + - col2 * ( col2 ) FROM tab1 AS cor0
----
-2890
-3239
-9203

skipif mysql # not compatible
query I rowsort label-5212
SELECT CAST ( + col1 AS INTEGER ) + - col2 * ( col2 ) FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT tab0.col0 + - col0 + col1 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 + + col0 * col1 col2 FROM tab1 AS cor0
----
27
589
989

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 * col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - - cor0.col2 * col1 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5217
SELECT + 14 + - col0 * - CAST( col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
1239
590
7935

skipif mysql # not compatible
query I rowsort label-5217
SELECT + 14 + - col0 * - CAST ( col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
1239
590
7935

query I rowsort
SELECT DISTINCT ( col0 ) * col2 AS col2 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5219
SELECT ALL - tab2.col1 DIV - col1 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5219
SELECT ALL - tab2.col1 / - col1 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT col0 * col2 * ( col2 ) - col1 FROM tab2
----
114059
5072
52669

query I rowsort
SELECT DISTINCT + tab2.col2 + col1 - col0 AS col2 FROM tab2
----
-24
51
7

query I rowsort
SELECT 77 * + col1 FROM tab1
----
1001
2002
770

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5223
SELECT DISTINCT 81 * + tab0.col2 - CAST( col1 * col0 AS SIGNED ) FROM tab0
----
-1457
-3314
609

skipif mysql # not compatible
query I rowsort label-5223
SELECT DISTINCT 81 * + tab0.col2 - CAST ( col1 * col0 AS INTEGER ) FROM tab0
----
-1457
-3314
609

query I rowsort
SELECT + 22 FROM tab0, tab1 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to c6f049334398e3533dd6996714479a2f

query I rowsort
SELECT + tab0.col1 * tab0.col0 + tab0.col2 AS col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL + - col1 * + col0 - - col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-5227
SELECT - cor0.col1 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5227
SELECT - cor0.col1 / cor0.col1 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 57 + col0 * 23 FROM tab2 AS cor0
----
104
1737
1760

query I rowsort
SELECT + ( + cor0.col0 ) * + col1 * - col1 + col1 + ( col0 + col2 ) * + col1 FROM tab2 AS cor0
----
-20825
-265323
-5642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 + + col1 col0 FROM tab0
----
258
273
291

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL > - col1
----

query I rowsort
SELECT DISTINCT 94 + cor1.col1 AS col2 FROM tab1, tab2 cor0, tab0 AS cor1
----
180
185
191

query I rowsort
SELECT DISTINCT 1 * col1 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL + - tab1.col0 AS col2 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col0 * - tab2.col2 col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT - col1 * col0 * col0 - + col0 * - tab1.col1 AS col2 FROM tab1
----
-156
-40320
-82160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col1 * + col0 col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT col2 + + col1 + col1 AS col1 FROM tab1
----
106
122
77

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE - cor0.col1 NOT BETWEEN col2 - - col1 * col2 AND NULL
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT * FROM tab1 WHERE + col0 IN ( - col2 * tab1.col2 + col0 * col2 )
----

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 WHERE NOT NULL = ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5242
SELECT DISTINCT col2 + tab1.col0 DIV + tab1.col1 FROM tab1
----
102
54
63

skipif mysql # not compatible
query I rowsort label-5242
SELECT DISTINCT col2 + tab1.col0 / + tab1.col1 FROM tab1
----
102
54
63

query I rowsort
SELECT ALL + col0 * col0 - + col0 * col2 * col1 FROM tab0
----
-2170
-656197
-67536

query I rowsort
SELECT col0 * - col2 + - col0 AS col2 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT - tab1.col0 - - tab1.col0 * - col2 AS col1 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT - tab0.col1 + + col2 + - col2 AS col1 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5247
SELECT col0 + - col0 * col1 DIV col0 + - col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5247
SELECT col0 + - col0 * col1 / col0 + - col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col0 * - col1 * tab2.col0 AS col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT ALL col0 + col0 * col0 / - tab0.col1 AS col1 FROM tab0 WHERE NOT NULL <= ( NULL )
----

query I rowsort
SELECT + col1 * - col1 * - col0 AS col2 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT DISTINCT tab1.col2 * - tab1.col0 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL col2 * - tab0.col1 AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - col1 + - col1 * + col2 + + col0 * - col0 FROM tab2
----
-6904
-7677
-917

query I rowsort
SELECT tab1.col1 + col0 + col0 FROM tab1
----
138
173
32

query I rowsort
SELECT col0 AS col2 FROM tab0 WHERE NOT ( col1 * - col0 + - col2 * col0 ) IN ( col1 )
----
24
35
89

query I rowsort
SELECT tab1.col2 + - col0 + col0 AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT 17 * - 28 AS col1 FROM tab1
----
-476
-476
-476

onlyif mysql # use DIV operator for integer division
query I rowsort label-5258
SELECT - CAST( + tab1.col0 AS SIGNED ) DIV - col1 + col2 + - col2 AS col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-5258
SELECT - CAST ( + tab1.col0 AS INTEGER ) / - col1 + col2 + - col2 AS col1 FROM tab1
----
0
6
6

query I rowsort
SELECT + 36 * col0 FROM tab1
----
108
2304
2880

query I rowsort
SELECT - ( - 77 ) AS col2 FROM tab1
----
77
77
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5261
SELECT DISTINCT col0 - + ( col2 ) DIV + col0 col0 FROM tab0
----
23
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5261
SELECT DISTINCT col0 - + ( col2 ) / + col0 col0 FROM tab0
----
23
35
89

query I rowsort
SELECT ALL 56 - 9 FROM tab0
----
47
47
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-5263
SELECT col1 + - col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-5263
SELECT col1 + - col2 / - col1 AS col1 FROM tab1 AS cor0
----
15
20
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5264
SELECT + ( col2 ) + CAST( ( cor0.col2 ) AS SIGNED ) * col1 FROM tab0 cor0
----
2871
7544
98

skipif mysql # not compatible
query I rowsort label-5264
SELECT + ( col2 ) + CAST ( ( cor0.col2 ) AS INTEGER ) * col1 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT ALL + col2 * + col2 + - col1 FROM tab1 cor0
----
2890
3239
9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-5266
SELECT col0 DIV + 36 AS col1 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5266
SELECT col0 / + 36 AS col1 FROM tab1 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * 58 col0 FROM tab1 cor0
----
174
3712
4640

query I rowsort
SELECT col2 * - ( - cor0.col2 * col2 + col2 ) FROM tab2 AS cor0
----
16900
18954
53428

query I rowsort
SELECT ALL col0 * 99 FROM tab0 AS cor0
----
2376
3465
8811

onlyif mysql # use DIV operator for integer division
query I rowsort label-5270
SELECT - - cor0.col0 DIV + col0 + - col0 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5270
SELECT - - cor0.col0 / + col0 + - col0 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5271
SELECT col0 DIV - 72 AS col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5271
SELECT col0 / - 72 AS col2 FROM tab1
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5272
SELECT DISTINCT col1 + - CAST( - 67 AS SIGNED ) + col0 FROM tab1
----
141
160
96

skipif mysql # not compatible
query I rowsort label-5272
SELECT DISTINCT col1 + - CAST ( - 67 AS INTEGER ) + col0 FROM tab1
----
141
160
96

query I rowsort
SELECT DISTINCT col0 * - 73 FROM tab2
----
-511
-5694
-5767

onlyif mysql # use DIV operator for integer division
query I rowsort label-5274
SELECT col0 * ( - 31 ) DIV col2 FROM tab1
----
-1
-25
-34

skipif mysql # not compatible
query I rowsort label-5274
SELECT col0 * ( - 31 ) / col2 FROM tab1
----
-1
-25
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5275
SELECT col2 + col2 DIV - col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5275
SELECT col2 + col2 / - col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + 19 * col2 + - col2 AS col2 FROM tab1 AS cor0
----
1026
1728
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-5277
SELECT ( col1 ) DIV tab1.col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-5277
SELECT ( col1 ) / tab1.col0 FROM tab1
----
0
0
8

query I rowsort
SELECT tab0.col2 * 69 FROM tab0
----
2277
5658
69

query I rowsort
SELECT - col1 * - ( col2 ) FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - + cor0.col1 + - col0 * col0 FROM tab2 cor0
----
-6143
-6258
-80

query I rowsort
SELECT DISTINCT + - col1 + col1 * - col0 * col0 FROM tab0 AS cor0
----
-118922
-49622
-720902

query I rowsort
SELECT ALL + - col2 * col2 * col0 AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT + - 71 * + col0 FROM tab2 AS cor0
----
-497
-5538
-5609

query I rowsort
SELECT tab0.col2 - 92 FROM tab0
----
-10
-59
-91

query I rowsort
SELECT DISTINCT tab0.col1 - - col1 AS col2 FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-5286
SELECT - col1 DIV - tab2.col1 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5286
SELECT - col1 / - tab2.col1 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT ALL + 74 - 64 FROM tab1
----
10
10
10

query I rowsort
SELECT DISTINCT - col1 - + 52 FROM tab0
----
-138
-143
-149

query I rowsort
SELECT col2 + 11 + - col0 AS col0 FROM tab2
----
-30
-41
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5290
SELECT DISTINCT CAST( NULL AS SIGNED ) * 87 * - col0 + col0 + col0 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5290
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 87 * - col0 + col0 + col0 AS col0 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5291
SELECT DISTINCT - 67 - 73 DIV - col1 FROM tab2
----
-63
-65
-66

skipif mysql # not compatible
query I rowsort label-5291
SELECT DISTINCT - 67 - 73 / - col1 FROM tab2
----
-63
-65
-66

query I rowsort
SELECT DISTINCT + - col1 * - col2 * + col2 AS col2 FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT col1 + - col1 * col0 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - 14 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 cor1, tab2, tab1 AS cor2
----
3645 values hashing to 731e4a6549b312ba21c2e61ca9bede27

onlyif mysql # use DIV operator for integer division
query I rowsort label-5296
SELECT ALL tab1.col2 * tab1.col0 DIV col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5296
SELECT ALL tab1.col2 * tab1.col0 / col0 FROM tab1
----
54
57
96

query I rowsort
SELECT col0 * ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT 82 - + 8 * - col2 AS col1 FROM tab0 cor0
----
346
738
90

query I rowsort
SELECT ALL col1 * + col2 + tab1.col0 FROM tab1
----
1328
1407
634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5300
SELECT DISTINCT + CAST( - col2 AS SIGNED ) + + cor0.col2 * + cor0.col2 FROM tab1 AS cor0
----
2862
3192
9120

skipif mysql # not compatible
query I rowsort label-5300
SELECT DISTINCT + CAST ( - col2 AS INTEGER ) + + cor0.col2 * + cor0.col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT - ( - 46 ) + + col2 FROM tab1 cor0
----
100
103
142

onlyif mysql # use DIV operator for integer division
query I rowsort label-5302
SELECT DISTINCT - ( - col0 ) DIV col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-5302
SELECT DISTINCT - ( - col0 ) / col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT DISTINCT 36 FROM tab0 cor0
----
36

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) IN ( col1 + - col2 )
----

query I rowsort
SELECT ALL col1 - - cor0.col0 * - col1 * + col2 FROM tab0 AS cor0
----
-3298
-664027
-68026

onlyif mysql # use DIV operator for integer division
query I rowsort label-5306
SELECT DISTINCT + col0 * col2 DIV - col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-5306
SELECT DISTINCT + col0 * col2 / - col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5307
SELECT ALL + col1 * col0 DIV + col1 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5307
SELECT ALL + col1 * col0 / + col1 FROM tab2 cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col0 * col1 col0 FROM tab0 AS cor0
----
118825
49536
720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-5309
SELECT ALL - cor0.col1 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5309
SELECT ALL - cor0.col1 / col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT + col2 + + col0 * + col0 * - col0 AS col2 FROM tab0 AS cor0
----
-13791
-42874
-704887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 + col1 col1 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT cor0.col2 + col2 - col1 AS col0 FROM tab0 AS cor0
----
-20
-95
73

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE - col1 IN ( + col0 * - col2 ) OR NULL > NULL
----

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 * + col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT - - cor0.col1 + - col2 + col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5316
SELECT DISTINCT col1 DIV col2 col2 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5316
SELECT DISTINCT col1 / col2 col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - cor0.col1 + col1 * - col2 FROM tab0 cor0
----
-194
-2924
-7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + cor0.col0 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col0 * - col0 - col0 AS col1 FROM tab2 AS cor0
----
-56
-6162
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * - col0 - - col2 * - col1 col2 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT + col2 * tab2.col1 * + col0 AS col0 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5322
SELECT tab0.col1 * - col2 DIV + col2 + tab0.col0 * + col1 * - col2 FROM tab0
----
-3492
-664209
-68198

skipif mysql # not compatible
query I rowsort label-5322
SELECT tab0.col1 * - col2 / + col2 + tab0.col0 * + col1 * - col2 FROM tab0
----
-3492
-664209
-68198

query I rowsort
SELECT col0 * - ( + col2 * col0 ) AS col1 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT + cor0.col1 - + col0 AS col2 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5325
SELECT - - col0 * CAST( NULL AS DECIMAL ) + + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5325
SELECT - - col0 * CAST ( NULL AS REAL ) + + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5326
SELECT - col2 * CAST( NULL AS SIGNED ) / - 70 + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5326
SELECT - col2 * CAST ( NULL AS INTEGER ) / - 70 + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 34 + col1 FROM tab2 cor0
----
-17
-3
25

query I rowsort
SELECT ALL + + 68 * - 89 + col1 FROM tab2 AS cor0
----
-5993
-6021
-6035

query I rowsort
SELECT DISTINCT + col1 * - 66 AS col2 FROM tab2 AS cor0
----
-1122
-2046
-3894

query I rowsort
SELECT col0 + - 82 FROM tab2 AS cor0
----
-3
-4
-75

query I rowsort
SELECT - + col1 + - col0 * + col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT + - col2 + + col1 * - col1 * col0 FROM tab2 cor0
----
-22869
-271544
-6754

query I rowsort
SELECT DISTINCT col0 - col0 * col0 FROM tab1 cor0
----
-4032
-6
-6320

query I rowsort
SELECT - - cor0.col1 + + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + + cor0.col0 + - ( + col0 * + col1 ) FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-5336
SELECT ALL - col2 + - col1 DIV - ( 39 ) FROM tab0
----
-31
-80
1

skipif mysql # not compatible
query I rowsort label-5336
SELECT ALL - col2 + - col1 / - ( 39 ) FROM tab0
----
-31
-80
1

query I rowsort
SELECT col2 + - 33 * col2 FROM tab2 AS cor0
----
-1216
-832
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-5338
SELECT col0 * col2 DIV 67 FROM tab0
----
0
108
11

skipif mysql # not compatible
query I rowsort label-5338
SELECT col0 * col2 / 67 FROM tab0
----
0
108
11

query I rowsort
SELECT - 41 * - col0 - ( - ( col0 ) * col0 ) FROM tab2 cor0
----
336
9282
9480

query I rowsort
SELECT - col2 * ( cor0.col1 ) + - col2 AS col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - col0 * + col0 + + col0 * - col0 FROM tab2 AS cor0
----
-12168
-12482
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5342
SELECT + + col2 * 43 + + 63 DIV col2 FROM tab0 AS cor0
----
106
1420
3526

skipif mysql # not compatible
query I rowsort label-5342
SELECT + + col2 * 43 + + 63 / col2 FROM tab0 AS cor0
----
106
1420
3526

query I rowsort
SELECT ALL cor1.col1 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-5344
SELECT ALL + - 26 DIV - 32 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5344
SELECT ALL + - 26 / - 32 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5345
SELECT col2 + col1 - tab1.col2 DIV - col2 FROM tab1
----
110
68
81

skipif mysql # not compatible
query I rowsort label-5345
SELECT col2 + col1 - tab1.col2 / - col2 FROM tab1
----
110
68
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5346
SELECT DISTINCT col2 DIV + 38 - tab2.col1 AS col2 FROM tab2
----
-16
-31
-59

skipif mysql # not compatible
query I rowsort label-5346
SELECT DISTINCT col2 / + 38 - tab2.col1 AS col2 FROM tab2
----
-16
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT col0 DIV + ( col2 ) FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5347
SELECT col0 / + ( col2 ) FROM tab1
----
0
0
1

query I rowsort
SELECT + + 66 + + 20 AS col2 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to e219687f6f4ab6f7ee442792edcebca9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5349
SELECT - tab0.col0 * + ( 98 ) * col1 + - col0 + + tab0.col1 DIV - col1 FROM tab0
----
-202297
-332746
-793792

skipif mysql # not compatible
query I rowsort label-5349
SELECT - tab0.col0 * + ( 98 ) * col1 + - col0 + + tab0.col1 / - col1 FROM tab0
----
-202297
-332746
-793792

query I rowsort
SELECT col0 + - 85 AS col0 FROM tab1
----
-21
-5
-82

query I rowsort
SELECT col1 * + col2 + - col1 * - col1 FROM tab0
----
10234
15743
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5352
SELECT - tab1.col0 * CAST( NULL AS SIGNED ) / col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5352
SELECT - tab1.col0 * CAST ( NULL AS INTEGER ) / col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5353
SELECT ALL + col2 DIV 35 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5353
SELECT ALL + col2 / 35 FROM tab2
----
0
0
1

query I rowsort
SELECT + col2 + - 2 * col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + ( - col2 ) * col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5356
SELECT + + 49 DIV col1 AS col1 FROM tab2 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5356
SELECT + + 49 / col1 AS col1 FROM tab2 cor0
----
0
1
2

query I rowsort
SELECT 21 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT DISTINCT + 68 * col0 FROM tab2 AS cor0
----
476
5304
5372

query I rowsort
SELECT DISTINCT - 73 * cor0.col0 AS col2 FROM tab2 cor0
----
-511
-5694
-5767

query I rowsort
SELECT - 48 + + col2 * ( 41 ) FROM tab0 AS cor0
----
-7
1305
3314

query I rowsort
SELECT DISTINCT + col2 + col1 * - col1 + + 63 AS col0 FROM tab2 AS cor0
----
-188
-3392
-871

query I rowsort
SELECT DISTINCT - 93 * 61 - - col2 FROM tab1 cor0
----
-5577
-5616
-5619

query I rowsort
SELECT ALL + - col2 + col0 * + col1 FROM tab1 AS cor0
----
24
583
944

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 40e4acd618698dd2305f1f7b8b547f7a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5365
SELECT ALL CAST( NULL AS SIGNED ) * - col0 + - col0 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5365
SELECT ALL CAST ( NULL AS INTEGER ) * - col0 + - col0 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col1 ) * + col1 * - ( cor0.col2 ) - col1 FROM tab2 AS cor0
----
10965
25916
90447

query I rowsort
SELECT DISTINCT - ( col1 ) + + cor0.col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col2 * - ( + col1 ) AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - 15 * - col0 AS col1 FROM tab1 cor0
----
1200
45
960

query I rowsort
SELECT ALL + + col0 * - col1 * col0 AS col2 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT - - col2 * 93 AS col0 FROM tab2 AS cor0
----
2418
2511
3534

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + ( col0 ) * col2 col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT - ( col0 ) + col1 AS col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - 16 AS col0 FROM tab1 AS cor0
----
-16

onlyif mysql # use DIV operator for integer division
query I rowsort label-5375
SELECT + + col2 + col1 DIV cor0.col1 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5375
SELECT + + col2 + col1 / cor0.col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT ALL - - col1 * - col1 + col1 * + ( + col2 ) + 60 FROM tab2 AS cor0
----
-1887
-64
417

query I rowsort
SELECT ALL + col1 + col0 * + 10 FROM tab0 cor0
----
326
447
981

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col2 FROM tab1
----
44
44
44

query I rowsort
SELECT DISTINCT - 69 + 6 * col1 AS col2 FROM tab0
----
447
477
513

query I rowsort
SELECT 10 + col2 AS col0 FROM tab1
----
106
64
67

query I rowsort
SELECT col2 * + 77 AS col2 FROM tab2
----
2002
2079
2926

query I rowsort
SELECT col1 * + col1 * - col2 + + 7 - col2 AS col2 FROM tab1
----
-16313
-36551
-5750

query I rowsort
SELECT ALL ( 17 ) - - col1 * col2 FROM tab0
----
114
2855
7479

onlyif mysql # use DIV operator for integer division
query I rowsort label-5384
SELECT DISTINCT - col0 - 56 DIV col1 FROM tab1
----
-5
-69
-84

skipif mysql # not compatible
query I rowsort label-5384
SELECT DISTINCT - col0 - 56 / col1 FROM tab1
----
-5
-69
-84

query I rowsort
SELECT - 75 * col0 AS col1 FROM tab2
----
-525
-5850
-5925

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5386
SELECT DISTINCT CAST( NULL AS SIGNED ) / col2 + - col0 - - ( tab0.col1 ) col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5386
SELECT DISTINCT CAST ( NULL AS INTEGER ) / col2 + - col0 - - ( tab0.col1 ) col2 FROM tab0
----
NULL

query I rowsort
SELECT col1 * - ( + col2 + col2 ) AS col1 FROM tab1 AS cor0
----
-1140
-2496
-2808

onlyif mysql # use DIV operator for integer division
query I rowsort label-5388
SELECT + - col0 DIV 52 + col0 + col2 FROM tab0 AS cor0
----
170
36
57

skipif mysql # not compatible
query I rowsort label-5388
SELECT + - col0 / 52 + col0 + col2 FROM tab0 AS cor0
----
170
36
57

query I rowsort
SELECT DISTINCT - cor0.col0 * + 44 * col2 AS col1 FROM tab2 AS cor0
----
-132088
-8316
-89232

query I rowsort
SELECT DISTINCT - col2 + ( col1 ) * + col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + + cor0.col2 * 78 AS col1 FROM tab1 AS cor0
----
4212
4446
7488

query I rowsort
SELECT ALL col2 * + ( + 86 ) AS col0 FROM tab1 cor0
----
4644
4902
8256

query I rowsort
SELECT - 40 AS col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 01aad4539198a6509248e086869f90a6

query I rowsort
SELECT ALL ( col2 ) + ( - 12 ) FROM tab0
----
-11
21
70

query I rowsort
SELECT DISTINCT + ( + col2 ) + ( + col0 ) FROM tab0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5396
SELECT ALL - col0 * CAST( - col1 AS SIGNED ) AS col2 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-5396
SELECT ALL - col0 * CAST ( - col1 AS INTEGER ) AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT col2 + - 1 * + col1 FROM tab1
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5398
SELECT DISTINCT - col2 - + ( + col0 + - col2 ) DIV + col1 FROM tab1 AS cor0
----
-53
-57
-95

skipif mysql # not compatible
query I rowsort label-5398
SELECT DISTINCT - col2 - + ( + col0 + - col2 ) / + col1 FROM tab1 AS cor0
----
-53
-57
-95

query I rowsort
SELECT ALL + cor0.col1 * ( - 6 ) AS col0 FROM tab1 cor0
----
-156
-60
-78

query I rowsort
SELECT + cor0.col0 * col0 + - col2 * + col0 AS col1 FROM tab2 AS cor0
----
-140
3239
4056

query I rowsort
SELECT DISTINCT - col1 + - ( + col0 ) * col0 AS col2 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT DISTINCT + - col1 * - 50 * - cor0.col0 + - col0 FROM tab0 AS cor0
----
-103224
-169785
-405039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col0 ) col0 FROM tab0, tab2 cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT col1 * ( col2 + + col0 ) * - col2 AS col2 FROM tab0
----
-1276002
-161766
-3492

onlyif mysql # use DIV operator for integer division
query I rowsort label-5405
SELECT col2 + ( col2 ) DIV col0 FROM tab2
----
26
30
38

skipif mysql # not compatible
query I rowsort label-5405
SELECT col2 + ( col2 ) / col0 FROM tab2
----
26
30
38

query I rowsort
SELECT cor0.col1 * ( col1 ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5407
SELECT + 37 DIV col1 AS col1 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5407
SELECT + 37 / col1 AS col1 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT + col1 * - 23 * 14 + col1 AS col0 FROM tab0
----
-27606
-29211
-31137

query I rowsort
SELECT - + 24 FROM tab0, tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to f2e40f6e5cdbc2877843191cb261975f

query I rowsort
SELECT ALL - ( + 55 ) FROM tab2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT col0 + 54 * cor0.col2 FROM tab0 AS cor0
----
1806
4517
89

query I rowsort
SELECT - - 42 AS col2 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT ALL col2 + + col0 * + col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT 62 * col1 AS col2 FROM tab2 cor0
----
1054
1922
3658

onlyif mysql # use DIV operator for integer division
query I rowsort label-5415
SELECT DISTINCT + + col2 + + 33 DIV + col0 FROM tab1 cor0
----
57
65
96

skipif mysql # not compatible
query I rowsort label-5415
SELECT DISTINCT + + col2 + + 33 / + col0 FROM tab1 cor0
----
57
65
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 6 * + col1 col2 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT ALL + cor0.col2 * + col1 + col2 AS col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT ALL + ( + 56 ) * - cor1.col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 28a9d0ce91a832ad7576a5e04111affb

query I rowsort
SELECT + + 69 + - cor1.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6f46dc677849adeeb88f9b79089a4767

query I rowsort
SELECT ALL col1 - - col1 * col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + 86 + col1 * ( cor0.col2 + + col2 ) FROM tab2 AS cor0
----
1378
1760
3154

query I rowsort
SELECT - - col2 - - col0 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col2 + - cor0.col2 + - col0 * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 91 + + col2 + - ( col0 ) AS col0 FROM tab2 AS cor0
----
111
39
50

query I rowsort
SELECT + - col0 + col0 * - col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT - 87 + - col0 FROM tab0 AS cor0
----
-111
-122
-176

query I rowsort
SELECT ALL + + col1 + + 12 AS col1 FROM tab0 AS cor0
----
103
109
98

query I rowsort
SELECT + - col2 + - cor0.col1 AS col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT + col2 + - col0 * + col1 + - col1 * - 20 FROM tab0 AS cor0
----
-1454
-311
-6197

query I rowsort
SELECT - + col1 + - ( + 88 ) FROM tab2 AS cor0
----
-105
-119
-147

query I rowsort
SELECT ALL + 46 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT DISTINCT - col0 + 32 + col0 FROM tab2 AS cor0
----
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-5433
SELECT ( + col2 ) DIV col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5433
SELECT ( + col2 ) / col1 AS col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 11 - col0 col2 FROM tab2 AS cor0
----
-67
-68
4

query I rowsort
SELECT ALL - ( - tab1.col0 ) * col0 FROM tab1
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5436
SELECT 98 DIV - col1 + cor0.col2 AS col1 FROM tab2 AS cor0
----
24
25
33

skipif mysql # not compatible
query I rowsort label-5436
SELECT 98 / - col1 + cor0.col2 AS col1 FROM tab2 AS cor0
----
24
25
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5437
SELECT ALL - - CAST( NULL AS SIGNED ) - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5437
SELECT ALL - - CAST ( NULL AS INTEGER ) - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 47 + cor0.col0 FROM tab1 AS cor0
----
-44
17
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-5439
SELECT DISTINCT + - col1 DIV col1 + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-5439
SELECT DISTINCT + - col1 / col1 + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT - col1 + + cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT tab1.col2 + - col2 * tab1.col0 + + col1 FROM tab1
----
-3581
-7571
-82

query I rowsort
SELECT - - 16 + col2 FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT - - col2 * - col2 + - ( col1 ) FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT + col1 * - col1 + + cor0.col1 * col0 FROM tab0 AS cor0
----
-182
-5332
-6014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + ( col0 ) * - col2 - + col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col0 * + 45 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT + col2 * 57 + + cor0.col0 FROM tab2 AS cor0
----
1546
1560
2245

query I rowsort
SELECT + tab1.col2 * 0 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col1 col2 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-5450
SELECT - cor1.col1 DIV cor1.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

skipif mysql # not compatible
query I rowsort label-5450
SELECT - cor1.col1 / cor1.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5451
SELECT CAST( - cor0.col0 AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-5451
SELECT CAST ( - cor0.col0 AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + + 17 * - ( col1 ) FROM tab2 AS cor0
----
-1003
-289
-527

query I rowsort
SELECT tab1.col1 * col2 * 19 + col2 FROM tab1
----
10887
23808
26730

query I rowsort
SELECT - cor0.col0 * 21 FROM tab1 AS cor0
----
-1344
-1680
-63

query I rowsort
SELECT ALL 80 AS col0 FROM tab1 cor0
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5456
SELECT ALL - 27 + - 8 DIV + col2 AS col2 FROM tab0 AS cor0
----
-27
-27
-35

skipif mysql # not compatible
query I rowsort label-5456
SELECT ALL - 27 + - 8 / + col2 AS col2 FROM tab0 AS cor0
----
-27
-27
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * col1 col2 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - col0 * - 9 FROM tab1
----
27
576
720

query I rowsort
SELECT DISTINCT - col2 * col0 + 28 AS col1 FROM tab1 AS cor0
----
-134
-3620
-7652

onlyif mysql # use DIV operator for integer division
query I rowsort label-5460
SELECT ALL - + 31 - - col1 DIV - col0 FROM tab0 AS cor0
----
-32
-33
-34

skipif mysql # not compatible
query I rowsort label-5460
SELECT ALL - + 31 - - col1 / - col0 FROM tab0 AS cor0
----
-32
-33
-34

query I rowsort
SELECT + 62 * + cor0.col1 + + col2 FROM tab1 AS cor0
----
1666
677
902

query I rowsort
SELECT DISTINCT - col0 + col1 * 87 * 26 + cor0.col1 * - ( 77 + + cor0.col1 ) FROM tab1 AS cor0
----
21686
28156
56131

onlyif mysql # use DIV operator for integer division
query I rowsort label-5463
SELECT DISTINCT + col1 DIV + col1 AS col1 FROM tab2 cor0
----
1

skipif mysql # not compatible
query I rowsort label-5463
SELECT DISTINCT + col1 / + col1 AS col1 FROM tab2 cor0
----
1

query I rowsort
SELECT + + cor0.col1 + 20 FROM tab1 AS cor0
----
30
33
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 + col2 col1 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT + + col1 * col0 * 86 + - col0 + col2 FROM tab2 AS cor0
----
115457
18682
395720

query I rowsort
SELECT DISTINCT + 6 * + col1 AS col2 FROM tab1
----
156
60
78

query I rowsort
SELECT + 55 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT DISTINCT - 54 AS col2 FROM tab0
----
-54

query I rowsort
SELECT - 70 * col2 FROM tab2
----
-1820
-1890
-2660

query I rowsort
SELECT - tab2.col1 * - ( + col2 * col2 ) + col2 FROM tab2
----
22626
24586
39910

query I rowsort
SELECT - col2 * col0 + col0 * + col1 FROM tab2 AS cor0
----
-1659
2574
28

query I rowsort
SELECT + col2 - - 46 AS col2 FROM tab0
----
128
47
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5474
SELECT col1 + col1 DIV - col1 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-5474
SELECT col1 + col1 / - col1 FROM tab0 cor0
----
85
90
96

query I rowsort
SELECT + col2 * col1 * - ( - col2 ) + - col0 FROM tab2
----
22592
24469
39806

query I rowsort
SELECT 2 * + col2 - 12 * + col0 * - col1 FROM tab1
----
1044
12672
7794

query I rowsort
SELECT ALL + 36 + - col0 FROM tab2 AS cor0
----
-42
-43
29

query I rowsort
SELECT ALL + 18 AS col2 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

onlyif mysql # use DIV operator for integer division
query I rowsort label-5479
SELECT ALL 90 + - col1 DIV col2 AS col2 FROM tab1 AS cor0
----
90
90
90

skipif mysql # not compatible
query I rowsort label-5479
SELECT ALL 90 + - col1 / col2 AS col2 FROM tab1 AS cor0
----
90
90
90

query I rowsort
SELECT ALL - + col2 * - col2 * col1 - col0 AS col0 FROM tab1 AS cor0
----
119728
32426
75813

query I rowsort
SELECT ALL + ( col2 ) * + col2 + 39 FROM tab2 AS cor0
----
1483
715
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5482
SELECT ALL - cor0.col1 DIV col2 AS col1 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5482
SELECT ALL - cor0.col1 / col2 AS col1 FROM tab0 AS cor0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5483
SELECT DISTINCT - col2 DIV col0 + ( col1 ) DIV - 63 AS col2 FROM tab2 cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-5483
SELECT DISTINCT - col2 / col0 + ( col1 ) / - 63 AS col2 FROM tab2 cor0
----
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5484
SELECT DISTINCT - + col0 * - col2 + + 36 DIV cor0.col2 AS col0 FROM tab0 AS cor0
----
71
7298
793

skipif mysql # not compatible
query I rowsort label-5484
SELECT DISTINCT - + col0 * - col2 + + 36 / cor0.col2 AS col0 FROM tab0 AS cor0
----
71
7298
793

query I rowsort
SELECT + col0 + + ( - col0 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col0 * - col2 * col0 + - col1 * col2 FROM tab0 cor0
----
1128
16170
642060

query I rowsort
SELECT + + col0 + - 41 AS col2 FROM tab2 AS cor0
----
-34
37
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5488
SELECT + + col0 + + col0 DIV col1 AS col2 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-5488
SELECT + + col0 + + col0 / col1 AS col2 FROM tab1 AS cor0
----
3
70
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5489
SELECT DISTINCT - col1 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5489
SELECT DISTINCT - col1 + + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5490
SELECT ALL - + cor0.col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5490
SELECT ALL - + cor0.col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + 91 * + col2 AS col1 FROM tab2 AS cor0
----
2444
2464
3537

query I rowsort
SELECT ALL + col0 + - col1 - + col2 AS col0 FROM tab2 AS cor0
----
-51
-7
24

query I rowsort
SELECT ALL - col1 * col0 + col2 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - - col2 * 50 * col0 FROM tab1 cor0
----
182400
384000
8100

query I rowsort
SELECT DISTINCT + - 73 * - col0 FROM tab2 AS cor0
----
511
5694
5767

query I rowsort
SELECT ALL 12 * col1 * col0 AS col2 FROM tab2 AS cor0
----
16116
2604
55224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - cor0.col0 ) * col2 + + col2 col1 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5498
SELECT - CAST( NULL AS SIGNED ) * 29 * + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5498
SELECT - CAST ( NULL AS INTEGER ) * 29 * + cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 27 FROM tab1 cor0
----
27

query I rowsort
SELECT 49 * + col2 + + col0 AS col1 FROM tab1
----
2649
2857
4784

query I rowsort
SELECT col2 * col1 + + col2 AS col2 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT - - ( - col0 ) * - col1 + col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-5503
SELECT + 14 * col2 DIV + col0 + 82 * - col2 FROM tab1 AS cor0
----
-4176
-4662
-7856

skipif mysql # not compatible
query I rowsort label-5503
SELECT + 14 * col2 / + col0 + 82 * - col2 FROM tab1 AS cor0
----
-4176
-4662
-7856

query I rowsort
SELECT ALL + 26 * 30 * col0 + + col2 FROM tab1 AS cor0
----
2394
49977
62496

query I rowsort
SELECT ALL - + col1 * - 22 FROM tab1 AS cor0
----
220
286
572

query I rowsort
SELECT DISTINCT + col2 * cor0.col1 + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5507
SELECT ALL - CAST( NULL AS SIGNED ) + 55 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5507
SELECT ALL - CAST ( NULL AS INTEGER ) + 55 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5508
SELECT ALL CAST( - col1 AS SIGNED ) * col2 col0 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5508
SELECT ALL CAST ( - col1 AS INTEGER ) * col2 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + 49 * 63 * + col1 FROM tab1 AS cor0
----
30870
40131
80262

query I rowsort
SELECT 93 + cor0.col1 AS col1 FROM tab0 AS cor0
----
179
184
190

query I rowsort
SELECT DISTINCT 13 * + cor0.col2 * - 29 + ( col0 ) FROM tab0 AS cor0
----
-12417
-30825
-342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - col1 * 57 col1 FROM tab0 AS cor0
----
-4935
-5269
-5530

query I rowsort
SELECT col1 * + col1 + col0 FROM tab2 cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT col2 * col1 + + col2 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL col2 + 61 * tab0.col2 FROM tab0
----
2046
5084
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 45 * col0 + - cor0.col2 + col0 col2 FROM tab0 cor0
----
1071
1609
4012

query I rowsort
SELECT + ( - cor0.col2 ) * 59 AS col0 FROM tab0 AS cor0
----
-1947
-4838
-59

query I rowsort
SELECT - 85 + cor0.col2 + col1 * col0 FROM tab0 cor0
----
2012
3311
8096

query I rowsort
SELECT ALL + - col1 + col0 * col1 AS col0 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col1 * col2 col0 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL - col0 + col2 * - col2 FROM tab1
----
-2919
-3313
-9296

query I rowsort
SELECT - 32 + col0 * col1 FROM tab1 AS cor0
----
1008
46
608

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5523
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1, tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5523
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab2, tab0 AS cor0
----
NULL

query I rowsort
SELECT - ( col0 ) + col1 * - 43 FROM tab1
----
-1121
-494
-639

query I rowsort
SELECT ALL col2 + - 98 FROM tab0
----
-16
-65
-97

query I rowsort
SELECT + 58 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT ALL + col1 + - col1 - - ( col0 ) * + col1 * + col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT + col2 + cor0.col0 * + ( - cor0.col1 + + col1 ) FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5529
SELECT - - 30 * col0 + col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5529
SELECT - - 30 * col0 + col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 98 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5531
SELECT ALL - col0 + + CAST( NULL AS SIGNED ) * + cor0.col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5531
SELECT ALL - col0 + + CAST ( NULL AS INTEGER ) * + cor0.col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + + ( + ( + col0 ) + col1 ) * col1 FROM tab0
----
12769
16291
9436

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT - cor0.col1 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL col2 + 31 * - col1 FROM tab0
----
-2633
-2739
-3006

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5536
SELECT ALL + CAST( + 70 AS SIGNED ) + col0 col1 FROM tab1
----
134
150
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5536
SELECT ALL + CAST ( + 70 AS INTEGER ) + col0 col1 FROM tab1
----
134
150
73

query I rowsort
SELECT - 68 FROM tab1, tab1 cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) * + col2 col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col1 AS REAL ) + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + col2 * + cor0.col0 * + col1 + - 21 * col2 + col1 FROM tab0 AS cor0
----
3471
662487
67505

query I rowsort
SELECT DISTINCT + 83 * + col1 AS col2 FROM tab2 AS cor0
----
1411
2573
4897

query I rowsort
SELECT ( cor0.col2 ) * col2 + + col0 AS col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 * col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT ALL 34 + ( - col0 ) FROM tab0 AS cor0
----
-1
-55
10

query I rowsort
SELECT + tab1.col2 * - col1 FROM tab1 WHERE ( - tab1.col2 * col1 ) < ( tab1.col1 + - tab1.col1 )
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col0 + - col0 * col0 FROM tab2
----
-42
-6006
-6162

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL <= - col1
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 >= col2 * col2
----
24
86
33
89
91
82

query III rowsort
SELECT * FROM tab0 WHERE NOT + col0 < NULL
----

query I rowsort
SELECT col0 + col0 + - col1 * col0 FROM tab0
----
-2016
-3325
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5551
SELECT - tab1.col1 DIV + tab1.col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5551
SELECT - tab1.col1 / + tab1.col1 FROM tab1
----
-1
-1
-1

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <= col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 + + cor0.col2 + col0 col2 FROM tab0 AS cor0
----
1261
633
8092

query I rowsort
SELECT DISTINCT + + cor0.col0 + + col0 FROM tab1 AS cor0
----
128
160
6

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT - col2 * - col1 = NULL
----

query I rowsort
SELECT ALL col0 - + col0 FROM tab2 WHERE NOT + col1 <= NULL
----

query I rowsort
SELECT + col1 + + col0 * - col1 AS col1 FROM tab0 WHERE - col2 BETWEEN ( NULL ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5558
SELECT - col0 + col2 DIV col1 FROM tab1 AS cor0
----
-1
-59
-73

skipif mysql # not compatible
query I rowsort label-5558
SELECT - col0 + col2 / col1 FROM tab1 AS cor0
----
-1
-59
-73

query I rowsort
SELECT col2 + - 78 * 20 FROM tab2
----
-1522
-1533
-1534

query I rowsort
SELECT - col0 * col1 + + 32 * - col1 AS col1 FROM tab0 AS cor0
----
-11011
-4816
-6499

onlyif mysql # use DIV operator for integer division
query I rowsort label-5561
SELECT + col0 + ( + cor0.col2 ) DIV col1 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5561
SELECT + col0 + ( + cor0.col2 ) / col1 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col0 * - col1 + 65 FROM tab2 cor0
----
1408
282
4667

query I rowsort
SELECT + col0 + + ( 32 ) FROM tab0 AS cor0
----
121
56
67

query I rowsort
SELECT ALL + ( - col2 ) + + col0 * + col1 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5565
SELECT ALL - + CAST( + col1 AS SIGNED ) AS col1 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5565
SELECT ALL - + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - 24 * + ( col0 ) + col1 AS col1 FROM tab0 cor0
----
-2045
-490
-743

query I rowsort
SELECT DISTINCT - 80 * + 71 AS col2 FROM tab2 AS cor0
----
-5680

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-5569
SELECT - + col1 DIV + col0 AS col1 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-5569
SELECT - + col1 / + col0 AS col1 FROM tab1 AS cor0
----
-8
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col1 ) * + col1 + - col2 col1 FROM tab0 AS cor0
----
7363
8199
9408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5571
SELECT ALL ( - 74 ) * col2 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5571
SELECT ALL ( - 74 ) * col2 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query III rowsort
SELECT * FROM tab0 WHERE NOT ( - col1 ) IN ( + col2 + + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT + ( col2 ) + 42 * 26 * col1 AS col0 FROM tab0 AS cor0
----
105925
93945
99454

query I rowsort
SELECT ALL + - col0 * 62 + col0 FROM tab1 AS cor0
----
-183
-3904
-4880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT ALL - - col0 + - col1 * + col2 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - col1 + ( + 65 ) * - col1 AS col0 FROM tab2 AS cor0
----
-1122
-2046
-3894

query I rowsort
SELECT ALL + + col0 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - cor0.col0 + ( - col1 ) AS col1 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + - col2 * + col0 + ( col0 ) * col0 FROM tab1 AS cor0
----
-1280
-153
448

query I rowsort
SELECT - cor0.col2 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col2 + ( 43 ) AS col0 FROM tab1 AS cor0
----
-11
-14
-53

query I rowsort
SELECT 9 + - col0 * + ( - 73 ) - + col1 * tab2.col0 FROM tab2
----
1101
303
4433

query I rowsort
SELECT - 17 - + tab1.col1 * 82 AS col1 FROM tab1
----
-1083
-2149
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 * - tab2.col1 col2 FROM tab2
----
-1180
-340
-620

query I rowsort
SELECT - - 68 + - cor0.col0 + col0 AS col2 FROM tab2 AS cor0
----
68
68
68

query I rowsort
SELECT DISTINCT 83 AS col2 FROM tab0, tab2 AS cor0
----
83

query I rowsort
SELECT DISTINCT 53 * col1 + col1 AS col2 FROM tab0 AS cor0
----
4644
4914
5238

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) AS col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + col1 * + col2 + - col1 * - col0 + col2 FROM tab1 AS cor0
----
1267
1536
2384

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0, tab1 cor2
----
3645 values hashing to 9044210e7dc2a764fe944d925f222728

query I rowsort
SELECT cor0.col1 * 24 - tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 7a6877368ffd52b4e0a5d9cbd8fa4444

query I rowsort
SELECT + col1 + - ( - 67 ) AS col2 FROM tab1
----
77
80
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5594
SELECT - ( + 78 ) DIV - tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5d6d039eb17fe8a59085894f90e47088

skipif mysql # not compatible
query I rowsort label-5594
SELECT - ( + 78 ) / - tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5d6d039eb17fe8a59085894f90e47088

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - 38 * tab0.col2 col1 FROM tab0
----
-1278
-3205
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5596
SELECT ALL + CAST( col2 AS SIGNED ) * col2 FROM tab1
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-5596
SELECT ALL + CAST ( col2 AS INTEGER ) * col2 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5597
SELECT ALL + col2 + - 86 * col1 DIV cor0.col2 + col0 AS col2 FROM tab1 AS cor0
----
106
16
165

skipif mysql # not compatible
query I rowsort label-5597
SELECT ALL + col2 + - 86 * col1 / cor0.col2 + col0 AS col2 FROM tab1 AS cor0
----
106
16
165

query I rowsort
SELECT ALL ( - col2 ) - - col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - 45 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query I rowsort
SELECT DISTINCT col1 + col1 * - 94 - - tab0.col2 FROM tab0
----
-7965
-8381
-9020

onlyif mysql # use DIV operator for integer division
query I rowsort label-5601
SELECT + tab0.col1 + col0 * col2 DIV + col1 + + col2 FROM tab0
----
128
253
98

skipif mysql # not compatible
query I rowsort label-5601
SELECT + tab0.col1 + col0 * col2 / + col1 + + col2 FROM tab0
----
128
253
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5602
SELECT - col2 DIV col0 col1 FROM tab1
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5602
SELECT - col2 / col0 col1 FROM tab1
----
-1
-18
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5603
SELECT + col1 DIV col1 - + col2 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-5603
SELECT + col1 / col1 - + col2 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT tab0.col1 + + col1 * tab0.col1 FROM tab0
----
7482
8372
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 * col1 - 14 col0 FROM tab2
----
1520
632
823

query I rowsort
SELECT DISTINCT + 77 * - col1 FROM tab1 AS cor0
----
-1001
-2002
-770

query I rowsort
SELECT DISTINCT - + col2 * - col0 * ( + 68 ) AS col1 FROM tab0 AS cor0
----
2380
496264
53856

query I rowsort
SELECT DISTINCT 68 + + col1 AS col1 FROM tab0
----
154
159
165

query I rowsort
SELECT - ( col2 * - tab1.col2 ) + col2 + col1 AS col2 FROM tab1
----
2996
3316
9325

query I rowsort
SELECT ALL - col1 + col0 * 90 FROM tab1
----
244
5750
7187

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 18 AS REAL ) * cor0.col0 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 5fc2939f29fdc1943314a40a3a2a9a58

query I rowsort
SELECT - cor0.col0 + + 92 + col1 AS col0 FROM tab2 AS cor0
----
116
30
73

query I rowsort
SELECT - col1 + - 21 FROM tab1 AS cor0
----
-31
-34
-47

query I rowsort
SELECT ALL + col1 + - 73 * col2 FROM tab0 cor0
----
-2323
-5895
24

query I rowsort
SELECT DISTINCT + + cor0.col0 * - 1 + - ( col2 * col1 ) FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-5616
SELECT + + col1 + - col0 DIV 81 + col2 col0 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5616
SELECT + + col1 + - col0 / 81 + col2 col0 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 80 + + col0 * - col0 * cor0.col0 + - col0 * + cor0.col2 col1 FROM tab2 AS cor0
----
-471860
-494681
1948

query I rowsort
SELECT ALL + cor0.col1 * 26 AS col0 FROM tab1 AS cor0
----
260
338
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5619
SELECT DISTINCT - col1 / - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5619
SELECT DISTINCT - col1 / - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + col2 * - col1 + + col1 * + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5621
SELECT DISTINCT - + col1 * - CAST( NULL AS SIGNED ) + + 61 * + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5621
SELECT DISTINCT - + col1 * - CAST ( NULL AS INTEGER ) + + 61 * + col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 + - 82 FROM tab1 AS cor0
----
-56
-69
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5623
SELECT + + col2 DIV - col1 + cor0.col0 + col2 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-5623
SELECT + + col2 / - col1 + cor0.col0 + col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5624
SELECT ALL col1 * tab1.col2 - col0 DIV 68 FROM tab1
----
1247
1404
570

skipif mysql # not compatible
query I rowsort label-5624
SELECT ALL col1 * tab1.col2 - col0 / 68 FROM tab1
----
1247
1404
570

query I rowsort
SELECT DISTINCT ( + col0 ) * + col1 - col2 FROM tab1
----
24
583
944

query I rowsort
SELECT col1 + - ( + col2 ) FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + + col0 * col1 * col1 AS col2 FROM tab1 AS cor0
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-5628
SELECT ALL - col2 * + 62 + - 62 DIV + cor0.col2 FROM tab1 AS cor0
----
-3349
-3535
-5952

skipif mysql # not compatible
query I rowsort label-5628
SELECT ALL - col2 * + 62 + - 62 / + cor0.col2 FROM tab1 AS cor0
----
-3349
-3535
-5952

query I rowsort
SELECT ALL + cor0.col1 * - col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col2 * col1 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT + col0 + - col1 + - cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
-159
-2900
-7464

query I rowsort
SELECT ALL + col2 + + col1 * tab0.col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT + cor0.col2 * - col2 * col0 + col1 FROM tab0 AS cor0
----
-26050
-598345
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5634
SELECT ALL col0 * col2 DIV col0 + tab2.col2 FROM tab2
----
52
54
76

skipif mysql # not compatible
query I rowsort label-5634
SELECT ALL col0 * col2 / col0 + tab2.col2 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT + col1 - - cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + + col0 + + cor0.col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5637
SELECT DISTINCT - - col2 DIV + col2 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-5637
SELECT DISTINCT - - col2 / + col2 FROM tab0 cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 * col0 col2 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-5639
SELECT ALL + - ( col2 ) DIV col2 + col2 * col1 AS col1 FROM tab1 AS cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-5639
SELECT ALL + - ( col2 ) / col2 + col2 * col1 AS col1 FROM tab1 AS cor0
----
1247
1403
569

query I rowsort
SELECT ALL + col1 * + col0 - col0 * col2 AS col2 FROM tab2 AS cor0
----
-1659
2574
28

query I rowsort
SELECT + - 62 + col2 AS col1 FROM tab1 AS cor0
----
-5
-8
34

query I rowsort
SELECT ALL + - 1 * - col1 + cor0.col1 * cor0.col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT + + 20 * col1 * col0 FROM tab2 cor0
----
26860
4340
92040

query I rowsort
SELECT ALL - col1 * cor0.col0 - + col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT + - cor0.col2 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 84 col2 FROM tab2
----
84
84
84

query I rowsort
SELECT 99 * + cor0.col2 FROM tab0 AS cor0
----
3267
8118
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * cor0.col2 * + ( col2 ) + col1 col0 FROM tab0 AS cor0
----
194
611975
93740

query I rowsort
SELECT - ( col0 ) * col1 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT + ( - col0 * + col1 + - ( col1 ) ) FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT DISTINCT col2 * - col0 * cor0.col1 - - col2 * - col1 AS col2 FROM tab2 AS cor0
----
-121186
-51680
-6696

query I rowsort
SELECT + 69 + cor0.col1 FROM tab1 AS cor0
----
79
82
95

query I rowsort
SELECT DISTINCT - col0 + + 3 * col0 + col0 FROM tab1
----
192
240
9

query I rowsort
SELECT - - 82 * ( + cor0.col1 ) + col0 AS col0 FROM tab0 AS cor0
----
7076
7551
7989

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to 48b1d5d88e8ac6a6daea5a8e5606f112

query I rowsort
SELECT col2 + - tab2.col1 * + col2 + + col0 FROM tab2
----
-1430
-529
-803

query I rowsort
SELECT col1 * ( + cor0.col1 ) FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT col2 * 64 + - col1 AS col1 FROM tab1 AS cor0
----
3430
3638
6131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5659
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5659
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + 66 * col2 * col2 AS col2 FROM tab0
----
443784
66
71874

query I rowsort
SELECT ALL ( + 56 * + tab1.col2 ) FROM tab1
----
3024
3192
5376

query I rowsort
SELECT + - 34 * col1 FROM tab2 cor0
----
-1054
-2006
-578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * 81 col0 FROM tab0
----
1944
2835
7209

query I rowsort
SELECT cor0.col2 * cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL + col0 + - col1 * col2 * 83 FROM tab2 AS cor0
----
-127244
-53539
-69464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + col0 col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col2 * + col1 + tab1.col0 AS col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT ALL cor1.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5669
SELECT - 84 * - col0 + col1 * 97 + + 97 * col1 DIV col1 FROM tab0 AS cor0
----
10455
12446
16400

skipif mysql # not compatible
query I rowsort label-5669
SELECT - 84 * - col0 + col1 * 97 + + 97 * col1 / col1 FROM tab0 AS cor0
----
10455
12446
16400

query I rowsort
SELECT + col1 + + col0 * col0 FROM tab0 cor0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + 47 col2 FROM tab2
----
73
74
85

query I rowsort
SELECT DISTINCT - 48 FROM tab0, tab1 AS cor0
----
-48

query I rowsort
SELECT ALL - 66 + col1 * col0 * + 68 FROM tab1
----
43454
5238
70654

query I rowsort
SELECT - + tab0.col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL - 74 * - col1 + 84 + 8 AS col0 FROM tab1
----
1054
2016
832

query I rowsort
SELECT ALL ( - col0 ) + col2 + - 2 * - col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + - 19 * - col0 FROM tab1 AS cor0
----
1216
1520
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 90 col1 FROM tab2 AS cor0
----
-90
-90
-90

query I rowsort
SELECT - col0 + col1 + - 68 FROM tab1 AS cor0
----
-122
-135
-45

query I rowsort
SELECT - - 48 + + col1 + ( + col2 ) * - col0 FROM tab0 AS cor0
----
-658
-7159
110

query I rowsort
SELECT DISTINCT + - 36 * - cor0.col0 * col0 FROM tab0 AS cor0
----
20736
285156
44100

query I rowsort
SELECT ALL 2 * - 57 FROM tab1, tab1 AS cor0
----
9 values hashing to 12b2d2a7b2701d250793754d86c57f73

query I rowsort
SELECT col0 * - ( col2 ) * col1 - + col0 * 94 AS col2 FROM tab1
----
-107360
-42496
-4494

query I rowsort
SELECT - cor0.col2 * - col0 * + col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT 16 - 94 FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT ALL - - col1 + cor0.col2 * + col0 AS col2 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT - col0 * cor0.col0 * - col0 + + col1 AS col1 FROM tab2 cor0
----
374
474611
493056

onlyif mysql # use DIV operator for integer division
query I rowsort label-5688
SELECT DISTINCT col0 + + ( col0 ) DIV + col1 AS col2 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5688
SELECT DISTINCT col0 + + ( col0 ) / + col1 AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + col2 - + cor0.col1 * - col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 + + col0 + col1 FROM tab2 AS cor0
----
-11
-5947
-6145

query I rowsort
SELECT ALL - + 75 + - col0 * cor0.col1 FROM tab2 AS cor0
----
-1418
-292
-4677

query I rowsort
SELECT - - col0 + + col1 * - col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL 81 * + 49 FROM tab2 AS cor0
----
3969
3969
3969

onlyif mysql # use DIV operator for integer division
query I rowsort label-5694
SELECT col0 DIV ( - cor0.col0 ) FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5694
SELECT col0 / ( - cor0.col0 ) FROM tab2 cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5695
SELECT - + CAST( NULL AS SIGNED ) * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5695
SELECT - + CAST ( NULL AS INTEGER ) * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5696
SELECT ALL + col0 DIV + ( + col2 ) AS col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5696
SELECT ALL + col0 / + ( + col2 ) AS col2 FROM tab1
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5697
SELECT ALL - ( - 98 ) DIV - col2 - ( 53 ) AS col2 FROM tab0 cor0
----
-151
-54
-55

skipif mysql # not compatible
query I rowsort label-5697
SELECT ALL - ( - 98 ) / - col2 - ( 53 ) AS col2 FROM tab0 cor0
----
-151
-54
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + col0 * col1 * + ( + cor0.col0 ) col2 FROM tab0 cor0
----
118922
49622
720902

query I rowsort
SELECT ALL - + ( - col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 98 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT ALL - col1 * - 16 AS col1 FROM tab1 AS cor0
----
160
208
416

query I rowsort
SELECT DISTINCT col2 + 27 * 17 FROM tab1 cor0
----
513
516
555

query I rowsort
SELECT - + cor0.col1 * + 51 + 25 AS col1 FROM tab0 cor0
----
-4361
-4616
-4922

onlyif mysql # use DIV operator for integer division
query I rowsort label-5704
SELECT col0 DIV 27 - col1 AS col2 FROM tab0
----
-86
-88
-96

skipif mysql # not compatible
query I rowsort label-5704
SELECT col0 / 27 - col1 AS col2 FROM tab0
----
-86
-88
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 * - col2 col0 FROM tab2
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-5706
SELECT + 31 + - col1 DIV - col1 FROM tab2 cor0
----
32
32
32

skipif mysql # not compatible
query I rowsort label-5706
SELECT + 31 + - col1 / - col1 FROM tab2 cor0
----
32
32
32

query I rowsort
SELECT DISTINCT 74 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
74

query I rowsort
SELECT ALL - col0 + - 57 * col0 AS col1 FROM tab1
----
-174
-3712
-4640

query I rowsort
SELECT ALL 7 AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT DISTINCT + col1 + col2 DIV + col1 FROM tab1 cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-5710
SELECT DISTINCT + col1 + col2 / + col1 FROM tab1 cor0
----
15
20
28

query I rowsort
SELECT ALL - col1 + - col0 * + col0 * col1 AS col1 FROM tab2 AS cor0
----
-106114
-1550
-359015

query I rowsort
SELECT ALL + col0 + - 14 + tab1.col0 AS col1 FROM tab1
----
-8
114
146

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col0 FROM tab0, tab2 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - 10 + - col2 * + 35 FROM tab2 AS cor0
----
-1340
-920
-955

query I rowsort
SELECT + col1 * + col1 + + col0 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT ALL - 33 * 11 AS col2 FROM tab0
----
-363
-363
-363

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5717
SELECT CAST( NULL AS SIGNED ) / - col0 + - col0 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5717
SELECT CAST ( NULL AS INTEGER ) / - col0 + - col0 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 7 * - col0 FROM tab0 cor0
----
-168
-245
-623

onlyif mysql # use DIV operator for integer division
query I rowsort label-5719
SELECT + 27 DIV + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5719
SELECT + 27 / + col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 + col1 * 58 FROM tab0 cor0
----
5074
5369
5723

query I rowsort
SELECT + col2 * col1 + col0 - 22 AS col0 FROM tab2 AS cor0
----
1590
703
822

query I rowsort
SELECT DISTINCT + + cor0.col0 * col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 16 + cor0.col0 AS col1 FROM tab1 AS cor0
----
19
80
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5724
SELECT - cor0.col2 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5724
SELECT - cor0.col2 / cor0.col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT ALL 98 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT col0 + col2 * 85 * col2 AS col1 FROM tab2
----
122819
57538
61972

onlyif mysql # use DIV operator for integer division
query I rowsort label-5727
SELECT col2 DIV - col0 + col0 AS col1 FROM tab0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-5727
SELECT col2 / - col0 + col0 AS col1 FROM tab0
----
23
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5728
SELECT col0 * col0 + - CAST( col0 AS SIGNED ) FROM tab0
----
1190
552
7832

skipif mysql # not compatible
query I rowsort label-5728
SELECT col0 * col0 + - CAST ( col0 AS INTEGER ) FROM tab0
----
1190
552
7832

query I rowsort
SELECT DISTINCT + 52 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
52

query I rowsort
SELECT ALL 68 + col2 FROM tab0 AS cor0
----
101
150
69

query I rowsort
SELECT + 53 + + cor0.col0 FROM tab0 AS cor0
----
142
77
88

query I rowsort
SELECT DISTINCT ( + col0 + - col1 ) AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL - 29 AS col1 FROM tab2
----
-29
-29
-29

query I rowsort
SELECT ALL + + col2 * + col2 + col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT - - col2 * col0 + 67 * col0 FROM tab0 AS cor0
----
13261
2380
2400

query I rowsort
SELECT ALL cor0.col2 * ( - col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5737
SELECT col0 + - CAST( NULL AS SIGNED ) / - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5737
SELECT col0 + - CAST ( NULL AS INTEGER ) / - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5738
SELECT cor0.col0 + - CAST( col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-5738
SELECT cor0.col0 + - CAST ( col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + col2 * + col2 * - 86 - - col0 FROM tab2 AS cor0
----
-124105
-58058
-62687

onlyif mysql # use DIV operator for integer division
query I rowsort label-5740
SELECT col0 DIV - 62 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-5740
SELECT col0 / - 62 FROM tab2 AS cor0
----
-1
-1
0

query I rowsort
SELECT + + col0 * + 21 AS col1 FROM tab0 AS cor0
----
1869
504
735

query I rowsort
SELECT + col2 * + ( ( - col1 ) ) - cor0.col2 FROM tab0 AS cor0
----
-2871
-7544
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5743
SELECT ALL - 20 DIV col0 + + col0 FROM tab2 AS cor0
----
5
78
79

skipif mysql # not compatible
query I rowsort label-5743
SELECT ALL - 20 / col0 + + col0 FROM tab2 AS cor0
----
5
78
79

query I rowsort
SELECT DISTINCT - col2 * + col1 * col1 + - col1 * col2 + - cor0.col1 AS col0 FROM tab1 cor0
----
-17485
-37934
-6280

query I rowsort
SELECT ALL + cor0.col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL + col1 * - cor0.col1 * col2 AS col0 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT - + ( col2 ) * - col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - ( + col0 ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + - 69 + col0 AS col2 FROM tab0 AS cor0
----
-34
-45
20

query I rowsort
SELECT ALL + col2 * + cor0.col2 - + col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT ALL - - 42 + + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
1576
688
879

query I rowsort
SELECT - 5 * col2 AS col1 FROM tab1 AS cor0
----
-270
-285
-480

query I rowsort
SELECT DISTINCT col2 * cor0.col0 + - col1 + - col1 AS col0 FROM tab0 AS cor0
----
-159
620
7116

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5754
SELECT CAST( + col2 AS SIGNED ) + + tab0.col2 FROM tab0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-5754
SELECT CAST ( + col2 AS INTEGER ) + + tab0.col2 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT + col1 * - tab2.col2 AS col1 FROM tab2
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5756
SELECT col0 * CAST( NULL AS SIGNED ) * + tab0.col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5756
SELECT col0 * CAST ( NULL AS INTEGER ) * + tab0.col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab0.col2 + - col2 * col1 FROM tab0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * - ( 62 ) - - col1 col1 FROM tab2
----
-1553
-1643
-2339

query I rowsort
SELECT + col1 - 4 AS col0 FROM tab1
----
22
6
9

query I rowsort
SELECT - col1 + - col1 + - col0 * col2 * - ( + col0 ) FROM tab2 AS cor0
----
1261
158066
237124

query I rowsort
SELECT + col1 * 57 + col0 FROM tab1
----
1485
634
821

query I rowsort
SELECT + col0 + + ( 22 ) FROM tab2 AS cor0
----
100
101
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 + col0 col0 FROM tab0 AS cor0
----
15
69
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5764
SELECT + col2 DIV col0 + - col2 * - col2 + - col1 * + col0 col1 FROM tab0 AS cor0
----
-1375
-3394
-974

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5764
SELECT + col2 / col0 + - col2 * - col2 + - col1 * + col0 col1 FROM tab0 AS cor0
----
-1375
-3394
-974

query I rowsort
SELECT + + ( - 8 ) * + col0 FROM tab0 AS cor0
----
-192
-280
-712

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5766
SELECT ALL - CAST( col1 AS SIGNED ) * - cor0.col1 + + CAST( NULL AS SIGNED ) / - 8 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5766
SELECT ALL - CAST ( col1 AS INTEGER ) * - cor0.col1 + + CAST ( NULL AS INTEGER ) / - 8 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * ( cor0.col1 ) * + col0 + - col1 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
170108
319906
728728

query I rowsort
SELECT - + col2 + + col1 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + col0 + cor0.col2 + cor0.col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT DISTINCT 74 + col1 FROM tab1 AS cor0
----
100
84
87

query I rowsort
SELECT DISTINCT + col1 * + col1 + - col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT col0 + col2 * col2 AS col1 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5773
SELECT - col2 * col1 - CAST( NULL AS SIGNED ) * - 41 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5773
SELECT - col2 * col1 - CAST ( NULL AS INTEGER ) * - 41 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + cor0.col0 ) - col2 col0 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT 61 * + cor0.col0 AS col0 FROM tab0 cor0
----
1464
2135
5429

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * ( + col1 ) col2 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort
SELECT ALL cor0.col0 * - CAST ( col2 AS REAL ) + - col1 + + ( - col2 + col2 ) FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT - 70 * col2 FROM tab2
----
-1820
-1890
-2660

onlyif mysql # use DIV operator for integer division
query I rowsort label-5779
SELECT 77 DIV col2 FROM tab0
----
0
2
77

skipif mysql # not compatible
query I rowsort label-5779
SELECT 77 / col2 FROM tab0
----
0
2
77

query I rowsort
SELECT DISTINCT cor0.col1 * 48 + ( - col0 * 48 ) FROM tab2 AS cor0
----
-2976
-912
1152

onlyif mysql # use DIV operator for integer division
query I rowsort label-5781
SELECT ALL + - col0 DIV 12 - + cor0.col2 DIV + col0 FROM tab2 AS cor0
----
-3
-6
-6

skipif mysql # not compatible
query I rowsort label-5781
SELECT ALL + - col0 / 12 - + cor0.col2 / + col0 FROM tab2 AS cor0
----
-3
-6
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5782
SELECT ALL col0 * - CAST( NULL AS SIGNED ) + + ( col0 ) + col0 * + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5782
SELECT ALL col0 * - CAST ( NULL AS INTEGER ) + + ( col0 ) + col0 * + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + ( + 27 ) FROM tab2 AS cor0
----
53
54
65

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 - + col2 * - col2 AS col1 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT + col0 * + col1 - + 13 FROM tab2 AS cor0
----
1330
204
4589

query I rowsort
SELECT ALL + col1 * ( - cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col2 - ( col0 ) AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + - cor0.col0 * + 39 * + col2 - col0 * ( col0 * + col0 ) FROM tab2 AS cor0
----
-553644
-610117
-7714

query I rowsort
SELECT DISTINCT col0 + ( - 24 ) * - cor0.col0 + + 7 FROM tab2 AS cor0
----
182
1957
1982

query I rowsort
SELECT ALL ( col0 ) * 88 * - 64 AS col2 FROM tab0
----
-135168
-197120
-501248

query I rowsort
SELECT DISTINCT - col0 * + 88 * 72 AS col0 FROM tab2 AS cor0
----
-44352
-494208
-500544

query I rowsort
SELECT ALL col0 - tab0.col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT + + 89 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT + col0 + + col2 * - col0 AS col0 FROM tab0 cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + col1 * - 18 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT ALL col2 + col1 + - col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - ( - cor0.col1 ) * cor0.col2 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT col0 + - col0 * 48 + tab0.col2 FROM tab0
----
-1095
-1644
-4101

query I rowsort
SELECT DISTINCT ( col2 ) * 86 AS col2 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT - - cor0.col0 + + cor0.col2 * + ( + col0 ) AS col2 FROM tab2 AS cor0
----
196
2106
3081

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 DISTINCT + 15 + + 50 FROM tab2
----
65

query I rowsort
SELECT DISTINCT 67 * col0 + col2 + 72 * col0 FROM tab0
----
12453
3369
4866

query I rowsort
SELECT ALL + 41 AS col0 FROM tab2
----
41
41
41

query I rowsort
SELECT ALL - - cor0.col1 * - col2 + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab1 AS cor0
----
-96

query I rowsort
SELECT DISTINCT - - col2 + - 89 FROM tab0 AS cor0
----
-56
-7
-88

query I rowsort
SELECT ALL col1 + + col0 * cor0.col2 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-5810
SELECT DISTINCT - col2 - - col0 DIV - cor0.col2 AS col1 FROM tab1 cor0
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-5810
SELECT DISTINCT - col2 - - col0 / - cor0.col2 AS col1 FROM tab1 cor0
----
-54
-58
-96

query I rowsort
SELECT + col2 * 18 FROM tab1 AS cor0
----
1026
1728
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-5812
SELECT DISTINCT + + 20 + col1 DIV col2 col0 FROM tab0 AS cor0
----
117
21
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5812
SELECT DISTINCT + + 20 + col1 / col2 col0 FROM tab0 AS cor0
----
117
21
22

query I rowsort
SELECT - + ( - col0 ) * - col0 + + 99 FROM tab0 AS cor0
----
-1126
-477
-7822

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5814
SELECT ALL CAST( + 12 AS SIGNED ) + col2 FROM tab0 cor0
----
13
45
94

skipif mysql # not compatible
query I rowsort label-5814
SELECT ALL CAST ( + 12 AS INTEGER ) + col2 FROM tab0 cor0
----
13
45
94

query I rowsort
SELECT col2 * - 72 AS col2 FROM tab2 AS cor0
----
-1872
-1944
-2736

query I rowsort
SELECT ALL + ( - 67 ) * + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-1745
-734
-951

onlyif mysql # use DIV operator for integer division
query I rowsort label-5817
SELECT DISTINCT + ( col2 ) DIV + col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5817
SELECT DISTINCT + ( col2 ) / + col1 FROM tab1 cor0
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5818
SELECT col1 * - col1 + CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5818
SELECT col1 * - col1 + CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 96 * - col2 AS col1 FROM tab1 cor0
----
5184
5472
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5820
SELECT ALL col2 DIV col2 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5820
SELECT ALL col2 / col2 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT 90 FROM tab2, tab1 cor0 CROSS JOIN tab0
----
90

query I rowsort
SELECT DISTINCT 78 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab2 cor1
----
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5823
SELECT - col2 DIV + 99 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5823
SELECT - col2 / + 99 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5824
SELECT + col2 * cor0.col0 * col0 + - col0 DIV col2 col1 FROM tab0 AS cor0
----
1190
19008
649521

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5824
SELECT + col2 * cor0.col0 * col0 + - col0 / col2 col1 FROM tab0 AS cor0
----
1190
19008
649521

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * ( col1 ) - col1 * cor0.col0 col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * 30 FROM tab1 AS cor0
----
1920
2400
90

query I rowsort
SELECT + ( - 64 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

query I rowsort
SELECT ALL col1 * + col2 + col2 FROM tab2 AS cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col0 + col0 * + col1 col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + + cor0.col1 + + 74 * - ( col2 ) FROM tab0 AS cor0
----
-2356
-5977
23

query I rowsort
SELECT ALL + col0 * + 37 + col2 - - col1 AS col1 FROM tab0 AS cor0
----
1007
1393
3466

query I rowsort
SELECT ALL - col2 - + col0 AS col1 FROM tab1 cor0
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( - col1 ) col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col0 * col0 * - 77 AS col2 FROM tab0
----
-44352
-609917
-94325

query I rowsort
SELECT 41 * - col1 AS col2 FROM tab2 AS cor0
----
-1271
-2419
-697

query I rowsort
SELECT cor1.col2 * 45 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to e67a930a3a3f65472df5898fde1f1255

query I rowsort
SELECT ALL + 30 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5838
SELECT ALL CAST( - col0 AS SIGNED ) AS col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5838
SELECT ALL CAST ( - col0 AS INTEGER ) AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL + col2 * col0 + tab1.col2 + col1 * - col0 FROM tab1
----
138
3065
6736

query I rowsort
SELECT DISTINCT 16 * col0 + 11 FROM tab1
----
1035
1291
59

query I rowsort
SELECT ALL 23 + col1 * - ( + col0 ) * col2 FROM tab2
----
-119629
-51011
-5836

onlyif mysql # use DIV operator for integer division
query I rowsort label-5842
SELECT ALL 38 DIV tab2.col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5842
SELECT ALL 38 / tab2.col1 FROM tab2
----
0
1
2

query I rowsort
SELECT ALL tab0.col1 + + 67 FROM tab0, tab0 cor0
----
9 values hashing to a4c5bf82c6e4a62bca64c27bb7120d7e

query I rowsort
SELECT - cor0.col1 + col1 + - col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - + col1 * + col2 * ( - col0 + 43 ) FROM tab2 AS cor0
----
-30132
23256
53690

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 * + col0 + + col0 + ( col2 ) col0 FROM tab2 AS cor0
----
-1289
-158080
-237041

query I rowsort
SELECT ALL col1 + 57 AS col0 FROM tab1 AS cor0
----
67
70
83

query I rowsort
SELECT col1 + - ( 22 ) FROM tab1 AS cor0
----
-12
-9
4

query I rowsort
SELECT + + col1 + 25 * + 41 FROM tab1 AS cor0
----
1035
1038
1051

query I rowsort
SELECT ALL + col1 * + ( + cor0.col2 ) FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + 63 * col1 AS col0 FROM tab1
----
1638
630
819

query I rowsort
SELECT - - col1 * col2 - col0 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT + 21 * - col2 AS col2 FROM tab1
----
-1134
-1197
-2016

query I rowsort
SELECT ALL 86 * + col1 FROM tab1
----
1118
2236
860

query I rowsort
SELECT col1 * - col1 + - 60 FROM tab1
----
-160
-229
-736

query I rowsort
SELECT - col2 * + col2 + col0 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT - - col0 - col0 * + 84 * ( + col0 * + col1 ) FROM tab0 AS cor0
----
-4161000
-60548035
-9981265

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 - + col0 col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT + ( - col1 ) - + ( + 27 + col0 * + col0 ) FROM tab1 AS cor0
----
-4133
-62
-6440

query I rowsort
SELECT - - 53 * - col1 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT ALL + - tab2.col1 FROM tab2, tab0 AS cor0, tab1, tab0 cor1
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5862
SELECT + col1 * + CAST( NULL AS DECIMAL ) * - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5862
SELECT + col1 * + CAST ( NULL AS REAL ) * - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + 15 AS col0 FROM tab0 AS cor0
----
101
106
112

query I rowsort
SELECT + 57 * col2 AS col1 FROM tab1 AS cor0
----
3078
3249
5472

query I rowsort
SELECT + col0 * + 57 AS col0 FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT + + ( 53 ) + col2 AS col0 FROM tab0 AS cor0
----
135
54
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5867
SELECT ALL + - CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5867
SELECT ALL + - CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5868
SELECT ALL CAST( - 22 AS SIGNED ) col0 FROM tab0 AS cor0
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5868
SELECT ALL CAST ( - 22 AS INTEGER ) col0 FROM tab0 AS cor0
----
-22
-22
-22

query I rowsort
SELECT cor0.col2 * + 54 + col0 * - ( - col1 ) FROM tab2 AS cor0
----
1675
3395
6006

query I rowsort
SELECT ALL + + col2 + col2 * - col1 AS col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL - + col0 + 34 AS col1 FROM tab2 AS cor0
----
-44
-45
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-5872
SELECT ALL ( - col1 ) * col1 + 75 * - col0 + + col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
-1482
-6214
-9331

skipif mysql # not compatible
query I rowsort label-5872
SELECT ALL ( - col1 ) * col1 + 75 * - col0 + + col1 / + col0 AS col1 FROM tab2 AS cor0
----
-1482
-6214
-9331

query I rowsort
SELECT ALL + 75 + - col0 * col2 * + col2 - + col2 FROM tab2 AS cor0
----
-114039
-5055
-52679

query I rowsort
SELECT DISTINCT cor0.col2 * col0 + col1 * col0 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT + ( + ( + col1 ) ) AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - 47 * 1 FROM tab2 AS cor0
----
-47

query I rowsort
SELECT ( col1 ) * + cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL col1 + col2 * - ( - 16 ) FROM tab2 AS cor0
----
463
475
625

query I rowsort
SELECT - col1 + + 78 AS col0 FROM tab1 AS cor0
----
52
65
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5880
SELECT DISTINCT col0 / + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5880
SELECT DISTINCT col0 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT col1 + + ( + col1 ) + + cor0.col1 AS col0 FROM tab1 AS cor0
----
30
39
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 + - cor0.col1 col0 FROM tab2, tab1 AS cor0
----
-41
-44
-57

query I rowsort
SELECT - - col2 * + col2 + col0 * - col1 AS col1 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT DISTINCT - 88 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5885
SELECT ALL - tab0.col1 DIV col2 AS col2 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5885
SELECT ALL - tab0.col1 / col2 AS col2 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT col1 * + col0 * - col1 + col0 AS col1 FROM tab1
----
-13440
-2025
-6336

query I rowsort
SELECT ALL + col1 * + col0 + - col1 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT DISTINCT - tab0.col0 * - col0 * col1 AS col1 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT ( 10 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
10

query I rowsort
SELECT ALL - - ( cor0.col2 ) + ( col2 ) * col0 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL - tab1.col1 * - ( + col1 ) * col2 AS col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT col1 + + ( col2 ) AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL ( - 68 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

query I rowsort
SELECT 22 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 + cor0.col0 col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL - ( + col1 ) * - col0 * 79 - cor0.col2 AS col2 FROM tab1 AS cor0
----
50503
6108
82064

query I rowsort
SELECT + col2 * cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + col1 * - col1 + col1 * ( - 93 * col1 ) FROM tab2 AS cor0
----
-27166
-327214
-90334

query I rowsort
SELECT DISTINCT col2 + 1 AS col0 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5901
SELECT + + CAST( - cor0.col2 AS SIGNED ) * - cor0.col1 + cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

skipif mysql # not compatible
query I rowsort label-5901
SELECT + + CAST ( - cor0.col2 AS INTEGER ) * - cor0.col1 + cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + + 56 + col2 * col2 FROM tab2 AS cor0
----
1500
732
785

query I rowsort
SELECT 98 + col2 * col1 AS col1 FROM tab1 AS cor0
----
1346
1502
668

query I rowsort
SELECT ALL + 14 * - col1 + cor0.col2 * + col1 FROM tab0 cor0
----
-1261
1634
6188

query I rowsort
SELECT ALL - 47 * + col1 AS col0 FROM tab2 cor0
----
-1457
-2773
-799

query I rowsort
SELECT + + 1 + + col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT - + col1 * - col0 + + col0 * + ( + col2 ) * 44 FROM tab2 AS cor0
----
133431
8533
93834

query I rowsort
SELECT ALL - - col0 * + col2 AS col1 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5909
SELECT ALL + - cor0.col0 DIV - col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5909
SELECT ALL + - cor0.col0 / - col2 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 11 col1 FROM tab1 AS cor0
----
11
11
11

query I rowsort
SELECT ALL + ( - col2 ) + + 67 AS col1 FROM tab0 AS cor0
----
-15
34
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5912
SELECT - 6 DIV + col2 AS col0 FROM tab0 AS cor0
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-5912
SELECT - 6 / + col2 AS col0 FROM tab0 AS cor0
----
-6
0
0

query I rowsort
SELECT DISTINCT + ( 5 ) * col1 + - 74 FROM tab2
----
11
221
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 * + col2 col2 FROM tab0 AS cor0
----
2805
7380
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 12 col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 77 + col2 col2 FROM tab1 AS cor0
----
131
134
173

query I rowsort
SELECT + + 81 AS col0 FROM tab0 AS cor0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col2 * col0 col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + - ( col2 ) * - col0 + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT 85 * col2 + + 16 FROM tab2 AS cor0
----
2226
2311
3246

query I rowsort
SELECT ALL - col2 * + tab2.col1 * col1 + col1 * - col0 * + col0 AS col0 FROM tab2
----
-117079
-27466
-449462

query I rowsort
SELECT + col0 + + cor0.col0 * 99 AS col2 FROM tab2 AS cor0
----
700
7800
7900

query I rowsort
SELECT ( - col1 + col0 * + col1 ) AS col1 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT - - 71 * + 37 + cor0.col2 FROM tab1 cor0
----
2681
2684
2723

query I rowsort
SELECT + col0 + + 42 * tab1.col1 - - col2 AS col1 FROM tab1
----
1149
541
722

query I rowsort
SELECT - + ( col2 ) - - col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5927
SELECT + col1 * ( + ( tab2.col0 ) ) + + CAST( - ( col1 ) + 42 AS SIGNED ) FROM tab2
----
1368
228
4585

skipif mysql # not compatible
query I rowsort label-5927
SELECT + col1 * ( + ( tab2.col0 ) ) + + CAST ( - ( col1 ) + 42 AS INTEGER ) FROM tab2
----
1368
228
4585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( 77 ) * col0 col1 FROM tab2
----
570
6065
6100

query I rowsort
SELECT DISTINCT - col1 * 7 + + col0 AS col0 FROM tab1
----
-11
-179
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 + col1 col1 FROM tab2
----
-158
-1969
-2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-5931
SELECT DISTINCT - col2 DIV + ( + tab0.col0 ) AS col2 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5931
SELECT DISTINCT - col2 / + ( + tab0.col0 ) AS col2 FROM tab0
----
-1
0

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT ALL - tab2.col2 * cor0.col2 * + 97 FROM tab2, tab2 AS cor0
----
9 values hashing to 25e19180fee0e20e005b0f09a762cd4b

query I rowsort
SELECT DISTINCT - - col1 + - ( col1 ) * - col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT + 49 + col2 - + col0 AS col2 FROM tab2 AS cor0
----
-3
69
8

query I rowsort
SELECT ALL - ( 84 ) AS col2 FROM tab1 AS cor0
----
-84
-84
-84

query I rowsort
SELECT + - cor0.col1 + - 17 AS col0 FROM tab2 AS cor0
----
-34
-48
-76

query I rowsort
SELECT - col0 - + cor0.col0 AS col2 FROM tab2 cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT col0 + cor0.col1 * col0 - col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - ( cor0.col1 ) * col2 + + 33 * col2 AS col2 FROM tab2 AS cor0
----
-676
54
608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( col1 ) + cor0.col1 - col1 * col1 col0 FROM tab2 AS cor0
----
-255
-3363
-899

query I rowsort
SELECT ALL - cor0.col2 + 60 * + col1 FROM tab0 AS cor0
----
5127
5378
5819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 + col1 col2 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5944
SELECT DISTINCT - - CAST( 86 AS SIGNED ) * col2 + 12 FROM tab1 AS cor0
----
4656
4914
8268

skipif mysql # not compatible
query I rowsort label-5944
SELECT DISTINCT - - CAST ( 86 AS INTEGER ) * col2 + 12 FROM tab1 AS cor0
----
4656
4914
8268

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + ( col2 ) AS REAL ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + + 24 + + col1 AS col1 FROM tab2 AS cor0
----
41
55
83

query I rowsort
SELECT DISTINCT col1 * + col2 * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - col1 * col2 + - 85 AS col0 FROM tab0 AS cor0
----
-182
-2923
-7547

query I rowsort
SELECT tab0.col1 FROM tab0, tab2, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ALL cor0.col0 + + 74 * col0 AS col2 FROM tab1 AS cor0
----
225
4800
6000

query I rowsort
SELECT DISTINCT - col0 - + ( col0 ) AS col2 FROM tab2 cor0
----
-14
-156
-158

query I rowsort
SELECT - col1 * + col1 + + col0 AS col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT col2 * - col2 * col1 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT + - col0 + col0 + - col0 * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + col1 * col0 - col2 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
-774
3298
637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5956
SELECT - - col0 + - CAST( NULL AS DECIMAL ) * - col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5956
SELECT - - col0 + - CAST ( NULL AS REAL ) * - col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 * + col1 FROM tab1
----
1000
17576
2197

query I rowsort
SELECT col1 + 11 AS col2 FROM tab2 AS cor0
----
28
42
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5959
SELECT col1 + col1 * col2 DIV - col0 + - 61 * col0 col2 FROM tab0 cor0
----
-1496
-2040
-5421

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5959
SELECT col1 + col1 * col2 / - col0 + - 61 * col0 col2 FROM tab0 cor0
----
-1496
-2040
-5421

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + ( 10 + col2 ) * - ( 3 ) col0 FROM tab1
----
-137
-189
-238

query I rowsort
SELECT col0 + ( 39 ) FROM tab0
----
128
63
74

query I rowsort
SELECT col2 * - col2 + 40 AS col2 FROM tab2
----
-1404
-636
-689

query I rowsort
SELECT - col2 + ( col2 ) FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5964
SELECT - tab1.col1 * - ( - col1 ) * - col1 + + CAST( 37 AS SIGNED ) AS col1 FROM tab1
----
1037
17613
2234

skipif mysql # not compatible
query I rowsort label-5964
SELECT - tab1.col1 * - ( - col1 ) * - col1 + + CAST ( 37 AS INTEGER ) AS col1 FROM tab1
----
1037
17613
2234

query I rowsort
SELECT - col2 - + 66 AS col1 FROM tab0
----
-148
-67
-99

query I rowsort
SELECT DISTINCT col1 + + 75 * - col0 FROM tab2
----
-494
-5791
-5908

query I rowsort
SELECT ALL - col2 + - ( col1 ) * col1 AS col1 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT ALL - col0 * 60 + 28 + - col2 FROM tab2
----
-419
-4678
-4750

query I rowsort
SELECT DISTINCT 61 * 54 AS col0 FROM tab1, tab2 cor0
----
3294

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 * + col2 FROM tab2 cor0
----
162
2002
2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5971
SELECT + CAST( NULL AS SIGNED ) * col0 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5971
SELECT + CAST ( NULL AS INTEGER ) * col0 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 43 + - col1 col0 FROM tab1 AS cor0
----
17
30
33

query I rowsort
SELECT + - col0 * - 29 FROM tab1 AS cor0
----
1856
2320
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( 0 ) * - col0 col2 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5975
SELECT + CAST( NULL AS SIGNED ) / cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5975
SELECT + CAST ( NULL AS INTEGER ) / cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * + col0 + + col2 + + col0 AS col2 FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT - col1 * + cor0.col1 * + col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

query I rowsort
SELECT ALL 36 * + col0 AS col2 FROM tab0 AS cor0
----
1260
3204
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5979
SELECT ALL - + CAST( col0 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-5979
SELECT ALL - + CAST ( col0 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5980
SELECT col0 + - col2 DIV + ( + col1 ) FROM tab1
----
1
59
73

skipif mysql # not compatible
query I rowsort label-5980
SELECT col0 + - col2 / + ( + col1 ) FROM tab1
----
1
59
73

query I rowsort
SELECT - col2 * cor0.col2 + 64 FROM tab2 AS cor0
----
-1380
-612
-665

query I rowsort
SELECT DISTINCT - 82 AS col1 FROM tab1 cor0
----
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col1 + ( - col0 ) + col1 * + ( col0 * col1 + - col0 ) col2 FROM tab0 AS cor0
----
172578
325788
721359

query I rowsort
SELECT DISTINCT + + 40 * col2 * + col1 - - 71 * + col2 * 74 FROM tab2 AS cor0
----
175338
197964
225492

query I rowsort
SELECT col2 * col0 - ( col2 ) FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL - - 26 * - cor0.col2 * - col2 FROM tab1 AS cor0
----
239616
75816
84474

query I rowsort
SELECT - col1 * cor0.col2 - 52 FROM tab0 AS cor0
----
-149
-2890
-7514

query I rowsort
SELECT - cor0.col1 * col2 + + ( + cor0.col2 ) FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL col2 * cor0.col2 * col0 + col2 FROM tab0 AS cor0
----
26169
36
598518

query I rowsort
SELECT - - cor0.col1 + + col1 * col1 + col1 * ( 38 ) * col0 AS col0 FROM tab1 AS cor0
----
24430
3666
39702

query I rowsort
SELECT DISTINCT - col1 + ( 53 + + col1 ) FROM tab0 AS cor0
----
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5992
SELECT + col2 * 88 + - col0 + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5992
SELECT + col2 * 88 + - col0 + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5993
SELECT ALL 37 DIV + 81 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5993
SELECT ALL 37 / + 81 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 * - ( col0 ) col0 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5995
SELECT + cor0.col1 + 42 * col0 DIV col1 FROM tab2 AS cor0
----
114
212
40

skipif mysql # not compatible
query I rowsort label-5995
SELECT + cor0.col1 + 42 * col0 / col1 FROM tab2 AS cor0
----
114
212
40

query I rowsort
SELECT DISTINCT - - cor0.col2 + col1 * col1 FROM tab1 cor0
----
157
265
730

query I rowsort
SELECT + + 64 * + col0 * col1 FROM tab0 AS cor0
----
132096
217280
518336

query I rowsort
SELECT DISTINCT + - 38 * - col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT ALL tab0.col2 + + col0 + - tab0.col0 * tab0.col0 AS col2 FROM tab0
----
-1189
-519
-7750

query I rowsort
SELECT + 81 + + col0 AS col2 FROM tab0
----
105
116
170

onlyif mysql # use DIV operator for integer division
query I rowsort label-6001
SELECT - col0 + col1 DIV 29 AS col0 FROM tab0 AS cor0
----
-22
-32
-86

skipif mysql # not compatible
query I rowsort label-6001
SELECT - col0 + col1 / 29 AS col0 FROM tab0 AS cor0
----
-22
-32
-86

query I rowsort
SELECT DISTINCT + 17 * col0 AS col1 FROM tab1 cor0
----
1088
1360
51

query I rowsort
SELECT - - 66 * col2 FROM tab0 cor0
----
2178
5412
66

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col1 AS REAL ) * - col0 * - col1 + - col2 FROM tab0 AS cor0
----
177471
329314
736927

query I rowsort
SELECT + ( + 86 ) + col1 * col0 AS col0 FROM tab2 AS cor0
----
1429
303
4688

query I rowsort
SELECT DISTINCT + 73 * + col2 AS col0 FROM tab1 AS cor0
----
3942
4161
7008

query I rowsort
SELECT + + ( + cor0.col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - + 47 * cor0.col0 * - col1 AS col2 FROM tab2 AS cor0
----
10199
216294
63121

query I rowsort
SELECT - cor0.col2 * + col2 + - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT col1 + ( + col1 ) AS col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + + col1 * col1 * - col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT + ( 91 ) FROM tab0 AS cor0
----
91

query I rowsort
SELECT ALL + 34 FROM tab1, tab0 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT tab1.col2 * + 57 AS col2 FROM tab1
----
3078
3249
5472

query I rowsort
SELECT - + 7 + + col2 * - col2 FROM tab2 AS cor0
----
-1451
-683
-736

query I rowsort
SELECT DISTINCT 54 FROM tab1, tab2 cor0
----
54

query I rowsort
SELECT - + ( + col2 ) * + col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + + col0 * col2 * ( col2 ) + - cor0.col1 * ( + cor0.col1 ) + - col0 AS col2 FROM tab2 AS cor0
----
113708
4135
49169

query I rowsort
SELECT col0 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 - cor0.col2 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 col1 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT - + col2 + - 83 FROM tab1 AS cor0
----
-137
-140
-179

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT + col1 * ( - col0 + col0 ) FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + col1 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + + col1 * - 9 + col1 FROM tab0 AS cor0
----
-688
-728
-776

query I rowsort
SELECT - col2 * - 80 * col2 FROM tab1 cor0
----
233280
259920
737280

query I rowsort
SELECT + - ( - col0 ) * col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - col0 * + col2 + - col2 * + col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6031
SELECT + - CAST( NULL AS SIGNED ) + col2 - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6031
SELECT + - CAST ( NULL AS INTEGER ) + col2 - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6032
SELECT - ( + ( col0 ) ) DIV col1 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-6032
SELECT - ( + ( col0 ) ) / col1 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT cor0.col0 + + 25 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to edd5db78b4c7b191e7e4cfa256126243

query I rowsort
SELECT DISTINCT + 95 * + cor0.col1 * cor0.col1 AS col2 FROM tab2, tab0 AS cor0
----
702620
786695
893855

query I rowsort
SELECT col1 + + 82 AS col1 FROM tab1
----
108
92
95

query I rowsort
SELECT DISTINCT ( cor0.col0 ) FROM tab0, tab0 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT ALL - 98 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 9b0655947ad21e0b95a137a474fa6a1f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6038
SELECT col0 * col2 * - ( col2 * - col2 ) - + 30 DIV col1 AS col2 FROM tab2
----
1370928
137781
4334887

skipif mysql # not compatible
query I rowsort label-6038
SELECT col0 * col2 * - ( col2 * - col2 ) - + 30 / col1 AS col2 FROM tab2
----
1370928
137781
4334887

onlyif mysql # use DIV operator for integer division
query I rowsort label-6039
SELECT col1 - tab1.col0 DIV + 4 FROM tab1
----
-6
-7
26

skipif mysql # not compatible
query I rowsort label-6039
SELECT col1 - tab1.col0 / + 4 FROM tab1
----
-6
-7
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 43 - col1 col1 FROM tab0 AS cor0
----
-129
-134
-140

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab1 cor0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT + ( col1 ) * - 51 + - col1 * + col1 FROM tab1 AS cor0
----
-2002
-610
-832

onlyif mysql # use DIV operator for integer division
query I rowsort label-6043
SELECT - 98 DIV col0 + + col1 FROM tab2 AS cor0
----
16
17
58

skipif mysql # not compatible
query I rowsort label-6043
SELECT - 98 / col0 + + col1 FROM tab2 AS cor0
----
16
17
58

query I rowsort
SELECT + col0 * - col0 + - ( - col2 ) AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-6045
SELECT - col2 + col1 DIV - 12 FROM tab1 AS cor0
----
-56
-57
-97

skipif mysql # not compatible
query I rowsort label-6045
SELECT - col2 + col1 / - 12 FROM tab1 AS cor0
----
-56
-57
-97

query I rowsort
SELECT - - cor0.col2 * - 78 FROM tab0 AS cor0
----
-2574
-6396
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6047
SELECT ALL + - cor0.col2 DIV - col2 + cor0.col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6047
SELECT ALL + - cor0.col2 / - col2 + cor0.col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT + col0 * ( - cor0.col0 ) AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col1 + 41 AS col0 FROM tab2 AS cor0
----
-18
10
24

query I rowsort
SELECT cor0.col2 * - cor0.col1 * + col0 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-6051
SELECT - - col2 + ( - col1 ) DIV col2 AS col2 FROM tab0 AS cor0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-6051
SELECT - - col2 + ( - col1 ) / col2 AS col2 FROM tab0 AS cor0
----
-96
31
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col0 + 83 col0 FROM tab0 cor0
----
-709
-7215
48

query I rowsort
SELECT + cor0.col1 * - 85 AS col2 FROM tab0 AS cor0
----
-7310
-7735
-8245

query I rowsort
SELECT ALL cor0.col0 * ( + col2 ) * cor0.col0 + ( - col0 ) AS col0 FROM tab1 AS cor0
----
233408
483
614320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - ( + col0 ) * col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + ( 95 ) AS col0 FROM tab1 AS cor0
----
-95
-95
-95

query I rowsort
SELECT + ( + 75 ) + cor0.col2 * - 13 AS col0 FROM tab0 AS cor0
----
-354
-991
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 * col1 col1 FROM tab1 AS cor0
----
156
650
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6060
SELECT - col1 DIV - 86 + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6060
SELECT - col1 / - 86 + col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT - - 65 + col1 * + col0 AS col1 FROM tab2 cor0
----
1408
282
4667

query I rowsort
SELECT col1 + + ( cor0.col0 * col0 ) AS col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT - 4 - cor0.col2 * col0 AS col2 FROM tab2 AS cor0
----
-193
-2032
-3006

query I rowsort
SELECT - 50 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

query I rowsort
SELECT ALL + 46 * + col2 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT DISTINCT - + 66 + - col2 AS col0 FROM tab1 AS cor0
----
-120
-123
-162

query I rowsort
SELECT + cor0.col2 + ( - col2 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + + col1 * col1 + + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-2713
1453
772

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6070
SELECT col1 * + col0 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6070
SELECT col1 * + col0 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 83 + tab0.col0 * - 38 FROM tab0, tab2 AS cor0
----
-1247
-3299
-829

query I rowsort
SELECT ALL - cor0.col2 + - col1 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - + col1 + + col2 * 74 AS col0 FROM tab0 AS cor0
----
-23
2356
5977

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 - cor0.col1 col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6075
SELECT DISTINCT - + col1 * - col2 - - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6075
SELECT DISTINCT - + col1 * - col2 - - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 + col1 + - col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6077
SELECT ALL 46 DIV col1 + col1 AS col0 FROM tab1
----
14
16
27

skipif mysql # not compatible
query I rowsort label-6077
SELECT ALL 46 / col1 + col1 AS col0 FROM tab1
----
14
16
27

query I rowsort
SELECT ALL - col2 + + col2 + tab2.col0 AS col0 FROM tab2
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6079
SELECT + CAST( ( col2 ) AS SIGNED ) + ( + 86 ) col0 FROM tab2
----
112
113
124

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6079
SELECT + CAST ( ( col2 ) AS INTEGER ) + ( + 86 ) col0 FROM tab2
----
112
113
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-6080
SELECT col1 + + col2 DIV + cor0.col0 AS col2 FROM tab0 AS cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-6080
SELECT col1 + + col2 / + cor0.col0 AS col2 FROM tab0 AS cor0
----
87
91
97

query I rowsort
SELECT - - col0 + col0 * 5 * + 25 AS col1 FROM tab2 AS cor0
----
882
9828
9954

query I rowsort
SELECT - + 65 + col1 * + col1 FROM tab0 AS cor0
----
7331
8216
9344

query I rowsort
SELECT DISTINCT - 15 * col2 AS col2 FROM tab2 AS cor0
----
-390
-405
-570

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 69 * col2 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT + cor0.col2 * cor0.col1 * + 15 FROM tab2 AS cor0
----
12555
23010
9690

query I rowsort
SELECT ALL + ( col0 ) * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT cor0.col2 * cor0.col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL + + col2 * - col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-6090
SELECT DISTINCT + col0 * col2 DIV 56 col0 FROM tab0
----
0
130
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6090
SELECT DISTINCT + col0 * col2 / 56 col0 FROM tab0
----
0
130
14

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0 AS cor2, tab2 cor3
----
3645 values hashing to 773bb916e463ebc075d701108532badb

query I rowsort
SELECT DISTINCT tab1.col1 * - col1 * 18 FROM tab1
----
-12168
-1800
-3042

query I rowsort
SELECT DISTINCT col0 * col2 * + 57 AS col2 FROM tab0
----
1995
415986
45144

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT DISTINCT + 9 FROM tab2, tab0 AS cor0
----
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6096
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6096
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT + - col0 + + 89 AS col0 FROM tab2 AS cor0
----
10
11
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6098
SELECT ALL - ( 64 ) + col1 DIV - col2 AS col0 FROM tab0 AS cor0
----
-161
-65
-66

skipif mysql # not compatible
query I rowsort label-6098
SELECT ALL - ( 64 ) + col1 / - col2 AS col0 FROM tab0 AS cor0
----
-161
-65
-66

query I rowsort
SELECT DISTINCT - 14 * col1 + + col1 + - 28 AS col0 FROM tab1
----
-158
-197
-366

query I rowsort
SELECT - col0 * + col2 - - cor0.col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - + 2 + - 42 FROM tab2 AS cor0
----
-44

onlyif mysql # use DIV operator for integer division
query I rowsort label-6102
SELECT + col2 * - col2 DIV + cor0.col2 + col0 col0 FROM tab1 cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6102
SELECT + col2 * - col2 / + cor0.col2 + col0 col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - col2 * + col0 + col0 * col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + - col2 + cor0.col1 * cor0.col0 * col1 + ( col2 + col2 ) FROM tab1 AS cor0
----
13616
2082
6457

query I rowsort
SELECT + col2 * + col2 * + col2 - col0 AS col1 FROM tab1 AS cor0
----
157461
185129
884656

query I rowsort
SELECT ALL col0 * - col1 + - 65 AS col0 FROM tab0 cor0
----
-2129
-3460
-8164

query I rowsort
SELECT - + col2 * - col1 * 58 + col0 AS col0 FROM tab1 AS cor0
----
33124
72464
81435

onlyif mysql # use DIV operator for integer division
query I rowsort label-6108
SELECT ALL + - col0 DIV + ( + 87 ) + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6108
SELECT ALL + - col0 / + ( + 87 ) + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - cor0.col0 + col0 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT ALL - - col1 * - 77 + col0 AS col2 FROM tab0 AS cor0
----
-6598
-6918
-7434

query I rowsort
SELECT DISTINCT col1 + cor0.col1 - + col0 FROM tab0 AS cor0
----
148
159
93

query I rowsort
SELECT DISTINCT + - col1 * ( + col2 ) + - col0 AS col2 FROM tab1 cor0
----
-1328
-1407
-634

query I rowsort
SELECT + + col2 * - 79 + col2 AS col1 FROM tab0 AS cor0
----
-2574
-6396
-78

query I rowsort
SELECT + + col0 * col1 - col2 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-6115
SELECT + col0 DIV - col1 + + col0 * col1 FROM tab1 AS cor0
----
1034
634
78

skipif mysql # not compatible
query I rowsort label-6115
SELECT + col0 / - col1 + + col0 * col1 FROM tab1 AS cor0
----
1034
634
78

query I rowsort
SELECT ALL + 72 FROM tab2, tab0 cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT + - ( col2 ) + - col2 * 12 FROM tab1 cor0
----
-1248
-702
-741

query I rowsort
SELECT - 1 * - 52 + col0 * cor0.col2 FROM tab0 AS cor0
----
7350
844
87

query I rowsort
SELECT col0 + - 30 * col0 FROM tab1
----
-1856
-2320
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6120
SELECT col1 * col0 DIV - col0 AS col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6120
SELECT col1 * col0 / - col0 AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL 16 - + col0 AS col2 FROM tab0 AS cor0
----
-19
-73
-8

query I rowsort
SELECT col2 * + tab1.col1 * + tab1.col0 AS col0 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6123
SELECT col1 DIV col1 + - col1 - - col1 * - col1 col1 FROM tab0
----
-7481
-8371
-9505

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6123
SELECT col1 / col1 + - col1 - - col1 * - col1 col1 FROM tab0
----
-7481
-8371
-9505

query I rowsort
SELECT - 8 * - col2 * col2 + tab2.col2 * + col2 FROM tab2
----
12996
6084
6561

query I rowsort
SELECT 56 * + col0 AS col0 FROM tab0 AS cor0
----
1344
1960
4984

query I rowsort
SELECT + 80 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2, tab0 cor0, tab0 AS cor1
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT DISTINCT 84 + ( + cor0.col2 ) AS col0 FROM tab1, tab1 AS cor0
----
138
141
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6129
SELECT col0 * CAST( - cor0.col2 AS SIGNED ) col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6129
SELECT col0 * CAST ( - cor0.col2 AS INTEGER ) col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + tab2.col1 + col2 + - col1 FROM tab2
----
26
27
38

query I rowsort
SELECT + + col1 * + 32 + 63 FROM tab2 AS cor0
----
1055
1951
607

query I rowsort
SELECT col0 * col1 - - cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - col0 * 56 AS col1 FROM tab1
----
-168
-3584
-4480

onlyif mysql # use DIV operator for integer division
query I rowsort label-6134
SELECT ALL - col1 DIV + 84 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6134
SELECT ALL - col1 / + 84 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + 53 + + col2 FROM tab0 AS cor0
----
135
54
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-6136
SELECT DISTINCT + col2 DIV - col2 + col0 * + col1 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-6136
SELECT DISTINCT + col2 / - col2 + col0 * + col1 FROM tab0 AS cor0
----
2063
3394
8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( - col2 ) + + col0 col1 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) * - ( col2 ) col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 3 + - col2 * + ( - col0 + + cor0.col2 ) FROM tab2 AS cor0
----
-537
1355
1561

query I rowsort
SELECT - - cor0.col1 * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6141
SELECT DISTINCT tab2.col0 * CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6141
SELECT DISTINCT tab2.col0 * CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0, tab1 AS cor1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6142
SELECT DISTINCT + + CAST( 77 AS SIGNED ) FROM tab0 cor0
----
77

skipif mysql # not compatible
query I rowsort label-6142
SELECT DISTINCT + + CAST ( 77 AS INTEGER ) FROM tab0 cor0
----
77

query I rowsort
SELECT + 94 + - 61 AS col1 FROM tab1 AS cor0
----
33
33
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-6144
SELECT DISTINCT - col2 DIV - ( - col2 + - col0 ) AS col0 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-6144
SELECT DISTINCT - col2 / - ( - col2 + - col0 ) AS col0 FROM tab0
----
0

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 * + col1 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - + col1 - - col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - col0 + 80 * col2 AS col0 FROM tab0
----
2616
45
6471

query I rowsort
SELECT DISTINCT + 17 AS col1 FROM tab1, tab1 AS cor0
----
17

query I rowsort
SELECT + ( - 67 + col1 ) FROM tab1
----
-41
-54
-57

query I rowsort
SELECT ALL + + 11 * cor0.col0 FROM tab1 AS cor0
----
33
704
880

onlyif mysql # use DIV operator for integer division
query I rowsort label-6151
SELECT ALL col2 DIV + col2 col2 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6151
SELECT ALL col2 / + col2 col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + 59 AS col2 FROM tab0 AS cor0
----
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + + col1 + col2 col2 FROM tab2 AS cor0
----
107
6169
6296

query I rowsort
SELECT - - col2 * 14 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
111
1239
548

onlyif mysql # use DIV operator for integer division
query I rowsort label-6155
SELECT - col0 * col1 + 97 + col1 DIV col1 FROM tab2
----
-119
-1245
-4504

skipif mysql # not compatible
query I rowsort label-6155
SELECT - col0 * col1 + 97 + col1 / col1 FROM tab2
----
-119
-1245
-4504

query I rowsort
SELECT 52 - + col0 AS col2 FROM tab1
----
-12
-28
49

query I rowsort
SELECT 31 FROM tab1, tab1 cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 0bb6d1445d82a11417f7bb2ec248ca9c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6158
SELECT cor0.col1 DIV cor0.col1 col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6158
SELECT cor0.col1 / cor0.col1 col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + col2 * - 51 + - col2 AS col2 FROM tab1 AS cor0
----
-2808
-2964
-4992

query I rowsort
SELECT + cor0.col0 - - 21 FROM tab2 AS cor0
----
100
28
99

query I rowsort
SELECT col1 * col0 + cor0.col0 * - col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6162
SELECT - cor0.col2 + 73 DIV - col1 FROM tab1 AS cor0
----
-101
-56
-64

skipif mysql # not compatible
query I rowsort label-6162
SELECT - cor0.col2 + 73 / - col1 FROM tab1 AS cor0
----
-101
-56
-64

query I rowsort
SELECT ALL - col1 * ( + col0 + cor0.col0 ) FROM tab0 AS cor0
----
-16198
-4128
-6790

query I rowsort
SELECT DISTINCT col2 + + 50 AS col2 FROM tab0 AS cor0
----
132
51
83

query I rowsort
SELECT col2 * ( col1 ) + col0 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT ALL + col0 * ( - 67 ) FROM tab2 AS cor0
----
-469
-5226
-5293

query I rowsort
SELECT - cor0.col0 + 13 FROM tab0 AS cor0
----
-11
-22
-76

query I rowsort
SELECT DISTINCT col0 * - 9 FROM tab2 AS cor0
----
-63
-702
-711

onlyif mysql # use DIV operator for integer division
query I rowsort label-6169
SELECT cor0.col2 * col2 DIV + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6169
SELECT cor0.col2 * col2 / + col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6170
SELECT DISTINCT + - col0 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6170
SELECT DISTINCT + - col0 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - + col0 * cor0.col0 - + 47 FROM tab2 AS cor0
----
-6131
-6288
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6172
SELECT DISTINCT + cor0.col2 / + CAST( NULL AS SIGNED ) + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6172
SELECT DISTINCT + cor0.col2 / + CAST ( NULL AS INTEGER ) + col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 + - ( col1 + - col0 ) FROM tab1
----
-29
-3
-77

query I rowsort
SELECT DISTINCT col1 + 88 FROM tab1
----
101
114
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6175
SELECT DISTINCT - - col1 DIV + CAST( - col1 + - col0 AS SIGNED ) FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6175
SELECT DISTINCT - - col1 / + CAST ( - col1 + - col0 AS INTEGER ) FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6176
SELECT ALL col0 + col1 * col1 DIV + col1 col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6176
SELECT ALL col0 + col1 * col1 / + col1 col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + 9 * 32 FROM tab0, tab1 AS cor0
----
9 values hashing to 82e6883532c12893988dd7590283fd3b

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT + col0 * - ( - col1 ) FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6180
SELECT 66 + - 28 DIV col1 + col1 DIV 68 AS col2 FROM tab2 cor0
----
65
66
66

skipif mysql # not compatible
query I rowsort label-6180
SELECT 66 + - 28 / col1 + col1 / 68 AS col2 FROM tab2 cor0
----
65
66
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6181
SELECT - CAST( + col1 AS SIGNED ) * col2 - - col1 FROM tab2 AS cor0
----
-1475
-629
-806

skipif mysql # not compatible
query I rowsort label-6181
SELECT - CAST ( + col1 AS INTEGER ) * col2 - - col1 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6182
SELECT ALL col1 DIV ( col0 ) + col2 - - tab0.col1 FROM tab0
----
100
122
174

skipif mysql # not compatible
query I rowsort label-6182
SELECT ALL col1 / ( col0 ) + col2 - - tab0.col1 FROM tab0
----
100
122
174

query I rowsort
SELECT DISTINCT col1 + 75 AS col1 FROM tab2 AS cor0
----
106
134
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6184
SELECT ALL CAST( ( col1 ) AS SIGNED ) + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-6184
SELECT ALL CAST ( ( col1 ) AS INTEGER ) + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + + col2 * col0 + - col1 FROM tab0 cor0
----
-62
706
7207

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6186
SELECT + CAST( col1 AS SIGNED ) + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-6186
SELECT + CAST ( col1 AS INTEGER ) + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - ( + 71 ) - - col2 AS col2 FROM tab2 AS cor0
----
-33
-44
-45

query I rowsort
SELECT ALL ( + 61 ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT col1 * + tab1.col0 + - 91 + + col1 AS col1 FROM tab1
----
13
559
962

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6190
SELECT - col2 * CAST( - col0 AS SIGNED ) col2 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6190
SELECT - col2 * CAST ( - col0 AS INTEGER ) col2 FROM tab2
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6191
SELECT ALL col0 * + CAST( - col2 AS SIGNED ) * col0 + col1 FROM tab1
----
-233462
-460
-614387

skipif mysql # not compatible
query I rowsort label-6191
SELECT ALL col0 * + CAST ( - col2 AS INTEGER ) * col0 + col1 FROM tab1
----
-233462
-460
-614387

query I rowsort
SELECT - tab0.col1 * + col0 + tab0.col1 * - col0 AS col0 FROM tab0
----
-16198
-4128
-6790

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6193
SELECT - tab2.col0 * - CAST( 66 AS SIGNED ) AS col2 FROM tab2
----
462
5148
5214

skipif mysql # not compatible
query I rowsort label-6193
SELECT - tab2.col0 * - CAST ( 66 AS INTEGER ) AS col2 FROM tab2
----
462
5148
5214

query I rowsort
SELECT col2 + col2 * - 84 + - col1 FROM tab1
----
-4508
-4741
-7981

query I rowsort
SELECT - col1 * col2 + 78 * col2 + 2 FROM tab0
----
-1064
-17
-262

query I rowsort
SELECT DISTINCT col2 + + 92 * - col0 FROM tab1
----
-222
-5831
-7264

query I rowsort
SELECT ALL - col2 * col1 + 28 * - col1 - - col0 FROM tab0 AS cor0
----
-2778
-5222
-9921

query I rowsort
SELECT - - 34 AS col0 FROM tab0 cor0
----
34
34
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6199
SELECT DISTINCT - col0 DIV + cor0.col1 + + 59 FROM tab1 AS cor0
----
53
59

skipif mysql # not compatible
query I rowsort label-6199
SELECT DISTINCT - col0 / + cor0.col1 + + 59 FROM tab1 AS cor0
----
53
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6200
SELECT - + cor0.col0 * + col2 * - CAST( - col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

skipif mysql # not compatible
query I rowsort label-6200
SELECT - + cor0.col0 * + col2 * - CAST ( - col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT - 65 + col1 FROM tab2 AS cor0
----
-34
-48
-6

query I rowsort
SELECT DISTINCT - tab2.col0 * - 91 + + col2 FROM tab2
----
664
7124
7227

query I rowsort
SELECT DISTINCT 39 + - col1 FROM tab2 AS cor0
----
-20
22
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6204
SELECT ALL + cor0.col0 - col0 * - CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
70
7387
816

skipif mysql # not compatible
query I rowsort label-6204
SELECT ALL + cor0.col0 - col0 * - CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT col0 + - col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT + 67 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-3618
-3819
-6432

query I rowsort
SELECT ALL - 41 * 33 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to dbcc3ea06d15afde9b9fd039d7a57094

query I rowsort
SELECT - col1 * + 57 + col0 FROM tab0
----
-4878
-5098
-5494

query I rowsort
SELECT DISTINCT - col1 * + 18 AS col2 FROM tab2
----
-1062
-306
-558

query I rowsort
SELECT - ( - ( + col1 ) ) + col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL 62 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT ( 69 * - col1 ) AS col2 FROM tab2
----
-1173
-2139
-4071

query I rowsort
SELECT DISTINCT 75 * - col1 AS col2 FROM tab1
----
-1950
-750
-975

query I rowsort
SELECT DISTINCT + - 22 * col1 + + col1 FROM tab0 AS cor0
----
-1806
-1911
-2037

query I rowsort
SELECT ALL + + col0 * + 21 + cor0.col1 FROM tab0 AS cor0
----
1960
590
832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6216
SELECT ALL + CAST( ( col1 ) AS SIGNED ) * col2 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-6216
SELECT ALL + CAST ( ( col1 ) AS INTEGER ) * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT - 31 + col0 FROM tab1 AS cor0
----
-28
33
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-6218
SELECT 88 DIV col0 + col1 * 90 AS col1 FROM tab0 AS cor0
----
7743
8190
8732

skipif mysql # not compatible
query I rowsort label-6218
SELECT 88 / col0 + col1 * 90 AS col1 FROM tab0 AS cor0
----
7743
8190
8732

query I rowsort
SELECT DISTINCT + 37 + + col2 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT 31 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-2
-51
30

query I rowsort
SELECT - col2 * + cor0.col0 * + col1 + col1 * - col0 AS col0 FROM tab0 AS cor0
----
-672217
-6790
-70176

query I rowsort
SELECT ALL - col2 + tab1.col0 + col1 * - 76 FROM tab1
----
-1004
-2027
-753

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6223
SELECT + col0 * cor0.col2 - - CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
70
7387
816

skipif mysql # not compatible
query I rowsort label-6223
SELECT + col0 * cor0.col2 - - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + col2 + - col0 - col0 FROM tab0 AS cor0
----
-15
-69
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6225
SELECT - + col2 + + col2 DIV - ( col0 ) AS col1 FROM tab2 AS cor0
----
-26
-30
-38

skipif mysql # not compatible
query I rowsort label-6225
SELECT - + col2 + + col2 / - ( col0 ) AS col1 FROM tab2 AS cor0
----
-26
-30
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6226
SELECT DISTINCT + col2 * - CAST( - 24 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
624
648
912

skipif mysql # not compatible
query I rowsort label-6226
SELECT DISTINCT + col2 * - CAST ( - 24 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
624
648
912

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 + + col1 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL + col0 + - ( col2 ) * col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - col2 + 72 * col1 AS col1 FROM tab0 AS cor0
----
6159
6470
6983

query I rowsort
SELECT ALL - - col2 * - 1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT col1 * - 62 FROM tab1 AS cor0
----
-1612
-620
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6232
SELECT ALL col2 DIV ( - 6 ) col0 FROM tab1 AS cor0
----
-16
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6232
SELECT ALL col2 / ( - 6 ) col0 FROM tab1 AS cor0
----
-16
-9
-9

query I rowsort
SELECT + 39 + 97 FROM tab1 AS cor0
----
136
136
136

query I rowsort
SELECT col0 + ( col0 ) AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT + cor0.col1 * + col2 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 ) - + col0 * + 99 col2 FROM tab0 AS cor0
----
-2400
-3500
-8900

query I rowsort
SELECT ALL col2 * col2 * col1 + col2 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
22619
24507
39832

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col2 AS REAL ) FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col1 FROM tab2 cor0
----
2
2
2

query I rowsort
SELECT + 86 + + 62 AS col0 FROM tab2 AS cor0
----
148
148
148

query I rowsort
SELECT ALL - + col1 * - cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col2 * col0 + + ( + col1 ) * - col2 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT cor0.col2 FROM tab1, tab2 cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to 3dcd863493ac16ce594c62d4ac8b0412

query I rowsort
SELECT DISTINCT col2 * - col0 * 15 AS col0 FROM tab0
----
-109470
-11880
-525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 97 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - 28 col0 FROM tab1
----
-1792
-2240
-84

query I rowsort
SELECT 54 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT + col2 + + 58 FROM tab1 AS cor0
----
112
115
154

query I rowsort
SELECT col2 * - 10 AS col2 FROM tab0
----
-10
-330
-820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6250
SELECT col0 * CAST( NULL AS DECIMAL ) + tab1.col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6250
SELECT col0 * CAST ( NULL AS REAL ) + tab1.col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 + - col2 FROM tab1 cor0
----
108
3591
7584

query I rowsort
SELECT - col2 * - col0 + col0 FROM tab2 cor0 WHERE NOT NULL < ( col0 * + col2 )
----

query I rowsort
SELECT col0 + col1 FROM tab0 AS cor0 WHERE NOT NULL < - col2 / + cor0.col2 + + cor0.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col2 col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + col0 FROM tab1 AS cor0 WHERE NULL NOT BETWEEN ( - col0 ) AND NULL
----

query III rowsort
SELECT * FROM tab0 cor0 WHERE NOT ( NULL ) <> - col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + - col2 * + col1 col1 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT ALL col0 FROM tab0 WHERE NOT - tab0.col0 * col1 + col0 NOT BETWEEN + col0 AND + col2
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) IN ( + col1 - + col1 )
----

query I rowsort
SELECT DISTINCT + tab2.col0 * + tab2.col2 * col0 AS col2 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT - col1 * col0 - col2 AS col0 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT - col2 + col1 * col1 + col1 AS col2 FROM tab0
----
7449
8290
9505

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 * col0 col1 FROM tab0 WHERE NOT NULL BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) IN ( col2 * tab1.col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE ( col0 - col0 * col0 ) > col1 + col2 / col1
----

query I rowsort
SELECT - col1 + - col0 * + col1 AS col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT tab1.col2 * - tab1.col2 + col2 + col2 AS col1 FROM tab1
----
-2808
-3135
-9024

onlyif mysql # use DIV operator for integer division
query I rowsort label-6268
SELECT ALL - + cor0.col2 * col0 DIV cor0.col1 FROM tab0 AS cor0
----
-80
-9
0

skipif mysql # not compatible
query I rowsort label-6268
SELECT ALL - + cor0.col2 * col0 / cor0.col1 FROM tab0 AS cor0
----
-80
-9
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6269
SELECT + - col1 + + col2 DIV + col0 FROM tab0 AS cor0
----
-85
-91
-97

skipif mysql # not compatible
query I rowsort label-6269
SELECT + - col1 + + col2 / + col0 FROM tab0 AS cor0
----
-85
-91
-97

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 35 * + col1 AS col1 FROM tab0
----
3010
3185
3395

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6272
SELECT DISTINCT + ( + tab0.col2 ) / CAST( NULL AS DECIMAL ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6272
SELECT DISTINCT + ( + tab0.col2 ) / CAST ( NULL AS REAL ) AS col2 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6273
SELECT + col0 DIV - tab2.col0 + - tab2.col2 FROM tab2
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-6273
SELECT + col0 / - tab2.col0 + - tab2.col2 FROM tab2
----
-27
-28
-39

query I rowsort
SELECT 20 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6275
SELECT DISTINCT - 42 DIV cor0.col2 + - col0 * - col1 * col1 FROM tab1 cor0
----
13520
2028
6400

skipif mysql # not compatible
query I rowsort label-6275
SELECT DISTINCT - 42 / cor0.col2 + - col0 * - col1 * col1 FROM tab1 cor0
----
13520
2028
6400

query I rowsort
SELECT ALL 85 AS col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query I rowsort
SELECT ALL + + col1 * + col0 * - 25 + - col0 FROM tab2 AS cor0
----
-115128
-33654
-5432

query I rowsort
SELECT DISTINCT + 42 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
42

query I rowsort
SELECT DISTINCT 26 * - col0 + + col2 FROM tab1 cor0
----
-1607
-1984
-24

query I rowsort
SELECT DISTINCT + col0 * - col0 + 11 * + col0 AS col1 FROM tab2 AS cor0
----
-5226
-5372
28

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL col1 * 90 FROM tab2 AS cor0
----
1530
2790
5310

query I rowsort
SELECT DISTINCT + col1 + 7 FROM tab1 AS cor0
----
17
20
33

query I rowsort
SELECT ALL + col0 * - 66 + - col1 AS col1 FROM tab0 AS cor0
----
-1670
-2407
-5965

query I rowsort
SELECT DISTINCT + + col2 * + 96 * - col1 AS col2 FROM tab0 AS cor0
----
-272448
-716352
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6286
SELECT ALL + col1 * - CAST( + col1 AS SIGNED ) + - col0 * 30 + - cor0.col0 * + col2 FROM tab1 cor0
----
-10249
-5668
-928

skipif mysql # not compatible
query I rowsort label-6286
SELECT ALL + col1 * - CAST ( + col1 AS INTEGER ) + - col0 * 30 + - cor0.col0 * + col2 FROM tab1 cor0
----
-10249
-5668
-928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6287
SELECT - cor0.col2 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6287
SELECT - cor0.col2 * - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + col2 * ( col2 ) * col1 FROM tab0 AS cor0
----
194
611975
93740

query I rowsort
SELECT DISTINCT - - col1 * + col2 FROM tab2 cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6290
SELECT + + cor0.col2 * CAST( NULL AS DECIMAL ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6290
SELECT + + cor0.col2 * CAST ( NULL AS REAL ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * + col0 + - col1 * - tab2.col1 AS col1 FROM tab2
----
1178
1632
8083

query I rowsort
SELECT ALL + col0 - col0 * col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT - col1 * col2 FROM tab0 WHERE NOT ( NULL ) NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT + col1 FROM tab2 WHERE NOT ( col1 ) = NULL
----

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 WHERE NOT + col0 > col2
----
33

query I rowsort
SELECT + col2 * col2 * col1 + + col1 * + col1 FROM tab0
----
101050
620165
9506

query I rowsort
SELECT ALL + col2 + col1 AS col0 FROM tab0 WHERE NOT - col1 BETWEEN + col1 AND NULL
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6298
SELECT - tab0.col1 * - col0 + + col1 * col1 + col1 DIV col1 FROM tab0
----
12805
16381
9461

skipif mysql # not compatible
query I rowsort label-6298
SELECT - tab0.col1 * - col0 + + col1 * col1 + col1 / col1 FROM tab0
----
12805
16381
9461

onlyif mysql # use DIV operator for integer division
query I rowsort label-6299
SELECT ALL + col2 DIV cor0.col1 + + ( col2 ) AS col1 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-6299
SELECT ALL + col2 / cor0.col1 + + ( col2 ) AS col1 FROM tab2 AS cor0
----
26
27
40

query I rowsort
SELECT DISTINCT col0 * - col1 + - col0 * - ( - col0 ) FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT ALL - col1 * col1 + + col2 * col2 AS col0 FROM tab1 AS cor0
----
2240
3149
9047

onlyif mysql # use DIV operator for integer division
query I rowsort label-6302
SELECT DISTINCT - col1 * + col1 - - col1 DIV + col1 FROM tab1
----
-168
-675
-99

skipif mysql # not compatible
query I rowsort label-6302
SELECT DISTINCT - col1 * + col1 - - col1 / + col1 FROM tab1
----
-168
-675
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6303
SELECT + col0 * - col1 - - col0 DIV col0 col0 FROM tab0
----
-2063
-3394
-8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6303
SELECT + col0 * - col1 - - col0 / col0 col0 FROM tab0
----
-2063
-3394
-8098

query I rowsort
SELECT ALL + col1 * + col2 - - col2 * tab1.col0 FROM tab1
----
1566
4218
8928

query I rowsort
SELECT - + col0 * + ( - col0 ) AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + 32 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
32

query I rowsort
SELECT DISTINCT + 47 FROM tab0, tab2 AS cor0, tab1 cor1
----
47

query I rowsort
SELECT DISTINCT col2 * - tab2.col0 * + col1 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col0 * ( 9 ) FROM tab2
----
63
702
711

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 64312dc66df177d8c745c63c0bdd4dc7

query I rowsort
SELECT + col0 + + col2 * + 9 AS col1 FROM tab2 cor0
----
250
312
421

query I rowsort
SELECT col1 * 48 + col1 AS col2 FROM tab0 AS cor0
----
4214
4459
4753

query I rowsort
SELECT - col0 * 40 FROM tab2 cor0
----
-280
-3120
-3160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6314
SELECT DISTINCT + col2 - - CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6314
SELECT DISTINCT + col2 - - CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col0 + 54 * col2 AS col0 FROM tab1 AS cor0
----
2913
3014
5104

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6316
SELECT ALL + cor0.col0 * CAST( ( + col1 ) AS SIGNED ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-6316
SELECT ALL + cor0.col0 * CAST ( ( + col1 ) AS INTEGER ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6317
SELECT DISTINCT col1 + CAST( col1 AS SIGNED ) * + col1 FROM tab0 AS cor0
----
7482
8372
9506

skipif mysql # not compatible
query I rowsort label-6317
SELECT DISTINCT col1 + CAST ( col1 AS INTEGER ) * + col1 FROM tab0 AS cor0
----
7482
8372
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 78 * 73 col2 FROM tab2
----
5694
5694
5694

query I rowsort
SELECT ALL + 43 * cor0.col1 AS col0 FROM tab1 cor0
----
1118
430
559

query I rowsort
SELECT DISTINCT - col0 + 57 AS col2 FROM tab2 AS cor0
----
-21
-22
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 - + col2 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL col1 + cor0.col0 * col2 + col0 FROM tab2 AS cor0
----
2165
227
3098

query I rowsort
SELECT - 87 * cor0.col0 + col1 FROM tab2 AS cor0
----
-578
-6727
-6856

query I rowsort
SELECT ( - col0 + - tab0.col2 ) AS col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT - + ( + col0 ) * + 44 + - col2 AS col0 FROM tab2 AS cor0
----
-335
-3458
-3514

query I rowsort
SELECT DISTINCT + 41 * + col0 AS col2 FROM tab0 AS cor0
----
1435
3649
984

query I rowsort
SELECT + 57 + - col1 + + col0 AS col0 FROM tab0 AS cor0
----
-5
-5
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6328
SELECT + col2 + + col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6328
SELECT + col2 + + col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 35 * - col0 * ( tab2.col2 * - col2 ) FROM tab2
----
178605
1845480
3992660

query I rowsort
SELECT - col2 + cor0.col2 * + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-1122
-2
-6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6331
SELECT col2 + col2 DIV col2 + col0 FROM tab0 cor0
----
172
37
58

skipif mysql # not compatible
query I rowsort label-6331
SELECT col2 + col2 / col2 + col0 FROM tab0 cor0
----
172
37
58

query I rowsort
SELECT - cor0.col0 * - col0 + col0 * col2 AS col2 FROM tab0 AS cor0
----
1260
1368
15219

query I rowsort
SELECT - - col1 + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - cor0.col2 ) * + col2 + col0 col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT 72 * + cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
107
2400
5993

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 + + 42 col1 FROM tab1 AS cor0
----
86
86
86

query I rowsort
SELECT + ( - 39 ) * col2 AS col1 FROM tab2 cor0
----
-1014
-1053
-1482

onlyif mysql # use DIV operator for integer division
query I rowsort label-6338
SELECT col0 DIV ( - 40 * + col0 ) + col1 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6338
SELECT col0 / ( - 40 * + col0 ) + col1 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT + 4 * - 41 + - col0 AS col0 FROM tab0 cor0
----
-188
-199
-253

query I rowsort
SELECT - ( + col1 ) * - col2 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6341
SELECT CAST( + ( col1 ) AS SIGNED ) * - col0 AS col2 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-6341
SELECT CAST ( + ( col1 ) AS INTEGER ) * - col0 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + 49 * cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
2643
2729
4624

onlyif mysql # use DIV operator for integer division
query I rowsort label-6343
SELECT - 14 DIV + col1 - col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6343
SELECT - 14 / + col1 - col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6344
SELECT - CAST( col1 AS SIGNED ) AS col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6344
SELECT - CAST ( col1 AS INTEGER ) AS col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL + 63 * + tab0.col1 + - col2 + col1 FROM tab0
----
5471
5742
6207

query I rowsort
SELECT + col0 * col2 * col1 - + col0 FROM tab1 AS cor0
----
36416
4209
99760

query I rowsort
SELECT DISTINCT ( cor0.col2 ) + - col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + ( 24 * + col0 ) FROM tab2
----
168
1872
1896

query I rowsort
SELECT ALL ( col1 + + col0 ) AS col1 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6350
SELECT - - 69 + col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
69
69
69

skipif mysql # not compatible
query I rowsort label-6350
SELECT - - 69 + col1 / + col2 AS col1 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT - + 41 * + col2 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT ALL + + col2 * + ( col1 ) + + cor0.col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + cor0.col0 + ( cor0.col2 ) * - cor0.col1 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-6354
SELECT DISTINCT - col0 * 6 + col0 DIV + 77 FROM tab0 AS cor0
----
-144
-210
-533

skipif mysql # not compatible
query I rowsort label-6354
SELECT DISTINCT - col0 * 6 + col0 / + 77 FROM tab0 AS cor0
----
-144
-210
-533

query I rowsort
SELECT - - cor0.col1 * + col1 AS col0 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - 9 + 55 AS col0 FROM tab2 AS cor0
----
46

query I rowsort
SELECT ALL 24 + 40 FROM tab2 AS cor0
----
64
64
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6358
SELECT ALL + CAST( + col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6358
SELECT ALL + CAST ( + col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - col0 + - 41 AS col1 FROM tab1 AS cor0
----
-105
-121
-44

query I rowsort
SELECT ALL - col0 * ( cor0.col1 ) * + col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6361
SELECT CAST( - 49 AS SIGNED ) col1 FROM tab0 AS cor0
----
-49
-49
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6361
SELECT CAST ( - 49 AS INTEGER ) col1 FROM tab0 AS cor0
----
-49
-49
-49

query I rowsort
SELECT + - ( + cor0.col2 ) + - col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - 5 * col1 AS col1 FROM tab1 AS cor0
----
-130
-50
-65

query I rowsort
SELECT + cor0.col1 + - col2 * col1 AS col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ( 54 ) * col2 + col2 AS col1 FROM tab0
----
1815
4510
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 + - 53 col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
81 values hashing to 8f7b4660f14acdc0a5e1c10d1576c40e

query I rowsort
SELECT + ( col2 ) * col1 + col2 AS col0 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL + - cor0.col1 + 48 FROM tab2 AS cor0
----
-11
17
31

query I rowsort
SELECT ALL - col0 + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT col0 * - 6 * + ( col2 ) FROM tab1 AS cor0
----
-21888
-46080
-972

query I rowsort
SELECT DISTINCT + + col2 * + ( col0 ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + + col2 * + cor0.col1 + - col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - col2 + + 41 AS col1 FROM tab1
----
-13
-16
-55

query I rowsort
SELECT DISTINCT + col1 + tab2.col1 * + col2 AS col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL + col2 * col1 + + 55 AS col2 FROM tab2
----
1589
701
892

query I rowsort
SELECT DISTINCT col1 * - col0 + + col2 * 23 * + ( - cor0.col0 ) + col2 AS col2 FROM tab0 AS cor0
----
-175871
-20247
-4199

query I rowsort
SELECT ALL col1 + 72 FROM tab2 AS cor0
----
103
131
89

query I rowsort
SELECT DISTINCT ( 23 ) FROM tab1 AS cor0
----
23

query I rowsort
SELECT - 43 * 51 * + col2 FROM tab0 AS cor0
----
-179826
-2193
-72369

query I rowsort
SELECT ALL 56 AS col0 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to 9cee91ca9c60ba6e45a33b388a3b7d9b

query I rowsort
SELECT ALL - ( + col2 ) * tab2.col1 * + col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT + col2 * col0 + - col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT - 10 * + cor0.col1 AS col1 FROM tab1, tab0 AS cor0
----
-860
-910
-970

query I rowsort
SELECT DISTINCT 10 - + col1 AS col2 FROM tab1 AS cor0
----
-16
-3
0

query I rowsort
SELECT + col2 + - 61 * - col2 FROM tab1 cor0
----
3348
3534
5952

query I rowsort
SELECT DISTINCT + 77 - + 74 AS col0 FROM tab2 AS cor0
----
3

query I rowsort
SELECT DISTINCT + 80 * + 88 FROM tab1 AS cor0
----
7040

query I rowsort
SELECT + 15 + + 68 AS col1 FROM tab2 AS cor0
----
83
83
83

query I rowsort
SELECT ALL - 55 * col0 + + col1 - 69 AS col1 FROM tab2 AS cor0
----
-423
-4300
-4397

query I rowsort
SELECT ALL + 63 + - col1 + col1 AS col2 FROM tab0 AS cor0
----
63
63
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-6391
SELECT + ( + col1 ) + - 30 + + col0 * col1 DIV ( - 92 ) FROM tab1
----
-26
-28
-4

skipif mysql # not compatible
query I rowsort label-6391
SELECT + ( + col1 ) + - 30 + + col0 * col1 / ( - 92 ) FROM tab1
----
-26
-28
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 + col2 + + col2 col0 FROM tab0
----
187
25
89

query I rowsort
SELECT col0 * + col1 + - 44 * + col0 AS col0 FROM tab0
----
1008
1855
4183

query I rowsort
SELECT - col0 * col1 + - ( tab0.col2 * col0 ) + + tab0.col2 FROM tab0
----
-15315
-2823
-3429

query I rowsort
SELECT ALL col2 * + col0 - + col1 FROM tab2
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-6396
SELECT DISTINCT 67 * col1 + - tab1.col2 * col0 DIV col1 - - col2 FROM tab1
----
1790
363
377

skipif mysql # not compatible
query I rowsort label-6396
SELECT DISTINCT 67 * col1 + - tab1.col2 * col0 / col1 - - col2 FROM tab1
----
1790
363
377

query I rowsort
SELECT + 10 + - col1 * + ( + col1 ) + col1 AS col2 FROM tab0
----
-7300
-8180
-9302

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6398
SELECT ALL - CAST( tab1.col0 AS SIGNED ) col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6398
SELECT ALL - CAST ( tab1.col0 AS INTEGER ) col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT ( col1 ) * 88 FROM tab1
----
1144
2288
880

query I rowsort
SELECT - 59 + + cor0.col0 * + col2 AS col2 FROM tab2 cor0
----
130
1969
2943

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * 65 col2 FROM tab1 AS cor0
----
3510
3705
6240

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6402
SELECT DISTINCT + col2 - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6402
SELECT DISTINCT + col2 - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL

query I rowsort
SELECT - + cor0.col2 * - col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col0 * - ( col1 * + col1 ) AS col2 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT + - col1 + - col2 + ( - col0 ) AS col2 FROM tab1 AS cor0
----
-131
-189
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + ( - ( cor0.col1 ) ) col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + + col0 * 87 FROM tab0 AS cor0
----
2088
3045
7743

query I rowsort
SELECT ALL + 2 - - col1 FROM tab1
----
12
15
28

query I rowsort
SELECT - 27 * - col2 FROM tab1
----
1458
1539
2592

onlyif mysql # use DIV operator for integer division
query I rowsort label-6410
SELECT DISTINCT - col2 DIV ( - cor0.col2 * - col2 ) FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6410
SELECT DISTINCT - col2 / ( - cor0.col2 * - col2 ) FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT - + col2 * 62 FROM tab1 AS cor0
----
-3348
-3534
-5952

query I rowsort
SELECT + - col1 * - col0 * + col0 + + col0 * col0 FROM tab0 AS cor0
----
120050
50112
728732

query I rowsort
SELECT + ( + col0 ) * - 59 + + cor0.col2 + - col2 AS col1 FROM tab2 AS cor0
----
-413
-4602
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-6414
SELECT + tab2.col2 DIV - cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 89133a65f7c69b453d3293c8c42398f0

skipif mysql # not compatible
query I rowsort label-6414
SELECT + tab2.col2 / - cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 89133a65f7c69b453d3293c8c42398f0

query I rowsort
SELECT ALL - col0 * col2 + ( 17 + col1 ) FROM tab1 AS cor0
----
-119
-3621
-7650

query I rowsort
SELECT - + col0 * col1 + 65 AS col1 FROM tab0 AS cor0
----
-1999
-3330
-8034

onlyif mysql # use DIV operator for integer division
query I rowsort label-6417
SELECT + col0 DIV - col1 + + 90 * + cor0.col1 * - col0 FROM tab2 AS cor0
----
-120874
-19530
-414181

skipif mysql # not compatible
query I rowsort label-6417
SELECT + col0 / - col1 + + 90 * + cor0.col1 * - col0 FROM tab2 AS cor0
----
-120874
-19530
-414181

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT cor0.col2 - CAST ( + 50 AS REAL ) FROM tab0, tab1 AS cor0
----
4
46
7

query I rowsort
SELECT + col1 + + 20 AS col0 FROM tab1 AS cor0
----
30
33
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-6420
SELECT 91 DIV col2 + col2 FROM tab0
----
35
83
92

skipif mysql # not compatible
query I rowsort label-6420
SELECT 91 / col2 + col2 FROM tab0
----
35
83
92

query I rowsort
SELECT - - col0 - + col0 * cor0.col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT - - cor0.col2 + + col1 - + col0 * + col1 AS col1 FROM tab1 AS cor0
----
-573
-931
2

query I rowsort
SELECT DISTINCT 89 AS col1 FROM tab0, tab2 AS cor0
----
89

query I rowsort
SELECT DISTINCT col2 * - ( - tab0.col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT + tab2.col1 + - tab2.col2 AS col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL col0 + tab2.col0 * ( + col2 ) FROM tab2
----
196
2106
3081

query I rowsort
SELECT + col1 + - ( col0 ) * col2 AS col1 FROM tab2
----
-158
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 * + col2 + col2 col2 FROM tab1 AS cor0
----
3186
3363
5664

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6429
SELECT - ( col2 ) * + col1 / CAST( NULL AS SIGNED ) + - col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6429
SELECT - ( col2 ) * + col1 / CAST ( NULL AS INTEGER ) + - col0 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( + cor0.col1 ) * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6431
SELECT DISTINCT - - CAST( col0 AS SIGNED ) + + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-6431
SELECT DISTINCT - - CAST ( col0 AS INTEGER ) + + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT - 38 * + col0 + + col2 AS col0 FROM tab2 AS cor0
----
-239
-2938
-2964

query I rowsort
SELECT ALL cor0.col2 + + 58 - col2 AS col2 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT + col2 + - col1 * col0 AS col2 FROM tab2 cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-6435
SELECT + 36 DIV col1 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6435
SELECT + 36 / col1 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT - - col0 + col1 * + 47 AS col2 FROM tab1 AS cor0
----
1225
534
691

query I rowsort
SELECT ALL 51 * + col2 FROM tab2 cor0
----
1326
1377
1938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6438
SELECT DISTINCT CAST( - col0 AS SIGNED ) * + col0 + + col2 * 39 - col2 * col0 FROM tab1
----
-10336
-5521
1935

skipif mysql # not compatible
query I rowsort label-6438
SELECT DISTINCT CAST ( - col0 AS INTEGER ) * + col0 + + col2 * 39 - col2 * col0 FROM tab1
----
-10336
-5521
1935

query I rowsort
SELECT ALL - + 52 * - col2 FROM tab0 AS cor0
----
1716
4264
52

query I rowsort
SELECT - col2 * + col2 - col0 FROM tab0 AS cor0
----
-1113
-36
-6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-6441
SELECT + - col0 DIV + ( + col1 * col0 ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6441
SELECT + - col0 / + ( + col1 * col0 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * + ( col2 ) AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - cor0.col2 * + 48 AS col0 FROM tab1 cor0
----
-2592
-2736
-4608

query I rowsort
SELECT ALL - col2 * ( col1 * + col0 ) AS col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT tab0.col0 AS col0 FROM tab0, tab2 cor0
----
24
35
89

query I rowsort
SELECT col0 - col1 * - tab0.col2 AS col1 FROM tab0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-6447
SELECT col2 + + col0 DIV - ( + col0 * + cor0.col0 ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6447
SELECT col2 + + col0 / - ( + col0 * + cor0.col0 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ( + cor0.col1 ) * ( + 33 ) FROM tab0 AS cor0
----
2838
3003
3201

query I rowsort
SELECT ALL + 35 * + col2 AS col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT ALL + - col1 + cor0.col1 * - cor0.col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - cor0.col1 * - col0 + ( col0 ) AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT cor0.col0 + col2 + col0 FROM tab0 AS cor0
----
260
71
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col0 * - 92 col1 FROM tab2 cor0
----
17388
186576
276184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * ( cor0.col0 ) + + col0 * 20 col1 FROM tab0 AS cor0
----
1056
1925
9701

query I rowsort
SELECT ALL + col2 * - col1 * + col1 AS col0 FROM tab0 cor0
----
-244068
-679042
-9409

query I rowsort
SELECT + 17 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT - - 36 * col0 AS col1 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT - cor0.col2 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT 43 + col0 FROM tab1 AS cor0
----
107
123
46

query I rowsort
SELECT ALL col2 * cor0.col0 * col2 - col1 FROM tab2 AS cor0
----
114059
5072
52669

query I rowsort
SELECT + col0 - + 96 FROM tab1 cor0
----
-16
-32
-93

query I rowsort
SELECT DISTINCT col2 + col1 + col2 * col1 AS col0 FROM tab2 AS cor0
----
1619
701
895

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6463
SELECT + - cor0.col1 + + col0 + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6463
SELECT + - cor0.col1 + + col0 + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col0 * 57 FROM tab2 AS cor0
----
-12369
-262314
-76551

query I rowsort
SELECT DISTINCT + + cor0.col2 + + col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - col2 + - col0 * - col1 * 19 FROM tab1 AS cor0
----
12103
1428
19664

query I rowsort
SELECT 60 + - col1 FROM tab0 AS cor0
----
-26
-31
-37

query I rowsort
SELECT ALL - - ( col2 ) * + 70 + - col2 FROM tab2 AS cor0
----
1794
1863
2622

query I rowsort
SELECT DISTINCT 27 + col0 FROM tab2 AS cor0
----
105
106
34

query I rowsort
SELECT + 91 - - col1 FROM tab2
----
108
122
150

query I rowsort
SELECT DISTINCT tab0.col1 + - col2 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT - col2 * + 47 * col1 + col0 FROM tab0
----
-133362
-350625
-4524

query I rowsort
SELECT + 84 * col0 * + col2 FROM tab2
----
15876
170352
252168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6474
SELECT DISTINCT - CAST( NULL AS DECIMAL ) / col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6474
SELECT DISTINCT - CAST ( NULL AS REAL ) / col2 FROM tab1
----
NULL

query I rowsort
SELECT ALL ( - tab2.col2 ) AS col0 FROM tab2
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 35 * cor0.col0 + ( col0 ) col2 FROM tab2 AS cor0
----
-238
-2652
-2686

query I rowsort
SELECT ALL + + 28 + + col0 FROM tab1 AS cor0
----
108
31
92

query I rowsort
SELECT ALL + - col2 * col1 + cor0.col0 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6479
SELECT col1 * + col2 / + CAST( NULL AS SIGNED ) + - col0 * col2 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6479
SELECT col1 * + col2 / + CAST ( NULL AS INTEGER ) + - col0 * col2 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 40 + + col0 AS col0 FROM tab0
----
129
64
75

query I rowsort
SELECT DISTINCT - 59 + - col1 * col2 AS col1 FROM tab0
----
-156
-2897
-7521

onlyif mysql # use DIV operator for integer division
query I rowsort label-6482
SELECT DISTINCT - col1 + col1 DIV tab1.col0 FROM tab1
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-6482
SELECT DISTINCT - col1 + col1 / tab1.col0 FROM tab1
----
-10
-13
-18

query I rowsort
SELECT + col0 * - col2 + - col1 * - col1 FROM tab2
----
-2713
1453
772

query I rowsort
SELECT col1 * col0 + 94 AS col0 FROM tab1
----
1134
172
734

query I rowsort
SELECT 15 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT DISTINCT - - 31 * - col0 + - col1 AS col0 FROM tab2 cor0
----
-2466
-2477
-248

query I rowsort
SELECT ALL + 40 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 09624b9180d40f03a4dda4b4c17356c0

query I rowsort
SELECT - ( + 69 ) AS col1 FROM tab1 cor0
----
-69
-69
-69

query I rowsort
SELECT ALL + col1 * + 19 FROM tab0 AS cor0
----
1634
1729
1843

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6490
SELECT + CAST( col1 AS SIGNED ) * - col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-6490
SELECT + CAST ( col1 AS INTEGER ) * - col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + - CAST ( col0 AS REAL ) col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 16 * 96 FROM tab1 AS cor0
----
1536

query I rowsort
SELECT + + ( - ( - col0 ) ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col1 * col2 * tab2.col0 AS col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT - ( 86 ) FROM tab1
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + 36 col1 FROM tab1 AS cor0
----
1944
2052
3456

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + 79 col2 FROM tab1 AS cor0
----
-237
-5056
-6320

query I rowsort
SELECT ALL cor0.col2 + - col1 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 28 * cor0.col0 col1 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT + + col0 + - col1 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL + ( cor0.col1 ) + col2 + col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT DISTINCT 29 - cor0.col0 AS col2 FROM tab0 AS cor0
----
-6
-60
5

query I rowsort
SELECT DISTINCT + ( 57 ) * col2 * - 95 - 65 FROM tab1 AS cor0
----
-292475
-308720
-519905

query I rowsort
SELECT + col1 - col0 * - col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL - ( + col1 ) * + col2 + + cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-6506
SELECT ( 24 ) DIV - col1 - col2 FROM tab1 AS cor0
----
-54
-59
-97

skipif mysql # not compatible
query I rowsort label-6506
SELECT ( 24 ) / - col1 - col2 FROM tab1 AS cor0
----
-54
-59
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6507
SELECT DISTINCT col1 * CAST( col1 AS SIGNED ) AS col1 FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-6507
SELECT DISTINCT col1 * CAST ( col1 AS INTEGER ) AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT 86 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6509
SELECT - col2 DIV - 57 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6509
SELECT - col2 / - 57 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-6511
SELECT + + cor0.col1 + + 0 DIV - col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6511
SELECT + + cor0.col1 + + 0 / - col1 AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6512
SELECT + 35 + + col2 + + col1 * col0 DIV 39 AS col2 FROM tab0 AS cor0
----
120
123
324

skipif mysql # not compatible
query I rowsort label-6512
SELECT + 35 + + col2 + + col1 * col0 / 39 AS col2 FROM tab0 AS cor0
----
120
123
324

query I rowsort
SELECT + col2 * - 30 * - col2 + - col2 + + col1 AS col2 FROM tab2 AS cor0
----
20313
21874
43299

query I rowsort
SELECT + col0 * + 41 FROM tab0 AS cor0
----
1435
3649
984

query I rowsort
SELECT + 33 + cor0.col2 FROM tab0 AS cor0
----
115
34
66

query I rowsort
SELECT + ( - 89 ) + col2 AS col0 FROM tab0 AS cor0
----
-56
-7
-88

query I rowsort
SELECT cor0.col2 + + 81 + col0 AS col0 FROM tab2 AS cor0
----
115
185
198

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + ( 66 ) + tab0.col2 * ( - ( col0 ) ) col0 FROM tab0
----
-7314
-759
30

query I rowsort
SELECT DISTINCT + 5 + col1 + col0 AS col0 FROM tab0 cor0
----
115
137
185

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 # use DIV operator for integer division
query I rowsort label-6521
SELECT ALL col1 DIV col0 - col2 * 39 FROM tab1 AS cor0
----
-2098
-2223
-3744

skipif mysql # not compatible
query I rowsort label-6521
SELECT ALL col1 / col0 - col2 * 39 FROM tab1 AS cor0
----
-2098
-2223
-3744

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 + - col2 AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT ( cor0.col2 ) + 64 AS col2 FROM tab0, tab1 AS cor0
----
118
121
160

query I rowsort
SELECT - - col1 + - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6525
SELECT + col0 DIV 19 + + col0 FROM tab2 AS cor0
----
7
82
83

skipif mysql # not compatible
query I rowsort label-6525
SELECT + col0 / 19 + + col0 FROM tab2 AS cor0
----
7
82
83

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * CAST ( - col0 AS REAL ) + - col1 AS col1 FROM tab0 AS cor0
----
-1322
-662
-8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-6527
SELECT ALL + col1 DIV col0 + col1 AS col2 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-6527
SELECT ALL + col1 / col0 + col1 AS col2 FROM tab1 AS cor0
----
10
13
34

query I rowsort
SELECT - col1 * 15 AS col1 FROM tab1 AS cor0
----
-150
-195
-390

query I rowsort
SELECT - col2 + + col0 * col0 AS col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT - col2 * ( - 97 ) FROM tab2 cor0
----
2522
2619
3686

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 + - 48 * - col0 FROM tab0 AS cor0
----
-1715
-3827
-912

query I rowsort
SELECT DISTINCT 86 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
86

query I rowsort
SELECT - col1 + + col0 * 91 FROM tab2 cor0
----
606
7039
7172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - 54 col1 FROM tab1 AS cor0
----
-28
-41
-44

query I rowsort
SELECT ALL ( tab0.col0 ) * col1 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - 66 + tab1.col2 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 4bc19cb4f414fc442ec5cbc7609514c0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col1 AS REAL ) * - col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL - 12 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 60b4654b2477631ac8f4a95ec4a22fd3

query I rowsort
SELECT - 63 * 78 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 00c27f45807ca572653323f7ee200e5f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6540
SELECT ALL tab2.col1 - CAST( NULL AS SIGNED ) * tab2.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6540
SELECT ALL tab2.col1 - CAST ( NULL AS INTEGER ) * tab2.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + cor0.col0 + col1 + 28 AS col2 FROM tab0 AS cor0
----
138
160
208

query I rowsort
SELECT - - col0 * + col1 + + col1 AS col0 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - col2 + col1 + - col0 FROM tab2 AS cor0
----
-100
-3
-45

query I rowsort
SELECT ALL - col1 * col0 - col2 FROM tab2
----
-1381
-244
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6545
SELECT ALL + col2 + col2 * col0 DIV - col1 FROM tab0 AS cor0
----
1
2
24

skipif mysql # not compatible
query I rowsort label-6545
SELECT ALL + col2 + col2 * col0 / - col1 FROM tab0 AS cor0
----
1
2
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 - col0 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 - col1 * col2 AS col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT + col0 * + tab1.col1 + - col1 AS col1 FROM tab1
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6549
SELECT col0 DIV - col1 + - col1 FROM tab2
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-6549
SELECT col0 / - col1 + - col1 FROM tab2
----
-21
-31
-60

query I rowsort
SELECT tab0.col1 * + col2 + + col0 + - col1 FROM tab0
----
2776
35
7460

query I rowsort
SELECT DISTINCT tab0.col2 + col1 * col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT col2 + - col2 + + col0 AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT tab0.col2 - + col1 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT tab1.col0 + col2 * - col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT col1 * col2 + + col2 AS col2 FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 + tab0.col0 * - col0 col2 FROM tab0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-6557
SELECT ALL col2 * col1 + - col2 DIV col2 AS col0 FROM tab0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-6557
SELECT ALL col2 * col1 + - col2 / col2 AS col0 FROM tab0
----
2837
7461
96

query I rowsort
SELECT - cor0.col2 * - col1 + col0 * - col2 AS col0 FROM tab0 cor0
----
164
2046
62

query I rowsort
SELECT DISTINCT - + cor0.col0 * - col2 + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL + col2 * col2 * + col1 AS col0 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT DISTINCT cor0.col0 * col1 + col2 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-6563
SELECT ALL + col2 + + cor0.col2 DIV + col1 AS col2 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-6563
SELECT ALL + col2 + + cor0.col2 / + col1 AS col2 FROM tab2 AS cor0
----
26
27
40

query I rowsort
SELECT DISTINCT + col1 + - col0 AS col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL - col2 - + cor0.col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - - col1 * col0 + + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT - col2 * col1 * + col2 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + col2 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 + - col1 + - tab2.col1 AS col0 FROM tab2
----
-40
-55
45

query I rowsort
SELECT DISTINCT col1 + col1 * col1 AS col0 FROM tab1
----
110
182
702

query I rowsort
SELECT col0 * + col1 + col0 * tab1.col1 FROM tab1
----
1280
156
2080

query I rowsort
SELECT tab0.col0 * + tab0.col2 AS col0 FROM tab0
----
35
7298
792

query III rowsort
SELECT ALL * FROM tab1 WHERE col0 + + col0 * - col1 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL - col2 * col0 * + col2 + - col2 FROM tab2 WHERE NOT ( col0 ) <> ( NULL )
----

query I rowsort
SELECT - + 96 * + col0 FROM tab1 AS cor0
----
-288
-6144
-7680

query I rowsort
SELECT DISTINCT - col1 * tab1.col2 * - col1 AS col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT - col0 * + col1 * - col0 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT col2 + col2 * + col2 - - col1 FROM tab0
----
1208
6897
99

query I rowsort
SELECT - tab0.col2 * col0 * col0 AS col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL col1 + + col1 + + col0 * col0 AS col2 FROM tab2
----
111
6202
6275

onlyif mysql # use DIV operator for integer division
query I rowsort label-6581
SELECT ALL - cor0.col2 DIV col2 + - col1 AS col2 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-6581
SELECT ALL - cor0.col2 / col2 + - col1 AS col2 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT - col1 - + col2 * col0 FROM tab0 WHERE col0 IN ( col0 / col1 )
----

query I rowsort
SELECT DISTINCT col1 * col2 * + col0 + - tab1.col2 AS col0 FROM tab1
----
36423
4158
99744

query I rowsort
SELECT + tab0.col1 * - col2 - - col1 AS col2 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + col2 * col2 * col2 + col1 FROM tab0 AS cor0
----
36023
551459
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6586
SELECT DISTINCT - col1 + + col2 DIV col1 AS col0 FROM tab2 AS cor0
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-6586
SELECT DISTINCT - col1 + + col2 / col1 AS col0 FROM tab2 AS cor0
----
-15
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6587
SELECT col0 DIV + col2 + + col1 AS col1 FROM tab0 AS cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-6587
SELECT col0 / + col2 + + col1 AS col1 FROM tab0 AS cor0
----
132
86
92

query I rowsort
SELECT ALL + col1 * + col2 - + col0 AS col1 FROM tab2
----
1456
567
830

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( col1 * tab2.col0 )
----

query I rowsort
SELECT col1 + + col0 * - tab0.col0 FROM tab0
----
-1128
-490
-7830

query III rowsort
SELECT ALL * FROM tab1 WHERE col2 / col1 NOT IN ( col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL col2 - col1 FROM tab1 WHERE NULL IN ( col2 * col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL > + col1 * + col1
----

query I rowsort
SELECT + col0 + - col0 * col2 * + col2 + col1 FROM tab2
----
-113980
-5065
-52591

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col2 col0 FROM tab1 WHERE NULL = NULL
----

query I rowsort
SELECT ALL 39 * tab2.col2 * + col1 FROM tab2
----
25194
32643
59826

query I rowsort
SELECT + col2 + + col2 * + 86 FROM tab2 AS cor0
----
2262
2349
3306

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6598
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 5 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6598
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 5 AS col1 FROM tab2
----
NULL

query I rowsort
SELECT 22 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT ALL + ( + col2 + tab0.col1 * - col0 ) AS col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + 22 * + col0 * col1 AS col2 FROM tab1
----
14080
1716
22880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6602
SELECT + - 52 * - col2 * + CAST( ( - col0 ) AS SIGNED ) + + col2 AS col2 FROM tab0 AS cor0
----
-1819
-379414
-41151

skipif mysql # not compatible
query I rowsort label-6602
SELECT + - 52 * - col2 * + CAST ( ( - col0 ) AS INTEGER ) + + col2 AS col2 FROM tab0 AS cor0
----
-1819
-379414
-41151

query I rowsort
SELECT + + col0 * + col1 + ( col2 ) AS col1 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6604
SELECT ALL - col2 * 52 DIV col1 AS col2 FROM tab2
----
-116
-22
-45

skipif mysql # not compatible
query I rowsort label-6604
SELECT ALL - col2 * 52 / col1 AS col2 FROM tab2
----
-116
-22
-45

query I rowsort
SELECT ALL - 96 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6606
SELECT + col1 * + CAST( ( col0 ) AS SIGNED ) FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-6606
SELECT + col1 * + CAST ( ( col0 ) AS INTEGER ) FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6607
SELECT DISTINCT + cor0.col0 DIV + 85 FROM tab0, tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-6607
SELECT DISTINCT + cor0.col0 / + 85 FROM tab0, tab1 cor0
----
0

query I rowsort
SELECT - tab1.col0 * 70 * - col0 FROM tab1
----
286720
448000
630

query I rowsort
SELECT cor0.col1 + col2 + col0 AS col2 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT - col0 * - col0 * 55 AS col0 FROM tab1 AS cor0
----
225280
352000
495

query I rowsort
SELECT DISTINCT - 69 FROM tab0, tab0 cor0
----
-69

onlyif mysql # use DIV operator for integer division
query I rowsort label-6612
SELECT ALL 70 DIV + 89 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6612
SELECT ALL 70 / + 89 FROM tab0
----
0
0
0

query I rowsort
SELECT ( + col0 ) - + col0 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - 96 + - col0 AS col0 FROM tab1 AS cor0
----
-160
-176
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6615
SELECT ALL - - CAST( NULL AS SIGNED ) * 95 + + col2 / cor0.col2 + + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6615
SELECT ALL - - CAST ( NULL AS INTEGER ) * 95 + + col2 / cor0.col2 + + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6616
SELECT DISTINCT + - CAST( col2 AS SIGNED ) DIV - col0 FROM tab0 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6616
SELECT DISTINCT + - CAST ( col2 AS INTEGER ) / - col0 FROM tab0 cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6617
SELECT + ( col1 ) DIV + cor0.col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6617
SELECT + ( col1 ) / + cor0.col0 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT 60 * + col1 AS col1 FROM tab0 AS cor0
----
5160
5460
5820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) + col0 col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - 63 AS col1 FROM tab2 AS cor0
----
-63
-63
-63

query I rowsort
SELECT ALL - 93 * - cor0.col1 FROM tab1 AS cor0
----
1209
2418
930

query I rowsort
SELECT DISTINCT + + 29 * col0 FROM tab2 cor0
----
203
2262
2291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * + col0 col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + 10 + col0 * col2 FROM tab0 AS cor0
----
45
7308
802

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 + - col2 + - col1 * + 5 col0 FROM tab0 AS cor0
----
-463
-486
-537

query I rowsort
SELECT + col2 * + 78 AS col1 FROM tab0 AS cor0
----
2574
6396
78

query I rowsort
SELECT col1 + - ( col2 + - col0 * col1 ) AS col2 FROM tab0 cor0
----
2117
3491
8108

query I rowsort
SELECT + col0 + + 4 FROM tab2 AS cor0
----
11
82
83

query I rowsort
SELECT DISTINCT + + col1 * - col2 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - cor0.col0 * - ( - col1 ) + + col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - col2 * + col2 + + cor0.col1 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6633
SELECT - ( + col1 ) * col2 DIV col1 AS col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6633
SELECT - ( + col1 ) * col2 / col1 AS col2 FROM tab0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6634
SELECT + col1 DIV + col1 + + col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6634
SELECT + col1 / + col1 + + col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT DISTINCT - col1 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL - col2 * col0 * - ( col2 ) - + col1 * col1 * + col0 AS col1 FROM tab0 AS cor0
----
-138573
-151368
-329280

query I rowsort
SELECT DISTINCT + + col2 * 45 AS col1 FROM tab0 AS cor0
----
1485
3690
45

query I rowsort
SELECT DISTINCT - col2 + + col2 * - col0 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6639
SELECT DISTINCT + col0 * ( col0 ) * col1 + CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
118922
49622
720902

skipif mysql # not compatible
query I rowsort label-6639
SELECT DISTINCT + col0 * ( col0 ) * col1 + CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
118922
49622
720902

query I rowsort
SELECT col1 * - 86 - + col2 * + col1 FROM tab2 AS cor0
----
-2108
-3503
-6608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 - col0 * col2 col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL col0 * 43 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT DISTINCT - - col1 + cor0.col2 + + 80 * col1 FROM tab0 AS cor0
----
6999
7453
7858

query I rowsort
SELECT - col2 - + col2 * - cor0.col1 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT ALL + - col2 + col2 + - col1 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col0 + 96 AS col0 FROM tab0 AS cor0
----
61
7
72

query I rowsort
SELECT - col1 * + col1 + 80 FROM tab0 AS cor0
----
-7316
-8201
-9329

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6648
SELECT + col2 * + ( col2 ) - col0 / - CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6648
SELECT + col2 * + ( col2 ) - col0 / - CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + col0 * col1 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + col1 - + ( + 44 ) AS col2 FROM tab2 cor0
----
-13
-27
15

query I rowsort
SELECT DISTINCT col2 + + cor0.col0 * col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + cor0.col0 + 78 col1 FROM tab2 AS cor0
----
127
6162
6319

query I rowsort
SELECT ALL col0 + + 20 * col0 FROM tab1 AS cor0
----
1344
1680
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-6654
SELECT + col1 DIV col2 + ( + col1 * col0 + cor0.col2 * + col0 ) AS col0 FROM tab0 AS cor0
----
15398
2858
3527

skipif mysql # not compatible
query I rowsort label-6654
SELECT + col1 / col2 + ( + col1 * col0 + cor0.col2 * + col0 ) AS col0 FROM tab0 AS cor0
----
15398
2858
3527

onlyif mysql # use DIV operator for integer division
query I rowsort label-6655
SELECT DISTINCT - 96 DIV - cor0.col0 - 29 FROM tab0, tab2 AS cor0
----
-16
-28

skipif mysql # not compatible
query I rowsort label-6655
SELECT DISTINCT - 96 / - cor0.col0 - 29 FROM tab0, tab2 AS cor0
----
-16
-28

query I rowsort
SELECT DISTINCT - col1 * + col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT - col1 * col0 - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-6658
SELECT ALL 2 DIV - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6658
SELECT ALL 2 / - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 79 + col0 col1 FROM tab1 AS cor0
----
143
159
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6660
SELECT cor0.col1 DIV + 43 FROM tab1, tab2, tab0 AS cor0, tab2 AS cor1
----
81 values hashing to 6d1be3904d6870ba21bc766b979d1110

skipif mysql # not compatible
query I rowsort label-6660
SELECT cor0.col1 / + 43 FROM tab1, tab2, tab0 AS cor0, tab2 AS cor1
----
81 values hashing to 6d1be3904d6870ba21bc766b979d1110

query I rowsort
SELECT - 1 + tab2.col0 * ( 90 ) FROM tab2
----
629
7019
7109

query I rowsort
SELECT - 13 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 1c6aaa07ba8d3dc01ee616e16bef60f2

query I rowsort
SELECT DISTINCT + 34 FROM tab0, tab2, tab2 AS cor0
----
34

query I rowsort
SELECT DISTINCT + 95 AS col0 FROM tab2 AS cor0
----
95

query I rowsort
SELECT ALL - - cor0.col2 * 21 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to de28110a6888259783c448ca40ca2460

query I rowsort
SELECT DISTINCT - col1 - col1 * + 59 * - col1 FROM tab0 AS cor0
----
436278
488488
555034

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 * - col0 col1 FROM tab1 AS cor0
----
-262144
-27
-512000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6668
SELECT DISTINCT + 89 + - col2 * + CAST( - 47 * + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
141183
8972
95405

skipif mysql # not compatible
query I rowsort label-6668
SELECT DISTINCT + 89 + - col2 * + CAST ( - 47 * + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
141183
8972
95405

onlyif mysql # use DIV operator for integer division
query I rowsort label-6669
SELECT + 83 DIV - col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6669
SELECT + 83 / - col2 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT ALL 30 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * cor0.col0 + 77 col1 FROM tab1 cor0
----
-4019
-6323
68

query I rowsort
SELECT + + cor0.col0 + - 47 AS col0 FROM tab1 AS cor0
----
-44
17
33

query I rowsort
SELECT DISTINCT col2 * ( 10 ) FROM tab1
----
540
570
960

query I rowsort
SELECT DISTINCT + 47 AS col1 FROM tab0, tab0 AS cor0
----
47

query I rowsort
SELECT + - cor0.col0 * + col2 FROM tab1 cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 col0 FROM tab1 cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col2 ) * cor0.col2 col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL 15 + col0 AS col1 FROM tab0 AS cor0
----
104
39
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-6679
SELECT ( + 2 ) * + cor0.col1 + col0 DIV + col0 FROM tab1 cor0
----
21
27
53

skipif mysql # not compatible
query I rowsort label-6679
SELECT ( + 2 ) * + cor0.col1 + col0 / + col0 FROM tab1 cor0
----
21
27
53

query I rowsort
SELECT ALL - - 96 * 43 * col1 AS col1 FROM tab1 AS cor0
----
107328
41280
53664

query I rowsort
SELECT + 77 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL - + cor0.col2 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 83 * - col0 * + col2 AS col2 FROM tab0 AS cor0
----
2905
605734
65736

query I rowsort
SELECT DISTINCT - 76 * + cor0.col0 + - ( col2 ) * col1 FROM tab0 AS cor0
----
-14226
-2757
-4662

query I rowsort
SELECT + 20 * - col0 FROM tab2 cor0
----
-140
-1560
-1580

query I rowsort
SELECT DISTINCT - col1 * col1 * 76 AS col0 FROM tab0 AS cor0
----
-562096
-629356
-715084

query I rowsort
SELECT + 70 + + cor0.col2 FROM tab0 AS cor0
----
103
152
71

query I rowsort
SELECT DISTINCT col2 + - col2 * + 42 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT ALL - - col2 * + col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - 19 + cor0.col2 AS col2 FROM tab0 AS cor0
----
101
20
52

query I rowsort
SELECT - + 15 * + col2 + 34 + - 66 * + cor0.col1 FROM tab2 AS cor0
----
-1658
-2417
-4250

onlyif mysql # use DIV operator for integer division
query I rowsort label-6692
SELECT 31 DIV - 52 + + tab1.col2 * ( - col0 ) AS col1 FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-6692
SELECT 31 / - 52 + + tab1.col2 * ( - col0 ) AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 10 + tab2.col0 FROM tab2
----
17
88
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6694
SELECT ALL col0 + 30 * - col1 * + 88 + col1 DIV + col0 AS col1 FROM tab0
----
-227013
-240150
-256043

skipif mysql # not compatible
query I rowsort label-6694
SELECT ALL col0 + 30 * - col1 * + 88 + col1 / + col0 AS col1 FROM tab0
----
-227013
-240150
-256043

query I rowsort
SELECT DISTINCT + col1 + - 24 FROM tab0
----
62
67
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6696
SELECT DISTINCT + 88 * 76 + tab1.col2 + - 40 DIV col0 AS col0 FROM tab1
----
6729
6745
6784

skipif mysql # not compatible
query I rowsort label-6696
SELECT DISTINCT + 88 * 76 + tab1.col2 + - 40 / col0 AS col0 FROM tab1
----
6729
6745
6784

query I rowsort
SELECT DISTINCT + 43 + - 33 * col1 FROM tab2
----
-1904
-518
-980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col2 FROM tab1, tab0 cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

onlyif mysql # use DIV operator for integer division
query I rowsort label-6699
SELECT DISTINCT - ( + col0 ) DIV + col1 FROM tab1
----
-6
0

skipif mysql # not compatible
query I rowsort label-6699
SELECT DISTINCT - ( + col0 ) / + col1 FROM tab1
----
-6
0

query I rowsort
SELECT DISTINCT + tab0.col0 * - 57 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-1368
-1995
-5073

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 44 col2 FROM tab0
----
44
44
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-6702
SELECT 40 DIV - col0 + - col0 * - tab2.col2 FROM tab2
----
184
2028
3002

skipif mysql # not compatible
query I rowsort label-6702
SELECT 40 / - col0 + - col0 * - tab2.col2 FROM tab2
----
184
2028
3002

query I rowsort
SELECT DISTINCT 82 * col2 FROM tab0
----
2706
6724
82

query I rowsort
SELECT col1 + + col2 * + tab2.col2 + ( + col2 ) AS col0 FROM tab2
----
1499
761
787

query I rowsort
SELECT ALL 72 * - col2 AS col1 FROM tab1
----
-3888
-4104
-6912

query I rowsort
SELECT ALL 31 * - col2 AS col1 FROM tab2
----
-1178
-806
-837

query I rowsort
SELECT col0 + 33 FROM tab2 AS cor0
----
111
112
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6708
SELECT + col0 + CAST( - 94 * + col1 AS SIGNED ) FROM tab1 cor0
----
-1142
-2441
-876

skipif mysql # not compatible
query I rowsort label-6708
SELECT + col0 + CAST ( - 94 * + col1 AS INTEGER ) FROM tab1 cor0
----
-1142
-2441
-876

query I rowsort
SELECT ALL - - col1 + + 8 AS col2 FROM tab1 AS cor0
----
18
21
34

query I rowsort
SELECT + - cor0.col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT col1 + - 72 AS col2 FROM tab2
----
-13
-41
-55

query I rowsort
SELECT - col2 + + ( 58 ) * col2 + tab1.col0 AS col1 FROM tab1
----
3081
3313
5552

query I rowsort
SELECT DISTINCT col2 * - ( + ( col1 ) ) + col2 FROM tab2
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6714
SELECT col2 - + CAST( - col2 AS SIGNED ) col0 FROM tab1
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6714
SELECT col2 - + CAST ( - col2 AS INTEGER ) col0 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT 52 AS col1 FROM tab0, tab1 cor0
----
52

query I rowsort
SELECT + 25 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6717
SELECT ALL col2 * 0 DIV + col1 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6717
SELECT ALL col2 * 0 / + col1 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + col1 * + ( col2 + - cor0.col2 * - ( col1 ) ) FROM tab0 AS cor0
----
246906
686504
9506

query I rowsort
SELECT col0 * 21 + + col0 AS col1 FROM tab1
----
1408
1760
66

query I rowsort
SELECT ALL - col1 * col0 * + 33 + col0 * - col0 + 13 AS col1 FROM tab0
----
-113247
-275175
-68675

query I rowsort
SELECT DISTINCT col0 * ( - col0 ) + col1 + + 80 AS col2 FROM tab2
----
-5945
-6144
62

query I rowsort
SELECT - + col2 + col0 * - cor0.col0 FROM tab1 cor0
----
-4153
-63
-6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 col1 FROM tab0 AS cor0
----
-44
-44
-44

query I rowsort
SELECT + 32 + - col2 * - col2 * + ( + ( + col0 ) ) FROM tab1 AS cor0
----
207968
737312
8780

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6725
SELECT DISTINCT + CAST( ( col1 ) AS SIGNED ) AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6725
SELECT DISTINCT + CAST ( ( col1 ) AS INTEGER ) AS col2 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - col0 * col0 col0 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + 10 * + col1 - 96 AS col1 FROM tab1
----
164
34
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT 4 + - col1 AS col2 FROM tab2 AS cor0
----
-13
-27
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-6730
SELECT - 68 DIV col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6730
SELECT - 68 / col0 FROM tab0 AS cor0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 + - col0 col1 FROM tab0 AS cor0
----
-42
12
23

query I rowsort
SELECT ALL + - col0 + col2 + - col0 FROM tab1 cor0
----
-64
-71
48

query I rowsort
SELECT DISTINCT + cor0.col2 * - ( + col1 ) AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - + col2 + col1 * col2 * col2 FROM tab2 AS cor0
----
22572
24510
39858

query I rowsort
SELECT ALL col0 * col1 + - col0 AS col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + col0 * 24 + cor0.col0 AS col1 FROM tab2 AS cor0
----
175
1950
1975

query I rowsort
SELECT ALL 95 * col2 * col0 FROM tab0
----
3325
693310
75240

query I rowsort
SELECT ALL 55 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6739
SELECT ALL + tab2.col2 DIV 70 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6739
SELECT ALL + tab2.col2 / 70 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - 96 * col0 AS col2 FROM tab0 AS cor0
----
-2304
-3360
-8544

query I rowsort
SELECT ALL + + 25 * - col0 AS col0 FROM tab0 AS cor0
----
-2225
-600
-875

query I rowsort
SELECT ALL col0 + col1 * - col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + tab2.col1 * col1 + col1 * + 31 * + 19 AS col0 FROM tab2
----
10302
19220
38232

query I rowsort
SELECT DISTINCT + - 15 * col0 AS col1 FROM tab1 AS cor0
----
-1200
-45
-960

query I rowsort
SELECT - 12 * col1 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT ALL + ( + col2 ) + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL cor0.col1 * col2 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ( + col1 ) + + col0 * col0 AS col1 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6749
SELECT + + 95 DIV col0 col1 FROM tab1 AS cor0
----
1
1
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6749
SELECT + + 95 / col0 col1 FROM tab1 AS cor0
----
1
1
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 col1 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + 48 * - col2 FROM tab0 cor0
----
-1584
-3936
-48

query I rowsort
SELECT DISTINCT - + col2 + cor0.col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + - col1 + cor0.col1 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + col0 * + col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL ( col2 + - tab0.col1 ) * col0 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT ALL - 39 AS col1 FROM tab2
----
-39
-39
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6757
SELECT DISTINCT + col0 DIV col2 + + col0 * col2 AS col1 FROM tab0 AS cor0
----
70
7299
792

skipif mysql # not compatible
query I rowsort label-6757
SELECT DISTINCT + col0 / col2 + + col0 * col2 AS col1 FROM tab0 AS cor0
----
70
7299
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6758
SELECT ALL col0 * + col0 + - col2 + - col2 * + 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-6758
SELECT ALL col0 * + col0 + - col2 + - col2 * + CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6759
SELECT ALL + - col2 DIV 35 FROM tab1 cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-6759
SELECT ALL + - col2 / 35 FROM tab1 cor0
----
-1
-1
-2

query I rowsort
SELECT + - col2 * + 65 + ( + col2 ) AS col0 FROM tab2 AS cor0
----
-1664
-1728
-2432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + 79 * 0 col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col0 * 93 + + 9 * col0 FROM tab0 AS cor0
----
2448
3570
9078

onlyif mysql # use DIV operator for integer division
query I rowsort label-6763
SELECT + col0 DIV ( col1 ) FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-6763
SELECT + col0 / ( col1 ) FROM tab1 cor0
----
0
6
6

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 cor1, tab0 AS cor2
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT ALL - - col2 * - 80 AS col1 FROM tab2 AS cor0
----
-2080
-2160
-3040

query I rowsort
SELECT + col0 * - 97 + 29 FROM tab0 AS cor0
----
-2299
-3366
-8604

query I rowsort
SELECT DISTINCT + cor0.col2 * + 61 AS col1 FROM tab2 AS cor0
----
1586
1647
2318

query I rowsort
SELECT ALL - + col0 + ( - col1 ) * cor0.col2 * 27 FROM tab0 AS cor0
----
-201563
-2654
-76650

query I rowsort
SELECT ALL 99 * ( - col1 ) AS col2 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT - 4 * + 68 FROM tab1 AS cor0
----
-272
-272
-272

query I rowsort
SELECT - - col2 * + ( + col1 + 78 ) FROM tab1 AS cor0
----
5016
5616
8736

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6772
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + col0 * col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6772
SELECT DISTINCT + CAST ( NULL AS REAL ) + col0 * col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col1 col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL tab1.col2 * col2 + col0 AS col0 FROM tab1
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-6775
SELECT - + 82 DIV 10 + col2 FROM tab2 AS cor0
----
18
19
30

skipif mysql # not compatible
query I rowsort label-6775
SELECT - + 82 / 10 + col2 FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT - - 36 + col1 FROM tab0 AS cor0
----
122
127
133

query I rowsort
SELECT - + 39 + + ( col1 ) * cor0.col1 FROM tab2 AS cor0
----
250
3442
922

onlyif mysql # use DIV operator for integer division
query I rowsort label-6778
SELECT + + 92 DIV col0 AS col2 FROM tab2 AS cor0
----
1
1
13

skipif mysql # not compatible
query I rowsort label-6778
SELECT + + 92 / col0 AS col2 FROM tab2 AS cor0
----
1
1
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6779
SELECT DISTINCT + + CAST( col2 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-6779
SELECT DISTINCT + + CAST ( col2 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - 70 + col0 AS col0 FROM tab0 AS cor0
----
105
159
94

query I rowsort
SELECT + + 9 * + cor0.col2 + + col1 AS col2 FROM tab2 AS cor0
----
274
293
359

query I rowsort
SELECT ALL col2 * ( col0 ) + col1 * - col1 AS col0 FROM tab0
----
-6604
-9374
-983

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6783
SELECT col2 + CAST( ( col0 ) AS SIGNED ) FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-6783
SELECT col2 + CAST ( ( col0 ) AS INTEGER ) FROM tab0
----
171
36
57

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 CROSS JOIN tab1, tab0 cor1
----
972 values hashing to 5e655b1287771868a8f868574a94d749

onlyif mysql # use DIV operator for integer division
query I rowsort label-6785
SELECT + col1 * col2 DIV col1 + 24 * col1 FROM tab0
----
2097
2266
2329

skipif mysql # not compatible
query I rowsort label-6785
SELECT + col1 * col2 / col1 + 24 * col1 FROM tab0
----
2097
2266
2329

query I rowsort
SELECT ALL + + 60 * - col2 AS col1 FROM tab0 AS cor0
----
-1980
-4920
-60

query I rowsort
SELECT DISTINCT ( + col1 ) * + cor0.col2 + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6788
SELECT DISTINCT - - ( col2 ) DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6788
SELECT DISTINCT - - ( col2 ) / + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT 83 AS col0 FROM tab1, tab0 AS cor0
----
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6790
SELECT - 52 DIV + tab0.col2 + col2 * + ( + col2 ) + + col1 AS col2 FROM tab0
----
1174
46
6815

skipif mysql # not compatible
query I rowsort label-6790
SELECT - 52 / + tab0.col2 + col2 * + ( + col2 ) + + col1 AS col2 FROM tab0
----
1174
46
6815

query I rowsort
SELECT ALL - 66 + col2 + - col2 AS col1 FROM tab0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - 37 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-37

query I rowsort
SELECT DISTINCT - cor0.col2 * 2 + 94 AS col2 FROM tab1, tab0, tab0 AS cor0
----
-70
28
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6794
SELECT + col1 * - CAST( col1 * col2 AS SIGNED ) + - ( + col0 + + col1 ) * 50 * + 28 FROM tab1 AS cor0
----
-109300
-146424
-77104

skipif mysql # not compatible
query I rowsort label-6794
SELECT + col1 * - CAST ( col1 * col2 AS INTEGER ) + - ( + col0 + + col1 ) * 50 * + 28 FROM tab1 AS cor0
----
-109300
-146424
-77104

query I rowsort
SELECT DISTINCT - col0 + + 18 * + 22 AS col1 FROM tab0 AS cor0
----
307
361
372

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6796
SELECT cor0.col0 + + CAST( - 64 AS SIGNED ) * + col2 * col0 FROM tab1 AS cor0
----
-10365
-233408
-491440

skipif mysql # not compatible
query I rowsort label-6796
SELECT cor0.col0 + + CAST ( - 64 AS INTEGER ) * + col2 * col0 FROM tab1 AS cor0
----
-10365
-233408
-491440

onlyif mysql # use DIV operator for integer division
query I rowsort label-6797
SELECT ALL + col2 * 65 + col2 DIV col1 FROM tab0 AS cor0
----
2145
5330
65

skipif mysql # not compatible
query I rowsort label-6797
SELECT ALL + col2 * 65 + col2 / col1 FROM tab0 AS cor0
----
2145
5330
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 + col0 col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - cor0.col2 * col1 + ( col2 ) * + 34 * + ( col0 ) FROM tab2 AS cor0
----
101422
5589
67418

query I rowsort
SELECT - + cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 * - tab2.col1 col2 FROM tab2
----
-1547
-2821
-5369

query I rowsort
SELECT 21 * - col0 AS col2 FROM tab2 cor0
----
-147
-1638
-1659

query I rowsort
SELECT - + col1 + - col2 AS col2 FROM tab0 cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6804
SELECT - - cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6804
SELECT - - cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 * + col2 - col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT ALL col1 * 80 FROM tab2 AS cor0
----
1360
2480
4720

query I rowsort
SELECT - + ( - col2 ) + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + + col0 * ( col0 ) + - col2 AS col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT - - ( + col0 ) * col1 + col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-6810
SELECT + ( cor0.col0 ) * col1 + col2 * cor0.col2 DIV + col0 + ( - cor0.col2 ) DIV col0 AS col0 FROM tab1 AS cor0
----
1032
1154
690

skipif mysql # not compatible
query I rowsort label-6810
SELECT + ( cor0.col0 ) * col1 + col2 * cor0.col2 / + col0 + ( - cor0.col2 ) / col0 AS col0 FROM tab1 AS cor0
----
1032
1154
690

query I rowsort
SELECT + col2 + col1 + - col0 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT ALL + + 34 * col2 AS col0 FROM tab1 AS cor0
----
1836
1938
3264

query I rowsort
SELECT DISTINCT + + col0 + + col1 + 73 * col1 FROM tab1 cor0
----
1042
1927
804

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + col0 col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + 12 * col1 FROM tab0
----
1032
1092
1164

query I rowsort
SELECT + tab2.col1 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT ( + tab2.col1 + + col1 ) DIV ( - col0 ) AS col0 FROM tab2
----
-1
-8
0

skipif mysql # not compatible
query I rowsort label-6817
SELECT ( + tab2.col1 + + col1 ) / ( - col0 ) AS col0 FROM tab2
----
-1
-8
0

query I rowsort
SELECT DISTINCT + col0 + + col1 * + ( - ( + col1 ) ) FROM tab0 AS cor0
----
-7372
-8192
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6819
SELECT ALL + cor0.col1 + col0 * CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6819
SELECT ALL + cor0.col1 + col0 * CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 + - cor0.col2 + - col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL col1 * + col2 + - cor0.col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
26
27
38

query I rowsort
SELECT 98 AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6824
SELECT col2 DIV 1 col0 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6824
SELECT col2 / 1 col0 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6825
SELECT 58 DIV 7 FROM tab1
----
8
8
8

skipif mysql # not compatible
query I rowsort label-6825
SELECT 58 / 7 FROM tab1
----
8
8
8

query I rowsort
SELECT 28 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

onlyif mysql # use DIV operator for integer division
query I rowsort label-6827
SELECT 21 DIV + col0 + + col1 + tab2.col2 FROM tab2
----
55
61
85

skipif mysql # not compatible
query I rowsort label-6827
SELECT 21 / + col0 + + col1 + tab2.col2 FROM tab2
----
55
61
85

query I rowsort
SELECT - - col0 * col2 + ( col1 ) AS col1 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT - col2 * col0 * + col2 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + col1 + + 4 * col0 FROM tab0 AS cor0
----
182
237
447

query I rowsort
SELECT + + 11 * + 91 FROM tab0 AS cor0
----
1001
1001
1001

query I rowsort
SELECT - col2 * ( col2 + col2 ) AS col0 FROM tab1 AS cor0
----
-18432
-5832
-6498

query I rowsort
SELECT DISTINCT - - 14 + col1 + - col1 AS col1 FROM tab0 AS cor0
----
14

query I rowsort
SELECT ALL - ( + cor0.col1 ) + col0 * + ( + col1 + - cor0.col1 * 76 ) AS col0 FROM tab2 AS cor0
----
-100742
-16306
-345209

onlyif mysql # use DIV operator for integer division
query I rowsort label-6835
SELECT DISTINCT + - col0 DIV + col0 AS col2 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6835
SELECT DISTINCT + - col0 / + col0 AS col2 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + cor0.col0 * - cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 39 * col1 + col0 * - ( - 96 * col2 ) AS col0 FROM tab0 AS cor0
----
704157
7143
79386

query I rowsort
SELECT - ( 9 ) FROM tab0 cor0
----
-9
-9
-9

query I rowsort
SELECT ALL - col2 + 23 * - col0 FROM tab0 AS cor0
----
-2129
-585
-806

query I rowsort
SELECT ALL - col2 * + col0 * + col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT + col0 + tab1.col2 * - col2 + 14 AS col2 FROM tab1
----
-2899
-3171
-9122

query I rowsort
SELECT DISTINCT tab2.col2 + col0 * - col0 FROM tab2
----
-22
-6058
-6203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6843
SELECT + col0 + col0 * - CAST( + col1 AS SIGNED ) FROM tab0
----
-2040
-3360
-8010

skipif mysql # not compatible
query I rowsort label-6843
SELECT + col0 + col0 * - CAST ( + col1 AS INTEGER ) FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT 49 + - col1 AS col1 FROM tab2
----
-10
18
32

query I rowsort
SELECT - - col2 * + ( cor0.col1 ) + col2 * - col1 + - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - col1 * col0 - + col1 * tab0.col0 FROM tab0
----
-16198
-4128
-6790

query I rowsort
SELECT ALL + col0 * tab2.col1 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT - col2 * 1 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - col1 + - 53 FROM tab1 AS cor0
----
-63
-66
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col1 + ( - col2 ) col0 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL + + col1 * col0 * - cor0.col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 * col0 - col0 * + 86 AS col1 FROM tab1 AS cor0
----
-154
-4854
-5827

query I rowsort
SELECT ALL - - col0 * - 2 + + col2 FROM tab2 AS cor0
----
-120
-130
13

query I rowsort
SELECT - col1 + + 44 * col2 AS col1 FROM tab0 AS cor0
----
-53
1366
3517

query I rowsort
SELECT DISTINCT - col1 - 70 AS col2 FROM tab2 cor0
----
-101
-129
-87

query I rowsort
SELECT DISTINCT - cor0.col2 * 65 + 49 FROM tab2 AS cor0
----
-1641
-1706
-2421

query I rowsort
SELECT - cor0.col0 * + ( col1 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col2 * 4 + + 18 AS col0 FROM tab2 AS cor0
----
-134
-86
-90

query I rowsort
SELECT DISTINCT col1 + + 67 FROM tab2 AS cor0
----
126
84
98

query I rowsort
SELECT ALL + 32 + 75 * col0 * + col0 FROM tab0 AS cor0
----
43232
594107
91907

query I rowsort
SELECT + - 45 * ( - col1 ) AS col0 FROM tab1 AS cor0
----
1170
450
585

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6862
SELECT ALL - CAST( - 87 AS SIGNED ) FROM tab2 AS cor0
----
87
87
87

skipif mysql # not compatible
query I rowsort label-6862
SELECT ALL - CAST ( - 87 AS INTEGER ) FROM tab2 AS cor0
----
87
87
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6863
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6863
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 97 * + 5 AS col1 FROM tab1 AS cor0
----
-485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 81 col0 FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT DISTINCT - + col1 + ( - col2 ) AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - - 87 * - 12 * + col0 + col2 FROM tab1 AS cor0
----
-3078
-66759
-83424

query I rowsort
SELECT + + col1 - + 24 FROM tab1 AS cor0
----
-11
-14
2

query I rowsort
SELECT - 68 * col0 * col1 - - 10 FROM tab0 AS cor0
----
-140342
-230850
-550722

onlyif mysql # use DIV operator for integer division
query I rowsort label-6870
SELECT ALL + col1 + col0 DIV col2 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-6870
SELECT ALL + col1 + col0 / col2 FROM tab1 AS cor0
----
11
13
26

query I rowsort
SELECT ALL - 4 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 39ed23475412c3cbba02ecdd2d7018e6

query I rowsort
SELECT ALL + + ( - col0 ) * cor0.col1 - col2 * - col0 AS col0 FROM tab2 cor0
----
-2574
-28
1659

query I rowsort
SELECT - ( + col2 ) + + 76 FROM tab1 AS cor0
----
-20
19
22

query I rowsort
SELECT + - ( cor0.col2 ) + - 25 + col1 AS col0 FROM tab1 AS cor0
----
-108
-53
-72

query I rowsort
SELECT ALL + - col2 * + col0 * ( col0 * col2 ) AS col0 FROM tab2 cor0
----
-35721
-4112784
-9012004

query I rowsort
SELECT - 98 + - col2 * col1 FROM tab2 cor0
----
-1632
-744
-935

query I rowsort
SELECT - col0 + - cor0.col0 + + col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + cor0.col1 + col2 col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT ALL - - col1 * cor0.col0 - + 94 FROM tab0 AS cor0
----
1970
3301
8005

query I rowsort
SELECT ALL - - col1 + - col0 * - col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + col2 + + col0 + 69 FROM tab0 AS cor0
----
105
126
240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col2 FROM tab1
----
66
66
66

query I rowsort
SELECT DISTINCT - - ( + col2 ) * - col1 + 82 FROM tab1 AS cor0
----
-1166
-1322
-488

query I rowsort
SELECT col1 * - col2 + 75 FROM tab0 cor0
----
-22
-2763
-7387

query I rowsort
SELECT col2 * col0 + ( col0 ) + cor0.col1 AS col2 FROM tab1 AS cor0
----
191
3722
7773

query I rowsort
SELECT col0 * col1 + 89 FROM tab0 AS cor0
----
2153
3484
8188

query I rowsort
SELECT - ( cor1.col2 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT DISTINCT 47 + col1 FROM tab0
----
133
138
144

query I rowsort
SELECT + ( - col2 ) * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - - 48 + col0 * col0 FROM tab1 AS cor0
----
4144
57
6448

query I rowsort
SELECT ALL + ( - col1 ) * - col1 AS col1 FROM tab1 cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6892
SELECT ALL col0 + - col0 * col2 + cor0.col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
-178
-1950
-2923

skipif mysql # not compatible
query I rowsort label-6892
SELECT ALL col0 + - col0 * col2 + cor0.col1 / + col0 AS col2 FROM tab2 AS cor0
----
-178
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6893
SELECT ALL + + ( + col2 ) DIV col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6893
SELECT ALL + + ( + col2 ) / col2 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT 3 * col1 AS col0 FROM tab1
----
30
39
78

query I rowsort
SELECT - tab0.col2 * + tab0.col0 * col0 + - col2 * 53 FROM tab0
----
-1278
-20757
-653868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - 72 col2 FROM tab1
----
-69
-8
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6897
SELECT ALL col2 + - col0 DIV col1 + 27 FROM tab0
----
109
28
60

skipif mysql # not compatible
query I rowsort label-6897
SELECT ALL col2 + - col0 / col1 + 27 FROM tab0
----
109
28
60

query I rowsort
SELECT DISTINCT - col1 + 45 AS col1 FROM tab2
----
-14
14
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6899
SELECT DISTINCT ( - 79 ) * - col0 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6899
SELECT DISTINCT ( - 79 ) * - col0 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 86 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to e219687f6f4ab6f7ee442792edcebca9

query I rowsort
SELECT - col0 * 35 + - col2 FROM tab2 AS cor0
----
-272
-2756
-2803

query I rowsort
SELECT - - col1 * - col1 - ( + col2 ) * - col0 AS col0 FROM tab0 cor0
----
-6604
-9374
-983

query I rowsort
SELECT + + col2 + + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - 78 FROM tab2, tab1 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 * col2 col1 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - ( + 78 ) + col1 - col0 FROM tab0
----
-16
-16
-76

query I rowsort
SELECT - + col0 + + col2 * - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT - 9 * ( + cor0.col0 ) * ( - cor0.col1 * col0 ) FROM tab2 AS cor0
----
13671
3230604
954873

query I rowsort
SELECT ( ( - col1 ) ) * - col1 + col1 * + col1 AS col0 FROM tab1 AS cor0
----
1352
200
338

query I rowsort
SELECT DISTINCT ( + col2 ) + + col0 AS col2 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 9 ) + + col1 col1 FROM tab2 AS cor0
----
22
50
8

query I rowsort
SELECT - cor0.col0 + + cor0.col1 AS col2 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT - 28 * + col0 + + col0 AS col0 FROM tab2 AS cor0
----
-189
-2106
-2133

query I rowsort
SELECT - - 52 AS col2 FROM tab2 AS cor0
----
52
52
52

query I rowsort
SELECT DISTINCT - 17 + - col1 * 8 * - col2 AS col1 FROM tab1 cor0
----
11215
4543
9967

query I rowsort
SELECT - - col1 * 22 + - ( col0 ) * + col2 - + col0 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-13794
-7524
401

query I rowsort
SELECT - col0 * + 47 + - 62 * col0 AS col1 FROM tab2 AS cor0
----
-763
-8502
-8611

query I rowsort
SELECT + cor0.col2 * 90 FROM tab1, tab1 AS cor0
----
9 values hashing to d7b5fad5288a7bcff71018a7f839fb52

query I rowsort
SELECT + 92 * - col2 + ( + col1 ) * col0 FROM tab0
----
-972
3303
555

query I rowsort
SELECT + ( col0 * - 5 ) FROM tab1
----
-15
-320
-400

query I rowsort
SELECT col0 + 10 * 65 AS col0 FROM tab0 AS cor0
----
674
685
739

query I rowsort
SELECT ALL + col1 + + 86 AS col2 FROM tab1 AS cor0
----
112
96
99

query I rowsort
SELECT DISTINCT 11 * cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
1056
594
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6924
SELECT ALL + - col2 DIV col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6924
SELECT ALL + - col2 / col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 + - 73 AS col0 FROM tab0 AS cor0
----
13
18
24

query I rowsort
SELECT col0 + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6927
SELECT - col1 DIV - 3 AS col1 FROM tab1
----
3
4
8

skipif mysql # not compatible
query I rowsort label-6927
SELECT - col1 / - 3 AS col1 FROM tab1
----
3
4
8

query I rowsort
SELECT + 0 * + 58 + + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL ( col2 ) * + col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT 53 * 87 * col0 + col2 AS col1 FROM tab2 AS cor0
----
32304
359684
364307

query I rowsort
SELECT - + ( 12 ) * + col0 * - col0 + col0 * + col0 AS col2 FROM tab0 AS cor0
----
102973
15925
7488

query I rowsort
SELECT 0 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + - 25 * col0 AS col1 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT ALL + ( col2 ) * - ( cor0.col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 74 + cor0.col2 AS col2 FROM tab1, tab1 cor0
----
-17
-20
22

query I rowsort
SELECT + col1 + cor0.col1 * - 46 FROM tab2 AS cor0
----
-1395
-2655
-765

query I rowsort
SELECT DISTINCT - 74 * - col1 + col2 FROM tab2 AS cor0
----
1296
2321
4392

query I rowsort
SELECT ALL 98 * - col0 - col0 * + 82 AS col1 FROM tab0 AS cor0
----
-16020
-4320
-6300

query I rowsort
SELECT ALL - col2 * - col0 + 31 + - col2 FROM tab0 AS cor0
----
65
7247
790

query I rowsort
SELECT - ( ( - col1 ) * col0 ) + + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT tab1.col2 + - col1 + + col1 FROM tab1
----
54
57
96

query I rowsort
SELECT - + col2 * + col1 + col0 AS col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - col0 * col2 + col0 * col0 AS col1 FROM tab0 cor0
----
-216
1190
623

query I rowsort
SELECT - cor1.col1 * - 42 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1169b7fcf13ac18999dec49812e378f5

query I rowsort
SELECT col0 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + col1 * col1 + + 33 * + 81 AS col1 FROM tab2 AS cor0
----
2962
3634
6154

query I rowsort
SELECT - - cor0.col2 * + col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - ( - tab2.col0 ) AS col0 FROM tab2, tab0 AS cor0
----
7
78
79

query I rowsort
SELECT + + col1 * - col0 + - col1 AS col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT + + ( col0 ) + col0 + col0 FROM tab1 AS cor0
----
192
240
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6951
SELECT - - 20 + - col1 DIV col1 + 78 FROM tab2 AS cor0
----
97
97
97

skipif mysql # not compatible
query I rowsort label-6951
SELECT - - 20 + - col1 / col1 + 78 FROM tab2 AS cor0
----
97
97
97

query I rowsort
SELECT DISTINCT col2 * 93 + col0 + 15 AS col0 FROM tab0
----
143
3108
7730

query I rowsort
SELECT DISTINCT - 98 + + col0 * - 9 FROM tab1
----
-125
-674
-818

query I rowsort
SELECT 57 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT + col1 + 20 + col1 * + cor0.col0 * col2 AS col1 FROM tab1 AS cor0
----
36510
4258
99873

query I rowsort
SELECT - col0 + + 49 + + 83 FROM tab2 cor0
----
125
53
54

query I rowsort
SELECT col2 + + col1 * + col1 FROM tab1
----
157
265
730

query I rowsort
SELECT DISTINCT + + 96 FROM tab0, tab2, tab2 cor0
----
96

query I rowsort
SELECT ALL - 45 * - col0 AS col1 FROM tab1
----
135
2880
3600

query I rowsort
SELECT 55 + + col2 AS col0 FROM tab2
----
81
82
93

query I rowsort
SELECT cor0.col0 + + col2 * col1 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6962
SELECT + col2 + - CAST( 76 AS SIGNED ) FROM tab2
----
-38
-49
-50

skipif mysql # not compatible
query I rowsort label-6962
SELECT + col2 + - CAST ( 76 AS INTEGER ) FROM tab2
----
-38
-49
-50

query I rowsort
SELECT col2 - 52 FROM tab0 AS cor0
----
-19
-51
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col0 * cor0.col0 + - col0 col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - - col2 * - ( cor0.col2 ) + - col2 AS col2 FROM tab0 AS cor0
----
-1122
-2
-6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6966
SELECT DISTINCT - 38 - col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
-36
-38

skipif mysql # not compatible
query I rowsort label-6966
SELECT DISTINCT - 38 - col2 / - col1 AS col1 FROM tab2 AS cor0
----
-36
-38

query I rowsort
SELECT ALL - col2 + - 81 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-138
-202
-257

query I rowsort
SELECT DISTINCT + 41 + - col0 FROM tab1 AS cor0
----
-23
-39
38

query I rowsort
SELECT DISTINCT - tab2.col0 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-7
-78
-79

query I rowsort
SELECT - col1 * - ( - col1 ) + + col1 AS col2 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL + ( + tab2.col2 ) + - col1 * ( col1 + + col2 ) * col1 FROM tab2
----
-15857
-295859
-55711

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6972
SELECT - CAST( NULL AS DECIMAL ) + - tab1.col0 * col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6972
SELECT - CAST ( NULL AS REAL ) + - tab1.col0 * col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6973
SELECT ALL + + col2 + - cor0.col2 * col1 * - CAST( - col2 * - col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
2079417
227502
9584736

skipif mysql # not compatible
query I rowsort label-6973
SELECT ALL + + col2 + - cor0.col2 * col1 * - CAST ( - col2 * - col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
2079417
227502
9584736

query I rowsort
SELECT ALL - - col1 * col2 + - col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL - col1 * 89 FROM tab0 AS cor0
----
-7654
-8099
-8633

query I rowsort
SELECT - 89 + col0 AS col0 FROM tab1 AS cor0
----
-25
-86
-9

query I rowsort
SELECT - + cor0.col2 + - col1 * + col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT + col0 * col2 + cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT 73 + 99 AS col1 FROM tab2 AS cor0
----
172
172
172

query I rowsort
SELECT + + col2 - - col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col0 + 78 * + cor0.col0 FROM tab2 AS cor0
----
553
6162
6241

query I rowsort
SELECT DISTINCT + col2 + + 99 + - col1 AS col0 FROM tab0 AS cor0
----
3
46
90

query I rowsort
SELECT DISTINCT - col1 * - 83 FROM tab1
----
1079
2158
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 + + col2 * col2 * - tab2.col0 col1 FROM tab2
----
-114060
-5087
-52712

onlyif mysql # use DIV operator for integer division
query I rowsort label-6985
SELECT col0 + col1 + + col2 DIV 4 AS col2 FROM tab2
----
105
143
44

skipif mysql # not compatible
query I rowsort label-6985
SELECT col0 + col1 + + col2 / 4 AS col2 FROM tab2
----
105
143
44

query I rowsort
SELECT 92 * 67 FROM tab0
----
6164
6164
6164

query I rowsort
SELECT DISTINCT - 53 AS col2 FROM tab2, tab1 AS cor0
----
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-6988
SELECT + col0 DIV col2 - col0 FROM tab1 cor0
----
-3
-63
-80

skipif mysql # not compatible
query I rowsort label-6988
SELECT + col0 / col2 - col0 FROM tab1 cor0
----
-3
-63
-80

query I rowsort
SELECT ALL + - col2 * - col1 + + ( ( col2 ) * cor0.col2 ) FROM tab0 cor0
----
14186
3927
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6990
SELECT + 0 - cor0.col2 * + CAST( - 35 + col2 AS SIGNED ) col0 FROM tab0 AS cor0
----
-3854
34
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6990
SELECT + 0 - cor0.col2 * + CAST ( - 35 + col2 AS INTEGER ) col0 FROM tab0 AS cor0
----
-3854
34
66

query I rowsort
SELECT col0 * col1 + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - - 34 AS col1 FROM tab1 AS cor0
----
34
34
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6993
SELECT + 64 * + col0 + col0 DIV - col1 FROM tab2 AS cor0
----
448
4991
5052

skipif mysql # not compatible
query I rowsort label-6993
SELECT + 64 * + col0 + col0 / - col1 FROM tab2 AS cor0
----
448
4991
5052

query I rowsort
SELECT + - 57 + col1 AS col0 FROM tab0 AS cor0
----
29
34
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - 93 + 1 * cor0.col0 AS col2 FROM tab1, tab2 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 37b2e34902570cfb0bdb122abea29a94

onlyif mysql # use DIV operator for integer division
query I rowsort label-6997
SELECT DISTINCT col1 DIV + ( - col1 ) FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-6997
SELECT DISTINCT col1 / + ( - col1 ) FROM tab2
----
-1

query I rowsort
SELECT ALL cor0.col2 + col2 * + ( + col1 ) AS col0 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT ALL + col0 + 49 AS col2 FROM tab1 AS cor0
----
113
129
52

query I rowsort
SELECT + col1 * col2 + - col1 * col0 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT - + col2 * ( col1 ) AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7002
SELECT - - CAST( ( - col2 ) AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7002
SELECT - - CAST ( ( - col2 ) AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col2 * ( - col1 ) + col1 AS col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL + + cor0.col1 * 69 + cor0.col1 FROM tab1 AS cor0
----
1820
700
910

query I rowsort
SELECT ALL + 2 AS col0 FROM tab2
----
2
2
2

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab0 cor2, tab1
----
13122 values hashing to 84ba58b37d5a1b52e9b58798528c9751

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7008
SELECT col2 + col1 DIV col0 AS col2 FROM tab2 cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-7008
SELECT col2 + col1 / col0 AS col2 FROM tab2 cor0
----
26
31
38

query I rowsort
SELECT + + col1 + ( - cor0.col2 ) FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT + col1 * col1 * col0 - + col1 FROM tab0 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col2 + col1 * col0 * - col1 AS col2 FROM tab0
----
-177471
-329314
-736927

onlyif mysql # use DIV operator for integer division
query I rowsort label-7013
SELECT ALL col2 - - col1 DIV + col0 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-7013
SELECT ALL col2 - - col1 / + col0 FROM tab1
----
57
62
96

query I rowsort
SELECT - 74 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT col0 * col2 * col2 + + col0 FROM tab2
----
114155
5110
52806

query I rowsort
SELECT + col0 - - col2 AS col2 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7017
SELECT DISTINCT col1 DIV + col1 + + col0 AS col1 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-7017
SELECT DISTINCT col1 / + col1 + + col0 AS col1 FROM tab1
----
4
65
81

query III rowsort
SELECT ALL * FROM tab2 WHERE col2 NOT IN ( col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col2 * col1 * 18 AS col1 FROM tab2 AS cor0
----
11628
15066
27612

query I rowsort
SELECT - ( - tab2.col0 + + ( col0 ) ) FROM tab2
----
0
0
0

query I rowsort
SELECT + ( tab1.col0 ) + - col2 * - 46 AS col2 FROM tab1
----
2487
2686
4496

query I rowsort
SELECT + 37 + cor0.col0 AS col2 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT + col0 + col0 * - ( col2 ) AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT 63 * - col0 AS col2 FROM tab1 cor0
----
-189
-4032
-5040

query IIIIII rowsort
SELECT * FROM tab2, tab1 cor0 WHERE NOT ( NULL ) <= NULL
----

query I rowsort
SELECT DISTINCT - + ( + col2 ) * + col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - 18 AS col2 FROM tab0 cor0
----
-18
-18
-18

query I rowsort
SELECT - col1 * col1 + - col0 + - col0 * - cor0.col1 AS col1 FROM tab2 cor0
----
-751
1043
975

onlyif mysql # use DIV operator for integer division
query I rowsort label-7029
SELECT DISTINCT - - col1 DIV - cor0.col0 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-7029
SELECT DISTINCT - - col1 / - cor0.col0 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT + - col2 * ( - col0 + col1 ) AS col2 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT col1 - + 68 AS col0 FROM tab1 cor0
----
-42
-55
-58

query I rowsort
SELECT ALL col0 * - ( + cor0.col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + cor0.col1 + 56 FROM tab0 AS cor0
----
142
147
153

query I rowsort
SELECT ALL - - col2 + 12 * col2 FROM tab0 cor0
----
1066
13
429

query I rowsort
SELECT + col0 * + ( col1 * + col0 ) AS col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL col2 + - 97 FROM tab0 AS cor0
----
-15
-64
-96

query I rowsort
SELECT DISTINCT + col1 + ( col0 ) * col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT + 68 * cor0.col2 + col0 FROM tab0 AS cor0
----
103
2268
5665

query I rowsort
SELECT - + 93 AS col2 FROM tab1 AS cor0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT 84 + + col1 + col2 AS col0 FROM tab1
----
151
164
193

onlyif mysql # use DIV operator for integer division
query I rowsort label-7041
SELECT + col1 + - 40 DIV col0 + col2 AS col0 FROM tab1
----
109
67
67

skipif mysql # not compatible
query I rowsort label-7041
SELECT + col1 + - 40 / col0 + col2 AS col0 FROM tab1
----
109
67
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7042
SELECT CAST( NULL AS DECIMAL ) + ( - col0 ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7042
SELECT CAST ( NULL AS REAL ) + ( - col0 ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col2 col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7044
SELECT ALL + + CAST( NULL AS SIGNED ) / 55 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-7044
SELECT ALL + + CAST ( NULL AS INTEGER ) / 55 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - cor0.col1 - - col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT + col1 + - col1 + col1 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + + cor0.col1 * col2 * col1 + + col2 AS col0 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT - - col2 + cor0.col1 + + 84 AS col2 FROM tab2 AS cor0
----
139
142
169

query I rowsort
SELECT ALL - col2 * col0 * col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - 16 + cor0.col0 * col1 FROM tab0 AS cor0
----
2048
3379
8083

query I rowsort
SELECT ALL 0 + + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ( col2 ) * 32 * 88 + col0 + - 47 AS col1 FROM tab2 AS cor0
----
107040
73247
75992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 51 * col0 col2 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT ALL - tab1.col0 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7055
SELECT DISTINCT + 30 + - col1 DIV + col1 col0 FROM tab0
----
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7055
SELECT DISTINCT + 30 + - col1 / + col1 col0 FROM tab0
----
29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7056
SELECT + CAST( NULL AS SIGNED ) + + col2 - + tab2.col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7056
SELECT + CAST ( NULL AS INTEGER ) + + col2 - + tab2.col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT DISTINCT - ( + col2 ) + - col0 AS col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT + + col1 - + ( + cor0.col0 + - cor0.col1 ) AS col1 FROM tab2 cor0
----
-45
40
55

query I rowsort
SELECT DISTINCT - - cor0.col0 + + col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + - cor0.col2 * 40 AS col2 FROM tab2 AS cor0
----
-1040
-1080
-1520

query I rowsort
SELECT ALL + 38 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT DISTINCT + col0 + + col1 * + col1 + + col2 FROM tab0
----
7453
8452
9445

query I rowsort
SELECT col2 * + 23 + col1 + col2 AS col1 FROM tab1
----
1322
1378
2317

onlyif mysql # use DIV operator for integer division
query I rowsort label-7065
SELECT col0 DIV col0 + + 62 + col2 * + col1 FROM tab2
----
1597
709
900

skipif mysql # not compatible
query I rowsort label-7065
SELECT col0 / col0 + + 62 + col2 * + col1 FROM tab2
----
1597
709
900

onlyif mysql # use DIV operator for integer division
query I rowsort label-7066
SELECT - col0 DIV + tab2.col0 AS col2 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7066
SELECT - col0 / + tab2.col0 AS col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT ALL + + col1 * col0 + + 8 FROM tab2 AS cor0
----
1351
225
4610

query I rowsort
SELECT - - col0 * 55 FROM tab2 AS cor0
----
385
4290
4345

query I rowsort
SELECT - 35 * + 50 FROM tab0 AS cor0
----
-1750
-1750
-1750

query I rowsort
SELECT ( col0 ) * + cor0.col2 - - 78 * + col1 FROM tab2 AS cor0
----
2607
4328
6630

query I rowsort
SELECT DISTINCT + 6 * + ( col0 + + col0 ) AS col1 FROM tab1 cor0
----
36
768
960

query I rowsort
SELECT 47 * + ( - col1 ) + col1 + - cor0.col2 FROM tab0 AS cor0
----
-3989
-4268
-4463

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7073
SELECT + + CAST( + ( col0 ) AS SIGNED ) * + col1 FROM tab2 cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-7073
SELECT + + CAST ( + ( col0 ) AS INTEGER ) * + col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT col2 * + 1 AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL col1 + 30 AS col0 FROM tab0
----
116
121
127

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7076
SELECT DISTINCT - CAST( NULL AS SIGNED ) col0 FROM tab2, tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7076
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col0 FROM tab2, tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - ( - col2 ) + + col0 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col1 * col0 - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT - cor0.col1 - - col0 AS col0 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7080
SELECT DISTINCT - + 90 * - col1 + + col1 * + cor0.col2 * + cor0.col2 + - CAST( NULL AS SIGNED ) * + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7080
SELECT DISTINCT - + 90 * - col1 + + col1 * + cor0.col2 * + cor0.col2 + - CAST ( NULL AS INTEGER ) * + col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7081
SELECT ALL + 62 + + col1 + + col2 DIV - col2 AS col2 FROM tab1 cor0
----
71
74
87

skipif mysql # not compatible
query I rowsort label-7081
SELECT ALL + 62 + + col1 + + col2 / - col2 AS col2 FROM tab1 cor0
----
71
74
87

query I rowsort
SELECT 81 + cor0.col2 AS col0 FROM tab0 AS cor0
----
114
163
82

query I rowsort
SELECT ALL - + 75 + col1 * ( + col0 ) + + col0 FROM tab0 AS cor0
----
2013
3355
8113

query I rowsort
SELECT ALL - ( - col1 ) * ( ( + col1 ) ) + cor0.col2 FROM tab0 cor0
----
7429
8363
9410

query I rowsort
SELECT - ( col0 + col2 ) * - tab2.col0 FROM tab2
----
238
8112
9243

query I rowsort
SELECT col0 * col0 * + col2 + - 30 FROM tab1
----
233442
456
614370

query I rowsort
SELECT ( col0 * 57 ) - col2 FROM tab1
----
117
3591
4464

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7088
SELECT CAST( NULL AS SIGNED ) + + 46 * + cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7088
SELECT CAST ( NULL AS INTEGER ) + + 46 * + cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7089
SELECT - 0 DIV col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7089
SELECT - 0 / col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + + col1 * - 27 + cor0.col2 FROM tab1 AS cor0
----
-270
-351
-702

query I rowsort
SELECT ALL - + 98 + col1 AS col1 FROM tab1 cor0
----
-72
-85
-88

query I rowsort
SELECT col1 * col2 + ( col0 ) FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - col1 * + col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT + 71 * col1 AS col2 FROM tab0
----
6106
6461
6887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col1 FROM tab2
----
62
62
62

query I rowsort
SELECT - col1 * 16 AS col2 FROM tab2 AS cor0
----
-272
-496
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 6 * + col2 * ( col1 ) + - col1 col2 FROM tab0
----
16942
44681
485

query I rowsort
SELECT ALL - tab2.col1 + 98 FROM tab2, tab2 AS cor0
----
9 values hashing to a8dd31556370fb091d4b29e5e06ddd7b

query I rowsort
SELECT + + col0 + - cor0.col2 * + 18 AS col2 FROM tab1 AS cor0
----
-1648
-962
-969

query I rowsort
SELECT ALL - col2 + col0 * - col0 FROM tab0 AS cor0
----
-1226
-609
-8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-7101
SELECT ALL - - col2 DIV ( - col2 * + col2 ) + col0 DIV + col0 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7101
SELECT ALL - - col2 / ( - col2 * + col2 ) + col0 / + col0 AS col2 FROM tab1 cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7102
SELECT ALL col2 + + CAST( NULL AS SIGNED ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7102
SELECT ALL col2 + + CAST ( NULL AS INTEGER ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 45 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7104
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col0 * col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7104
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col0 * col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + 41 AS col2 FROM tab0 AS cor0
----
41
41
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7106
SELECT CAST( - col2 AS SIGNED ) + col0 FROM tab2 cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-7106
SELECT CAST ( - col2 AS INTEGER ) + col0 FROM tab2 cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 59 col1 FROM tab0 AS cor0
----
-59

query I rowsort
SELECT + cor0.col1 * + col1 + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT ALL + col2 * col0 * col1 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - + col1 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - col2 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7112
SELECT CAST( col1 AS SIGNED ) - col1 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7112
SELECT CAST ( col1 AS INTEGER ) - col1 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT - + 5 AS col2 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT ALL col2 + 4 FROM tab2 AS cor0
----
30
31
42

query I rowsort
SELECT ALL col2 * col1 * tab2.col2 AS col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT - 35 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6d967b3bac2e01a0318865f682f9a97b

query I rowsort
SELECT + - ( col2 ) + + col2 * + 31 AS col0 FROM tab2 cor0
----
1140
780
810

query I rowsort
SELECT ALL - - ( col1 ) * - col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col0 + - 17 FROM tab2 cor0
----
-10
61
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7120
SELECT + CAST( 84 * - col0 + - 18 * + col2 AS SIGNED ) AS col1 FROM tab2
----
-1074
-7020
-7320

skipif mysql # not compatible
query I rowsort label-7120
SELECT + CAST ( 84 * - col0 + - 18 * + col2 AS INTEGER ) AS col1 FROM tab2
----
-1074
-7020
-7320

query I rowsort
SELECT DISTINCT + 37 * col2 FROM tab0
----
1221
3034
37

query I rowsort
SELECT ALL 21 * col2 AS col1 FROM tab2
----
546
567
798

query I rowsort
SELECT 97 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT + col0 * - cor0.col1 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-15397
-2856
-3430

query I rowsort
SELECT DISTINCT ( + 45 ) FROM tab1, tab0 AS cor0
----
45

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - col0 * 86 FROM tab0
----
-2064
-3010
-7654

query I rowsort
SELECT DISTINCT 18 * - tab0.col0 AS col0 FROM tab0, tab1 AS cor0
----
-1602
-432
-630

query I rowsort
SELECT cor0.col2 * col2 + + col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL 18 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT col2 + - 3 FROM tab1 AS cor0
----
51
54
93

query I rowsort
SELECT ALL 93 * cor0.col2 - col2 FROM tab2 AS cor0
----
2392
2484
3496

query I rowsort
SELECT ALL + 38 - col1 * col0 FROM tab0 AS cor0
----
-2026
-3357
-8061

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 71 col0 FROM tab1, tab1 cor0
----
71

query I rowsort
SELECT ALL tab0.col1 + ( 89 ) FROM tab0
----
175
180
186

query I rowsort
SELECT cor0.col1 * + col0 + 4 * - col2 FROM tab0 AS cor0
----
1932
3391
7771

query I rowsort
SELECT - 31 * + col2 + + col2 FROM tab0 AS cor0
----
-2460
-30
-990

query I rowsort
SELECT DISTINCT - col1 - + col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + ( - col1 ) + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 49 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to e587c122dea39a2488ff88b884cea462

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - col0 AS REAL ) + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL + 75 + - col1 * - col1 + 23 AS col1 FROM tab0 AS cor0
----
7494
8379
9507

query I rowsort
SELECT ALL - col2 - + col1 AS col0 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT + col1 + - col0 * col1 + ( - col2 + col0 ) FROM tab2
----
-1285
-206
-4491

query I rowsort
SELECT ALL - col1 * - col2 * col1 AS col0 FROM tab2
----
10982
25947
90506

onlyif mysql # use DIV operator for integer division
query I rowsort label-7146
SELECT 37 * col0 DIV + col2 AS col0 FROM tab0
----
1295
26
40

skipif mysql # not compatible
query I rowsort label-7146
SELECT 37 * col0 / + col2 AS col0 FROM tab0
----
1295
26
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7147
SELECT ( - col2 ) * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7147
SELECT ( - col2 ) * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + + col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + col1 * col1 + 82 - col0 AS col0 FROM tab0 AS cor0
----
7454
8274
9456

query I rowsort
SELECT DISTINCT - col0 * + 80 AS col2 FROM tab2 AS cor0
----
-560
-6240
-6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7151
SELECT cor0.col0 * CAST( col2 AS SIGNED ) + - col0 FROM tab1 cor0
----
159
3584
7600

skipif mysql # not compatible
query I rowsort label-7151
SELECT cor0.col0 * CAST ( col2 AS INTEGER ) + - col0 FROM tab1 cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-7152
SELECT + col1 + 59 DIV col1 - - col2 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-7152
SELECT + col1 + 59 / col1 - - col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col2 * + col2 + + 21 FROM tab0 AS cor0
----
1110
22
6745

query I rowsort
SELECT ALL + col0 * col2 * + tab1.col2 AS col0 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col2 * + col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - col2 * + col1 + - 77 FROM tab1 AS cor0
----
-1325
-1481
-647

query I rowsort
SELECT - col2 * - col0 - + cor0.col2 * + col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 - 70 * + 37 * cor0.col2 FROM tab2 AS cor0
----
-67281
-69899
-98403

query I rowsort
SELECT col1 + ( cor0.col1 ) * - col1 AS col0 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL - + cor0.col2 * col1 + - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + - col0 * 84 FROM tab1 AS cor0
----
-252
-5376
-6720

query I rowsort
SELECT ALL + - cor0.col0 + - col0 AS col0 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7163
SELECT + col2 + - col2 DIV col2 AS col1 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-7163
SELECT + col2 + - col2 / col2 AS col1 FROM tab1
----
53
56
95

query I rowsort
SELECT - - col0 * cor0.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-7165
SELECT ALL + CAST( col2 AS SIGNED ) * col2 * cor0.col2 + ( - col0 ) FROM tab1 AS cor0
----
157461
185129
884656

skipif mysql # not compatible
query I rowsort label-7165
SELECT ALL + CAST ( col2 AS INTEGER ) * col2 * cor0.col2 + ( - col0 ) FROM tab1 AS cor0
----
157461
185129
884656

query I rowsort
SELECT DISTINCT - 91 - col2 AS col2 FROM tab1 AS cor0
----
-145
-148
-187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 38 col2 FROM tab2 AS cor0
----
38
38
38

query I rowsort
SELECT ALL - 66 FROM tab0, tab2 AS cor0
----
9 values hashing to a408108d423d7784b7d610cb779e515a

query I rowsort
SELECT ALL + 57 + col1 * 73 * - col1 FROM tab1 AS cor0
----
-12280
-49291
-7243

query I rowsort
SELECT ALL col1 * col2 - col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + 38 * - cor0.col1 AS col2 FROM tab2 cor0
----
-1178
-2242
-646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 4 * cor0.col1 * - 33 col0 FROM tab2 AS cor0
----
-2244
-4092
-7788

query I rowsort
SELECT ALL - - 47 * - col0 - + col1 AS col1 FROM tab1 AS cor0
----
-167
-3018
-3773

query I rowsort
SELECT DISTINCT - - 48 * col2 AS col0 FROM tab2 cor0
----
1248
1296
1824

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col2 * - ( - cor0.col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + + col1 - col0 AS col2 FROM tab0 AS cor0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 + - 58 + + col1 col2 FROM tab1 AS cor0
----
32
35
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-7179
SELECT ALL + ( + col2 ) DIV col2 + - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-7179
SELECT ALL + ( + col2 ) / col2 + - col1 FROM tab1 AS cor0
----
-12
-25
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7180
SELECT DISTINCT CAST( NULL AS SIGNED ) * 68 - col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7180
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 68 - col0 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col0 * - 55 * col1 AS col2 FROM tab1 cor0
----
-35200
-4290
-57200

query I rowsort
SELECT DISTINCT - col2 * col1 + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7183
SELECT ALL - col2 + + 28 DIV col1 AS col0 FROM tab2 AS cor0
----
-26
-27
-37

skipif mysql # not compatible
query I rowsort label-7183
SELECT ALL - col2 + + 28 / col1 AS col0 FROM tab2 AS cor0
----
-26
-27
-37

query I rowsort
SELECT ( - 94 ) AS col1 FROM tab2 AS cor0
----
-94
-94
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7185
SELECT - col0 + CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7185
SELECT - col0 + CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * - 90 + + col2 FROM tab1
----
-1074
-2286
-843

onlyif mysql # use DIV operator for integer division
query I rowsort label-7187
SELECT - 84 + + col1 DIV - col2 + + col0 AS col0 FROM tab0 AS cor0
----
-146
-62
4

skipif mysql # not compatible
query I rowsort label-7187
SELECT - 84 + + col1 / - col2 + + col0 AS col0 FROM tab0 AS cor0
----
-146
-62
4

query I rowsort
SELECT DISTINCT 57 * col2 AS col2 FROM tab1
----
3078
3249
5472

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 * col1 col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col1 * col0 + + col2 * + 88 FROM tab1 AS cor0
----
4376
4674
7408

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7191
SELECT ALL - CAST( NULL AS SIGNED ) * - 44 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7191
SELECT ALL - CAST ( NULL AS INTEGER ) * - 44 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7192
SELECT DISTINCT 41 DIV - col0 FROM tab1
----
-13
0

skipif mysql # not compatible
query I rowsort label-7192
SELECT DISTINCT 41 / - col0 FROM tab1
----
-13
0

query I rowsort
SELECT - - col2 + + col0 * + col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT - 96 * col2 AS col0 FROM tab0 AS cor0
----
-3168
-7872
-96

query I rowsort
SELECT ALL - 92 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

onlyif mysql # use DIV operator for integer division
query I rowsort label-7196
SELECT ALL - ( 56 ) DIV cor0.col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 7b29da85503fbf9c46cb81b1fdd701e6

skipif mysql # not compatible
query I rowsort label-7196
SELECT ALL - ( 56 ) / cor0.col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 7b29da85503fbf9c46cb81b1fdd701e6

query I rowsort
SELECT + col2 + + 87 FROM tab2 AS cor0
----
113
114
125

onlyif mysql # use DIV operator for integer division
query I rowsort label-7198
SELECT ALL + 98 * + col2 * + col1 + ( col0 ) DIV - col2 FROM tab0
----
278124
731275
9471

skipif mysql # not compatible
query I rowsort label-7198
SELECT ALL + 98 * + col2 * + col1 + ( col0 ) / - col2 FROM tab0
----
278124
731275
9471

onlyif mysql # use DIV operator for integer division
query I rowsort label-7199
SELECT ALL + 81 * col0 * 28 + + col2 DIV + col0 AS col0 FROM tab2
----
15879
176904
179172

skipif mysql # not compatible
query I rowsort label-7199
SELECT ALL + 81 * col0 * 28 + + col2 / + col0 AS col0 FROM tab2
----
15879
176904
179172

query I rowsort
SELECT + col2 + + col1 * col1 AS col0 FROM tab2 cor0
----
327
3507
988

query I rowsort
SELECT ALL - col1 * 50 FROM tab1 AS cor0
----
-1300
-500
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * cor0.col2 - + col2 col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT ( tab1.col0 ) FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + - cor0.col0 * + 94 AS col2 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT - col1 + col0 * - 89 FROM tab1
----
-293
-5706
-7133

query I rowsort
SELECT 47 - + col0 AS col0 FROM tab0
----
-42
12
23

query I rowsort
SELECT DISTINCT 12 AS col2 FROM tab0, tab0 cor0, tab0 AS cor1
----
12

query I rowsort
SELECT 57 * + col0 FROM tab1
----
171
3648
4560

query I rowsort
SELECT 23 + - col2 AS col2 FROM tab2 AS cor0
----
-15
-3
-4

query I rowsort
SELECT + + 49 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 + cor0.col0 col2 FROM tab1 cor0
----
-12
-73
4

query I rowsort
SELECT + - 32 + col2 AS col1 FROM tab2 AS cor0
----
-5
-6
6

query I rowsort
SELECT DISTINCT 91 + tab0.col1 * 2 + col1 FROM tab0
----
349
364
382

query I rowsort
SELECT - cor0.col2 + + 9 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-260
-270
-380

query I rowsort
SELECT col1 * 13 AS col0 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT + + col1 * + cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col0 + - col2 * + col2 AS col1 FROM tab1 AS cor0
----
-2919
-3313
-9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-7218
SELECT ALL + cor0.col1 * 24 + + col2 DIV + col1 + + col1 FROM tab2 AS cor0
----
1475
427
775

skipif mysql # not compatible
query I rowsort label-7218
SELECT ALL + cor0.col1 * 24 + + col2 / + col1 + + col1 FROM tab2 AS cor0
----
1475
427
775

query I rowsort
SELECT ALL - cor0.col2 + ( col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + cor0.col2 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - - cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL col0 + - ( col1 ) AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + col0 * ( - ( col1 ) ) * 46 + col1 + cor0.col1 FROM tab1 AS cor0
----
-29420
-3536
-47814

query I rowsort
SELECT DISTINCT + + cor0.col2 * 37 AS col1 FROM tab0 AS cor0
----
1221
3034
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-7225
SELECT - 86 DIV col0 AS col2 FROM tab0 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-7225
SELECT - 86 / col0 AS col2 FROM tab0 AS cor0
----
-2
-3
0

query I rowsort
SELECT - - 61 + - col1 * col2 - + col1 * 58 FROM tab1 AS cor0
----
-1089
-1941
-2851

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + cor0.col2 * col1 col1 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7228
SELECT col1 * col2 + col1 * CAST( NULL AS SIGNED ) - cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7228
SELECT col1 * col2 + col1 * CAST ( NULL AS INTEGER ) - cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - 72 ) - tab1.col0 FROM tab1
----
-136
-152
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - col2 col0 FROM tab2
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7231
SELECT - + CAST( NULL AS SIGNED ) + - col2 * + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7231
SELECT - + CAST ( NULL AS INTEGER ) + - col2 * + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 52 + col1 AS col1 FROM tab2 AS cor0
----
111
69
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 + 71 - col0 * + col1 col1 FROM tab1 AS cor0
----
-1016
-54
-616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 51 * - 12 + cor0.col0 col0 FROM tab0 cor0
----
-523
-577
-588

query I rowsort
SELECT cor0.col1 * + col2 - col1 AS col0 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + - ( col2 ) * - ( + col0 ) FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7238
SELECT ALL - CAST( NULL AS SIGNED ) / + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7238
SELECT ALL - CAST ( NULL AS INTEGER ) / + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - + ( + col2 ) + 80 FROM tab0 AS cor0
----
-2
47
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7240
SELECT DISTINCT + col1 + col2 * CAST( ( col2 ) AS SIGNED ) FROM tab1 AS cor0
----
2942
3259
9229

skipif mysql # not compatible
query I rowsort label-7240
SELECT DISTINCT + col1 + col2 * CAST ( ( col2 ) AS INTEGER ) FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL - cor0.col2 + col0 * - cor0.col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL + + 3 + + col0 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
38
7301
795

onlyif mysql # use DIV operator for integer division
query I rowsort label-7243
SELECT ALL + 97 * col1 + + col2 DIV - col0 FROM tab0 AS cor0
----
8341
8827
9409

skipif mysql # not compatible
query I rowsort label-7243
SELECT ALL + 97 * col1 + + col2 / - col0 FROM tab0 AS cor0
----
8341
8827
9409

query I rowsort
SELECT ALL - + 69 + + col0 AS col0 FROM tab2 AS cor0
----
-62
10
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 84 col0 FROM tab2 cor0
----
84

query I rowsort
SELECT ALL - + cor0.col1 * col1 + col2 AS col0 FROM tab2 AS cor0
----
-251
-3455
-934

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col2 + + col2 + - CAST ( 32 AS REAL ) AS col0 FROM tab2 AS cor0
----
20
22
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 11 col0 FROM tab0 cor0
----
11
11
11

query I rowsort
SELECT DISTINCT 9 * 13 FROM tab2
----
117

query I rowsort
SELECT - ( + col2 ) - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT col0 - - col2 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL - col1 * - cor0.col1 * col2 + col1 AS col1 FROM tab2 cor0
----
10999
25978
90565

query I rowsort
SELECT DISTINCT col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - 49 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
-49

query I rowsort
SELECT col1 * col0 + + col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + - cor0.col2 * + col0 + + 3 FROM tab2 AS cor0
----
-186
-2025
-2999

query I rowsort
SELECT + ( - col1 ) + + col1 - 22 AS col0 FROM tab1
----
-22
-22
-22

query I rowsort
SELECT DISTINCT 85 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
85

query I rowsort
SELECT + + col1 * + 20 AS col1 FROM tab2 AS cor0
----
1180
340
620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7260
SELECT + CAST( NULL AS DECIMAL ) + - col0 / + col0 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7260
SELECT + CAST ( NULL AS REAL ) + - col0 / + col0 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 65 + col1 * - col1 AS col1 FROM tab1
----
-104
-35
-611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7262
SELECT DISTINCT - ( col2 * - col2 + + CAST( - col2 AS SIGNED ) ) AS col0 FROM tab2
----
1482
702
756

skipif mysql # not compatible
query I rowsort label-7262
SELECT DISTINCT - ( col2 * - col2 + + CAST ( - col2 AS INTEGER ) ) AS col0 FROM tab2
----
1482
702
756

query I rowsort
SELECT ALL 66 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * + col1 * col0 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - cor1.col0 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7266
SELECT DISTINCT - 19 + col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
-15
-19

skipif mysql # not compatible
query I rowsort label-7266
SELECT DISTINCT - 19 + col1 / + col0 AS col2 FROM tab2 AS cor0
----
-15
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7267
SELECT ALL - - CAST( NULL AS SIGNED ) / tab2.col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7267
SELECT ALL - - CAST ( NULL AS INTEGER ) / tab2.col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + col0 * col1 + col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
10
13
26

query I rowsort
SELECT ALL - col0 + - col2 * + col2 * col1 FROM tab1
----
-119888
-32554
-75819

onlyif mysql # use DIV operator for integer division
query I rowsort label-7271
SELECT col1 * col1 * col0 + col2 DIV + col0 FROM tab1
----
13521
2046
6400

skipif mysql # not compatible
query I rowsort label-7271
SELECT col1 * col1 * col0 + col2 / + col0 FROM tab1
----
13521
2046
6400

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-847
2816
2907

query I rowsort
SELECT DISTINCT - - col0 + + col0 * cor0.col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL - col0 * - col2 + cor0.col0 * col2 FROM tab1 cor0
----
15360
324
7296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7275
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + col1 * col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7275
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + col1 * col0 FROM tab1
----
NULL

query I rowsort
SELECT ALL ( col2 ) * tab1.col1 + - col0 * + col0 + col2 FROM tab1
----
-3469
-5056
1449

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + ( col2 ) ) * col1 col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + tab2.col2 + col1 * col1 AS col0 FROM tab2
----
327
3507
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 + col2 col0 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7280
SELECT ALL 20 DIV - 51 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7280
SELECT ALL 20 / - 51 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7281
SELECT DISTINCT - 87 + col2 DIV col2 AS col1 FROM tab0 AS cor0
----
-86

skipif mysql # not compatible
query I rowsort label-7281
SELECT DISTINCT - 87 + col2 / col2 AS col1 FROM tab0 AS cor0
----
-86

query I rowsort
SELECT ALL + + col0 + - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 + + col0 + tab1.col0 AS col0 FROM tab1
----
185
256
60

query I rowsort
SELECT 26 + 74 FROM tab0
----
100
100
100

onlyif mysql # use DIV operator for integer division
query I rowsort label-7285
SELECT col2 DIV col2 + - col1 * - col1 FROM tab1
----
101
170
677

skipif mysql # not compatible
query I rowsort label-7285
SELECT col2 / col2 + - col1 * - col1 FROM tab1
----
101
170
677

query I rowsort
SELECT DISTINCT 88 * + col2 + - col2 FROM tab2
----
2262
2349
3306

onlyif mysql # use DIV operator for integer division
query I rowsort label-7287
SELECT ALL + + col1 - col2 DIV - cor0.col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-7287
SELECT ALL + + col1 - col2 / - cor0.col0 FROM tab1 AS cor0
----
10
14
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-7288
SELECT + 50 + + col1 DIV col0 AS col0 FROM tab1 AS cor0
----
50
50
58

skipif mysql # not compatible
query I rowsort label-7288
SELECT + 50 + + col1 / col0 AS col0 FROM tab1 AS cor0
----
50
50
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-7289
SELECT ALL col2 + col0 DIV col1 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7289
SELECT ALL col2 + col0 / col1 FROM tab0 cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7290
SELECT - ( - col0 ) * col2 + col0 DIV col0 FROM tab0 AS cor0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-7290
SELECT - ( - col0 ) * col2 + col0 / col0 FROM tab0 AS cor0
----
36
7299
793

query I rowsort
SELECT - - 48 * col1 + col2 FROM tab2 AS cor0
----
1515
2858
854

query I rowsort
SELECT DISTINCT - col0 - - col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - + cor0.col2 * col0 * col0 + cor0.col0 FROM tab2 cor0
----
-1316
-158106
-237079

query I rowsort
SELECT - 88 + - col0 * - col0 FROM tab1 AS cor0
----
-79
4008
6312

onlyif mysql # use DIV operator for integer division
query I rowsort label-7295
SELECT DISTINCT + - col1 DIV cor0.col0 + - col0 FROM tab2 AS cor0
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-7295
SELECT DISTINCT + - col1 / cor0.col0 + - col0 FROM tab2 AS cor0
----
-11
-78
-79

query I rowsort
SELECT 56 * - col0 + cor0.col0 FROM tab0 AS cor0
----
-1320
-1925
-4895

query I rowsort
SELECT ALL + 76 + - col1 * col1 * col0 AS col2 FROM tab1
----
-13444
-1952
-6324

onlyif mysql # use DIV operator for integer division
query I rowsort label-7298
SELECT + ( + col2 ) DIV + col1 + + col0 AS col0 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-7298
SELECT + ( + col2 ) / + col1 + + col0 AS col0 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT DISTINCT 34 * col0 + - col0 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT DISTINCT ( + col1 ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + ( col1 ) * cor0.col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col2 - col1 * col2 * col1 AS col0 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT col0 * - col1 + col2 * col0 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT ALL + col2 AS col1 FROM tab0 WHERE NOT + col2 * + col1 * + col0 + col0 >= col0 * col1
----

query I rowsort
SELECT ALL + col0 * - col2 * + col1 AS col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT col1 * - col2 * col0 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT col2 * col2 + tab0.col0 AS col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT + col0 * - col0 + + col0 + + col2 FROM tab1
----
-3975
-6224
48

query I rowsort
SELECT DISTINCT - col0 * col2 * col1 AS col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT + col0 * - col0 * - col0 AS col2 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT col0 + - col2 + + col2 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT - col2 * col0 + + col1 AS col1 FROM tab0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col0 col0 FROM tab2 WHERE - col2 < NULL
----

query I rowsort
SELECT ALL - col2 * - tab0.col0 FROM tab0 WHERE NOT - col1 * col1 NOT IN ( tab0.col0 + col0 )
----

query I rowsort
SELECT ALL col2 * + col1 * - col0 AS col1 FROM tab2
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * tab0.col1 col2 FROM tab0
----
2064
3395
8099

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( col2 - col0 )
----

query I rowsort
SELECT ALL - + col1 + col1 + col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7319
SELECT ALL - cor0.col1 + col1 DIV - col0 + col0 FROM tab2 AS cor0
----
-28
19
62

skipif mysql # not compatible
query I rowsort label-7319
SELECT ALL - cor0.col1 + col1 / - col0 + col0 FROM tab2 AS cor0
----
-28
19
62

query I rowsort
SELECT ALL cor0.col0 * col0 + - cor0.col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT ALL col1 * + col1 + col2 * col0 FROM tab2 AS cor0
----
1150
3291
5509

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 cor0 WHERE NOT col0 * col1 BETWEEN col0 / + col2 + col2 AND NULL OR NOT - cor0.col1 * + col1 NOT BETWEEN NULL AND - col2
----

query I rowsort
SELECT - col1 * col2 + + col2 AS col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT col2 * + col2 + - col1 AS col0 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT col0 * + col1 + col2 + + col2 AS col0 FROM tab1
----
1232
186
754

query I rowsort
SELECT ALL + tab0.col1 * - tab0.col1 + + tab0.col0 + - col2 * - col2 * col2 AS col1 FROM tab0
----
-9373
28565
543176

query III rowsort
SELECT * FROM tab2 WHERE NOT - col0 / col2 + col1 + col1 = ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7328
SELECT ALL + col2 * col0 * + tab0.col2 + + col0 DIV - col1 FROM tab0
----
26136
35
598436

skipif mysql # not compatible
query I rowsort label-7328
SELECT ALL + col2 * col0 * + tab0.col2 + + col0 / - col1 FROM tab0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-7329
SELECT - col0 DIV + 81 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7329
SELECT - col0 / + 81 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + - col2 * + 4 + - col2 FROM tab0 AS cor0
----
-165
-410
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - col1 * col1 col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT col0 + + col0 * col2 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL + tab0.col1 - + ( + 98 ) FROM tab0
----
-1
-12
-7

query I rowsort
SELECT ALL + col0 - 96 AS col1 FROM tab2
----
-17
-18
-89

query I rowsort
SELECT DISTINCT col2 * - ( + col1 * col2 ) FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT - 61 FROM tab0, tab2 cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7337
SELECT ALL + col1 + col2 DIV tab0.col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7337
SELECT ALL + col1 + col2 / tab0.col1 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT cor1.col2 * 99 + 58 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 8783eb6bc2ee2b9df266f529516f5426

query I rowsort
SELECT ALL col0 + + 21 FROM tab1
----
101
24
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 * + cor0.col2 + col2 col2 FROM tab0 AS cor0
----
1188
2952
36

query I rowsort
SELECT ALL - - ( 73 ) * col2 + 60 FROM tab0 AS cor0
----
133
2469
6046

onlyif mysql # use DIV operator for integer division
query I rowsort label-7342
SELECT - - col0 * col1 DIV col2 + col0 * col1 FROM tab1 AS cor0
----
1050
651
79

skipif mysql # not compatible
query I rowsort label-7342
SELECT - - col0 * col1 / col2 + col0 * col1 FROM tab1 AS cor0
----
1050
651
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col2 * col1 col1 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-7344
SELECT DISTINCT ( 40 ) DIV - col0 FROM tab1 AS cor0
----
-13
0

skipif mysql # not compatible
query I rowsort label-7344
SELECT DISTINCT ( 40 ) / - col0 FROM tab1 AS cor0
----
-13
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - tab1.col2 col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + cor0.col0 + col0 * - ( - col0 ) AS col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT + 28 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + + col0 * - col0 col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + cor1.col2 + cor0.col2 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 5a930730d347554ce36975510ca22e06

query I rowsort
SELECT - cor0.col1 + cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to 390c89882d83c6ae3bcd0873d5ad8118

query I rowsort
SELECT DISTINCT + col1 * col0 * 72 FROM tab0 cor0
----
148608
244440
583128

onlyif mysql # use DIV operator for integer division
query I rowsort label-7352
SELECT - col1 + ( col2 ) DIV col0 FROM tab2 AS cor0
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-7352
SELECT - col1 + ( col2 ) / col0 FROM tab2 AS cor0
----
-17
-28
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7353
SELECT col2 DIV col1 + col2 * col1 AS col1 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-7353
SELECT col2 / col1 + col2 * col1 AS col1 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * - 18 col2 FROM tab2 AS cor0
----
1062
306
558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * ( - cor0.col1 ) col0 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7356
SELECT DISTINCT col1 DIV + 38 AS col2 FROM tab0 AS cor0
----
2

skipif mysql # not compatible
query I rowsort label-7356
SELECT DISTINCT col1 / + 38 AS col2 FROM tab0 AS cor0
----
2

query I rowsort
SELECT DISTINCT - col1 * col0 + 68 AS col2 FROM tab2 AS cor0
----
-1275
-149
-4534

query I rowsort
SELECT ALL 8 + cor0.col0 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to bdcdd48f83aae8fd22d4a252d8bf9d1d

query I rowsort
SELECT + 92 + cor0.col0 + + col0 * - col1 FROM tab2 AS cor0
----
-1172
-118
-4432

query I rowsort
SELECT DISTINCT + 69 + + col2 * col1 AS col1 FROM tab2 AS cor0
----
1603
715
906

query I rowsort
SELECT ALL - - 5 + - col1 FROM tab1 AS cor0
----
-21
-5
-8

query I rowsort
SELECT ALL - + ( col2 ) * ( col0 + cor0.col1 ) * cor0.col1 FROM tab0 AS cor0
----
-12804
-1343160
-312180

query I rowsort
SELECT ALL - cor0.col2 - - col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - tab0.col1 - - col2 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - tab1.col1 AS col1 FROM tab1, tab0, tab0 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col1 * 29 * ( + col0 ) FROM tab1 AS cor0
----
18560
2262
30160

query I rowsort
SELECT DISTINCT + col0 * + ( + 68 * - col2 ) FROM tab0 AS cor0
----
-2380
-496264
-53856

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7369
SELECT DISTINCT + 94 DIV - col0 FROM tab1
----
-1
-31

skipif mysql # not compatible
query I rowsort label-7369
SELECT DISTINCT + 94 / - col0 FROM tab1
----
-1
-31

query I rowsort
SELECT col2 * - cor0.col1 + 97 + col0 FROM tab0 AS cor0
----
-2717
-7276
35

query I rowsort
SELECT DISTINCT - 9 AS col1 FROM tab0 AS cor0
----
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7372
SELECT DISTINCT 21 DIV + col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7372
SELECT DISTINCT 21 / + col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7373
SELECT + 9 DIV col0 - + col2 FROM tab1 AS cor0
----
-51
-57
-96

skipif mysql # not compatible
query I rowsort label-7373
SELECT + 9 / col0 - + col2 FROM tab1 AS cor0
----
-51
-57
-96

query I rowsort
SELECT DISTINCT + 2 * cor0.col0 + 73 * - col1 FROM tab0 AS cor0
----
-6230
-6465
-7011

query I rowsort
SELECT + + 27 - - col1 FROM tab2 AS cor0
----
44
58
86

query I rowsort
SELECT + col0 * - col0 + ( 92 ) FROM tab0 AS cor0
----
-1133
-484
-7829

query I rowsort
SELECT 87 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

onlyif mysql # use DIV operator for integer division
query I rowsort label-7378
SELECT + + col0 + + cor0.col0 DIV 27 FROM tab1 AS cor0
----
3
66
82

skipif mysql # not compatible
query I rowsort label-7378
SELECT + + col0 + + cor0.col0 / 27 FROM tab1 AS cor0
----
3
66
82

query I rowsort
SELECT + col1 * 9 FROM tab0 AS cor0
----
774
819
873

query I rowsort
SELECT ALL + - 45 * ( - cor0.col0 + + cor0.col2 ) * - col2 FROM tab0 AS cor0
----
-1530
-25830
13365

query I rowsort
SELECT ALL col1 * + ( - col1 ) AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT col2 * col0 + tab1.col0 * col0 AS col1 FROM tab1
----
14080
171
7744

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to 8e88b3a69c24fc01553b0c32bf7748d0

query I rowsort
SELECT + col0 * - 47 + col0 + + 38 FROM tab2
----
-284
-3550
-3596

query I rowsort
SELECT DISTINCT col2 + + 95 AS col0 FROM tab2
----
121
122
133

query I rowsort
SELECT DISTINCT - - col1 * col0 * col0 FROM tab1 AS cor0
----
234
40960
83200

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col0 AS REAL ) * + col1 + 89 AS col2 FROM tab2
----
1432
306
4691

query I rowsort
SELECT - + cor0.col0 + + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-7389
SELECT ALL + - cor0.col1 DIV - cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7389
SELECT ALL + - cor0.col1 / - cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7390
SELECT - CAST( - 38 AS SIGNED ) FROM tab2
----
38
38
38

skipif mysql # not compatible
query I rowsort label-7390
SELECT - CAST ( - 38 AS INTEGER ) FROM tab2
----
38
38
38

query I rowsort
SELECT ALL + tab2.col1 - + col0 * col2 * ( + col1 ) FROM tab2
----
-119593
-51017
-5828

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col0 * col0 col2 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7393
SELECT cor0.col2 / - CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7393
SELECT cor0.col2 / - CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 5 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT + 47 AS col2 FROM tab2, tab1, tab2 AS cor0, tab1 AS cor1
----
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-7396
SELECT + col0 + + cor0.col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-7396
SELECT + col0 + + cor0.col1 / - col1 AS col1 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT ALL col1 * 81 AS col0 FROM tab1
----
1053
2106
810

query I rowsort
SELECT + col1 * col0 * + cor0.col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT + ( col1 ) * - col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT + + ( cor0.col1 ) * - col0 * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + cor0.col1 + ( cor0.col1 ) * ( col0 ) AS col0 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT col0 * cor0.col1 * col1 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT 10 AS col1 FROM tab1, tab2 AS cor0
----
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7404
SELECT DISTINCT - + col0 * CAST( 48 * + col1 AS SIGNED ) FROM tab1 cor0
----
-30720
-3744
-49920

skipif mysql # not compatible
query I rowsort label-7404
SELECT DISTINCT - + col0 * CAST ( 48 * + col1 AS INTEGER ) FROM tab1 cor0
----
-30720
-3744
-49920

query I rowsort
SELECT DISTINCT + cor0.col0 + ( + 80 ) AS col0 FROM tab1 cor0
----
144
160
83

query I rowsort
SELECT ALL + 66 * 61 AS col0 FROM tab1 AS cor0
----
4026
4026
4026

query I rowsort
SELECT ALL col1 * 86 AS col0 FROM tab0
----
7396
7826
8342

query I rowsort
SELECT ( - 15 ) AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query I rowsort
SELECT ALL + + ( col2 ) + - col0 * - ( + 56 + + col1 ) FROM tab0 AS cor0
----
13165
3441
5356

onlyif mysql # use DIV operator for integer division
query I rowsort label-7410
SELECT ALL - 60 DIV col0 col2 FROM tab1 AS cor0
----
-20
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7410
SELECT ALL - 60 / col0 col2 FROM tab1 AS cor0
----
-20
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 91 col2 FROM tab1 AS cor0
----
-91

query I rowsort
SELECT - + 10 + - col0 * col2 AS col2 FROM tab0 AS cor0
----
-45
-7308
-802

query I rowsort
SELECT DISTINCT + - ( col1 ) + + col1 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT 13 + + col1 * + col2 AS col2 FROM tab1 cor0
----
1261
1417
583

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7415
SELECT CAST( NULL AS SIGNED ) - + 1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7415
SELECT CAST ( NULL AS INTEGER ) - + 1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + + ( + 93 ) FROM tab0
----
126
175
94

query I rowsort
SELECT ALL - ( 69 ) FROM tab2, tab0 cor0
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

query I rowsort
SELECT DISTINCT col1 + col0 - col1 AS col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 + cor0.col2 * - ( - cor0.col1 + col1 ) col2 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT ALL - - cor0.col0 + col0 * 94 * col1 AS col1 FROM tab2 AS cor0
----
126321
20405
432666

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7421
SELECT ALL + - col1 * - col1 + CAST( - ( col2 ) AS SIGNED ) + - ( - col2 + + col2 ) AS col0 FROM tab0 AS cor0
----
7363
8199
9408

skipif mysql # not compatible
query I rowsort label-7421
SELECT ALL + - col1 * - col1 + CAST ( - ( col2 ) AS INTEGER ) + - ( - col2 + + col2 ) AS col0 FROM tab0 AS cor0
----
7363
8199
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7422
SELECT + - col2 + + col1 * ( col2 ) DIV - col1 FROM tab1 AS cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-7422
SELECT + - col2 + + col1 * ( col2 ) / - col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + - 69 * + col2 FROM tab0 AS cor0
----
-2277
-5658
-69

query I rowsort
SELECT ALL ( + col0 ) + - col0 * 29 FROM tab1 cor0
----
-1792
-2240
-84

query I rowsort
SELECT DISTINCT + 20 * col2 FROM tab2 AS cor0
----
520
540
760

query I rowsort
SELECT ALL col2 * cor0.col1 + ( col2 ) FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL 22 * 50 FROM tab0
----
1100
1100
1100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 79 col2 FROM tab0
----
-79
-79
-79

query I rowsort
SELECT ALL 89 * cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 8236cf9ab6bad07e17b703f5b8641825

query I rowsort
SELECT - cor0.col2 + - col0 * - ( + 4 + - col2 ) FROM tab0 AS cor0
----
-7024
-729
104

query I rowsort
SELECT 74 + + col1 FROM tab1
----
100
84
87

query I rowsort
SELECT + + 68 AS col0 FROM tab1 AS cor0
----
68
68
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-7433
SELECT col1 + - col1 DIV - ( 86 + tab0.col2 ) AS col2 FROM tab0
----
86
91
98

skipif mysql # not compatible
query I rowsort label-7433
SELECT col1 + - col1 / - ( 86 + tab0.col2 ) AS col2 FROM tab0
----
86
91
98

query I rowsort
SELECT DISTINCT - 91 FROM tab0, tab0 AS cor0, tab0 cor1
----
-91

query I rowsort
SELECT + 10 * - col0 + ( 2 + col1 ) AS col0 FROM tab0
----
-152
-251
-797

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 84 col2 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

query I rowsort
SELECT DISTINCT + ( col1 * tab1.col1 ) AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL 73 * - col0 AS col1 FROM tab1
----
-219
-4672
-5840

onlyif mysql # use DIV operator for integer division
query I rowsort label-7439
SELECT DISTINCT + col1 + col2 DIV ( + cor0.col0 + - 88 ) AS col2 FROM tab0 AS cor0
----
173
86
97

skipif mysql # not compatible
query I rowsort label-7439
SELECT DISTINCT + col1 + col2 / ( + cor0.col0 + - 88 ) AS col2 FROM tab0 AS cor0
----
173
86
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7440
SELECT DISTINCT - + col2 - + CAST( NULL AS SIGNED ) * 80 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7440
SELECT DISTINCT - + col2 - + CAST ( NULL AS INTEGER ) * 80 AS col0 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7441
SELECT DISTINCT tab1.col0 DIV - col2 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-7441
SELECT DISTINCT tab1.col0 / - col2 FROM tab1
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7442
SELECT ALL - cor0.col1 DIV col1 - - col2 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-7442
SELECT ALL - cor0.col1 / col1 - - col2 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * col1 col2 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7444
SELECT DISTINCT + cor0.col1 * col2 DIV col1 + + col1 * cor0.col0 + 10 FROM tab2 AS cor0
----
1391
254
4638

skipif mysql # not compatible
query I rowsort label-7444
SELECT DISTINCT + cor0.col1 * col2 / col1 + + col1 * cor0.col0 + 10 FROM tab2 AS cor0
----
1391
254
4638

query I rowsort
SELECT DISTINCT + - col0 + col2 + - ( col0 * - ( 34 ) ) FROM tab0 AS cor0
----
1156
3019
825

query I rowsort
SELECT ALL - col2 + 67 FROM tab2 AS cor0
----
29
40
41

query I rowsort
SELECT DISTINCT - col2 + + ( + 17 ) FROM tab2 AS cor0
----
-10
-21
-9

query I rowsort
SELECT col1 + col1 * + col2 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT ALL + tab1.col1 + - tab1.col1 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7450
SELECT - - CAST( NULL AS SIGNED ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7450
SELECT - - CAST ( NULL AS INTEGER ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + ( col0 ) AS REAL ) + + CAST ( + col0 AS INTEGER ) col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7452
SELECT DISTINCT col0 - - col1 DIV cor0.col0 FROM tab2 cor0
----
11
78
79

skipif mysql # not compatible
query I rowsort label-7452
SELECT DISTINCT col0 - - col1 / cor0.col0 FROM tab2 cor0
----
11
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7453
SELECT ALL - col0 DIV ( - col2 ) AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7453
SELECT ALL - col0 / ( - col2 ) AS col0 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - - col1 * col2 - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT + - 10 * ( col0 ) * 1 - col0 AS col1 FROM tab1 AS cor0
----
-33
-704
-880

query I rowsort
SELECT ( + col0 ) * col0 + - 68 FROM tab0 AS cor0
----
1157
508
7853

onlyif mysql # use DIV operator for integer division
query I rowsort label-7457
SELECT + ( ( - col0 ) ) DIV col1 + 51 AS col1 FROM tab1 AS cor0
----
45
45
51

skipif mysql # not compatible
query I rowsort label-7457
SELECT + ( ( - col0 ) ) / col1 + 51 AS col1 FROM tab1 AS cor0
----
45
45
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7458
SELECT ALL CAST( NULL AS SIGNED ) + + cor0.col2 * col1 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7458
SELECT ALL CAST ( NULL AS INTEGER ) + + cor0.col2 * col1 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * + cor0.col2 + cor0.col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ALL col1 * col0 + 46 AS col0 FROM tab2 cor0
----
1389
263
4648

query I rowsort
SELECT ALL + + ( col0 ) * 56 - col2 AS col2 FROM tab1 AS cor0
----
114
3527
4384

query I rowsort
SELECT 11 + col1 * ( - 57 * col1 + - col2 ) FROM tab1 AS cor0
----
-10870
-39925
-6259

query I rowsort
SELECT - + col1 * col2 + col2 * + col2 AS col0 FROM tab0 cor0
----
-1749
-738
-96

query I rowsort
SELECT DISTINCT + + 90 + col1 FROM tab2 AS cor0
----
107
121
149

query I rowsort
SELECT + + 38 + + col2 FROM tab1 AS cor0
----
134
92
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * - col1 + + col1 + + col2 col1 FROM tab1 AS cor0
----
167
278
756

query I rowsort
SELECT ALL + + 17 - cor0.col0 FROM tab1 AS cor0
----
-47
-63
14

query I rowsort
SELECT - ( + col1 ) * - col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT - col0 + + col1 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT - + 61 * + col1 + - col0 FROM tab2 AS cor0
----
-1116
-1898
-3677

query I rowsort
SELECT DISTINCT - col1 * 32 * 99 + - col0 * + 26 * - col0 FROM tab1 AS cor0
----
-82134
125216
74816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col2 + - col2 - - 49 col2 FROM tab1 AS cor0
----
-143
-59
-65

query I rowsort
SELECT + col2 * + ( - col2 * - col0 ) FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-7474
SELECT DISTINCT col2 + + 33 DIV 19 AS col0 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-7474
SELECT DISTINCT col2 + + 33 / 19 AS col0 FROM tab0 cor0
----
2
34
83

query I rowsort
SELECT - col1 + col0 * - 24 FROM tab1 AS cor0
----
-1546
-1933
-98

query I rowsort
SELECT + 90 + col1 * - col1 FROM tab2 AS cor0
----
-199
-3391
-871

query I rowsort
SELECT - - 64 + col0 FROM tab1 AS cor0
----
128
144
67

query I rowsort
SELECT ALL + - cor0.col0 * 15 + - cor0.col2 * + cor0.col1 * + 89 AS col1 FROM tab1 AS cor0
----
-112272
-125001
-51690

query I rowsort
SELECT DISTINCT col1 + ( + col2 ) FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) + + col2 * + ( - 82 ) col0 FROM tab2 AS cor0
----
-2106
-2187
-3078

query I rowsort
SELECT + col0 + - 26 AS col1 FROM tab1 AS cor0
----
-23
38
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col2 col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - cor0.col0 + col1 AS col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT ALL cor0.col0 * col1 + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL col0 + col1 * col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 + + col0 col2 FROM tab1 AS cor0
----
-12
-73
4

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + 42 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7489
SELECT ALL 12 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7489
SELECT ALL 12 / - col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 * 55 col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0d6ea3f0185b2069a688f1981b19039b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - ( cor0.col0 ) + + col1 col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT cor0.col2 * 22 AS col0 FROM tab1 AS cor0
----
1188
1254
2112

query I rowsort
SELECT ALL - + 16 + col1 FROM tab0 cor0
----
70
75
81

query I rowsort
SELECT - col0 * ( - col2 ) * col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-7495
SELECT ALL 62 + col0 DIV col1 FROM tab0
----
62
62
62

skipif mysql # not compatible
query I rowsort label-7495
SELECT ALL 62 + col0 / col1 FROM tab0
----
62
62
62

query I rowsort
SELECT - 54 + - col1 FROM tab2
----
-113
-71
-85

query I rowsort
SELECT col1 * ( + col2 * 63 ) FROM tab2
----
40698
52731
96642

query I rowsort
SELECT ALL + ( + ( col0 ) + col1 ) FROM tab1
----
29
74
93

query I rowsort
SELECT tab2.col2 + ( cor1.col0 ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 48eb5da0c25f5490d4d40e7a9f41d2c4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 70 * col2 col1 FROM tab0 AS cor0
----
-2310
-5740
-70

query I rowsort
SELECT ALL 1 AS col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT + - col1 * - cor0.col2 + - 95 FROM tab1 AS cor0
----
1153
1309
475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - col2 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 29 + - col1 * - 72 FROM tab2 AS cor0
----
1195
2203
4219

query I rowsort
SELECT - col2 + 74 AS col0 FROM tab1
----
-22
17
20

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab1
----
82

query I rowsort
SELECT - - ( - col0 ) * - cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 54 col2 FROM tab2 AS cor0
----
1674
3186
918

query I rowsort
SELECT - 30 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

query I rowsort
SELECT + - col2 + + col0 + col2 AS col0 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7511
SELECT - cor0.col2 * col1 + + col2 + - 9 DIV - col1 col0 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7511
SELECT - cor0.col2 * col1 + + col2 + - 9 / - col1 col0 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-7512
SELECT ALL 3 DIV - cor0.col1 col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7512
SELECT ALL 3 / - cor0.col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 89 * col2 AS col0 FROM tab2 AS cor0
----
-2314
-2403
-3382

query I rowsort
SELECT DISTINCT + ( - col2 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - 57 * col2 AS col1 FROM tab0 AS cor0
----
-1881
-4674
-57

query I rowsort
SELECT ALL + + 63 + + col2 FROM tab0 AS cor0
----
145
64
96

query I rowsort
SELECT ALL + col1 * col0 * 99 + + ( col2 + 87 ) FROM tab2 AS cor0
----
133082
21597
455711

query I rowsort
SELECT DISTINCT + 87 + col2 FROM tab2 cor0
----
113
114
125

query I rowsort
SELECT DISTINCT + + 12 + col1 FROM tab2 AS cor0
----
29
43
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 97 * col0 col0 FROM tab2
----
679
7566
7663

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7521
SELECT + + col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7521
SELECT + + col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7522
SELECT - col0 + + CAST( + col0 AS SIGNED ) + - col2 * + ( - col2 ) AS col2 FROM tab2 AS cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-7522
SELECT - col0 + + CAST ( + col0 AS INTEGER ) + - col2 * + ( - col2 ) AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - cor0.col2 + col0 * - col2 + - col0 FROM tab0 AS cor0
----
-71
-7469
-849

query I rowsort
SELECT ALL - 14 + cor1.col1 AS col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 0a68748457b2b1aaf52f255757847e6b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 28 * - col2 col2 FROM tab2
----
-1064
-728
-756

query I rowsort
SELECT ALL + col0 * col0 + + col2 + col2 * - 53 * col0 FROM tab1 cor0
----
-189191
-400544
-8523

query I rowsort
SELECT - - col1 - + col0 * col1 * + col2 AS col1 FROM tab2 AS cor0
----
-119593
-51017
-5828

query I rowsort
SELECT ALL - + col1 * - col1 + 3 FROM tab0 AS cor0
----
7399
8284
9412

query I rowsort
SELECT - col0 + col2 * + col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT ALL + - col1 * 46 AS col2 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT DISTINCT cor0.col1 * ( col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col0 * col2 + - col2 * - col1 AS col2 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT + col0 * + cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT cor0.col0 - 25 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
-1
10
64

query I rowsort
SELECT DISTINCT - col2 + 15 * + cor0.col1 * + col0 FROM tab1 AS cor0
----
1116
15504
9543

query I rowsort
SELECT - - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-7537
SELECT DISTINCT - col2 + + 14 DIV + 17 AS col1 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-7537
SELECT DISTINCT - col2 + + 14 / + 17 AS col1 FROM tab2
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7538
SELECT CAST( + col1 AS SIGNED ) * col1 + ( - col1 ) FROM tab2 AS cor0
----
272
3422
930

skipif mysql # not compatible
query I rowsort label-7538
SELECT CAST ( + col1 AS INTEGER ) * col1 + ( - col1 ) FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT - 24 * - col1 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-4668
-5833
695

query I rowsort
SELECT ALL + + 54 + - col2 AS col2 FROM tab0 AS cor0
----
-28
21
53

query I rowsort
SELECT DISTINCT - ( 85 ) + cor0.col2 * col0 FROM tab2 AS cor0
----
104
1943
2917

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7542
SELECT + CAST( NULL AS SIGNED ) * + cor0.col2 * + col1 + + col1 * ( + col0 * + ( + col1 ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7542
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col2 * + col1 + + col1 * ( + col0 * + ( + col1 ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( 57 ) AS col2 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT ALL ( + col1 ) * - col1 * - ( - 9 ) + - col0 FROM tab2 cor0
----
-2680
-31407
-8656

query I rowsort
SELECT - ( - col1 ) + - cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL 83 * + 99 + cor0.col2 FROM tab0 AS cor0
----
8218
8250
8299

query I rowsort
SELECT DISTINCT 77 * cor0.col2 AS col1 FROM tab2 AS cor0
----
2002
2079
2926

query I rowsort
SELECT DISTINCT - col2 * 72 + - col1 * col2 AS col1 FROM tab2
----
-2781
-3382
-3406

query I rowsort
SELECT + col1 * col0 + 79 * col1 * col2 FROM tab2
----
125788
52377
66340

query I rowsort
SELECT + 70 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query I rowsort
SELECT ALL + - cor0.col2 + cor0.col2 * + col2 FROM tab2 AS cor0
----
1406
650
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-7552
SELECT 48 DIV + 41 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7552
SELECT 48 / + 41 AS col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - + col2 * - 1 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7554
SELECT ALL + col0 * 44 + col0 DIV cor0.col2 FROM tab0 AS cor0
----
1056
1575
3917

skipif mysql # not compatible
query I rowsort label-7554
SELECT ALL + col0 * 44 + col0 / cor0.col2 FROM tab0 AS cor0
----
1056
1575
3917

query I rowsort
SELECT DISTINCT + 64 + - col0 - col2 AS col0 FROM tab1 AS cor0
----
-112
-57
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 8 ) + col1 col0 FROM tab0 AS cor0
----
105
94
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 - col1 col0 FROM tab2
----
-21
21
7

query I rowsort
SELECT DISTINCT 41 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
41

query I rowsort
SELECT ALL + + col0 * 40 AS col2 FROM tab2 cor0
----
280
3120
3160

query I rowsort
SELECT DISTINCT + col2 + - 79 FROM tab0 AS cor0
----
-46
-78
3

query I rowsort
SELECT ALL + 39 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT DISTINCT col2 * + 92 + - tab1.col0 AS col2 FROM tab1
----
4965
5180
8752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( + 79 ) col0 FROM tab0
----
1896
2765
7031

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 + + ( col1 ) * col0 col1 FROM tab1 AS cor0
----
-3008
-6640
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * col2 + col2 col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col1 + + ( + 20 ) * col2 AS col0 FROM tab2 AS cor0
----
571
579
777

query I rowsort
SELECT - - col2 * + ( col1 ) * col2 + 35 AS col0 FROM tab1 AS cor0
----
119843
32525
75851

query I rowsort
SELECT DISTINCT - col1 + + col0 * 4 AS col0 FROM tab0 AS cor0
----
10
265
43

query I rowsort
SELECT col1 + - 67 AS col2 FROM tab0
----
19
24
30

query I rowsort
SELECT + 12 * - cor0.col0 AS col1 FROM tab0 cor0
----
-1068
-288
-420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 col1 FROM tab1
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7572
SELECT ALL + 62 DIV col2 AS col2 FROM tab0
----
0
1
62

skipif mysql # not compatible
query I rowsort label-7572
SELECT ALL + 62 / col2 AS col2 FROM tab0
----
0
1
62

query I rowsort
SELECT ALL - col1 * + col2 + tab1.col2 + col0 AS col0 FROM tab1
----
-1072
-1347
-449

query I rowsort
SELECT 53 * - col1 AS col0 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT 23 + + cor0.col0 * - col0 * col0 FROM tab1 cor0
----
-262121
-4
-511977

query I rowsort
SELECT DISTINCT + col0 * - col0 + cor0.col2 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT ALL + ( 54 ) FROM tab1, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT - col1 * - 86 AS col2 FROM tab0 cor0
----
7396
7826
8342

query I rowsort
SELECT ALL + col1 * cor0.col1 * - col2 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT col0 * ( - col0 ) * col2 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT + + col2 * - 9 AS col0 FROM tab2 AS cor0
----
-234
-243
-342

onlyif mysql # use DIV operator for integer division
query I rowsort label-7582
SELECT DISTINCT + + col2 + 71 DIV col1 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7582
SELECT DISTINCT + + col2 + 71 / col1 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - 2 + - col0 AS col0 FROM tab2 AS cor0
----
-80
-81
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - col2 * col0 col1 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT + col1 * + 88 + + col2 AS col2 FROM tab0 cor0
----
7601
8090
8537

query I rowsort
SELECT - - 36 AS col0 FROM tab1 AS cor0
----
36
36
36

query I rowsort
SELECT - ( - 6 ) AS col1 FROM tab2
----
6
6
6

query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - ( 76 ) * col1 + + col2 * - col0 FROM tab2 AS cor0
----
-2545
-4294
-6512

query I rowsort
SELECT + 33 + - col2 * col2 FROM tab0 cor0
----
-1056
-6691
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-7591
SELECT ALL - col0 DIV - col1 + + col2 FROM tab2
----
27
27
42

skipif mysql # not compatible
query I rowsort label-7591
SELECT ALL - col0 / - col1 + + col2 FROM tab2
----
27
27
42

query I rowsort
SELECT + + col2 + + col0 * - col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT + col1 + + col0 + col2 FROM tab2 cor0
----
134
163
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col2 col2 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 * - col0 + cor0.col1 col2 FROM tab1 AS cor0
----
-36470
-4186
-99827

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 WHERE NOT - col1 NOT IN ( cor0.col1 )
----

query III rowsort
SELECT ALL * FROM tab0 cor0 WHERE NOT col2 >= ( NULL )
----

query III rowsort
SELECT * FROM tab1 WHERE col0 >= NULL
----

query I rowsort
SELECT - - col0 + - col0 + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT col1 + + col2 + col0 AS col1 FROM tab0
----
133
143
262

query I rowsort
SELECT + col2 * col1 - - col2 FROM tab1 AS cor0
----
1344
1458
627

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7603
SELECT col2 DIV + cor0.col1 + col0 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-7603
SELECT col2 / + cor0.col1 + col0 FROM tab2 AS cor0
----
7
78
81

query I rowsort
SELECT - col2 * col1 * tab1.col0 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT - col0 * col2 + col0 * + col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7606
SELECT col2 + + cor0.col2 DIV col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-7606
SELECT col2 + + cor0.col2 / col2 FROM tab1 AS cor0
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7607
SELECT ALL - tab0.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-7607
SELECT ALL - tab0.col1 / col2 col1 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT ALL - 17 + col2 * 97 AS col1 FROM tab0
----
3184
7937
80

query I rowsort
SELECT ALL col2 * col1 + 9 AS col1 FROM tab2 cor0
----
1543
655
846

query I rowsort
SELECT + col0 + col1 * - 20 AS col1 FROM tab1 AS cor0
----
-136
-180
-517

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor1.col1 col1 FROM tab2 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ALL + tab2.col1 * col0 * col1 + col2 FROM tab2
----
22869
271544
6754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7613
SELECT + col2 + col1 * + col0 DIV - col0 AS col1 FROM tab1
----
28
47
83

skipif mysql # not compatible
query I rowsort label-7613
SELECT + col2 + col1 * + col0 / - col0 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT + + col0 * ( + 33 ) AS col0 FROM tab0 cor0
----
1155
2937
792

query I rowsort
SELECT + col2 + 3 AS col0 FROM tab0
----
36
4
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7616
SELECT DISTINCT - tab0.col2 DIV 58 AS col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7616
SELECT DISTINCT - tab0.col2 / 58 AS col0 FROM tab0
----
-1
0

query I rowsort
SELECT - 35 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 6d967b3bac2e01a0318865f682f9a97b

query I rowsort
SELECT ALL - col1 * col1 - + 53 AS col1 FROM tab1 AS cor0
----
-153
-222
-729

query I rowsort
SELECT col2 * + col1 + ( col0 ) * + ( col2 ) FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT ALL col0 * 2 + - col2 * col0 FROM tab0 AS cor0
----
-7120
-744
35

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col2 * 56 AS col2 FROM tab0 AS cor0
----
-41
1762
4501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col1 + col0 col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT - - col1 * + ( - col2 ) * cor0.col2 + + ( 69 ) FROM tab1 AS cor0
----
-119739
-32421
-75747

query I rowsort
SELECT ALL + 73 * col1 - col0 AS col1 FROM tab2
----
1162
2256
4229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7625
SELECT ALL CAST( NULL AS DECIMAL ) - - col2 * - col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7625
SELECT ALL CAST ( NULL AS REAL ) - - col2 * - col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 59 * - col0 - tab0.col0 FROM tab0
----
-1440
-2100
-5340

query I rowsort
SELECT + 83 * + tab0.col1 AS col0 FROM tab0
----
7138
7553
8051

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + tab0.col0 ) * 46 * tab1.col2 col2 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to 913c8547447d544e441a78f4c1eee09a

query I rowsort
SELECT ( 25 ) + col1 * col1 FROM tab1 AS cor0
----
125
194
701

query I rowsort
SELECT 76 AS col2 FROM tab0 cor0
----
76
76
76

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab1, tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7632
SELECT col2 DIV + col0 - + 28 FROM tab2 AS cor0
----
-25
-28
-28

skipif mysql # not compatible
query I rowsort label-7632
SELECT col2 / + col0 - + 28 FROM tab2 AS cor0
----
-25
-28
-28

query I rowsort
SELECT + - 40 + + col1 AS col0 FROM tab1 AS cor0
----
-14
-27
-30

query I rowsort
SELECT DISTINCT 96 + col2 AS col1 FROM tab2 AS cor0
----
122
123
134

query I rowsort
SELECT ALL - 91 - col0 AS col1 FROM tab0 AS cor0
----
-115
-126
-180

query I rowsort
SELECT + cor0.col0 * - cor0.col2 * + col2 + - 43 * - col0 AS col1 FROM tab2 AS cor0
----
-110679
-4802
-49374

query I rowsort
SELECT DISTINCT 47 + - col2 * col0 AS col1 FROM tab0 AS cor0
----
-7251
-745
12

query I rowsort
SELECT + 1 * col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + 42 * 50 AS col1 FROM tab2
----
2100
2100
2100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7640
SELECT + CAST( NULL AS DECIMAL ) * col0 / col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7640
SELECT + CAST ( NULL AS REAL ) * col0 / col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7642
SELECT DISTINCT + - ( + col2 ) * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7642
SELECT DISTINCT + - ( + col2 ) * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + cor0.col0 * col0 + 92 * col1 FROM tab0 AS cor0
----
10149
16293
8488

query I rowsort
SELECT ALL col0 * col0 - + col2 AS col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL + - col0 * + cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( col2 ) col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + - col1 + col1 * 79 FROM tab0 AS cor0
----
6708
7098
7566

query I rowsort
SELECT col0 * - cor0.col0 + - col1 * col0 - + col1 FROM tab2 AS cor0
----
-10745
-297
-7601

query I rowsort
SELECT DISTINCT + 59 * col1 FROM tab1 AS cor0
----
1534
590
767

query I rowsort
SELECT DISTINCT 41 * col2 + col1 * + 80 AS col0 FROM tab2
----
2918
3587
5786

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 * tab0.col1 col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT - - 5 AS col1 FROM tab0 AS cor0
----
5

query I rowsort
SELECT DISTINCT + 92 * col1 + col0 AS col2 FROM tab0 AS cor0
----
7936
8461
8959

query I rowsort
SELECT - col0 + + ( + col0 ) * + col2 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT + col0 + - col2 * - col0 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7656
SELECT ALL col2 - - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7656
SELECT ALL col2 - - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 * - col1 + - col0 * - col0 FROM tab2 AS cor0
----
1010
6530
9565

query I rowsort
SELECT 2 * + col0 AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL col2 * - col0 + 32 FROM tab0
----
-3
-7266
-760

query I rowsort
SELECT ALL tab2.col1 * 7 FROM tab2, tab1 cor0
----
9 values hashing to c04b2beae9324a163a4bd04f20c3bb97

query I rowsort
SELECT - 45 * + 72 FROM tab2 cor0
----
-3240
-3240
-3240

onlyif mysql # use DIV operator for integer division
query I rowsort label-7662
SELECT ALL + + 12 DIV - 23 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7662
SELECT ALL + + 12 / - 23 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + - ( + col2 ) * col1 + + col2 * col2 FROM tab0 cor0
----
-1749
-738
-96

query I rowsort
SELECT DISTINCT + col2 + + cor0.col1 * col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + + 84 AS col1 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT ALL - ( ( - col1 ) ) * + col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT 60 + ( - col1 ) AS col2 FROM tab2 AS cor0
----
1
29
43

query I rowsort
SELECT + ( 87 ) * + cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 8ca7861657245b119c7ce2b8cb1688b3

query I rowsort
SELECT - col0 + + col0 * tab1.col0 * col0 FROM tab1
----
24
262080
511920

query I rowsort
SELECT + tab0.col1 * - ( - tab0.col1 ) + + col1 AS col2 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT col1 - + ( ( col1 ) ) FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + - ( 48 ) * cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
-1680
-350304
-38016

onlyif mysql # use DIV operator for integer division
query I rowsort label-7673
SELECT DISTINCT - - 49 DIV - cor0.col2 col1 FROM tab0 AS cor0
----
-1
-49
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7673
SELECT DISTINCT - - 49 / - cor0.col2 col1 FROM tab0 AS cor0
----
-1
-49
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7674
SELECT col0 - CAST( + col1 AS SIGNED ) FROM tab0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-7674
SELECT col0 - CAST ( + col1 AS INTEGER ) FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT 34 * col2 FROM tab2
----
1292
884
918

query I rowsort
SELECT - col1 + - tab2.col2 * tab2.col0 AS col2 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT + ( - 87 ) AS col2 FROM tab1
----
-87
-87
-87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7678
SELECT - 80 * 66 - - col0 * - CAST( NULL AS SIGNED ) * col2 col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7678
SELECT - 80 * 66 - - col0 * - CAST ( NULL AS INTEGER ) * col2 col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + + cor0.col0 * col2 + col1 * 91 FROM tab1 AS cor0
----
2582
4615
8959

query I rowsort
SELECT + cor0.col0 * - 91 FROM tab2 AS cor0
----
-637
-7098
-7189

query I rowsort
SELECT ALL col1 + - col0 * col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - + col2 * + col2 + - col1 + col2 AS col2 FROM tab1 AS cor0
----
-2888
-3202
-9133

query I rowsort
SELECT 40 * + 55 FROM tab0 AS cor0
----
2200
2200
2200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7684
SELECT DISTINCT CAST( NULL AS SIGNED ) * 39 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7684
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 39 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 33 + - col0 FROM tab0 AS cor0
----
-2
-56
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7686
SELECT - CAST( NULL AS DECIMAL ) * - cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7686
SELECT - CAST ( NULL AS REAL ) * - cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7687
SELECT - - col0 DIV - col2 AS col0 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7687
SELECT - - col0 / - col2 AS col0 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + col0 * - 59 FROM tab1
----
-177
-3776
-4720

query I rowsort
SELECT 97 * tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to e30a30007d8f2794e2c4dddc0f207e12

query I rowsort
SELECT 35 + + ( col0 ) FROM tab0 AS cor0
----
124
59
70

query I rowsort
SELECT ( - 44 ) * col2 FROM tab0 cor0
----
-1452
-3608
-44

query I rowsort
SELECT col2 * + 12 FROM tab2
----
312
324
456

query I rowsort
SELECT + 85 * - col0 FROM tab0 AS cor0
----
-2040
-2975
-7565

query I rowsort
SELECT + ( + col2 ) * + col2 + col1 AS col0 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT ALL - 69 AS col1 FROM tab0 AS cor0
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * - col0 col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT col1 + - col2 + col1 FROM tab2
----
-4
35
92

query I rowsort
SELECT + tab1.col1 + + col1 AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT + col0 + ( + col0 ) FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL tab0.col0 + - col2 * 19 AS col2 FROM tab0
----
-1469
-603
16

query I rowsort
SELECT ALL - - 25 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT ALL + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-7703
SELECT - tab1.col0 * - tab1.col2 + col0 * col1 + col1 DIV + col0 FROM tab1
----
248
4288
8720

skipif mysql # not compatible
query I rowsort label-7703
SELECT - tab1.col0 * - tab1.col2 + col0 * col1 + col1 / + col0 FROM tab1
----
248
4288
8720

query I rowsort
SELECT ALL - - col0 * + 24 + + 79 AS col0 FROM tab0 AS cor0
----
2215
655
919

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 + + cor0.col0 col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT - + cor0.col2 + + col2 * col2 * col2 FROM tab0 AS cor0
----
0
35904
551286

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2, tab0 cor3
----
3645 values hashing to 4fa4bd3038de6e74a345debc8ab4cd53

onlyif mysql # use DIV operator for integer division
query I rowsort label-7708
SELECT + col1 + col2 DIV + 15 FROM tab1 cor0
----
13
19
29

skipif mysql # not compatible
query I rowsort label-7708
SELECT + col1 + col2 / + 15 FROM tab1 cor0
----
13
19
29

query I rowsort
SELECT - - col2 * + cor0.col2 + col1 * col1 FROM tab0 AS cor0
----
15005
8485
9410

query I rowsort
SELECT 36 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT - - col1 * + col1 * cor0.col2 + col1 FROM tab2 AS cor0
----
10999
25978
90565

query I rowsort
SELECT - cor0.col0 * + col1 + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT col2 - - 35 * col0 FROM tab0
----
1226
3197
873

query I rowsort
SELECT col1 * tab2.col0 * - col0 + + col0 * col1 AS col0 FROM tab2
----
-104754
-1302
-354354

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col2 + col0 * col1 * col2 col1 FROM tab1
----
101088
37050
5616

query I rowsort
SELECT DISTINCT cor0.col1 + 35 * col0 FROM tab1 AS cor0
----
131
2250
2813

onlyif mysql # use DIV operator for integer division
query I rowsort label-7717
SELECT col0 + 23 DIV cor0.col2 AS col2 FROM tab0 cor0
----
24
58
89

skipif mysql # not compatible
query I rowsort label-7717
SELECT col0 + 23 / cor0.col2 AS col2 FROM tab0 cor0
----
24
58
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 col0 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7719
SELECT CAST( - 97 AS SIGNED ) + col2 FROM tab2 AS cor0
----
-59
-70
-71

skipif mysql # not compatible
query I rowsort label-7719
SELECT CAST ( - 97 AS INTEGER ) + col2 FROM tab2 AS cor0
----
-59
-70
-71

query I rowsort
SELECT - 33 + - col1 FROM tab0 cor0
----
-119
-124
-130

query I rowsort
SELECT ALL 62 AS col0 FROM tab2 AS cor0
----
62
62
62

query I rowsort
SELECT + + cor0.col2 * col2 + + col2 FROM tab1 cor0
----
2970
3306
9312

query I rowsort
SELECT - col2 - + 43 FROM tab1 AS cor0
----
-100
-139
-97

query I rowsort
SELECT + col2 - ( + ( + col2 ) ) FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 + - 99 col2 FROM tab0 AS cor0
----
1965
3296
8000

query I rowsort
SELECT ( tab2.col0 ) * + 74 AS col0 FROM tab2
----
518
5772
5846

query I rowsort
SELECT + + col1 * cor0.col1 + - ( 88 ) * col2 + ( cor0.col0 ) AS col2 FROM tab0 AS cor0
----
1154
4516
9356

onlyif mysql # use DIV operator for integer division
query I rowsort label-7728
SELECT ALL + col0 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-7728
SELECT ALL + col0 / col1 col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7729
SELECT DISTINCT + col1 + + col0 DIV - ( - col1 ) col1 FROM tab1 cor0
----
16
19
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7729
SELECT DISTINCT + col1 + + col0 / - ( - col1 ) col1 FROM tab1 cor0
----
16
19
26

query I rowsort
SELECT + col0 + col1 + - col1 * col2 FROM tab2
----
-1397
-550
-799

query I rowsort
SELECT DISTINCT tab2.col1 - + col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL - col2 * col0 - - col1 FROM tab0
----
-706
-7207
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7733
SELECT DISTINCT - col0 DIV + col1 + col1 FROM tab2
----
13
31
58

skipif mysql # not compatible
query I rowsort label-7733
SELECT DISTINCT - col0 / + col1 + col1 FROM tab2
----
13
31
58

query I rowsort
SELECT - 80 * - col2 + - 43 * + col1 FROM tab1
----
3202
4130
7121

query I rowsort
SELECT DISTINCT 8 + col1 * + col1 + col2 AS col2 FROM tab2
----
335
3515
996

query I rowsort
SELECT - cor0.col2 * + col1 * 18 + + 78 FROM tab1 AS cor0
----
-10182
-22386
-25194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 * col0 col0 FROM tab1 AS cor0
----
177
3776
4720

query I rowsort
SELECT DISTINCT 13 FROM tab1, tab2, tab2 AS cor0
----
13

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( + col1 ) < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7740
SELECT - col2 - + tab1.col2 DIV col2 AS col1 FROM tab1
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-7740
SELECT - col2 - + tab1.col2 / col2 AS col1 FROM tab1
----
-55
-58
-97

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col2 <> col0
----

query I rowsort
SELECT col0 * - tab2.col0 FROM tab2 WHERE NOT - col2 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab1 WHERE NOT + col1 < - col0
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT * FROM tab2 WHERE ( - col2 ) IN ( col0 * + tab2.col1 * col0 + - col2 * - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7745
SELECT - col1 + col0 DIV - col0 - - col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7745
SELECT - col1 + col0 / - col0 - - col1 FROM tab0
----
-1
-1
-1

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL NOT IN ( - col1 + tab0.col0 * - tab0.col0 )
----

query I rowsort
SELECT col0 * col1 + col1 + col0 * col1 AS col2 FROM tab0 WHERE ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col1 AS col2 FROM tab2 WHERE NULL >= col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7749
SELECT DISTINCT col0 + - col1 DIV col2 AS col0 FROM tab0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-7749
SELECT DISTINCT col0 + - col1 / col2 AS col0 FROM tab0
----
-62
22
88

query I rowsort
SELECT DISTINCT col0 + + col0 FROM tab0 WHERE col2 - - col0 IN ( - col0 - + col0 * - col2 )
----

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 WHERE NOT - col2 NOT IN ( + col0 * - col1 )
----

query I rowsort
SELECT DISTINCT - col0 - col0 * + col0 FROM tab1
----
-12
-4160
-6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-7753
SELECT + col1 - col0 DIV - col2 AS col0 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-7753
SELECT + col1 - col0 / - col2 AS col0 FROM tab1
----
11
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7754
SELECT DISTINCT - col1 DIV - tab0.col0 AS col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7754
SELECT DISTINCT - col1 / - tab0.col0 AS col0 FROM tab0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7755
SELECT + col1 DIV + col0 + - col0 * + col2 FROM tab1
----
-154
-3648
-7680

skipif mysql # not compatible
query I rowsort label-7755
SELECT + col1 / + col0 + - col0 * + col2 FROM tab1
----
-154
-3648
-7680

query I rowsort
SELECT tab0.col1 * + col1 * tab0.col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT - col2 FROM tab1 WHERE NULL <> NULL
----

query I rowsort
SELECT + col2 AS col2 FROM tab2 WHERE NULL <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 - - col2 * col0 col0 FROM tab2
----
406
4345
6630

query I rowsort
SELECT + 46 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT - 52 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to e8a5cb10c0973a78554f344d4f6e7e74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7762
SELECT DISTINCT - + CAST( - col2 AS SIGNED ) * cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

skipif mysql # not compatible
query I rowsort label-7762
SELECT DISTINCT - + CAST ( - col2 AS INTEGER ) * cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - ( - col1 ) * + col0 * col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + 95 * - 7 FROM tab1 cor0
----
-665

query I rowsort
SELECT + ( col0 ) + ( - col0 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 * col0 - ( col0 ) FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL - col0 * col2 - - ( 91 + + col0 ) * cor0.col2 AS col2 FROM tab2 AS cor0
----
2366
2457
3458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * cor0.col2 + - 98 + ( col1 ) col0 FROM tab2 AS cor0
----
1495
565
770

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7769
SELECT ALL + ( + col0 ) + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7769
SELECT ALL + ( + col0 ) + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + - col1 * cor0.col2 * cor0.col2 FROM tab2 cor0
----
-22592
-24469
-39806

query I rowsort
SELECT DISTINCT - 89 + col0 AS col1 FROM tab2 AS cor0
----
-10
-11
-82

query I rowsort
SELECT 4 - + col0 FROM tab0 AS cor0
----
-20
-31
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7773
SELECT ALL col1 * cor0.col0 + - col1 DIV + col0 AS col1 FROM tab2 cor0
----
1343
213
4602

skipif mysql # not compatible
query I rowsort label-7773
SELECT ALL col1 * cor0.col0 + - col1 / + col0 AS col1 FROM tab2 cor0
----
1343
213
4602

query I rowsort
SELECT ALL + + col2 + + col2 * + col2 AS col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + col1 * - col2 - - ( 22 + + col1 ) * col2 AS col2 FROM tab0 AS cor0
----
1804
22
726

query I rowsort
SELECT DISTINCT - - col2 * col1 AS col0 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + - col1 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL tab1.col1 * 36 AS col0 FROM tab1
----
360
468
936

query I rowsort
SELECT DISTINCT + - col1 * 80 AS col0 FROM tab1 cor0
----
-1040
-2080
-800

query I rowsort
SELECT + col1 * + 56 + - col1 AS col0 FROM tab1 AS cor0
----
1430
550
715

query I rowsort
SELECT DISTINCT cor0.col2 * - ( col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + - col2 * col2 + ( col0 ) + + ( + ( + cor0.col0 ) ) * col1 AS col1 FROM tab1 cor0
----
-2545
-2835
-8096

query I rowsort
SELECT ALL 68 * col2 AS col2 FROM tab2
----
1768
1836
2584

query I rowsort
SELECT DISTINCT - col1 + - ( col0 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col1 + - 83 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
-4510
-4778
-8051

query I rowsort
SELECT DISTINCT + cor0.col0 + + col1 * + col1 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-7787
SELECT - col1 + col0 + + col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
-1
-61
-61

skipif mysql # not compatible
query I rowsort label-7787
SELECT - col1 + col0 + + col0 / + col0 AS col0 FROM tab0 AS cor0
----
-1
-61
-61

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to 7f0405f8197238fbd342972ef0bcee12

query I rowsort
SELECT ALL + 11 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT + cor0.col1 * + cor0.col1 + + 22 + + 79 * - cor0.col0 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to fa7109836227fcf9252f7cc64f351274

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7791
SELECT CAST( NULL AS SIGNED ) col2 FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7791
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL cor1.col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab2
----
83

query I rowsort
SELECT ALL + 64 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT DISTINCT + 1 * cor1.col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT + - cor0.col0 * col0 + col2 FROM tab2 cor0
----
-22
-6058
-6203

query I rowsort
SELECT - col1 + 9 * + col2 FROM tab2 AS cor0
----
175
212
325

query I rowsort
SELECT DISTINCT + 46 * - col1 AS col1 FROM tab2
----
-1426
-2714
-782

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7799
SELECT + - col1 + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7799
SELECT + - col1 + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 * 40 AS col2 FROM tab0 AS cor0
----
-1320
-3280
-40

query I rowsort
SELECT ALL - ( - 18 ) + + col0 AS col0 FROM tab1 AS cor0
----
21
82
98

query I rowsort
SELECT ALL ( col0 ) + col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT - ( col2 ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + - 95 + + ( cor0.col1 ) * ( col2 ) AS col1 FROM tab2 cor0
----
1439
551
742

query I rowsort
SELECT ALL - - col1 * col0 * - col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT - ( col2 ) + + col0 * 9 AS col2 FROM tab1 AS cor0
----
-27
519
624

query I rowsort
SELECT + - ( 27 ) AS col0 FROM tab2 AS cor0
----
-27
-27
-27

onlyif mysql # use DIV operator for integer division
query I rowsort label-7808
SELECT ALL col2 * col0 DIV col1 FROM tab1
----
364
590
6

skipif mysql # not compatible
query I rowsort label-7808
SELECT ALL col2 * col0 / col1 FROM tab1
----
364
590
6

query I rowsort
SELECT col2 * 79 + - col1 FROM tab0
----
-18
2521
6387

query I rowsort
SELECT col2 * - ( col0 ) + + col2 * + 82 FROM tab0
----
-574
1914
47

query I rowsort
SELECT + + cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + 63 * + tab0.col2 - + 14 FROM tab0, tab1 AS cor0
----
2065
49
5152

query I rowsort
SELECT cor0.col1 * + tab1.col2 FROM tab1, tab1 cor0
----
9 values hashing to e15c44d5a431966f2851e6bf4041b374

query I rowsort
SELECT ALL + ( col0 ) + col2 + col2 AS col2 FROM tab1
----
111
178
272

onlyif mysql # use DIV operator for integer division
query I rowsort label-7815
SELECT col1 DIV cor0.col0 AS col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7815
SELECT col1 / cor0.col0 AS col0 FROM tab2 cor0
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7816
SELECT DISTINCT - + cor0.col1 DIV - col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-7816
SELECT DISTINCT - + cor0.col1 / - col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT + col2 * - col2 + + col2 * cor0.col0 * col1 FROM tab1 AS cor0
----
1296
33231
90624

query I rowsort
SELECT - + ( + col1 ) * col1 * + col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-7819
SELECT 41 DIV col1 FROM tab1 AS cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-7819
SELECT 41 / col1 FROM tab1 AS cor0
----
1
3
4

query I rowsort
SELECT DISTINCT - 24 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-1416
-408
-744

onlyif mysql # use DIV operator for integer division
query I rowsort label-7821
SELECT ALL + ( + 37 ) DIV col0 FROM tab2
----
0
0
5

skipif mysql # not compatible
query I rowsort label-7821
SELECT ALL + ( + 37 ) / col0 FROM tab2
----
0
0
5

query I rowsort
SELECT DISTINCT col2 * col0 + tab2.col0 - - col1 * col1 FROM tab2
----
1157
3370
5587

query I rowsort
SELECT 27 + - col2 * col1 FROM tab0 AS cor0
----
-2811
-70
-7435

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7824
SELECT ALL + + CAST( NULL AS DECIMAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7824
SELECT ALL + + CAST ( NULL AS REAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 - tab0.col2 * + tab0.col2 FROM tab0
----
-1175
-6815
-98

query I rowsort
SELECT ALL cor0.col2 + - cor0.col0 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to cd9042ce7b6d5be41db6200432d27198

query I rowsort
SELECT + 62 + + col1 FROM tab2
----
121
79
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col1 FROM tab2
----
87
87
87

query I rowsort
SELECT + - cor0.col0 + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7830
SELECT DISTINCT cor0.col0 * - CAST( NULL AS SIGNED ) / col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7830
SELECT DISTINCT cor0.col0 * - CAST ( NULL AS INTEGER ) / col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col1 + - col2 + + col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 * col2 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT DISTINCT - + cor0.col0 + + col1 * - col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL + col1 * + 1 AS col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7835
SELECT - - CAST( NULL AS SIGNED ) + - ( - col1 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7835
SELECT - - CAST ( NULL AS INTEGER ) + - ( - col1 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL - col2 * 52 FROM tab1 AS cor0
----
-2808
-2964
-4992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7838
SELECT DISTINCT CAST( col0 AS SIGNED ) + + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-7838
SELECT DISTINCT CAST ( col0 AS INTEGER ) + + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL 19 * cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
1667
1811
1844

query I rowsort
SELECT col0 + 96 * + col0 FROM tab0 AS cor0
----
2328
3395
8633

query I rowsort
SELECT ALL - 70 + 46 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
62
67
73

query I rowsort
SELECT ALL ( 1 ) AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7843
SELECT DISTINCT + col1 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7843
SELECT DISTINCT + col1 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7844
SELECT ALL + col0 DIV col1 - col1 * + col2 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-7844
SELECT ALL + col0 / col1 - col1 * + col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - 32 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
81 values hashing to 54c3a9a1fd8612641b43985c0c2f59cd

query I rowsort
SELECT ALL 98 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) * col0 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT 98 * col0 FROM tab1
----
294
6272
7840

query I rowsort
SELECT ALL - - col0 * + 84 FROM tab2 AS cor0
----
588
6552
6636

query I rowsort
SELECT DISTINCT col1 - + ( + col2 + - col0 ) * + ( - ( cor0.col0 ) * - col0 ) AS col1 FROM tab0 AS cor0
----
-5098
41747
55538

query I rowsort
SELECT DISTINCT + 20 * + tab0.col0 FROM tab0
----
1780
480
700

query I rowsort
SELECT ( + col2 + - col0 * - col0 ) AS col1 FROM tab2
----
6110
6279
76

query I rowsort
SELECT 59 - col1 AS col0 FROM tab1
----
33
46
49

skipif mysql # not compatible
query I rowsort
SELECT col1 + + CAST ( ( col0 ) AS REAL ) FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * ( col2 ) col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7856
SELECT - - col1 * + CAST( NULL AS DECIMAL ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7856
SELECT - - col1 * + CAST ( NULL AS REAL ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 20 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
20

query I rowsort
SELECT DISTINCT + + cor0.col1 + 51 FROM tab0, tab1, tab1 cor0
----
61
64
77

query I rowsort
SELECT DISTINCT - col0 + ( + col0 * + col2 ) FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL + - col2 * col0 + - 10 FROM tab2 AS cor0
----
-199
-2038
-3012

onlyif mysql # use DIV operator for integer division
query I rowsort label-7861
SELECT + - col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7861
SELECT + - col1 / cor0.col1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7862
SELECT ALL + + col1 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-7862
SELECT ALL + + col1 / + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT - col2 + tab2.col2 AS col0 FROM tab2
----
0

query I rowsort
SELECT ALL col1 * + col0 + - col0 AS col1 FROM tab0
----
2040
3360
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7865
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7865
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + col0 FROM tab1
----
NULL

query I rowsort
SELECT col0 * + tab1.col1 * tab1.col2 FROM tab1
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 + col0 + 61 col0 FROM tab0
----
193
2923
7612

query I rowsort
SELECT ALL col1 + - col0 * + col2 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + + col0 * + col2 + - col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ( col0 ) * col0 AS col1 FROM tab0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7871
SELECT DISTINCT CAST( NULL AS SIGNED ) * + col1 + + col0 * - 0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7871
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + col1 + + col0 * - 0 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7872
SELECT DISTINCT - - 7 + col0 * cor0.col1 DIV + cor0.col0 AS col1 FROM tab0 AS cor0
----
104
93
98

skipif mysql # not compatible
query I rowsort label-7872
SELECT DISTINCT - - 7 + col0 * cor0.col1 / + cor0.col0 AS col1 FROM tab0 AS cor0
----
104
93
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7873
SELECT DISTINCT + ( col2 ) * - CAST( col2 AS SIGNED ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

skipif mysql # not compatible
query I rowsort label-7873
SELECT DISTINCT + ( col2 ) * - CAST ( col2 AS INTEGER ) + cor0.col1 AS col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ALL - 84 * col1 + - col2 FROM tab0 cor0
----
-7257
-7726
-8149

query I rowsort
SELECT DISTINCT - 83 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7876
SELECT + col0 * cor0.col0 + CAST( - col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-45
4039
6304

skipif mysql # not compatible
query I rowsort label-7876
SELECT + col0 * cor0.col0 + CAST ( - col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT 10 - + col2 FROM tab2 AS cor0
----
-16
-17
-28

query I rowsort
SELECT ALL - col2 + + col1 * + col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT DISTINCT + + col0 * - col0 + - 77 FROM tab1 AS cor0
----
-4173
-6477
-86

query I rowsort
SELECT 20 + + col1 AS col1 FROM tab0 AS cor0
----
106
111
117

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - col1 * cor0.col1 - 91 * - cor0.col1 FROM tab1 AS cor0
----
1014
1690
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-7883
SELECT DISTINCT - col0 DIV + col1 + col0 * - col2 FROM tab1
----
-162
-3654
-7686

skipif mysql # not compatible
query I rowsort label-7883
SELECT DISTINCT - col0 / + col1 + col0 * - col2 FROM tab1
----
-162
-3654
-7686

query I rowsort
SELECT - col0 * ( col1 ) * tab0.col1 AS col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT + col2 + + col2 * - col0 + col0 FROM tab0
----
-7127
-735
1

query I rowsort
SELECT + col0 + - 29 FROM tab0 AS cor0
----
-5
6
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + 67 col2 FROM tab1 AS cor0
----
77
80
93

query I rowsort
SELECT - 33 + + col1 FROM tab0 AS cor0
----
53
58
64

query I rowsort
SELECT - ( col2 ) * cor0.col0 + + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT - 25 + col1 * + col1 AS col1 FROM tab0 AS cor0
----
7371
8256
9384

query I rowsort
SELECT + ( + 11 ) * - col1 + - ( col0 ) * - col0 AS col0 FROM tab0 AS cor0
----
-370
158
6920

query I rowsort
SELECT + + 4 * + 64 - - col2 AS col1 FROM tab2 AS cor0
----
282
283
294

onlyif mysql # use DIV operator for integer division
query I rowsort label-7893
SELECT - 64 DIV col2 + + col1 + col0 AS col0 FROM tab1 AS cor0
----
28
73
93

skipif mysql # not compatible
query I rowsort label-7893
SELECT - 64 / col2 + + col1 + col0 AS col0 FROM tab1 AS cor0
----
28
73
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col0 col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - col0 * + col2 * 80 AS col0 FROM tab2 AS cor0
----
-15120
-162240
-240160

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab2 cor1, tab2 AS cor2
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT 7 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

onlyif mysql # use DIV operator for integer division
query I rowsort label-7898
SELECT + col0 DIV 38 FROM tab2 cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-7898
SELECT + col0 / 38 FROM tab2 cor0
----
0
2
2

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
-3
-64
-80

query I rowsort
SELECT - col2 + ( - col2 + col2 ) * col0 AS col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + ( col2 ) + - col0 * + col0 col0 FROM tab0 AS cor0
----
-1189
-519
-7750

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7902
SELECT + col2 * col1 * + col2 + + cor0.col1 * - CAST( NULL AS SIGNED ) + - 92 * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7902
SELECT + col2 * col1 * + col2 + + cor0.col1 * - CAST ( NULL AS INTEGER ) + - 92 * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 + col0 * col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
231
40896
83120

onlyif mysql # use DIV operator for integer division
query I rowsort label-7904
SELECT + col2 + + cor0.col0 DIV ( col0 * col1 ) FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7904
SELECT + col2 + + cor0.col0 / ( col0 * col1 ) FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7905
SELECT cor0.col0 * CAST( - 78 + - col1 AS SIGNED ) FROM tab1 AS cor0
----
-312
-5632
-7280

skipif mysql # not compatible
query I rowsort label-7905
SELECT cor0.col0 * CAST ( - 78 + - col1 AS INTEGER ) FROM tab1 AS cor0
----
-312
-5632
-7280

query I rowsort
SELECT - - col1 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7907
SELECT + col2 DIV + col1 col2 FROM tab2 cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7907
SELECT + col2 / + col1 col2 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT ALL col2 + + 26 * col1 FROM tab1 AS cor0
----
317
434
730

query I rowsort
SELECT - + col1 + + 16 * col2 FROM tab1 AS cor0
----
1523
838
902

query I rowsort
SELECT ALL - col0 + + col0 * col0 AS col2 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT ALL - + col0 + - 67 FROM tab2 AS cor0
----
-145
-146
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col0 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7913
SELECT ALL - col1 DIV ( + tab2.col0 * col1 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7913
SELECT ALL - col1 / ( + tab2.col0 * col1 ) FROM tab2
----
0
0
0

query I rowsort
SELECT + - col2 + col2 * col2 + - col1 AS col1 FROM tab0 AS cor0
----
-97
6551
970

skipif mysql # not compatible
query I rowsort
SELECT + ( - col2 ) * ( 38 ) + + col0 * CAST ( col2 AS REAL ) + col2 * ( col1 + cor0.col2 ) FROM tab1 AS cor0
----
14496
2430
5301

query I rowsort
SELECT ALL + + cor0.col1 * + col0 * + col0 + col1 AS col0 FROM tab1 cor0
----
260
40970
83213

query I rowsort
SELECT - 56 + + col0 + col0 AS col2 FROM tab0 AS cor0
----
-8
122
14

query I rowsort
SELECT - col1 + + cor0.col0 * cor0.col2 + col2 AS col1 FROM tab1 AS cor0
----
190
3695
7763

query I rowsort
SELECT + + cor1.col0 - - 31 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 24fa8f685160021bf96af2f39a41800b

query I rowsort
SELECT ALL ( ( tab1.col2 ) ) AS col0 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7921
SELECT DISTINCT - col0 DIV - col1 AS col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-7921
SELECT DISTINCT - col0 / - col1 AS col2 FROM tab2
----
0
1
4

query I rowsort
SELECT ALL + ( col2 + ( + col1 ) ) * - col0 * + ( 38 + col2 ) FROM tab1
----
-1168480
-22080
-407360

query I rowsort
SELECT ALL 58 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT + 27 * + col2 + cor0.col0 * + col2 FROM tab2 cor0
----
2730
4028
918

query I rowsort
SELECT DISTINCT 76 + col2 FROM tab2
----
102
103
114

query I rowsort
SELECT + col1 * col1 + - 22 - col1 FROM tab1
----
134
628
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7927
SELECT CAST( NULL AS SIGNED ) * col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7927
SELECT CAST ( NULL AS INTEGER ) * col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 53 * col1 FROM tab0 AS cor0
----
-4558
-4823
-5141

query I rowsort
SELECT DISTINCT + + ( + col2 ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - 95 + col0 FROM tab0 AS cor0
----
-6
-60
-71

query I rowsort
SELECT col0 * col1 * - col0 AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT - col0 * col1 * col0 + ( + col0 ) FROM tab0 AS cor0
----
-118790
-49512
-720722

onlyif mysql # use DIV operator for integer division
query I rowsort label-7933
SELECT DISTINCT 97 DIV - cor0.col1 FROM tab1 AS cor0
----
-3
-7
-9

skipif mysql # not compatible
query I rowsort label-7933
SELECT DISTINCT 97 / - cor0.col1 FROM tab1 AS cor0
----
-3
-7
-9

query I rowsort
SELECT ALL + cor0.col0 * + col0 + ( - 47 ) * - col2 FROM tab0 AS cor0
----
11775
1272
2127

query I rowsort
SELECT DISTINCT + + tab1.col0 AS col2 FROM tab1, tab0, tab0 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7936
SELECT ALL - cor0.col2 DIV - col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7936
SELECT ALL - cor0.col2 / - col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + ( - col2 ) * + col1 + 9 AS col0 FROM tab1 AS cor0
----
-1239
-1395
-561

onlyif mysql # use DIV operator for integer division
query I rowsort label-7938
SELECT DISTINCT + cor0.col0 DIV - col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7938
SELECT DISTINCT + cor0.col0 / - col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col2 + + tab2.col0 + + ( + col1 ) FROM tab2
----
11
111
58

query I rowsort
SELECT ALL + 31 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7941
SELECT ALL - cor0.col0 * CAST( 26 AS SIGNED ) AS col0 FROM tab2 cor0
----
-182
-2028
-2054

skipif mysql # not compatible
query I rowsort label-7941
SELECT ALL - cor0.col0 * CAST ( 26 AS INTEGER ) AS col0 FROM tab2 cor0
----
-182
-2028
-2054

query I rowsort
SELECT ALL + + ( - 89 ) + + col1 FROM tab0 cor0
----
-3
2
8

query I rowsort
SELECT - - col2 + + cor0.col0 * + col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7944
SELECT - col1 * col2 DIV - col1 + col0 FROM tab0 cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-7944
SELECT - col1 * col2 / - col1 + col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col2 + 21 FROM tab2 AS cor0
----
-17
-5
-6

query I rowsort
SELECT ALL + ( ( col2 ) ) * - col2 - ( + col2 ) FROM tab0 AS cor0
----
-1122
-2
-6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 1 * col2 + cor0.col2 + - 22 * - 77 col0 FROM tab0 AS cor0
----
1696
1760
1858

onlyif mysql # use DIV operator for integer division
query I rowsort label-7948
SELECT DISTINCT - col0 + - col2 DIV - 25 + - col2 * + col2 * col2 AS col1 FROM tab0
----
-35960
-36
-551454

skipif mysql # not compatible
query I rowsort label-7948
SELECT DISTINCT - col0 + - col2 / - 25 + - col2 * + col2 * col2 AS col1 FROM tab0
----
-35960
-36
-551454

query I rowsort
SELECT ALL - tab0.col2 * 60 * - col2 AS col2 FROM tab0
----
403440
60
65340

onlyif mysql # use DIV operator for integer division
query I rowsort label-7950
SELECT DISTINCT - col0 DIV - 87 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7950
SELECT DISTINCT - col0 / - 87 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + - 21 * 3 + col0 + - ( col2 ) FROM tab0 AS cor0
----
-29
-56
-72

query I rowsort
SELECT + - ( + col1 ) + - col2 + col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7953
SELECT CAST( - col2 AS SIGNED ) * col1 DIV + 24 + + col0 + + col2 AS col1 FROM tab0 cor0
----
-139
-61
32

skipif mysql # not compatible
query I rowsort label-7953
SELECT CAST ( - col2 AS INTEGER ) * col1 / + 24 + + col0 + + col2 AS col1 FROM tab0 cor0
----
-139
-61
32

query I rowsort
SELECT ( + 68 ) + tab1.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 83057b1e970711dce5e1a947d65526be

query I rowsort
SELECT - cor0.col1 + + ( col1 ) * + 68 AS col2 FROM tab1 AS cor0
----
1742
670
871

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7956
SELECT - CAST( NULL AS SIGNED ) * ( col0 ) - - 73 * + 86 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7956
SELECT - CAST ( NULL AS INTEGER ) * ( col0 ) - - 73 * + 86 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7957
SELECT + - col2 DIV 93 + - col2 FROM tab1 AS cor0
----
-54
-57
-97

skipif mysql # not compatible
query I rowsort label-7957
SELECT + - col2 / 93 + - col2 FROM tab1 AS cor0
----
-54
-57
-97

query I rowsort
SELECT + tab2.col0 * ( col1 ) + 93 AS col0 FROM tab2
----
1436
310
4695

query I rowsort
SELECT DISTINCT 76 * - col0 AS col0 FROM tab1
----
-228
-4864
-6080

onlyif mysql # use DIV operator for integer division
query I rowsort label-7960
SELECT DISTINCT + col0 DIV - 98 + tab0.col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7960
SELECT DISTINCT + col0 / - 98 + tab0.col0 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7961
SELECT ALL - CAST( NULL AS SIGNED ) / col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7961
SELECT ALL - CAST ( NULL AS INTEGER ) / col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7962
SELECT - tab2.col2 + + col0 DIV + col0 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-7962
SELECT - tab2.col2 + + col0 / + col0 FROM tab2
----
-25
-26
-37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7963
SELECT - CAST( col1 AS SIGNED ) * - col2 * + 41 FROM tab0
----
116358
305942
3977

skipif mysql # not compatible
query I rowsort label-7963
SELECT - CAST ( col1 AS INTEGER ) * - col2 * + 41 FROM tab0
----
116358
305942
3977

query I rowsort
SELECT DISTINCT 17 * - col0 FROM tab0
----
-1513
-408
-595

onlyif mysql # use DIV operator for integer division
query I rowsort label-7965
SELECT + + col1 DIV col0 + col1 AS col2 FROM tab0 cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-7965
SELECT + + col1 / col0 + col1 AS col2 FROM tab0 cor0
----
89
92
99

query I rowsort
SELECT ALL + col2 + + col1 * + col1 * - col2 AS col0 FROM tab0 AS cor0
----
-244035
-678960
-9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - + col2 * col1 col0 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-7968
SELECT DISTINCT - - col2 DIV + 53 AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-7968
SELECT DISTINCT - - col2 / + 53 AS col1 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT - cor0.col1 * - col1 + - col2 FROM tab0 cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 44 col1 FROM tab1
----
-44
-44
-44

query I rowsort
SELECT DISTINCT col1 + - 83 * + col0 AS col0 FROM tab1 AS cor0
----
-223
-5302
-6627

query I rowsort
SELECT ALL + - col2 * cor0.col0 - cor0.col1 AS col2 FROM tab1 AS cor0
----
-188
-3658
-7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col2 + + col1 col0 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7974
SELECT DISTINCT - col0 * CAST( + col2 * + col1 AS SIGNED ) + col1 AS col0 FROM tab0 cor0
----
-3298
-664027
-68026

skipif mysql # not compatible
query I rowsort label-7974
SELECT DISTINCT - col0 * CAST ( + col2 * + col1 AS INTEGER ) + col1 AS col0 FROM tab0 cor0
----
-3298
-664027
-68026

query I rowsort
SELECT - + col2 * ( col1 ) * cor0.col2 + cor0.col0 FROM tab1 AS cor0
----
-119728
-32426
-75813

query I rowsort
SELECT - - cor0.col0 * col2 - col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL + - col1 * ( + col2 ) AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - cor0.col1 + 36 FROM tab2 cor0
----
-23
19
5

query I rowsort
SELECT col2 - cor0.col2 * col1 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7980
SELECT ALL + col1 * CAST( NULL AS DECIMAL ) 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-7980
SELECT ALL + col1 * CAST ( NULL AS REAL ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 + col0 * col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL 27 * - col0 * + 67 AS col2 FROM tab2
----
-12663
-141102
-142911

query I rowsort
SELECT DISTINCT - - ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL col0 * ( col0 ) * - tab0.col2 AS col2 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL + 28 * - 35 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 15e79062e101d3f60b18666021a480c1

query I rowsort
SELECT ALL + 69 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7987
SELECT DISTINCT + CAST( - col0 * - col1 AS SIGNED ) AS col1 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-7987
SELECT DISTINCT + CAST ( - col0 * - col1 AS INTEGER ) AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT col2 * col2 * col1 + 73 * ( col2 ) + 98 FROM tab2
----
24668
27420
41880

query I rowsort
SELECT + ( col2 ) + - 20 FROM tab2 AS cor0
----
18
6
7

query I rowsort
SELECT - cor0.col2 * + col0 + 69 + col2 AS col0 FROM tab0 AS cor0
----
-690
-7147
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-7991
SELECT + 98 DIV col0 + col1 FROM tab1
----
11
14
58

skipif mysql # not compatible
query I rowsort label-7991
SELECT + 98 / col0 + col1 FROM tab1
----
11
14
58

query I rowsort
SELECT ALL - - col0 * - 1 + - col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - 18 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

query I rowsort
SELECT ( + cor0.col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 * + cor0.col1 col0 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-7997
SELECT + - col0 DIV col2 AS col2 FROM tab1 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7997
SELECT + - col0 / col2 AS col2 FROM tab1 cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT col1 * - col0 + + col1 * - col1 AS col0 FROM tab2
----
-1178
-1632
-8083

query I rowsort
SELECT ALL - 48 * + col1 + 63 FROM tab2
----
-1425
-2769
-753

query I rowsort
SELECT + + col2 + 98 AS col0 FROM tab1 AS cor0
----
152
155
194

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col0 * col0 * cor0.col2 + - col1 FROM tab0 AS cor0
----
-1322
-19094
-649613

query I rowsort
SELECT ALL + col1 + col2 + + 45 * col0 AS col1 FROM tab1 AS cor0
----
215
2947
3709

onlyif mysql # use DIV operator for integer division
query I rowsort label-8004
SELECT ALL col1 DIV - 59 - col0 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-8004
SELECT ALL col1 / - 59 - col0 col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8005
SELECT DISTINCT - col1 DIV col0 AS col1 FROM tab2 cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-8005
SELECT DISTINCT - col1 / col0 AS col1 FROM tab2 cor0
----
-4
0

skipif mysql # not compatible
query I rowsort
SELECT col1 * CAST ( col1 AS REAL ) + col2 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - - col2 * col2 + 0 * col2 + col2 * + col0 FROM tab2 cor0
----
2704
4446
918

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8008
SELECT ALL + col1 * - CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-8008
SELECT ALL + col1 * - CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + ( + cor0.col1 ) + col2 * col1 * + col2 AS col0 FROM tab2 cor0
----
22630
24565
39943

query I rowsort
SELECT 40 - - col1 AS col1 FROM tab0 AS cor0
----
126
131
137

query I rowsort
SELECT + ( col0 ) + cor0.col1 * ( + col2 + col1 * col2 ) AS col2 FROM tab1 AS cor0
----
17552
37911
6334

query I rowsort
SELECT + col0 * - col1 - cor0.col2 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT col0 * col1 - - col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - 15 - col0 AS col0 FROM tab0
----
-104
-39
-50

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 - col1 + cor0.col1 - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-8017
SELECT ( cor0.col1 ) DIV - cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-8017
SELECT ( cor0.col1 ) / - cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
-96
31
81

query I rowsort
SELECT + 81 + cor0.col2 FROM tab0 AS cor0
----
114
163
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8019
SELECT DISTINCT - - col0 * col1 - + CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
1422
224
4680

skipif mysql # not compatible
query I rowsort label-8019
SELECT DISTINCT - - col0 * col1 - + CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8020
SELECT - col2 + + col2 DIV - 61 FROM tab1 AS cor0
----
-54
-57
-97

skipif mysql # not compatible
query I rowsort label-8020
SELECT - col2 + + col2 / - 61 FROM tab1 AS cor0
----
-54
-57
-97

query I rowsort
SELECT - + 95 + col2 * 92 AS col2 FROM tab0 AS cor0
----
-3
2941
7449

query I rowsort
SELECT ALL col2 + col1 * ( - col1 ) * col1 AS col2 FROM tab1 AS cor0
----
-17522
-2101
-943

query I rowsort
SELECT ALL 28 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

onlyif mysql # use DIV operator for integer division
query I rowsort label-8024
SELECT ALL + - col0 DIV col2 + 65 * col1 FROM tab1 AS cor0
----
1690
649
845

skipif mysql # not compatible
query I rowsort label-8024
SELECT ALL + - col0 / col2 + 65 * col1 FROM tab1 AS cor0
----
1690
649
845

query I rowsort
SELECT tab1.col0 * + 35 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 1441e616f5d6d55b5a7a6a92b19e32cd

query I rowsort
SELECT col0 * + col2 + - tab1.col0 AS col2 FROM tab1
----
159
3584
7600

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab1 WHERE + col0 + col1 + col0 BETWEEN - col0 AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col2 + - col2 col0 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT ALL - tab1.col1 AS col0 FROM tab1 WHERE col2 NOT BETWEEN NULL AND + col0 + tab1.col0 * col1
----

query I rowsort
SELECT + col2 * col1 + + col2 * + col0 - col0 FROM tab2
----
1019
3484
3569

onlyif mysql # use DIV operator for integer division
query I rowsort label-8032
SELECT col1 * col0 DIV - col2 FROM tab0
----
-3395
-62
-98

skipif mysql # not compatible
query I rowsort label-8032
SELECT col1 * col0 / - col2 FROM tab0
----
-3395
-62
-98

query I rowsort
SELECT + col0 * col1 + + col0 + - col1 * + col2 AS col1 FROM tab1
----
-128
-1323
134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * tab1.col0 col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT col2 + + col1 - tab1.col1 AS col2 FROM tab1
----
54
57
96

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( + col0 * tab0.col1 / + col1 )
----

query I rowsort
SELECT col2 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col0 * col2 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE col1 NOT IN ( - col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT col1 + col1 + col1 * + col0 FROM tab2
----
1377
279
4720

query I rowsort
SELECT DISTINCT + col0 + col0 - col0 * tab0.col2 AS col0 FROM tab0
----
-7120
-744
35

query I rowsort
SELECT DISTINCT col0 * + col0 FROM tab2 WHERE NOT NULL BETWEEN NULL AND col2 * col1
----

query I rowsort
SELECT tab1.col2 + col2 * - col0 + col0 * col2 AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT col0 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col1 col2 FROM tab2 AS cor0
----
-1534
-646
-837

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT + col2 / + col0 + - col1 + + col0 IN ( - col1 - + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT + col0 + - col0 + col0 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col0 * col0 col1 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT col1 + col1 + + col1 * col1 FROM tab2 AS cor0
----
1023
323
3599

query I rowsort
SELECT + col2 * - col0 * - col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT + col0 * col2 * col0 - + col1 FROM tab1
----
233462
460
614387

query I rowsort
SELECT DISTINCT - col0 FROM tab2 WHERE NOT NULL IN ( col1 )
----

query I rowsort
SELECT DISTINCT - col2 + col2 + col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col2 * + col2 AS col0 FROM tab1 AS cor0 WHERE NOT NULL IN ( col0 )
----

query I rowsort
SELECT col2 * col0 * col2 + col2 AS col2 FROM tab1 AS cor0
----
207993
737376
8802

onlyif mysql # use DIV operator for integer division
query I rowsort label-8055
SELECT - col0 DIV col0 + col0 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-8055
SELECT - col0 / col0 + col0 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT ALL col2 * - cor0.col1 + + col2 + + col1 FROM tab2 AS cor0
----
-1449
-591
-779

query I rowsort
SELECT + - col2 - - col2 * + col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT ALL + + col2 * 6 FROM tab2 AS cor0
----
156
162
228

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8059
SELECT DISTINCT + col0 * - CAST( 5 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-15
-320
-400

skipif mysql # not compatible
query I rowsort label-8059
SELECT DISTINCT + col0 * - CAST ( 5 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-15
-320
-400

onlyif mysql # use DIV operator for integer division
query I rowsort label-8060
SELECT ALL - col1 * - col1 + - col0 + col0 * col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
185
727
93

skipif mysql # not compatible
query I rowsort label-8060
SELECT ALL - col1 * - col1 + - col0 + col0 * col2 / + col0 AS col1 FROM tab1 AS cor0
----
185
727
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + 20 + - col2 col1 FROM tab0 AS cor0
----
1698
447
699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col1 * + 66 * col2 col1 FROM tab1 AS cor0
----
37556
82288
92661

query I rowsort
SELECT DISTINCT + col2 * 48 - cor0.col2 * cor0.col0 FROM tab1 AS cor0
----
-3072
-912
2430

query I rowsort
SELECT + col1 + - 21 * + col1 FROM tab1 AS cor0
----
-200
-260
-520

query I rowsort
SELECT + ( col1 ) * + cor0.col0 + - col2 AS col0 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT + 19 * - col0 + col0 FROM tab0 AS cor0
----
-1602
-432
-630

query I rowsort
SELECT ALL + + col2 + 36 FROM tab0 cor0
----
118
37
69

query I rowsort
SELECT + - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to def82b52aa9c83b91991d7d043276abe

query I rowsort
SELECT - 11 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7120875811e4d19a19b69cd34b6bc202

query I rowsort
SELECT + col2 + col1 * + col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL + 20 - - col1 * + 66 AS col1 FROM tab1 AS cor0
----
1736
680
878

query I rowsort
SELECT ALL - col1 + col2 * + col2 AS col2 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col0 FROM tab0, tab0 AS cor0, tab2 cor1
----
24
35
89

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2, tab0, tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8076
SELECT DISTINCT + col0 * - col2 + CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-162
-2002
-2964

skipif mysql # not compatible
query I rowsort label-8076
SELECT DISTINCT + col0 * - col2 + CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT + + col0 * - col0 + + col2 FROM tab2 AS cor0
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-8078
SELECT DISTINCT col1 - col0 DIV col0 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-8078
SELECT DISTINCT col1 - col0 / col0 FROM tab0
----
85
90
96

query I rowsort
SELECT - tab2.col0 + - tab2.col0 AS col2 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT DISTINCT - - 95 FROM tab0 AS cor0
----
95

query I rowsort
SELECT - 80 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
1920
2800
7120

query I rowsort
SELECT - col0 + + col2 * + ( col1 ) FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - cor0.col2 * 83 FROM tab1 cor0
----
-4482
-4731
-7968

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab1, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - tab2.col2 + 99 FROM tab2, tab0 AS cor0
----
9 values hashing to 0cfc9014804ff3e8f265e0be1ed13610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 60 col0 FROM tab0
----
-60
-60
-60

query I rowsort
SELECT - 89 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col0 FROM tab2, tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ( - tab2.col0 ) * + col2 AS col1 FROM tab2
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8090
SELECT - CAST( col1 AS SIGNED ) + + col1 * + CAST( NULL AS DECIMAL ) / - 19 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8090
SELECT - CAST ( col1 AS INTEGER ) + + col1 * + CAST ( NULL AS REAL ) / - 19 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 96 + - cor0.col2 * + cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
-6539
-969
130

query I rowsort
SELECT ALL + + cor1.col2 * cor0.col1 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to 95ce9b5075b2a9ba9f0c69b6df7a5e0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-8093
SELECT DISTINCT + - 25 + - col2 DIV col0 AS col1 FROM tab0 cor0
----
-25
-26

skipif mysql # not compatible
query I rowsort label-8093
SELECT DISTINCT + - 25 + - col2 / col0 AS col1 FROM tab0 cor0
----
-25
-26

query I rowsort
SELECT + 39 * - col1 FROM tab2 cor0
----
-1209
-2301
-663

query I rowsort
SELECT DISTINCT 96 FROM tab0, tab1, tab1 AS cor0
----
96

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL 40 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT ALL + 66 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT ALL - col2 * 51 FROM tab0
----
-1683
-4182
-51

query I rowsort
SELECT + + col1 * cor0.col1 * + 11 + col0 + + col1 FROM tab2 AS cor0
----
10609
3275
38428

onlyif mysql # use DIV operator for integer division
query I rowsort label-8101
SELECT - col2 DIV col0 - 94 DIV + col0 FROM tab1 cor0
----
-1
-2
-49

skipif mysql # not compatible
query I rowsort label-8101
SELECT - col2 / col0 - 94 / + col0 FROM tab1 cor0
----
-1
-2
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col0 * col1 col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-8103
SELECT + col1 * - col1 + col1 + col2 * CAST( - 66 AS SIGNED ) DIV + col1 AS col0 FROM tab0 AS cor0
----
-7335
-8249
-9312

skipif mysql # not compatible
query I rowsort label-8103
SELECT + col1 * - col1 + col1 + col2 * CAST ( - 66 AS INTEGER ) / + col1 AS col0 FROM tab0 AS cor0
----
-7335
-8249
-9312

query I rowsort
SELECT + - col2 + 59 * - col1 FROM tab1 AS cor0
----
-1588
-647
-863

query I rowsort
SELECT ALL + 75 + tab0.col1 AS col1 FROM tab0
----
161
166
172

query I rowsort
SELECT DISTINCT + col2 * col0 + + tab0.col0 * col2 AS col0 FROM tab0
----
14596
1584
70

query I rowsort
SELECT ALL + ( col1 ) + 73 FROM tab2
----
104
132
90

query I rowsort
SELECT DISTINCT tab0.col0 + + tab0.col2 + tab0.col0 FROM tab0
----
260
71
81

query I rowsort
SELECT DISTINCT + 46 * col2 + ( + col2 * col2 + col2 * col1 ) FROM tab1
----
14880
6441
6804

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab2, tab0 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to ee83821bd928a072bc435d7135362ca1

query I rowsort
SELECT - 7 FROM tab0, tab1 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8112
SELECT DISTINCT + - col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8112
SELECT DISTINCT + - col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 + - cor0.col0 * 81 AS col2 FROM tab2 AS cor0
----
-540
-6292
-6361

query I rowsort
SELECT + col2 + col2 + - 33 AS col1 FROM tab1 cor0
----
159
75
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 + col0 * + col1 col1 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-8116
SELECT + - cor0.col1 * + col0 + cor0.col0 DIV - col1 AS col0 FROM tab2 AS cor0
----
-1347
-217
-4603

skipif mysql # not compatible
query I rowsort label-8116
SELECT + - cor0.col1 * + col0 + cor0.col0 / - col1 AS col0 FROM tab2 AS cor0
----
-1347
-217
-4603

query I rowsort
SELECT ALL - 74 FROM tab2, tab1 cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT - 68 + + col1 FROM tab1 AS cor0
----
-42
-55
-58

query I rowsort
SELECT DISTINCT - 80 * + 88 AS col2 FROM tab2 AS cor0
----
-7040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 + - col2 + + col1 col0 FROM tab1 AS cor0
----
-16
-52
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 * + col2 col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT + col2 + - 63 * + col1 + col0 AS col1 FROM tab2 cor0
----
-1919
-3613
-954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * col2 * + col2 col2 FROM tab1 AS cor0
----
-157464
-185193
-884736

query I rowsort
SELECT ( - cor0.col1 ) - + col2 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8125
SELECT DISTINCT - cor0.col0 DIV + 55 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8125
SELECT DISTINCT - cor0.col0 / + 55 AS col1 FROM tab1 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8126
SELECT DISTINCT - 83 + col0 DIV - cor0.col2 FROM tab1 AS cor0
----
-83
-84

skipif mysql # not compatible
query I rowsort label-8126
SELECT DISTINCT - 83 + col0 / - cor0.col2 FROM tab1 AS cor0
----
-83
-84

query I rowsort
SELECT ALL col0 - + col2 * + col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT + 93 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT 9 * - col2 * col0 + - ( cor0.col2 ) * - col2 FROM tab1 cor0
----
-29583
-59904
1458

query I rowsort
SELECT ( col1 ) * col1 + + 8 FROM tab2 AS cor0
----
297
3489
969

query I rowsort
SELECT DISTINCT + col2 * 5 + col1 AS col2 FROM tab1 AS cor0
----
295
296
493

onlyif mysql # use DIV operator for integer division
query I rowsort label-8132
SELECT DISTINCT 72 DIV - col1 + + col0 * - ( - 11 ) + + col0 AS col2 FROM tab2 cor0
----
82
935
944

skipif mysql # not compatible
query I rowsort label-8132
SELECT DISTINCT 72 / - col1 + + col0 * - ( - 11 ) + + col0 AS col2 FROM tab2 cor0
----
82
935
944

query I rowsort
SELECT + 84 AS col2 FROM tab1 cor0
----
84
84
84

query I rowsort
SELECT 17 + col1 * col0 * - 62 AS col0 FROM tab2 AS cor0
----
-13437
-285307
-83249

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 52 col2 FROM tab2 AS cor0
----
52
52
52

query I rowsort
SELECT - - 88 AS col0 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT + + 22 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
108
113
119

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8138
SELECT - col1 * - CAST( NULL AS SIGNED ) + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8138
SELECT - col1 * - CAST ( NULL AS INTEGER ) + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 50 + - col2 AS col1 FROM tab2 AS cor0
----
1523
2924
812

query I rowsort
SELECT DISTINCT col2 - + tab2.col2 * col2 AS col0 FROM tab2
----
-1406
-650
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * - col2 + 37 col1 FROM tab0 cor0
----
-7261
-755
2

query I rowsort
SELECT ALL col1 * 35 + - col1 AS col1 FROM tab0 AS cor0
----
2924
3094
3298

query I rowsort
SELECT col1 + 6 AS col0 FROM tab1 AS cor0
----
16
19
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-8144
SELECT ALL - cor0.col0 DIV - col2 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8144
SELECT ALL - cor0.col0 / - col2 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 * + col0 + + col2 * col0 col1 FROM tab2 cor0
----
280
3042
4029

query I rowsort
SELECT DISTINCT - - col1 + col2 * + col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + + col1 * col1 + col1 AS col0 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT ALL ( col2 ) * col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col0 * col1 - - cor0.col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - ( col1 ) * ( 48 ) AS col2 FROM tab2 AS cor0
----
-1488
-2832
-816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * cor0.col1 col1 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + col1 col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8153
SELECT DISTINCT ( - col2 ) DIV - col0 AS col2 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-8153
SELECT DISTINCT ( - col2 ) / - col0 AS col2 FROM tab2
----
0
3

query I rowsort
SELECT DISTINCT - 42 AS col0 FROM tab0 AS cor0
----
-42

query I rowsort
SELECT ALL col0 * + 91 - + col1 AS col0 FROM tab1
----
247
5814
7267

query I rowsort
SELECT col0 + 25 FROM tab0
----
114
49
60

query I rowsort
SELECT DISTINCT 89 + 89 - - tab1.col0 FROM tab1
----
181
242
258

query I rowsort
SELECT ALL - 26 - + 46 * - col2 * - 50 FROM tab2
----
-59826
-62126
-87426

query I rowsort
SELECT + ( col2 ) * - 27 - col0 * col2 AS col1 FROM tab2 AS cor0
----
-2730
-4028
-918

query I rowsort
SELECT - 99 * - col0 + 6 * cor0.col2 AS col2 FROM tab0 AS cor0
----
2574
3471
9303

query I rowsort
SELECT ALL 64 * col1 AS col1 FROM tab0 cor0
----
5504
5824
6208

query I rowsort
SELECT 39 + col1 AS col0 FROM tab1 cor0
----
49
52
65

query I rowsort
SELECT ALL + 33 * - col0 AS col0 FROM tab2 cor0
----
-231
-2574
-2607

query I rowsort
SELECT DISTINCT - + col2 + - 54 AS col1 FROM tab0 cor0
----
-136
-55
-87

query I rowsort
SELECT ALL - ( - cor0.col0 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL col1 * + col0 + 57 AS col1 FROM tab2
----
1400
274
4659

query I rowsort
SELECT DISTINCT + - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + 40 FROM tab1, tab0 cor0, tab2 AS cor1, tab1 AS cor2
----
40

query I rowsort
SELECT ALL + ( 73 ) * cor0.col1 FROM tab0 AS cor0
----
6278
6643
7081

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 ALL + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - 61 * 43 FROM tab0, tab0 AS cor0
----
9 values hashing to 07d9bbd3d99c74f295578e43bfccc051

query I rowsort
SELECT - 26 * - 77 + col1 AS col0 FROM tab1
----
2012
2015
2028

query I rowsort
SELECT ALL 73 - 32 FROM tab2
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 col2 FROM tab2
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8176
SELECT ALL + + col0 + col1 * col0 * CAST( 16 AS SIGNED ) FROM tab2 AS cor0
----
21567
3479
73710

skipif mysql # not compatible
query I rowsort label-8176
SELECT ALL + + col0 + col1 * col0 * CAST ( 16 AS INTEGER ) FROM tab2 AS cor0
----
21567
3479
73710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col2 FROM tab2 AS cor0
----
74
74
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-8178
SELECT ALL - col0 * 45 DIV tab2.col1 AS col1 FROM tab2
----
-10
-209
-59

skipif mysql # not compatible
query I rowsort label-8178
SELECT ALL - col0 * 45 / tab2.col1 AS col1 FROM tab2
----
-10
-209
-59

query I rowsort
SELECT ALL cor0.col0 + + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 8733ba2dd568938e338b27ad757d3e3b

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT ALL - cor0.col1 + col2 + col1 * col1 FROM tab1 AS cor0
----
147
252
704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 * + col1 col2 FROM tab2 AS cor0
----
-1003
-289
-527

query I rowsort
SELECT ALL col2 * - 2 FROM tab2
----
-52
-54
-76

query I rowsort
SELECT ALL col0 * col1 * - col0 AS col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT + col0 * 88 + col2 AS col2 FROM tab1 AS cor0
----
318
5689
7136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8187
SELECT ALL + + CAST( NULL AS SIGNED ) + - col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8187
SELECT ALL + + CAST ( NULL AS INTEGER ) + - col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8188
SELECT ALL - - col2 * - ( + col1 ) + - col2 DIV col1 - + col2 AS col2 FROM tab1 AS cor0
----
-1351
-1460
-632

skipif mysql # not compatible
query I rowsort label-8188
SELECT ALL - - col2 * - ( + col1 ) + - col2 / col1 - + col2 AS col2 FROM tab1 AS cor0
----
-1351
-1460
-632

query I rowsort
SELECT DISTINCT + 14 FROM tab0, tab2 AS cor0
----
14

query I rowsort
SELECT DISTINCT 80 + + col2 * + col2 AS col2 FROM tab2 AS cor0
----
1524
756
809

query I rowsort
SELECT - 89 * + col1 FROM tab1
----
-1157
-2314
-890

onlyif mysql # use DIV operator for integer division
query I rowsort label-8192
SELECT - 32 DIV + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8192
SELECT - 32 / + col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 90 col0 FROM tab1 AS cor0
----
-90
-90
-90

query I rowsort
SELECT DISTINCT + + col0 + + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - 32 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7106326ae056e78044adc0aef747ef08

query I rowsort
SELECT - col0 + 50 FROM tab1
----
-14
-30
47

query I rowsort
SELECT col2 * 94 + + col1 AS col2 FROM tab1
----
5102
5368
9037

onlyif mysql # use DIV operator for integer division
query I rowsort label-8198
SELECT - col1 + CAST( col1 AS SIGNED ) DIV - col1 AS col2 FROM tab1
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-8198
SELECT - col1 + CAST ( col1 AS INTEGER ) / - col1 AS col2 FROM tab1
----
-11
-14
-27

query I rowsort
SELECT ALL - col2 * ( - 68 ) AS col0 FROM tab2 AS cor0
----
1768
1836
2584

query I rowsort
SELECT + cor0.col2 + 75 + col2 * col2 AS col1 FROM tab1 cor0
----
3045
3381
9387

query I rowsort
SELECT DISTINCT - cor0.col0 * - ( + 76 ) FROM tab0 AS cor0
----
1824
2660
6764

onlyif mysql # use DIV operator for integer division
query I rowsort label-8202
SELECT ALL + + col0 DIV 69 + cor0.col0 FROM tab1 AS cor0
----
3
64
81

skipif mysql # not compatible
query I rowsort label-8202
SELECT ALL + + col0 / 69 + cor0.col0 FROM tab1 AS cor0
----
3
64
81

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col0 AS REAL ) + cor0.col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + 72 + cor0.col0 FROM tab1 cor0
----
136
152
75

query I rowsort
SELECT ALL - + cor0.col1 * col0 + col1 + col0 AS col2 FROM tab1 AS cor0
----
-49
-566
-947

query I rowsort
SELECT col0 + 98 FROM tab2 cor0
----
105
176
177

query I rowsort
SELECT ALL - + ( - 52 ) FROM tab1 AS cor0
----
52
52
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8208
SELECT ALL - 26 + col1 + col2 DIV + CAST( ( - col0 ) AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-9
2
33

skipif mysql # not compatible
query I rowsort label-8208
SELECT ALL - 26 + col1 + col2 / + CAST ( ( - col0 ) AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-9
2
33

query I rowsort
SELECT 75 * - 64 FROM tab0 AS cor0
----
-4800
-4800
-4800

query I rowsort
SELECT DISTINCT + 24 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8211
SELECT - col0 * + col1 + - 33 DIV ( + col2 ) FROM tab1 cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-8211
SELECT - col0 * + col1 + - 33 / ( + col2 ) FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8212
SELECT - col0 / + col1 + + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8212
SELECT - col0 / + col1 + + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col0 + 76 * col2 AS col1 FROM tab0 cor0
----
111
2532
6321

query I rowsort
SELECT + col2 * ( col0 * + col2 ) + - col2 AS col1 FROM tab2 AS cor0
----
114038
5076
52702

query I rowsort
SELECT + 77 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT - col0 + col2 - tab0.col1 * col0 FROM tab0
----
-2055
-3429
-8106

query I rowsort
SELECT col2 + tab2.col2 * - col2 AS col1 FROM tab2
----
-1406
-650
-702

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 cor1, tab0 cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - 29 + 29 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT + + cor0.col2 * - ( col1 ) + col1 * 0 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col2 * - col0 + col2 AS col0 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col2 + + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT 13 * - ( - col0 ) AS col1 FROM tab2
----
1014
1027
91

query I rowsort
SELECT ALL col2 * 43 FROM tab1
----
2322
2451
4128

query I rowsort
SELECT 64 + col2 AS col1 FROM tab1 AS cor0
----
118
121
160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8227
SELECT - CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-8227
SELECT - CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + + col0 * + col2 * col0 - 84 * - col0 * + col2 FROM tab1 AS cor0
----
1259520
14094
539904

query I rowsort
SELECT - col0 * col0 + - 51 * cor0.col2 FROM tab1 AS cor0
----
-11296
-2763
-7003

query I rowsort
SELECT + col0 * - col2 + col1 FROM tab2 cor0
----
-158
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 96 col2 FROM tab2
----
96

query I rowsort
SELECT DISTINCT - - 42 * - col0 + col2 * + ( col0 ) AS col2 FROM tab1 AS cor0
----
36
4320
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8233
SELECT ( tab1.col1 ) DIV col0 AS col2 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-8233
SELECT ( tab1.col1 ) / col0 AS col2 FROM tab1
----
0
0
8

query I rowsort
SELECT ALL 97 + + col1 AS col0 FROM tab2
----
114
128
156

query I rowsort
SELECT DISTINCT + 12 + 34 FROM tab0
----
46

query I rowsort
SELECT ALL col2 + - col1 AS col1 FROM tab2 cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 + ( + col2 ) col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - 19 + + col1 AS col2 FROM tab1 AS cor0
----
-6
-9
7

query I rowsort
SELECT DISTINCT - - 81 * col1 * 70 FROM tab1 AS cor0
----
147420
56700
73710

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col1 * 12 AS col0 FROM tab0 AS cor0
----
-1164
-34056
-89544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8241
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8241
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8242
SELECT DISTINCT - col2 * CAST( + 78 AS SIGNED ) FROM tab1 cor0
----
-4212
-4446
-7488

skipif mysql # not compatible
query I rowsort label-8242
SELECT DISTINCT - col2 * CAST ( + 78 AS INTEGER ) FROM tab1 cor0
----
-4212
-4446
-7488

query I rowsort
SELECT DISTINCT + col1 + - ( col2 ) * - col2 * + ( - col2 ) FROM tab2 AS cor0
----
-17517
-19652
-54855

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8244
SELECT - - col2 - CAST( + 61 AS SIGNED ) FROM tab1 AS cor0
----
-4
-7
35

skipif mysql # not compatible
query I rowsort label-8244
SELECT - - col2 - CAST ( + 61 AS INTEGER ) FROM tab1 AS cor0
----
-4
-7
35

query I rowsort
SELECT ALL - col1 * + col1 + + col2 AS col0 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT col1 * 84 * - col2 + col1 - - col1 AS col0 FROM tab0 AS cor0
----
-238220
-626626
-7954

query I rowsort
SELECT + - cor0.col0 - + col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT col1 - + col0 * col0 AS col1 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT 61 * - tab0.col2 - 40 * - 36 * col1 AS col1 FROM tab0
----
121827
126038
139619

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8250
SELECT ALL - + CAST( - ( - col0 ) AS SIGNED ) * - col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-8250
SELECT ALL - + CAST ( - ( - col0 ) AS INTEGER ) * - col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + 96 * col1 AS col2 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT DISTINCT col0 * - 88 FROM tab2 cor0
----
-616
-6864
-6952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + 47 ) col0 FROM tab2 AS cor0
----
-47
-47
-47

query I rowsort
SELECT DISTINCT + - 66 * col2 * col1 + + 78 FROM tab0 AS cor0
----
-187230
-492414
-6324

query I rowsort
SELECT ALL + col0 * + col2 * col2 + + ( col0 ) FROM tab0 AS cor0
----
26160
598525
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col1 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 96 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT DISTINCT - col1 * 48 FROM tab0
----
-4128
-4368
-4656

query I rowsort
SELECT ( + col2 ) + + col1 * - ( col2 ) AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - col0 + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL + 9 * + col1 AS col2 FROM tab0
----
774
819
873

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8262
SELECT CAST( + cor0.col1 AS SIGNED ) * - col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-8262
SELECT CAST ( + cor0.col1 AS INTEGER ) * - col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 0 col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8264
SELECT ALL cor0.col0 * col2 DIV col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8264
SELECT ALL cor0.col0 * col2 / col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL cor2.col2 + - ( - 8 ) AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to bf24856418cc685c8763b9c40cba3d29

query I rowsort
SELECT ALL - cor0.col1 - + ( col0 ) FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT - col0 + - 14 AS col1 FROM tab1 AS cor0
----
-17
-78
-94

query I rowsort
SELECT col0 + col2 + col1 * + col0 FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT ALL - ( - 33 ) * col0 AS col1 FROM tab2 AS cor0
----
231
2574
2607

onlyif mysql # use DIV operator for integer division
query I rowsort label-8271
SELECT DISTINCT + + col0 + 72 DIV cor0.col2 FROM tab0 AS cor0
----
107
26
89

skipif mysql # not compatible
query I rowsort label-8271
SELECT DISTINCT + + col0 + 72 / cor0.col2 FROM tab0 AS cor0
----
107
26
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + - ( col2 ) * 74 col2 FROM tab2 AS cor0
----
-1865
-1967
-2795

query I rowsort
SELECT ALL - 14 * - col2 + + col2 FROM tab0 AS cor0
----
1230
15
495

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8274
SELECT - CAST( NULL AS DECIMAL ) * + col0 + col2 + ( 72 * - col0 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8274
SELECT - CAST ( NULL AS REAL ) * + col0 + col2 + ( 72 * - col0 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * cor0.col1 + + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + 58 AS col1 FROM tab2 cor0
----
58
58
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-8277
SELECT + col2 * 20 DIV + col1 FROM tab0 AS cor0
----
0
18
7

skipif mysql # not compatible
query I rowsort label-8277
SELECT + col2 * 20 / + col1 FROM tab0 AS cor0
----
0
18
7

query I rowsort
SELECT ALL - ( - cor0.col1 ) * col0 + ( 62 ) FROM tab2 AS cor0
----
1405
279
4664

query I rowsort
SELECT + col2 + + 36 * + cor0.col0 FROM tab1 AS cor0
----
162
2361
2976

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8280
SELECT DISTINCT CAST( - col1 AS SIGNED ) - - col2 * + col0 AS col1 FROM tab1 cor0
----
136
3638
7667

skipif mysql # not compatible
query I rowsort label-8280
SELECT DISTINCT CAST ( - col1 AS INTEGER ) - - col2 * + col0 AS col1 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT ALL - - ( col0 ) + - col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8282
SELECT + col0 - ( col2 + col1 ) DIV col0 FROM tab0
----
20
33
88

skipif mysql # not compatible
query I rowsort label-8282
SELECT + col0 - ( col2 + col1 ) / col0 FROM tab0
----
20
33
88

query I rowsort
SELECT - ( col2 ) - col0 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8284
SELECT + CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8284
SELECT + CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 40 col0 FROM tab2 AS cor0
----
-40
-40
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-8286
SELECT DISTINCT col2 + col1 * col1 DIV + 62 FROM tab1 AS cor0
----
58
64
98

skipif mysql # not compatible
query I rowsort label-8286
SELECT DISTINCT col2 + col1 * col1 / + 62 FROM tab1 AS cor0
----
58
64
98

query I rowsort
SELECT ALL col0 * col2 + + col2 - col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8288
SELECT ALL + col0 + + col0 + - CAST( NULL AS SIGNED ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8288
SELECT ALL + col0 + + col0 + - CAST ( NULL AS INTEGER ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 14 * + col2 FROM tab1 AS cor0
----
-1344
-756
-798

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
1
33
82

query I rowsort
SELECT tab1.col1 * col0 + col2 * col0 FROM tab1
----
240
4288
8720

query I rowsort
SELECT DISTINCT - col1 * col2 + + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + col0 + - col1 + + col2 AS col2 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + - cor0.col2 * col2 AS col1 FROM tab1 cor0
----
-1536
-2754
399

query I rowsort
SELECT - 27 + col0 * col1 AS col0 FROM tab1 AS cor0
----
1013
51
613

query I rowsort
SELECT - 91 + + col0 * col0 AS col0 FROM tab1 AS cor0
----
-82
4005
6309

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8297
SELECT ALL + col2 * + col0 - - CAST( col1 AS SIGNED ) FROM tab2 cor0
----
2087
220
3019

skipif mysql # not compatible
query I rowsort label-8297
SELECT ALL + col2 * + col0 - - CAST ( col1 AS INTEGER ) FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT + + col2 - + col0 * 13 FROM tab1 AS cor0
----
-775
-944
15

query I rowsort
SELECT col2 + - col0 * 45 AS col1 FROM tab0 cor0
----
-1047
-1574
-3923

onlyif mysql # use DIV operator for integer division
query I rowsort label-8300
SELECT DISTINCT + + col1 DIV + 62 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8300
SELECT DISTINCT + + col1 / + 62 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + + col2 * col1 + - col1 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT col1 * 48 FROM tab0 cor0
----
4128
4368
4656

query I rowsort
SELECT ALL + col1 + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + col2 * - ( ( + col1 ) ) + 39 AS col2 FROM tab0 AS cor0
----
-2799
-58
-7423

query I rowsort
SELECT DISTINCT - 82 * - col1 FROM tab2
----
1394
2542
4838

query I rowsort
SELECT + - col2 * + ( - col1 ) + - col0 + ( - col2 ) FROM tab0 AS cor0
----
2781
61
7291

onlyif mysql # use DIV operator for integer division
query I rowsort label-8307
SELECT + col0 * col0 DIV + col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8307
SELECT + col0 * col0 / + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 97 * - 41 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6ce7f789b435848d6db612d2b054cfc9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8309
SELECT ALL col0 * + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8309
SELECT ALL col0 * + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8310
SELECT DISTINCT - CAST( ( col1 ) AS SIGNED ) + col1 * col0 * col0 + ( - col2 ) * + col0 AS col2 FROM tab2
----
103078
1299
356869

skipif mysql # not compatible
query I rowsort label-8310
SELECT DISTINCT - CAST ( ( col1 ) AS INTEGER ) + col1 * col0 * col0 + ( - col2 ) * + col0 AS col2 FROM tab2
----
103078
1299
356869

query I rowsort
SELECT DISTINCT col0 + col0 * - col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT - col1 * - col1 + - col0 FROM tab1 AS cor0
----
36
673
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8313
SELECT ALL col0 * 33 + col0 * - CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8313
SELECT ALL col0 * 33 + col0 * - CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col1 * cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-2814
-62
-7373

query I rowsort
SELECT ALL - ( ( col1 ) ) AS col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT col1 + 28 FROM tab2
----
45
59
87

query I rowsort
SELECT 31 * - col0 AS col2 FROM tab1
----
-1984
-2480
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8318
SELECT + - 85 + + col1 + col2 * col0 DIV - col0 col0 FROM tab1 AS cor0
----
-113
-132
-168

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8318
SELECT + - 85 + + col1 + col2 * col0 / - col0 col0 FROM tab1 AS cor0
----
-113
-132
-168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8319
SELECT - 79 * col2 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8319
SELECT - 79 * col2 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + col1 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8321
SELECT + + col0 DIV - 38 + + col2 AS col2 FROM tab2 AS cor0
----
24
27
36

skipif mysql # not compatible
query I rowsort label-8321
SELECT + + col0 / - 38 + + col2 AS col2 FROM tab2 AS cor0
----
24
27
36

query I rowsort
SELECT DISTINCT - col0 + + ( - col2 ) * col2 + col2 AS col1 FROM tab0
----
-1080
-35
-6731

query I rowsort
SELECT + + 68 + cor0.col1 FROM tab2 AS cor0
----
127
85
99

query I rowsort
SELECT - - col2 * col0 + - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT + 18 AS col0 FROM tab2, tab1 AS cor0
----
18

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 cor1, tab2 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT ALL - 5 * + cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to d1b2df16c908d430b9f1da407baeec26

query I rowsort
SELECT ALL 92 - col1 * col0 AS col1 FROM tab1
----
-548
-948
14

query I rowsort
SELECT + 75 + col0 + col2 FROM tab0 AS cor0
----
111
132
246

query I rowsort
SELECT ALL col2 + + col0 - - col0 FROM tab2
----
182
196
41

query I rowsort
SELECT - ( - cor0.col0 ) * - cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT ( - col2 ) + - col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8333
SELECT + col2 * col2 DIV - ( col1 ) FROM tab2 AS cor0
----
-11
-23
-84

skipif mysql # not compatible
query I rowsort label-8333
SELECT + col2 * col2 / - ( col1 ) FROM tab2 AS cor0
----
-11
-23
-84

query I rowsort
SELECT col0 + + 47 * - cor0.col0 FROM tab0 AS cor0
----
-1104
-1610
-4094

query I rowsort
SELECT ALL - col2 + col1 * - col0 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT + col0 * - col2 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT - col0 * + col0 * + col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-8338
SELECT ALL col1 + col2 DIV - col0 AS col2 FROM tab2 AS cor0
----
17
28
59

skipif mysql # not compatible
query I rowsort label-8338
SELECT ALL col1 + col2 / - col0 AS col2 FROM tab2 AS cor0
----
17
28
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-8339
SELECT DISTINCT - + cor0.col0 + cor0.col1 DIV + cor0.col0 + + col2 FROM tab2 AS cor0
----
-41
-52
24

skipif mysql # not compatible
query I rowsort label-8339
SELECT DISTINCT - + cor0.col0 + cor0.col1 / + cor0.col0 + + col2 FROM tab2 AS cor0
----
-41
-52
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-8340
SELECT ALL + col0 DIV + col1 - - col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8340
SELECT ALL + col0 / + col1 - - col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - - cor0.col1 * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - col1 * col1 - + col2 FROM tab0
----
-7429
-8363
-9410

query I rowsort
SELECT col0 - tab1.col1 * col2 FROM tab1
----
-1168
-1401
-506

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NULL NOT BETWEEN - col0 AND col1 * col0 - col2 OR NULL BETWEEN ( + col1 / col1 ) AND NULL
----

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 * col0 - col0 FROM tab1 AS cor0
----
233408
483
614320

query I rowsort
SELECT + col2 * + col1 + - cor0.col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ( cor0.col1 ) AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - ( col1 ) * - col1 FROM tab1
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8350
SELECT DISTINCT + CAST( + col2 AS SIGNED ) * - col0 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-8350
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) * - col0 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8351
SELECT ALL + 14 DIV - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8351
SELECT ALL + 14 / - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col1 + - col0 FROM tab2 cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col1 * + cor0.col1 + + col0 col1 FROM tab0 AS cor0
----
-177480
-329280
-736920

onlyif mysql # use DIV operator for integer division
query I rowsort label-8354
SELECT + 19 + + cor0.col2 DIV + col0 + col0 AS col0 FROM tab2 AS cor0
----
29
97
98

skipif mysql # not compatible
query I rowsort label-8354
SELECT + 19 + + cor0.col2 / + col0 + col0 AS col0 FROM tab2 AS cor0
----
29
97
98

query I rowsort
SELECT ALL 55 * col2 AS col0 FROM tab0 AS cor0
----
1815
4510
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 + col0 col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT col2 + col2 AS col0 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL - col2 + + tab0.col0 AS col2 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-8359
SELECT ALL col2 DIV + tab2.col0 + - col0 + col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-8359
SELECT ALL col2 / + tab2.col0 + - col0 + col0 FROM tab2
----
0
0
3

query I rowsort
SELECT col1 + col1 * - col0 AS col1 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT - 55 + - col2 AS col1 FROM tab2
----
-81
-82
-93

query I rowsort
SELECT ALL cor0.col2 + - 62 * col2 FROM tab0 AS cor0
----
-2013
-5002
-61

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 53 * cor0.col2 col2 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT + + col1 + col1 * cor0.col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL + + 31 + - col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
31
31
31

query I rowsort
SELECT ALL + + cor0.col1 + - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL - col2 * - cor0.col2 + + 5 AS col0 FROM tab2 cor0
----
1449
681
734

query I rowsort
SELECT - 16 * - col2 * - 85 AS col1 FROM tab2 AS cor0
----
-35360
-36720
-51680

query I rowsort
SELECT ALL + + col1 + + cor0.col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - - ( col2 ) * col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + - col2 + col1 * + ( col2 ) AS col1 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT ALL col1 + + ( + col2 ) AS col1 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + 89 col1 FROM tab0 AS cor0
----
175
180
186

query I rowsort
SELECT + col2 * - ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col2 * 83 FROM tab2 cor0
----
-2158
-2241
-3154

query I rowsort
SELECT ALL + + col1 + col1 * - 29 - col1 FROM tab1 AS cor0
----
-290
-377
-754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * - ( + col0 ) - col1 col0 FROM tab0 AS cor0
----
1128
490
7830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8379
SELECT ALL - col1 + CAST( 29 AS SIGNED ) * + col2 AS col1 FROM tab1 AS cor0
----
1540
1643
2771

skipif mysql # not compatible
query I rowsort label-8379
SELECT ALL - col1 + CAST ( 29 AS INTEGER ) * + col2 AS col1 FROM tab1 AS cor0
----
1540
1643
2771

query I rowsort
SELECT ALL + col1 + + 27 AS col0 FROM tab0 AS cor0
----
113
118
124

query I rowsort
SELECT - col0 + ( col2 ) * col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + cor0.col0 + ( - col0 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 + - 25 - - 11 AS col1 FROM tab2 AS cor0
----
17
3
45

query I rowsort
SELECT 7 * cor0.col2 + - col2 FROM tab1 cor0
----
324
342
576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) * - cor0.col0 + - col2 col2 FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT ALL + ( - col0 ) * - col0 + col0 * - col2 * + cor0.col1 FROM tab0 AS cor0
----
-2170
-656197
-67536

query I rowsort
SELECT col0 * + 65 * - col1 + - 99 * col0 FROM tab2 AS cor0
----
-14798
-306852
-95116

query I rowsort
SELECT ALL - cor0.col2 + + ( - col2 ) AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT + col0 + cor0.col1 * + col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + col1 + 68 FROM tab1 AS cor0
----
78
81
94

query I rowsort
SELECT ALL - + 92 * col2 * col2 AS col0 FROM tab2 AS cor0
----
-132848
-62192
-67068

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8392
SELECT col1 * CAST( - 42 AS SIGNED ) - + col1 AS col0 FROM tab1
----
-1118
-430
-559

skipif mysql # not compatible
query I rowsort label-8392
SELECT col1 * CAST ( - 42 AS INTEGER ) - + col1 AS col0 FROM tab1
----
-1118
-430
-559

query I rowsort
SELECT ALL + - col1 * - ( col2 ) + - ( 87 ) * - col1 AS col1 FROM tab1 AS cor0
----
1440
2379
3666

query I rowsort
SELECT DISTINCT 51 + - col0 * - col1 AS col0 FROM tab0 AS cor0
----
2115
3446
8150

query I rowsort
SELECT ALL - col0 + col0 * col2 * - cor0.col1 + + 35 FROM tab2 AS cor0
----
-119695
-51078
-5831

query I rowsort
SELECT col1 * col1 + col1 AS col2 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + - col1 * 57 - - col2 FROM tab0 AS cor0
----
-4869
-5105
-5528

query I rowsort
SELECT + 51 + col0 * + col0 AS col2 FROM tab2 AS cor0
----
100
6135
6292

onlyif mysql # use DIV operator for integer division
query I rowsort label-8399
SELECT ALL + + col1 + col0 DIV - col0 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-8399
SELECT ALL + + col1 + col0 / - col0 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT DISTINCT + 70 AS col1 FROM tab0 cor0
----
70

query I rowsort
SELECT + - col0 + col1 * col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT col2 * 71 AS col2 FROM tab1 AS cor0
----
3834
4047
6816

query I rowsort
SELECT cor0.col1 + + col1 * + cor0.col0 AS col2 FROM tab2 cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-8404
SELECT - - 12 DIV col1 - - col1 AS col0 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-8404
SELECT - - 12 / col1 - - col1 AS col0 FROM tab1 AS cor0
----
11
13
26

query I rowsort
SELECT col2 + ( col2 ) * col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + + 34 * cor0.col1 + col0 AS col1 FROM tab2 AS cor0
----
1061
2084
657

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * - col0 + + col2 col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL + 48 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

onlyif mysql # use DIV operator for integer division
query I rowsort label-8409
SELECT DISTINCT col0 DIV + col1 FROM tab1 cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-8409
SELECT DISTINCT col0 / + col1 FROM tab1 cor0
----
0
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8410
SELECT col1 * - CAST( 99 AS SIGNED ) FROM tab0 AS cor0
----
-8514
-9009
-9603

skipif mysql # not compatible
query I rowsort label-8410
SELECT col1 * - CAST ( 99 AS INTEGER ) FROM tab0 AS cor0
----
-8514
-9009
-9603

onlyif mysql # use DIV operator for integer division
query I rowsort label-8411
SELECT DISTINCT 17 DIV tab0.col0 AS col2 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-8411
SELECT DISTINCT 17 / tab0.col0 AS col2 FROM tab0
----
0

query I rowsort
SELECT col2 * 25 AS col2 FROM tab0
----
2050
25
825

query I rowsort
SELECT - tab0.col2 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT - tab0.col0 + + ( - tab0.col2 + col2 ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - col1 + + 60 FROM tab0
----
-26
-31
-37

query I rowsort
SELECT col2 + - ( + col0 ) + - col1 FROM tab0
----
-131
-77
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8417
SELECT ALL - col0 DIV 40 + ( col0 * - 64 ) AS col2 FROM tab1
----
-192
-4097
-5122

skipif mysql # not compatible
query I rowsort label-8417
SELECT ALL - col0 / 40 + ( col0 * - 64 ) AS col2 FROM tab1
----
-192
-4097
-5122

query I rowsort
SELECT - cor0.col0 + - col1 * 18 * + col0 FROM tab0 cor0
----
-145871
-37176
-61145

onlyif mysql # use DIV operator for integer division
query I rowsort label-8419
SELECT cor0.col2 + + 56 DIV 77 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8419
SELECT cor0.col2 + + 56 / 77 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2, tab2 cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

onlyif mysql # use DIV operator for integer division
query I rowsort label-8421
SELECT col1 DIV 41 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8421
SELECT col1 / 41 FROM tab2
----
0
0
1

query I rowsort
SELECT + col1 * - ( col0 ) AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col2 * + 71 AS col0 FROM tab1
----
3834
4047
6816

query I rowsort
SELECT - + cor0.col0 * 42 AS col1 FROM tab1 AS cor0
----
-126
-2688
-3360

query I rowsort
SELECT - + col1 * + 26 AS col2 FROM tab0 AS cor0
----
-2236
-2366
-2522

query I rowsort
SELECT - + col2 * 44 FROM tab1 AS cor0
----
-2376
-2508
-4224

query I rowsort
SELECT - - col0 * ( col2 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col0 * 47 - 46 FROM tab0 AS cor0
----
-1174
-1691
-4229

query I rowsort
SELECT ALL col0 + ( col1 * col0 + ( + ( + col1 ) ) ) FROM tab2 AS cor0
----
1439
255
4739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * ( + col0 ) + - cor0.col1 col2 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT 12 * + ( + col0 ) AS col1 FROM tab2 AS cor0
----
84
936
948

query I rowsort
SELECT - + col2 + 43 FROM tab0 AS cor0
----
-39
10
42

query I rowsort
SELECT DISTINCT - - 97 FROM tab2 cor0
----
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8434
SELECT DISTINCT + + col1 + - col1 * - col1 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8434
SELECT DISTINCT + + col1 + - col1 * - col1 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + cor0.col0 * col1 * col2 AS col0 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT ( + 15 ) * col0 FROM tab1 cor0
----
1200
45
960

query I rowsort
SELECT ALL + cor0.col2 * cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

query I rowsort
SELECT + + col1 * - col2 * - col0 + col1 AS col1 FROM tab0 AS cor0
----
3492
664209
68198

query I rowsort
SELECT ALL 7 * tab2.col2 AS col0 FROM tab2
----
182
189
266

query I rowsort
SELECT - tab0.col2 * 4 * - 26 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to c5bd8a4e02fe1b8a31711dba0e9be378

query I rowsort
SELECT - 51 + cor0.col2 AS col1 FROM tab1 AS cor0
----
3
45
6

query I rowsort
SELECT + - 69 + - col2 + ( - col2 ) AS col1 FROM tab2 AS cor0
----
-121
-123
-145

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 * col1 + col1 * + 16 * col1 FROM tab1 AS cor0
----
10868
2230
3731

query I rowsort
SELECT ALL + col2 * col2 * - col1 + col1 AS col0 FROM tab0 AS cor0
----
-611793
-93568
0

query I rowsort
SELECT ALL - col2 * ( - col1 ) AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - ( col2 * ( - col1 ) ) + col1 * + col2 FROM tab0
----
14924
194
5676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8447
SELECT - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8447
SELECT - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL col2 * 81 FROM tab0
----
2673
6642
81

query I rowsort
SELECT col1 * - col1 + - 92 AS col0 FROM tab0
----
-7488
-8373
-9501

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8450
SELECT CAST( NULL AS SIGNED ) * 88 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-8450
SELECT CAST ( NULL AS INTEGER ) * 88 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT cor0.col1 + ( - col0 ) * col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + col0 + col2 + - col0 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT col2 * col0 + + 76 AS col1 FROM tab1 AS cor0
----
238
3724
7756

query I rowsort
SELECT - + cor0.col1 * col0 * + col1 AS col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT - col2 * - col2 + + col2 + - cor0.col2 * 17 AS col0 FROM tab2 AS cor0
----
260
297
836

query I rowsort
SELECT + col1 + + ( col1 ) AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + col0 + - 77 * - col1 FROM tab1 cor0
----
1081
2005
834

query I rowsort
SELECT tab0.col0 * - 39 AS col1 FROM tab0, tab2, tab2 cor0
----
27 values hashing to 9eae681fbe6d0a58e1d82538c3b47bf9

query I rowsort
SELECT DISTINCT + 63 - 97 FROM tab2
----
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8460
SELECT - col1 DIV 30 AS col1 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8460
SELECT - col1 / 30 AS col1 FROM tab2
----
-1
-1
0

query I rowsort
SELECT ALL col0 - col0 * + col2 AS col1 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ( + ( col0 ) ) * - col0 FROM tab2 cor0
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( - 86 AS REAL ) FROM tab2 cor0
----
86
86
86

query I rowsort
SELECT col1 * col1 * - ( + 44 * + col2 ) + - 64 + col1 AS col0 FROM tab2 AS cor0
----
-1141701
-3982269
-483255

query I rowsort
SELECT col2 * col1 * - 51 FROM tab0 AS cor0
----
-144738
-380562
-4947

query I rowsort
SELECT + ( col0 ) + cor0.col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 67 * col2 + + col0 FROM tab2 AS cor0
----
1816
1820
2625

onlyif mysql # use DIV operator for integer division
query I rowsort label-8468
SELECT tab0.col1 DIV 79 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8468
SELECT tab0.col1 / 79 AS col2 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8469
SELECT - col1 DIV - 42 AS col0 FROM tab0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-8469
SELECT - col1 / - 42 AS col0 FROM tab0
----
2
2
2

query I rowsort
SELECT DISTINCT - 18 + - col0 * - col2 AS col0 FROM tab0 AS cor0
----
17
7280
774

query I rowsort
SELECT ( cor0.col1 ) * 85 AS col1 FROM tab0 AS cor0
----
7310
7735
8245

query I rowsort
SELECT ALL - + col0 * cor0.col1 + - col0 + + 94 * + col0 FROM tab2 AS cor0
----
2652
434
6004

onlyif mysql # use DIV operator for integer division
query I rowsort label-8473
SELECT ALL - + col1 DIV col1 + + 15 FROM tab0 AS cor0
----
14
14
14

skipif mysql # not compatible
query I rowsort label-8473
SELECT ALL - + col1 / col1 + + 15 FROM tab0 AS cor0
----
14
14
14

query I rowsort
SELECT + + 5 * - col1 AS col0 FROM tab0 cor0
----
-430
-455
-485

onlyif mysql # use DIV operator for integer division
query I rowsort label-8475
SELECT col2 + col1 DIV col0 col1 FROM tab0 AS cor0
----
3
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8475
SELECT col2 + col1 / col0 col1 FROM tab0 AS cor0
----
3
36
83

query I rowsort
SELECT ALL + cor0.col1 + - 73 AS col2 FROM tab1 AS cor0
----
-47
-60
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 7 * + col1 col0 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT ALL + 26 * + 62 AS col2 FROM tab1 AS cor0
----
1612
1612
1612

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8479
SELECT CAST( - 16 AS SIGNED ) * + col2 AS col2 FROM tab2 AS cor0
----
-416
-432
-608

skipif mysql # not compatible
query I rowsort label-8479
SELECT CAST ( - 16 AS INTEGER ) * + col2 AS col2 FROM tab2 AS cor0
----
-416
-432
-608

query I rowsort
SELECT DISTINCT - col0 + - 76 FROM tab0
----
-100
-111
-165

query I rowsort
SELECT 20 FROM tab1, tab1 cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT 83 + col1 AS col1 FROM tab2 AS cor0
----
100
114
142

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8483
SELECT - CAST( + col1 AS SIGNED ) + col0 * ( + 78 + + col2 * - 76 ) AS col2 FROM tab1 AS cor0
----
-12104
-272266
-577453

skipif mysql # not compatible
query I rowsort label-8483
SELECT - CAST ( + col1 AS INTEGER ) + col0 * ( + 78 + + col2 * - 76 ) AS col2 FROM tab1 AS cor0
----
-12104
-272266
-577453

query I rowsort
SELECT + - col2 + + 46 AS col2 FROM tab2 cor0
----
19
20
8

query I rowsort
SELECT - 20 + - col2 * - tab2.col0 AS col1 FROM tab2
----
169
2008
2982

query I rowsort
SELECT 52 + + col0 AS col1 FROM tab0
----
141
76
87

query I rowsort
SELECT + ( col0 * + tab2.col1 ) + + col1 FROM tab2
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8488
SELECT + col0 * col0 + + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8488
SELECT + col0 * col0 + + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 81 * col1 FROM tab2
----
1377
2511
4779

query I rowsort
SELECT + col0 * - 76 - col1 FROM tab1 cor0
----
-254
-4874
-6093

query I rowsort
SELECT + 85 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query I rowsort
SELECT ALL - cor0.col2 + + ( + 55 ) FROM tab0 AS cor0
----
-27
22
54

query I rowsort
SELECT - col2 + + col2 * + col0 * + cor0.col1 AS col1 FROM tab1 cor0
----
36423
4158
99744

onlyif mysql # use DIV operator for integer division
query I rowsort label-8494
SELECT + col2 DIV - 8 AS col0 FROM tab0 AS cor0
----
-10
-4
0

skipif mysql # not compatible
query I rowsort label-8494
SELECT + col2 / - 8 AS col0 FROM tab0 AS cor0
----
-10
-4
0

query I rowsort
SELECT ALL - + cor0.col2 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT col1 + ( tab0.col0 + + col2 ) AS col2 FROM tab0
----
133
143
262

query I rowsort
SELECT ALL + ( + cor0.col2 ) AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8498
SELECT + col2 / + CAST( NULL AS SIGNED ) + col0 * col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8498
SELECT + col2 / + CAST ( NULL AS INTEGER ) + col0 * col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col1 * ( col1 ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - + col2 * cor0.col2 + 11 AS col2 FROM tab0 AS cor0
----
-1078
-6713
10

query I rowsort
SELECT DISTINCT + + col2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + - col0 + col0 * col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - col2 * + col2 * + col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT + cor0.col2 * + ( - cor0.col0 ) FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + + col1 + - col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL - - col1 * 42 FROM tab1 AS cor0
----
1092
420
546

query I rowsort
SELECT - col1 + - 59 AS col0 FROM tab1 AS cor0
----
-69
-72
-85

query I rowsort
SELECT ALL col0 + col0 * - 26 FROM tab1
----
-1600
-2000
-75

query I rowsort
SELECT col1 + col0 * - tab2.col1 AS col1 FROM tab2
----
-1326
-186
-4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8510
SELECT ALL - + col0 * CAST( col0 AS SIGNED ) + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

skipif mysql # not compatible
query I rowsort label-8510
SELECT ALL - + col0 * CAST ( col0 AS INTEGER ) + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + col2 + cor0.col0 * - cor0.col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL - tab2.col1 - - cor1.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 9988d482f94d4a436a2fe6e0568c1c30

query I rowsort
SELECT col1 * ( col1 ) * col2 FROM tab0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-8514
SELECT - 36 * cor0.col0 + + col1 DIV col0 AS col2 FROM tab1 AS cor0
----
-100
-2304
-2880

skipif mysql # not compatible
query I rowsort label-8514
SELECT - 36 * cor0.col0 + + col1 / col0 AS col2 FROM tab1 AS cor0
----
-100
-2304
-2880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8515
SELECT + CAST( + 61 AS SIGNED ) * cor0.col2 FROM tab1 AS cor0
----
3294
3477
5856

skipif mysql # not compatible
query I rowsort label-8515
SELECT + CAST ( + 61 AS INTEGER ) * cor0.col2 FROM tab1 AS cor0
----
3294
3477
5856

query I rowsort
SELECT - - ( + col0 ) * + col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT - ( col2 ) * cor0.col2 + - col0 + 85 * col0 AS col0 FROM tab0 AS cor0
----
2939
752
927

query I rowsort
SELECT - col0 + 0 + - col2 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - col2 + + ( - col2 ) * - col2 FROM tab1 AS cor0
----
2862
3192
9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 * 84 - cor0.col1 col0 FROM tab2 AS cor0
----
1201
1229
1243

query I rowsort
SELECT - - col2 + - 62 AS col0 FROM tab2 AS cor0
----
-24
-35
-36

query I rowsort
SELECT DISTINCT + col1 * - col1 * - col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT + cor0.col1 * col1 + + ( + 90 ) AS col0 FROM tab2 AS cor0
----
1051
3571
379

query I rowsort
SELECT ALL + col2 + + col2 * cor0.col0 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT 79 * cor0.col1 + - cor0.col2 - + col0 AS col2 FROM tab0 AS cor0
----
6737
7018
7627

query I rowsort
SELECT ALL 78 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT + - col1 * - col2 + col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8528
SELECT - CAST( NULL AS SIGNED ) * - ( col0 ) + - col1 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8528
SELECT - CAST ( NULL AS INTEGER ) * - ( col0 ) + - col1 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 ) col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - - col0 * col1 + + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - ( col1 * tab0.col2 ) AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + cor0.col1 FROM tab2, tab1 cor0, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8533
SELECT - col0 + + CAST( + col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8533
SELECT - col0 + + CAST ( + col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - col1 * col0 + + col0 * - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + cor0.col0 + col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + - 57 * + ( col2 ) * 84 AS col2 FROM tab2 AS cor0
----
-124488
-129276
-181944

query I rowsort
SELECT DISTINCT 80 * - 38 FROM tab0 AS cor0
----
-3040

query I rowsort
SELECT ALL col0 * 73 AS col2 FROM tab2 AS cor0
----
511
5694
5767

query I rowsort
SELECT - - 2 + col2 * + col1 FROM tab1 AS cor0
----
1250
1406
572

query I rowsort
SELECT DISTINCT - 54 * col2 FROM tab0 AS cor0
----
-1782
-4428
-54

skipif mysql # not compatible
query I rowsort
SELECT ALL + + CAST ( col2 AS REAL ) * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8542
SELECT - 81 * - col1 + col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8542
SELECT - 81 * - col1 + col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8543
SELECT 22 DIV tab0.col2 col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 1a6b3161d70fdc2407bfe0f02ded6e9a

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8543
SELECT 22 / tab0.col2 col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 1a6b3161d70fdc2407bfe0f02ded6e9a

query I rowsort
SELECT - 86 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 9d2e1e8eda15b3b83dd7136dfc4f19af

query I rowsort
SELECT DISTINCT + ( - 66 ) * col2 + - col0 FROM tab1
----
-3567
-3826
-6416

query I rowsort
SELECT ALL - 30 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to a96370a8187089b6b83ce9bfbade5142

query I rowsort
SELECT ALL col1 + + 64 AS col0 FROM tab0
----
150
155
161

query I rowsort
SELECT col1 + 2 FROM tab1 AS cor0
----
12
15
28

query I rowsort
SELECT - 1 * + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 18 * - col0 AS col1 FROM tab1 AS cor0
----
-1152
-1440
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8551
SELECT + CAST( NULL AS SIGNED ) + - col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8551
SELECT + CAST ( NULL AS INTEGER ) + - col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * col2 + + col1 * - col2 AS col2 FROM tab2
----
-1026
-3562
-3648

query I rowsort
SELECT + - cor0.col2 * - cor0.col2 + col0 * + col0 + cor0.col2 FROM tab0 cor0
----
1227
14727
1698

query I rowsort
SELECT DISTINCT tab2.col1 * + 38 FROM tab2, tab2 AS cor0, tab0 cor1
----
1178
2242
646

query I rowsort
SELECT ALL - 57 * + tab0.col1 AS col0 FROM tab0
----
-4902
-5187
-5529

query I rowsort
SELECT 41 - + col0 AS col0 FROM tab0
----
-48
17
6

query I rowsort
SELECT - col2 + + 83 FROM tab0 AS cor0
----
1
50
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8558
SELECT DISTINCT + cor0.col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-8558
SELECT DISTINCT + cor0.col2 / + col0 AS col2 FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT ALL - - 81 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

query I rowsort
SELECT - ( 61 ) AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT ( col2 ) * ( col0 ) + col0 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT col2 - col0 * + ( 9 + + col2 ) FROM tab2
----
-225
-2704
-3675

query I rowsort
SELECT DISTINCT + col0 * - col1 + + col2 AS col1 FROM tab2
----
-1305
-190
-4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8564
SELECT + col1 * CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-8564
SELECT + col1 * CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col0 - - cor0.col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT col2 - 54 * col0 FROM tab2
----
-351
-4186
-4228

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT DISTINCT col2 * + ( col0 * col1 ) - + col2 * + 61 FROM tab2
----
118066
4212
48716

query I rowsort
SELECT + col0 * ( col1 * col2 ) + - col1 FROM tab0
----
3298
664027
68026

query I rowsort
SELECT ALL - col0 * cor0.col1 + col2 * col0 FROM tab1 cor0
----
3008
6640
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8571
SELECT ALL - col2 * - CAST( 29 AS SIGNED ) * col2 + + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8571
SELECT ALL - col2 * - CAST ( 29 AS INTEGER ) * col2 + + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 * + 81 FROM tab1 cor0
----
1053
2106
810

query I rowsort
SELECT col1 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + col2 * col1 + + ( col1 ) FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT ( - col2 * - col2 ) + col2 AS col2 FROM tab0
----
1122
2
6806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8576
SELECT ALL - col1 + - col2 * CAST( NULL AS SIGNED ) / ( cor0.col0 * ( - col1 ) ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8576
SELECT ALL - col1 + - col2 * CAST ( NULL AS INTEGER ) / ( cor0.col0 * ( - col1 ) ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8577
SELECT - col0 DIV + col0 + + col0 DIV + col2 FROM tab1 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8577
SELECT - col0 / + col0 + + col0 / + col2 FROM tab1 cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + col0 * col1 col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT 4 AS col0 FROM tab2 cor0
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 * col2 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col0 + col1 + 56 FROM tab2 AS cor0
----
-6
37
80

query I rowsort
SELECT - col2 + - ( 11 ) FROM tab0 AS cor0
----
-12
-44
-93

query I rowsort
SELECT - col2 * col1 + + cor0.col1 * col0 * 25 FROM tab1 AS cor0
----
15430
24752
546

query I rowsort
SELECT + col2 + + 9 * col2 AS col1 FROM tab2 AS cor0
----
260
270
380

query I rowsort
SELECT ALL - col1 * 51 * cor0.col0 + col1 * - col2 AS col0 FROM tab1 cor0
----
-33210
-5382
-54288

query I rowsort
SELECT DISTINCT col2 + 95 FROM tab0 AS cor0
----
128
177
96

query I rowsort
SELECT - 98 + col2 FROM tab2
----
-60
-71
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-8588
SELECT tab1.col0 + + 83 DIV - tab1.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to f90ca2a817cc7c28614ed12a0002326f

skipif mysql # not compatible
query I rowsort label-8588
SELECT tab1.col0 + + 83 / - tab1.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to f90ca2a817cc7c28614ed12a0002326f

query I rowsort
SELECT ALL 50 + + col1 * tab0.col1 FROM tab0
----
7446
8331
9459

query I rowsort
SELECT DISTINCT 28 * col0 FROM tab1 AS cor0
----
1792
2240
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col1 ) * - col2 col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8592
SELECT col2 DIV col2 - col1 * + tab1.col1 FROM tab1
----
-168
-675
-99

skipif mysql # not compatible
query I rowsort label-8592
SELECT col2 / col2 - col1 * + tab1.col1 FROM tab1
----
-168
-675
-99

query I rowsort
SELECT ALL + 49 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT + + ( - col1 ) * col1 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8595
SELECT ALL - CAST( NULL AS SIGNED ) + - 78 * + col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8595
SELECT ALL - CAST ( NULL AS INTEGER ) + - 78 * + col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 54 FROM tab2, tab2 AS cor0, tab0, tab0 AS cor1
----
54

query I rowsort
SELECT + + ( cor0.col1 ) + - 75 * - col0 - + cor0.col2 AS col1 FROM tab1 AS cor0
----
197
4753
5917

query I rowsort
SELECT ALL 88 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT + - col1 * ( + cor0.col2 ) FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 53 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT + + cor1.col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
1
33
82

query I rowsort
SELECT DISTINCT col0 + - col1 * col0 + col2 AS col1 FROM tab2
----
-1226
-183
-4498

onlyif mysql # use DIV operator for integer division
query I rowsort label-8603
SELECT - - col1 DIV - col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8603
SELECT - - col1 / - col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col1 + - col0 * - 95 FROM tab0 AS cor0
----
2366
3422
8546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 39 col1 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT + 37 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT ALL - + col0 * + 31 + - col0 * + col1 AS col1 FROM tab2 AS cor0
----
-3792
-434
-7020

query I rowsort
SELECT col0 * ( + 60 ) + - col0 FROM tab2 cor0
----
413
4602
4661

query I rowsort
SELECT ALL col1 + col0 * cor0.col1 AS col2 FROM tab1 cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col1 + col1 * col0 col2 FROM tab0 AS cor0
----
15561
3492
4902

query I rowsort
SELECT DISTINCT + cor0.col0 * + 83 AS col0 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT DISTINCT + col0 * ( 36 ) + + col1 AS col0 FROM tab2 AS cor0
----
283
2861
2867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( col0 ) col0 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8614
SELECT DISTINCT + ( ( col2 ) ) DIV col1 + col1 FROM tab1 cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-8614
SELECT DISTINCT + ( ( col2 ) ) / col1 + col1 FROM tab1 cor0
----
15
20
28

query I rowsort
SELECT + 57 + col2 AS col1 FROM tab0 AS cor0
----
139
58
90

query I rowsort
SELECT + - col2 * + 57 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-161766
-425334
-5529

query I rowsort
SELECT ALL 66 FROM tab2, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to dc112f70fecc29a6e605a39541192f43

query I rowsort
SELECT DISTINCT - 26 AS col2 FROM tab0, tab1 AS cor0, tab0 cor1
----
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8619
SELECT - 12 DIV col2 FROM tab0
----
-12
0
0

skipif mysql # not compatible
query I rowsort label-8619
SELECT - 12 / col2 FROM tab0
----
-12
0
0

query I rowsort
SELECT + - col0 + - col0 + 86 AS col0 FROM tab1 AS cor0
----
-42
-74
80

query I rowsort
SELECT ALL + + col1 * ( col2 ) * col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT - col0 + col0 * ( - col2 ) FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-8623
SELECT ALL cor0.col1 DIV 67 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8623
SELECT ALL cor0.col1 / 67 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 * 24 FROM tab0 cor0
----
-1968
-24
-792

query I rowsort
SELECT col2 * cor0.col1 + col1 * col2 AS col0 FROM tab1 cor0
----
1140
2496
2808

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8626
SELECT ALL - col2 * col1 + - CAST( NULL AS DECIMAL ) - + col0 * tab1.col2 / col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8626
SELECT ALL - col2 * col1 + - CAST ( NULL AS REAL ) - + col0 * tab1.col2 / col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 63 - - col1 AS col0 FROM tab1
----
73
76
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 + + tab0.col0 * + 13 - col0 col0 FROM tab0
----
1159
374
517

query I rowsort
SELECT DISTINCT 61 * col0 AS col1 FROM tab2
----
427
4758
4819

query I rowsort
SELECT + 81 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

query I rowsort
SELECT ALL col2 + col0 - + col0 AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT + cor1.col0 FROM tab0, tab0 cor0, tab2 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL + tab2.col2 + - ( col0 ) FROM tab2
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * + 92 col1 FROM tab0 cor0
----
7912
8372
8924

query I rowsort
SELECT ALL - cor0.col1 * + ( - col2 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col2 * + 10 + col1 + col0 FROM tab1 AS cor0
----
1053
569
644

query I rowsort
SELECT - 5 * - tab2.col2 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 4a6896ddd09b72f74e533e3e01c820bb

query I rowsort
SELECT + - 54 AS col2 FROM tab1 cor0
----
-54
-54
-54

query I rowsort
SELECT + + 61 * col2 + - col1 * col0 * + col1 + col0 * col0 * - col1 AS col2 FROM tab1 AS cor0
----
-43883
-90864
1032

query I rowsort
SELECT DISTINCT + 37 * - col0 FROM tab1 cor0
----
-111
-2368
-2960

query I rowsort
SELECT ALL + + col0 * + col2 * col2 AS col2 FROM tab2 AS cor0
----
114076
5103
52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + cor0.col1 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + - col2 * + cor0.col2 + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT ( - col2 ) * col0 * - cor0.col1 + - col0 FROM tab2 AS cor0
----
119574
50955
5852

query I rowsort
SELECT ALL - - col1 * - col2 - col2 FROM tab1 cor0
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-8646
SELECT ALL - col2 DIV col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8646
SELECT ALL - col2 / col1 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + - 32 * col0 + col2 AS col0 FROM tab0 AS cor0
----
-1119
-2766
-735

onlyif mysql # use DIV operator for integer division
query I rowsort label-8648
SELECT DISTINCT - col2 DIV cor0.col1 AS col1 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-8648
SELECT DISTINCT - col2 / cor0.col1 AS col1 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT + 88 * - col2 + - col0 FROM tab0 AS cor0
----
-123
-2928
-7305

query I rowsort
SELECT ALL - + cor0.col2 * + cor0.col1 + + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT ALL + cor0.col0 + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - col1 * - cor0.col0 + + col2 * - cor0.col2 FROM tab0 AS cor0
----
1375
3394
975

query I rowsort
SELECT - col0 * - cor0.col0 * + col2 + col1 AS col1 FROM tab1 AS cor0
----
233482
512
614413

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * + col0 col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8656
SELECT - CAST( + col1 AS SIGNED ) + + col1 + + col0 col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8656
SELECT - CAST ( + col1 AS INTEGER ) + + col1 + + col0 col2 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8657
SELECT DISTINCT + 78 DIV + ( col0 ) AS col2 FROM tab1 cor0
----
0
1
26

skipif mysql # not compatible
query I rowsort label-8657
SELECT DISTINCT + 78 / + ( col0 ) AS col2 FROM tab1 cor0
----
0
1
26

query I rowsort
SELECT - tab0.col2 - 6 AS col2 FROM tab0
----
-39
-7
-88

query I rowsort
SELECT DISTINCT - tab1.col2 + col0 AS col2 FROM tab1
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8660
SELECT ALL + CAST( 47 AS SIGNED ) FROM tab1 AS cor0
----
47
47
47

skipif mysql # not compatible
query I rowsort label-8660
SELECT ALL + CAST ( 47 AS INTEGER ) FROM tab1 AS cor0
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - 43 * + col0 * + col2 col2 FROM tab2
----
129048
8100
87178

query I rowsort
SELECT 51 + - col2 AS col2 FROM tab0
----
-31
18
50

query I rowsort
SELECT - 75 * + col0 FROM tab1 AS cor0
----
-225
-4800
-6000

query I rowsort
SELECT DISTINCT + - 36 * - col2 + - col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT DISTINCT - ( + 64 + col2 ) * col0 FROM tab1
----
-12800
-354
-7744

query I rowsort
SELECT DISTINCT + col0 * 73 AS col2 FROM tab1
----
219
4672
5840

query I rowsort
SELECT col2 * - col0 + + col1 AS col2 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ( col0 * - col2 + + col1 ) FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col2 * + 71 FROM tab0
----
2343
5822
71

query I rowsort
SELECT ALL + cor0.col0 + col0 * col0 + - col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-8671
SELECT DISTINCT ( + col1 ) DIV - col1 col2 FROM tab2 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8671
SELECT DISTINCT ( + col1 ) / - col1 col2 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + + 0 * col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 63 * 27 AS col2 FROM tab2
----
-1701
-1701
-1701

query I rowsort
SELECT + tab0.col2 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-8675
SELECT + tab2.col1 * col0 DIV - col0 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-8675
SELECT + tab2.col1 * col0 / - col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT col2 * - 83 AS col0 FROM tab1
----
-4482
-4731
-7968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8677
SELECT - CAST( + 59 AS SIGNED ) * - col0 AS col0 FROM tab1 AS cor0
----
177
3776
4720

skipif mysql # not compatible
query I rowsort label-8677
SELECT - CAST ( + 59 AS INTEGER ) * - col0 AS col0 FROM tab1 AS cor0
----
177
3776
4720

query I rowsort
SELECT ALL col1 + - 31 FROM tab0 AS cor0
----
55
60
66

query I rowsort
SELECT ALL + 51 * - 69 FROM tab0 AS cor0
----
-3519
-3519
-3519

query I rowsort
SELECT + 25 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT DISTINCT - 52 AS col1 FROM tab0
----
-52

query I rowsort
SELECT ALL ( + col0 ) + 7 FROM tab0 AS cor0
----
31
42
96

query I rowsort
SELECT DISTINCT - col0 * - col1 - + ( cor0.col0 + - col1 ) AS col1 FROM tab0 cor0
----
2126
3457
8101

query I rowsort
SELECT DISTINCT + 9 + cor0.col0 AS col0 FROM tab0 AS cor0
----
33
44
98

query I rowsort
SELECT DISTINCT - col0 + col2 * - 31 FROM tab2 AS cor0
----
-1257
-844
-884

query I rowsort
SELECT + col2 * 45 + col1 FROM tab0 AS cor0
----
142
1571
3781

query I rowsort
SELECT ALL - + col2 + col2 * col2 AS col1 FROM tab2 AS cor0
----
1406
650
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-8688
SELECT DISTINCT cor0.col1 + - col2 DIV col2 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-8688
SELECT DISTINCT cor0.col1 + - col2 / col2 FROM tab0 cor0
----
85
90
96

query I rowsort
SELECT DISTINCT - col1 * ( cor0.col1 ) + + col2 + - cor0.col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
16

query I rowsort
SELECT 7 + + col2 AS col2 FROM tab0
----
40
8
89

query I rowsort
SELECT DISTINCT + 97 AS col2 FROM tab2
----
97

query I rowsort
SELECT - col0 * cor0.col2 + col0 AS col1 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-8694
SELECT DISTINCT + col0 DIV + tab1.col2 col1 FROM tab1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8694
SELECT DISTINCT + col0 / + tab1.col2 col1 FROM tab1
----
0
1

query I rowsort
SELECT col1 * + col1 * col0 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT + 20 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT + cor0.col2 + - col2 * - ( + col1 + - ( + col0 ) ) AS col1 FROM tab2 AS cor0
----
-2318
-468
675

query I rowsort
SELECT + + col1 + ( + col2 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT cor0.col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT cor0.col2 * - ( + col0 ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8701
SELECT DISTINCT + ( cor0.col1 ) DIV - cor0.col0 + - cor0.col2 DIV col0 AS col0 FROM tab1 AS cor0
----
-1
-26
0

skipif mysql # not compatible
query I rowsort label-8701
SELECT DISTINCT + ( cor0.col1 ) / - cor0.col0 + - cor0.col2 / col0 AS col0 FROM tab1 AS cor0
----
-1
-26
0

query I rowsort
SELECT ALL - ( + col0 ) - + cor0.col1 FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 - col1 col2 FROM tab1 AS cor0
----
21
24
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8704
SELECT + cor0.col2 + + col2 DIV 87 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8704
SELECT + cor0.col2 + + col2 / 87 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col1 + - col1 * + col1 AS col2 FROM tab0 cor0
----
-7310
-8190
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col1 * 50 col2 FROM tab2 AS cor0
----
-14450
-174050
-48050

query I rowsort
SELECT col1 + + col0 * - 40 FROM tab2 AS cor0
----
-249
-3061
-3143

query I rowsort
SELECT col0 * + col2 + - col0 AS col2 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT ALL + - 97 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 12bd12d33f03250bee508c5641e140d5

query I rowsort
SELECT + col0 * + col1 + - cor0.col0 * col0 FROM tab1 AS cor0
----
-3456
-5360
69

query I rowsort
SELECT - + col2 - cor0.col0 AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + 55 * col1 + - col2 AS col0 FROM tab2
----
1678
3219
897

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8713
SELECT ALL CAST( col1 AS SIGNED ) * - tab0.col1 + ( ( col1 ) ) AS col1 FROM tab0
----
-7310
-8190
-9312

skipif mysql # not compatible
query I rowsort label-8713
SELECT ALL CAST ( col1 AS INTEGER ) * - tab0.col1 + ( ( col1 ) ) AS col1 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL + + col0 * col1 * + ( - col2 ) AS col1 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - 23 + col1 * col1 FROM tab2 AS cor0
----
266
3458
938

query I rowsort
SELECT - col2 * col2 + - 73 AS col2 FROM tab0 AS cor0
----
-1162
-6797
-74

query I rowsort
SELECT ALL + 73 + - col0 AS col0 FROM tab2 cor0
----
-5
-6
66

query I rowsort
SELECT 2 * col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + col2 * + col1 + cor0.col1 * - 48 * col0 + ( col0 ) FROM tab1 AS cor0
----
-2337
-30086
-48592

query I rowsort
SELECT DISTINCT - 58 * + col2 + ( col0 ) * - col1 - + col1 AS col2 FROM tab1 AS cor0
----
-3236
-3956
-6621

query I rowsort
SELECT - - 43 + + col1 - 73 AS col2 FROM tab2 AS cor0
----
-13
1
29

query I rowsort
SELECT - 36 * - col0 + col2 FROM tab2 AS cor0
----
279
2834
2882

query I rowsort
SELECT ALL + 17 + + col2 FROM tab1 AS cor0
----
113
71
74

query I rowsort
SELECT + col0 * col2 + + 30 - col0 * col2 * ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-111044
-4884
-50670

query I rowsort
SELECT tab1.col1 * - cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to bd3a01f5788d5b65679da995dbe27636

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8726
SELECT DISTINCT CAST( NULL AS DECIMAL ) * 41 * + col1 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-8726
SELECT DISTINCT CAST ( NULL AS REAL ) * 41 * + col1 AS col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT + + 92 FROM tab0, tab1, tab1 AS cor0
----
92

query I rowsort
SELECT DISTINCT - col2 * col0 - - col0 FROM tab0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8729
SELECT - col0 - - col2 DIV - tab1.col0 FROM tab1
----
-21
-64
-81

skipif mysql # not compatible
query I rowsort label-8729
SELECT - col0 - - col2 / - tab1.col0 FROM tab1
----
-21
-64
-81

query I rowsort
SELECT + 87 + col1 * col0 - 29 * col0 * col0 FROM tab2 cor0
----
-1117
-171747
-179559

query I rowsort
SELECT col1 * col0 + - tab0.col1 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT ALL - col0 + 54 AS col1 FROM tab0 AS cor0
----
-35
19
30

query I rowsort
SELECT ALL 63 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT ALL - + 86 AS col0 FROM tab1 AS cor0
----
-86
-86
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8735
SELECT DISTINCT col2 * + CAST( NULL AS DECIMAL ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8735
SELECT DISTINCT col2 * + CAST ( NULL AS REAL ) FROM tab2
----
NULL

query I rowsort
SELECT cor0.col0 * + 89 AS col2 FROM tab2 AS cor0
----
623
6942
7031

onlyif mysql # use DIV operator for integer division
query I rowsort label-8737
SELECT - col2 DIV - 14 + - col2 FROM tab1
----
-51
-53
-90

skipif mysql # not compatible
query I rowsort label-8737
SELECT - col2 / - 14 + - col2 FROM tab1
----
-51
-53
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8738
SELECT DISTINCT 52 * col1 DIV + tab2.col0 FROM tab2
----
11
230
39

skipif mysql # not compatible
query I rowsort label-8738
SELECT DISTINCT 52 * col1 / + tab2.col0 FROM tab2
----
11
230
39

query I rowsort
SELECT DISTINCT - col2 * - col0 * tab0.col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + cor0.col0 * - col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col2 + + 64 * - col1 * col1 FROM tab0 cor0
----
-473311
-529902
-602175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8742
SELECT DISTINCT CAST( + ( col1 ) AS SIGNED ) AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8742
SELECT DISTINCT CAST ( + ( col1 ) AS INTEGER ) AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8743
SELECT ALL - 86 DIV - col0 + - col0 DIV + col0 FROM tab1 cor0
----
0
0
27

skipif mysql # not compatible
query I rowsort label-8743
SELECT ALL - 86 / - col0 + - col0 / + col0 FROM tab1 cor0
----
0
0
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8744
SELECT + - CAST( + 22 AS SIGNED ) FROM tab0 AS cor0
----
-22
-22
-22

skipif mysql # not compatible
query I rowsort label-8744
SELECT + - CAST ( + 22 AS INTEGER ) FROM tab0 AS cor0
----
-22
-22
-22

query I rowsort
SELECT ALL + - col0 * - col2 + col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT + - col2 + + ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - 89 * cor0.col1 + - col1 + - col0 AS col0 FROM tab0 cor0
----
-7764
-8279
-8765

query I rowsort
SELECT DISTINCT - cor0.col0 * 3 - + col0 * ( + cor0.col1 ) FROM tab0 AS cor0
----
-2136
-3500
-8366

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - ( col2 ) AS REAL ) * - col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - cor0.col2 + 11 AS col1 FROM tab0 AS cor0
----
-22
-71
10

query I rowsort
SELECT DISTINCT cor0.col0 + - col2 + col2 * + 88 AS col0 FROM tab2 AS cor0
----
2340
2356
3385

query I rowsort
SELECT DISTINCT col0 * col2 + col1 * + col1 AS col2 FROM tab2 cor0
----
1150
3291
5509

query I rowsort
SELECT + col1 * col2 + 78 FROM tab2 AS cor0
----
1612
724
915

query I rowsort
SELECT DISTINCT - 60 * + col2 AS col0 FROM tab0 AS cor0
----
-1980
-4920
-60

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - - ( - cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + col1 * + col1 * 7 AS col0 FROM tab2 AS cor0
----
2023
24367
6727

query I rowsort
SELECT - col0 * 81 + - col0 AS col0 FROM tab0 AS cor0
----
-1968
-2870
-7298

query I rowsort
SELECT col2 + 60 - + col0 FROM tab2
----
19
8
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8760
SELECT ALL + col1 + CAST( - col2 AS SIGNED ) AS col1 FROM tab0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-8760
SELECT ALL + col1 + CAST ( - col2 AS INTEGER ) AS col1 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT col0 * col1 + - col0 FROM tab1
----
576
75
960

query I rowsort
SELECT DISTINCT - col0 + 73 AS col2 FROM tab1
----
-7
70
9

query I rowsort
SELECT ALL 16 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT ALL + col1 * + ( + col2 ) - col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT - col2 * 69 + + col0 FROM tab0 AS cor0
----
-2253
-34
-5569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + + col2 col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - - col1 + + 7 FROM tab1 cor0
----
17
20
33

skipif mysql # not compatible
query I rowsort
SELECT + col1 + CAST ( + 64 AS REAL ) FROM tab0 AS cor0
----
150
155
161

query I rowsort
SELECT DISTINCT - col0 * + ( - col0 ) + col1 AS col2 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT ALL + + 41 - 94 FROM tab2 AS cor0
----
-53
-53
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-8771
SELECT DISTINCT ( col2 ) + col2 DIV + ( col1 ) + col1 col1 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8771
SELECT DISTINCT ( col2 ) + col2 / + ( col1 ) + col1 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT col2 * 22 + - col2 AS col0 FROM tab0 AS cor0
----
1722
21
693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + 54 * col2 col0 FROM tab0 AS cor0
----
151
1868
4519

query I rowsort
SELECT + cor0.col1 + - 54 FROM tab2 AS cor0
----
-23
-37
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8775
SELECT + CAST( NULL AS DECIMAL ) + + col1 * + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8775
SELECT + CAST ( NULL AS REAL ) + + col1 * + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8776
SELECT ALL 52 DIV - 34 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8776
SELECT ALL 52 / - 34 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8777
SELECT DISTINCT - ( ( - col1 ) ) + col2 DIV + 42 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-8777
SELECT DISTINCT - ( ( - col1 ) ) + col2 / + 42 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + + 75 - col1 AS col1 FROM tab0 AS cor0
----
-11
-16
-22

onlyif mysql # use DIV operator for integer division
query I rowsort label-8779
SELECT - + col1 DIV ( + col1 ) + - 50 AS col0 FROM tab1 AS cor0
----
-51
-51
-51

skipif mysql # not compatible
query I rowsort label-8779
SELECT - + col1 / ( + col1 ) + - 50 AS col0 FROM tab1 AS cor0
----
-51
-51
-51

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 / + col1 + col0 * CAST ( 4 AS REAL ) FROM tab0 cor0
----
140
356
96

query I rowsort
SELECT ALL - cor0.col2 + col1 * + col0 * col1 AS col0 FROM tab1 AS cor0
----
13424
1974
6343

query I rowsort
SELECT DISTINCT + ( - col0 ) + + col1 + col0 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL cor0.col1 + - 31 * 17 * - cor0.col0 AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 6ff0be9e62c8c5c50701132005ee928e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 86 - col2 col2 FROM tab2
----
-2262
-2349
-3306

query I rowsort
SELECT DISTINCT + col2 + + 29 AS col1 FROM tab1
----
125
83
86

query III rowsort
SELECT ALL * FROM tab1 WHERE ( NULL ) IN ( - col0 * + col2 )
----

query I rowsort
SELECT + tab1.col0 + tab1.col2 FROM tab1
----
121
176
57

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL = col1 - col1 * + col2 * + col1
----

query I rowsort
SELECT - tab2.col1 / col1 FROM tab2 WHERE col1 IN ( col2 - col1 )
----

query I rowsort
SELECT col1 + col0 * col0 AS col1 FROM tab0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + tab0.col0 + - col2 * + col2 AS col0 FROM tab0
----
-1065
-6635
34

query III rowsort
SELECT * FROM tab2 WHERE NOT ( col0 * col0 ) NOT IN ( - tab2.col0 )
----

query I rowsort
SELECT DISTINCT tab2.col1 * - tab2.col0 * + col1 + - col1 AS col1 FROM tab2
----
-22848
-271577
-6758

query I rowsort
SELECT + tab0.col0 + col2 + col0 * + tab0.col0 * col2 AS col1 FROM tab0
----
1261
19065
649693

query I rowsort
SELECT ALL - col1 + col0 * col2 FROM tab1
----
136
3638
7667

query I rowsort
SELECT DISTINCT - tab1.col0 + col0 * + col0 * + tab1.col2 AS col1 FROM tab1
----
233408
483
614320

query I rowsort
SELECT ALL col1 + col1 * col2 * + col1 FROM tab2
----
10999
25978
90565

onlyif mysql # use DIV operator for integer division
query I rowsort label-8799
SELECT ALL col1 DIV + col1 + + col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-8799
SELECT ALL col1 / + col1 + + col2 FROM tab1
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - cor0.col1 col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 AS col2 FROM tab2, tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + col1 * - col0 + - col2 AS col1 FROM tab1
----
-1136
-132
-697

query I rowsort
SELECT ALL - col2 * + col0 + col1 + + col0 FROM tab1
----
-133
-3574
-7587

query I rowsort
SELECT col1 + + col0 + col0 * - tab2.col1 FROM tab2
----
-1247
-179
-4465

query I rowsort
SELECT ALL + cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8806
SELECT DISTINCT - col0 * col1 DIV col2 col0 FROM tab1 AS cor0
----
-1
-10
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8806
SELECT DISTINCT - col0 * col1 / col2 col0 FROM tab1 AS cor0
----
-1
-10
-11

query I rowsort
SELECT ALL col0 + - cor0.col0 FROM tab1 AS cor0 WHERE NOT ( col2 + col0 ) >= ( NULL ) OR NOT NULL IN ( + col0 )
----

query I rowsort
SELECT + col2 * + col1 + col0 + col2 FROM tab0 AS cor0
----
133
2895
7633

query I rowsort
SELECT col0 + col0 + col2 AS col2 FROM tab1 AS cor0
----
185
256
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 * col0 col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - tab1.col2 * col1 * - col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT col2 + + cor0.col1 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT + - col2 * 77 * col1 + col2 FROM tab1 AS cor0
----
-108054
-43833
-96000

query I rowsort
SELECT col1 * + col1 + - 25 AS col2 FROM tab0 cor0
----
7371
8256
9384

query I rowsort
SELECT - col2 + ( - cor0.col1 + cor0.col2 ) * - col2 FROM tab1 cor0
----
-1566
-2736
-8064

query I rowsort
SELECT - 57 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT - ( - tab0.col1 ) AS col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-8818
SELECT - + col1 DIV - col1 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8818
SELECT - + col1 / - col1 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col0 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-8820
SELECT col2 DIV tab1.col0 + col2 + col0 * col2 * + col0 FROM tab1
----
233529
558
614497

skipif mysql # not compatible
query I rowsort label-8820
SELECT col2 / tab1.col0 + col2 + col0 * col2 * + col0 FROM tab1
----
233529
558
614497

query I rowsort
SELECT ALL - col2 + - col0 FROM tab1 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - tab1.col2 - - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 + - col1 * tab0.col1 + + col2 FROM tab0
----
-7330
-8117
-9407

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( NULL ) NOT IN ( - tab1.col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) NOT IN ( col0 * col1 + - col2 * col1 * - col1 )
----

query I rowsort
SELECT col1 * col0 * - col1 AS col2 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT col2 * col0 + - ( + 57 ) AS col1 FROM tab1 AS cor0
----
105
3591
7623

onlyif mysql # use DIV operator for integer division
query I rowsort label-8828
SELECT cor0.col2 DIV - col2 + CAST( col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-8828
SELECT cor0.col2 / - col2 + CAST ( col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT + col0 * + col1 * tab2.col2 + tab2.col0 FROM tab2
----
119730
51113
5866

onlyif mysql # use DIV operator for integer division
query I rowsort label-8830
SELECT DISTINCT col2 + col2 DIV + col0 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-8830
SELECT DISTINCT col2 + col2 / + col0 FROM tab1
----
57
72
97

query I rowsort
SELECT + col2 + ( + col2 ) AS col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL + col1 * 0 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8833
SELECT ALL + cor0.col1 DIV + 22 + - 60 AS col0 FROM tab2 AS cor0
----
-58
-59
-60

skipif mysql # not compatible
query I rowsort label-8833
SELECT ALL + cor0.col1 / + 22 + - 60 AS col0 FROM tab2 AS cor0
----
-58
-59
-60

query I rowsort
SELECT cor0.col2 + cor1.col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 69aef5111c4de6da0dae514eae0942b5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8835
SELECT + + CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8835
SELECT + + CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( - col1 AS REAL ) + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8837
SELECT ALL + + col2 * + col0 DIV - col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-8837
SELECT ALL + + col2 * + col0 / - col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + 31 col1 FROM tab0 AS cor0
----
-55
-60
-66

query I rowsort
SELECT ALL 92 * - col0 * - col1 + + cor0.col0 FROM tab2 AS cor0
----
123635
19971
423462

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * cor0.col0 col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT 45 + - col0 AS col1 FROM tab1 AS cor0
----
-19
-35
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-8842
SELECT DISTINCT + - col0 * col1 DIV - col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8842
SELECT DISTINCT + - col0 * col1 / - col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - 20 * col2 + + col2 FROM tab1 AS cor0
----
-1026
-1083
-1824

query I rowsort
SELECT col2 * + col1 - col0 FROM tab1
----
1168
1401
506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8845
SELECT + col2 - CAST( + col1 AS SIGNED ) AS col2 FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-8845
SELECT + col2 - CAST ( + col1 AS INTEGER ) AS col2 FROM tab2
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + cor0.col2 ) * col1 col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8847
SELECT 13 DIV col0 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8847
SELECT 13 / col0 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8848
SELECT ALL + tab1.col2 DIV + ( - col0 ) AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8848
SELECT ALL + tab1.col2 / + ( - col0 ) AS col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT + - 4 * cor0.col0 + col2 * - col2 FROM tab1 AS cor0
----
-2928
-3505
-9536

onlyif mysql # use DIV operator for integer division
query I rowsort label-8850
SELECT DISTINCT + 77 + col0 DIV - col0 col1 FROM tab0 AS cor0
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8850
SELECT DISTINCT + 77 + col0 / - col0 col1 FROM tab0 AS cor0
----
76

query I rowsort
SELECT - 97 + 60 AS col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 395d44ccbce08828bc493e93ec3d9207

query I rowsort
SELECT DISTINCT - col0 * + col2 * col0 AS col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL + + 95 + - col1 * 53 FROM tab0 AS cor0
----
-4463
-4728
-5046

onlyif mysql # use DIV operator for integer division
query I rowsort label-8854
SELECT DISTINCT + col0 DIV - col1 + + col0 AS col1 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8854
SELECT DISTINCT + col0 / - col1 + + col0 AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL - 66 * cor0.col0 - cor0.col2 FROM tab2 AS cor0
----
-489
-5174
-5252

query I rowsort
SELECT 76 + col1 FROM tab0 AS cor0
----
162
167
173

query I rowsort
SELECT + col2 + - 55 AS col2 FROM tab1 AS cor0
----
-1
2
41

query I rowsort
SELECT DISTINCT + ( - cor0.col1 ) FROM tab0, tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8859
SELECT DISTINCT tab0.col1 DIV tab0.col2 + + col1 FROM tab0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-8859
SELECT DISTINCT tab0.col1 / tab0.col2 + + col1 FROM tab0
----
194
88
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8860
SELECT ALL - col2 + col2 * CAST( col2 AS SIGNED ) AS col0 FROM tab0
----
0
1056
6642

skipif mysql # not compatible
query I rowsort label-8860
SELECT ALL - col2 + col2 * CAST ( col2 AS INTEGER ) AS col0 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - col0 * col1 * col2 + col0 AS col0 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT + col0 + - ( - col2 ) AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + col0 + col1 + - col1 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + col1 + + 63 * - col0 AS col1 FROM tab0 AS cor0
----
-1426
-2108
-5516

query I rowsort
SELECT + + col0 + - cor0.col0 + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT 93 + - col1 AS col2 FROM tab2
----
34
62
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-8867
SELECT ALL col0 DIV + col1 + col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8867
SELECT ALL col0 / + col1 + col0 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL - - 45 + - tab0.col0 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to ec4d1683749455b5e667c1c395eedd78

query I rowsort
SELECT 41 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 4fa4bd3038de6e74a345debc8ab4cd53

query I rowsort
SELECT - col2 * col1 + + col2 AS col1 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + col0 + + 48 - + cor0.col2 FROM tab0 cor0
----
39
55
82

query I rowsort
SELECT col0 * ( + 56 + + tab2.col2 ) FROM tab2
----
581
6396
7426

onlyif mysql # use DIV operator for integer division
query I rowsort label-8874
SELECT DISTINCT + col1 - 58 DIV tab0.col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8874
SELECT DISTINCT + col1 - 58 / tab0.col1 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8875
SELECT + ( + col1 ) + col2 DIV CAST( cor0.col0 AS SIGNED ) AS col2 FROM tab1 cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-8875
SELECT + ( + col1 ) + col2 / CAST ( cor0.col0 AS INTEGER ) AS col2 FROM tab1 cor0
----
10
14
44

query I rowsort
SELECT ALL + + col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - ( col1 ) * col0 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + + ( - col2 ) + + col2 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - 73 + - col1 + + ( + tab2.col1 ) AS col2 FROM tab2
----
-73
-73
-73

query I rowsort
SELECT DISTINCT col1 * - col1 + col2 + 21 * col2 FROM tab1
----
1154
1943
512

query I rowsort
SELECT ALL - 4 * - col0 + col0 AS col0 FROM tab2 AS cor0
----
35
390
395

onlyif mysql # use DIV operator for integer division
query I rowsort label-8882
SELECT - 74 DIV col0 + - ( col2 ) * col2 + - col1 * cor0.col2 FROM tab0 cor0
----
-100
-14186
-3930

skipif mysql # not compatible
query I rowsort label-8882
SELECT - 74 / col0 + - ( col2 ) * col2 + - col1 * cor0.col2 FROM tab0 cor0
----
-100
-14186
-3930

query I rowsort
SELECT - 51 * col0 + - col2 FROM tab1 AS cor0
----
-207
-3321
-4176

onlyif mysql # use DIV operator for integer division
query I rowsort label-8884
SELECT ALL col1 DIV cor0.col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8884
SELECT ALL col1 / cor0.col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 33 + + col2 FROM tab1 AS cor0
----
129
87
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8886
SELECT DISTINCT - + 10 DIV 93 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8886
SELECT DISTINCT - + 10 / 93 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + col0 + - col0 * + col0 AS col2 FROM tab1 cor0
----
-4032
-6
-6320

query I rowsort
SELECT + ( ( col1 ) ) * ( 52 ) FROM tab1 AS cor0
----
1352
520
676

query I rowsort
SELECT - + cor0.col1 * + col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT cor0.col2 * 91 FROM tab2, tab1 AS cor0
----
9 values hashing to 45285ffa439708fe5215b7a3a1f4aef8

query I rowsort
SELECT ALL 60 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8892
SELECT ( col0 ) * + CAST( col0 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
4153
63
6496

skipif mysql # not compatible
query I rowsort label-8892
SELECT ( col0 ) * + CAST ( col0 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT - col1 * + col0 + - 22 * col2 FROM tab1 AS cor0
----
-1266
-1894
-3152

query I rowsort
SELECT - col0 * 28 + - 3 FROM tab0 cor0
----
-2495
-675
-983

query I rowsort
SELECT col1 - col2 * + col0 AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT 3 FROM tab2, tab1 cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT ALL - col0 + + 16 FROM tab0
----
-19
-73
-8

query I rowsort
SELECT ALL - col1 + - ( - col2 + col1 ) AS col2 FROM tab0
----
-100
-139
-193

query I rowsort
SELECT DISTINCT + 81 + + col2 AS col2 FROM tab0 AS cor0
----
114
163
82

query I rowsort
SELECT - 28 * 38 + col2 * + col0 AS col1 FROM tab1 cor0
----
-902
2584
6616

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8901
SELECT ALL col1 * col2 - + col0 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8901
SELECT ALL col1 * col2 - + col0 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 - 53 AS col0 FROM tab2
----
-15
-26
-27

query I rowsort
SELECT + - tab1.col1 AS col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8904
SELECT + col1 DIV + 4 FROM tab0
----
21
22
24

skipif mysql # not compatible
query I rowsort label-8904
SELECT + col1 / + 4 FROM tab0
----
21
22
24

query I rowsort
SELECT + 67 * tab1.col1 FROM tab1
----
1742
670
871

query I rowsort
SELECT ALL + ( + col2 ) - col2 FROM tab2
----
0
0
0

query I rowsort
SELECT + - 6 + col1 FROM tab2 AS cor0
----
11
25
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 + - cor0.col1 col0 FROM tab2 AS cor0
----
34
48
6

query I rowsort
SELECT DISTINCT 98 FROM tab0, tab1 AS cor0, tab0 cor1
----
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8910
SELECT - col2 * + col2 + - 96 DIV + ( col2 ) col1 FROM tab0
----
-1091
-6725
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8910
SELECT - col2 * + col2 + - 96 / + ( col2 ) col1 FROM tab0
----
-1091
-6725
-97

query I rowsort
SELECT ALL + 87 AS col0 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT ALL 73 * + col0 AS col0 FROM tab2
----
511
5694
5767

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8913
SELECT col2 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8913
SELECT col2 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col0 + col2 * cor0.col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT + col0 * col2 * - col0 AS col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT - cor0.col0 * - ( - cor0.col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + - ( - ( col2 ) ) + + col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8918
SELECT CAST( - col0 AS SIGNED ) - - tab1.col1 FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-8918
SELECT CAST ( - col0 AS INTEGER ) - - tab1.col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT col0 + + 2 FROM tab0
----
26
37
91

query I rowsort
SELECT DISTINCT - ( col0 ) + ( + col0 ) FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 36 * col0 FROM tab0 AS cor0
----
-1260
-3204
-864

query I rowsort
SELECT + - col1 * col1 + ( - col2 ) FROM tab2 AS cor0
----
-327
-3507
-988

onlyif mysql # use DIV operator for integer division
query I rowsort label-8923
SELECT DISTINCT + 43 DIV 22 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-8923
SELECT DISTINCT + 43 / 22 FROM tab1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 41 * + col2 col2 FROM tab2 AS cor0
----
-1066
-1107
-1558

query I rowsort
SELECT - - 73 + col0 * col0 FROM tab1 AS cor0
----
4169
6473
82

query I rowsort
SELECT DISTINCT + col2 * col2 * ( + col0 ) FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + - 78 * col2 + + cor0.col2 * - col1 FROM tab1 AS cor0
----
-5016
-5616
-8736

onlyif mysql # use DIV operator for integer division
query I rowsort label-8928
SELECT col0 + - col2 DIV cor0.col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8928
SELECT col0 + - col2 / cor0.col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col1 * + col2 - - col2 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT 29 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT col2 * - 75 - 57 FROM tab0 AS cor0
----
-132
-2532
-6207

onlyif mysql # use DIV operator for integer division
query I rowsort label-8932
SELECT - col0 - - col1 * 56 DIV col1 AS col1 FROM tab2 AS cor0
----
-22
-23
49

skipif mysql # not compatible
query I rowsort label-8932
SELECT - col0 - - col1 * 56 / col1 AS col1 FROM tab2 AS cor0
----
-22
-23
49

query I rowsort
SELECT ALL + - col1 + + 36 FROM tab1 AS cor0
----
10
23
26

query I rowsort
SELECT DISTINCT - - col1 - col0 * col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL 89 * - col2 - col0 FROM tab0 AS cor0
----
-124
-2961
-7387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8936
SELECT ALL + col1 * + col0 / - col0 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8936
SELECT ALL + col1 * + col0 / - col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - 25 + cor0.col0 FROM tab0 AS cor0
----
-2126
-2186
-2390

query I rowsort
SELECT - + cor0.col2 * col0 * + col1 + + col2 FROM tab1 AS cor0
----
-36423
-4158
-99744

query I rowsort
SELECT ALL + - 23 + col2 AS col2 FROM tab1 AS cor0
----
31
34
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-8940
SELECT ALL - col1 DIV 65 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8940
SELECT ALL - col1 / 65 AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8941
SELECT ALL + col0 DIV - 63 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8941
SELECT ALL + col0 / - 63 FROM tab2
----
-1
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8942
SELECT ALL + CAST( NULL AS SIGNED ) * + 57 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8942
SELECT ALL + CAST ( NULL AS INTEGER ) * + 57 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + cor0.col0 * ( - col0 ) + col1 FROM tab0 cor0
----
-1128
-490
-7830

query I rowsort
SELECT 27 + 77 FROM tab2 AS cor0
----
104
104
104

query I rowsort
SELECT ALL + + col1 * - 49 + + cor0.col0 * col0 AS col2 FROM tab0 AS cor0
----
-3528
-3638
3462

onlyif mysql # use DIV operator for integer division
query I rowsort label-8946
SELECT ALL + - cor0.col1 * col2 DIV col0 AS col0 FROM tab0 cor0
----
-118
-2
-83

skipif mysql # not compatible
query I rowsort label-8946
SELECT ALL + - cor0.col1 * col2 / col0 AS col0 FROM tab0 cor0
----
-118
-2
-83

query I rowsort
SELECT DISTINCT + col0 + + 78 AS col0 FROM tab1 AS cor0
----
142
158
81

query I rowsort
SELECT 13 + - col1 * cor0.col1 FROM tab2 AS cor0
----
-276
-3468
-948

query I rowsort
SELECT ALL - col2 * - 16 FROM tab0 AS cor0
----
1312
16
528

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8950
SELECT + + CAST( col0 AS SIGNED ) + cor0.col0 * col2 col0 FROM tab2 AS cor0
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8950
SELECT + + CAST ( col0 AS INTEGER ) + cor0.col0 * col2 col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - tab0.col2 - - col1 * + ( col2 + tab0.col2 * 89 ) FROM tab0
----
255387
671498
8729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8952
SELECT + col0 + - CAST( NULL AS SIGNED ) + - col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8952
SELECT + col0 + - CAST ( NULL AS INTEGER ) + - col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8953
SELECT - + cor0.col1 * + col1 + - col1 DIV col2 AS col1 FROM tab0 AS cor0
----
-7398
-8282
-9506

skipif mysql # not compatible
query I rowsort label-8953
SELECT - + cor0.col1 * + col1 + - col1 / col2 AS col1 FROM tab0 AS cor0
----
-7398
-8282
-9506

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-8955
SELECT + 78 DIV 33 - col2 FROM tab0 AS cor0
----
-31
-80
1

skipif mysql # not compatible
query I rowsort label-8955
SELECT + 78 / 33 - col2 FROM tab0 AS cor0
----
-31
-80
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8956
SELECT DISTINCT col0 + col1 DIV col1 AS col1 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-8956
SELECT DISTINCT col0 + col1 / col1 AS col1 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT ALL + 83 - col0 AS col2 FROM tab2 AS cor0
----
4
5
76

query I rowsort
SELECT col1 + col2 * - col2 * - ( 83 ) AS col2 FROM tab2 cor0
----
119869
56167
60538

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8959
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * - col0 + + cor0.col0 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8959
SELECT DISTINCT - CAST ( NULL AS REAL ) * - col0 + + cor0.col0 AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT DISTINCT + + ( + 26 ) * col2 + 80 * 86 AS col2 FROM tab2 AS cor0
----
7556
7582
7868

query I rowsort
SELECT ALL - cor0.col1 * 76 * - col2 + + cor0.col1 AS col1 FROM tab2 AS cor0
----
116643
49113
63643

query I rowsort
SELECT DISTINCT - ( - 46 * + tab1.col0 ) + col1 AS col0 FROM tab1
----
164
2954
3693

query I rowsort
SELECT + ( col1 ) + + 46 * col0 FROM tab2 AS cor0
----
353
3647
3651

onlyif mysql # use DIV operator for integer division
query I rowsort label-8964
SELECT 83 DIV col0 + - col2 * - 36 FROM tab0 AS cor0
----
1191
2952
38

skipif mysql # not compatible
query I rowsort label-8964
SELECT 83 / col0 + - col2 * - 36 FROM tab0 AS cor0
----
1191
2952
38

query I rowsort
SELECT ALL 5 + - col2 FROM tab0
----
-28
-77
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + col0 col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT + - col2 * - 66 * + col2 AS col2 FROM tab2 AS cor0
----
44616
48114
95304

query I rowsort
SELECT ALL - cor0.col0 + ( 32 ) AS col2 FROM tab2 AS cor0
----
-46
-47
25

query I rowsort
SELECT ALL + - col0 * - 28 FROM tab1 AS cor0
----
1792
2240
84

query I rowsort
SELECT ALL 96 * + col1 FROM tab0
----
8256
8736
9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8971
SELECT col0 + tab1.col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8971
SELECT col0 + tab1.col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 - - col2 * + tab0.col1 FROM tab0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8973
SELECT tab0.col1 DIV 73 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8973
SELECT tab0.col1 / 73 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL + tab1.col2 + col2 * + tab1.col0 + - col2 * + ( ( - col1 ) + tab1.col2 ) AS col1 FROM tab1
----
-1296
-192
1026

query I rowsort
SELECT col1 + col2 - + col1 * - col2 FROM tab1
----
1357
1484
637

query I rowsort
SELECT ALL - col1 * + 32 - + col1 AS col0 FROM tab2
----
-1023
-1947
-561

query I rowsort
SELECT DISTINCT - + cor0.col1 * + 46 + - 47 AS col2 FROM tab2 AS cor0
----
-1473
-2761
-829

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 col0 FROM tab1
----
-82
-82
-82

query I rowsort
SELECT ALL - col0 * - col0 + - ( 12 ) FROM tab0
----
1213
564
7909

onlyif mysql # use DIV operator for integer division
query I rowsort label-8980
SELECT ALL + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8980
SELECT ALL + col0 / col0 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT ( - col0 ) + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL col0 * col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT + 57 * + col2 + col1 * col2 AS col1 FROM tab0 AS cor0
----
12136
154
4719

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 col0 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT - 64 * - col0 * col2 AS col2 FROM tab2 AS cor0
----
12096
129792
192128

query I rowsort
SELECT DISTINCT col1 + + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - col2 + - col1 + - 51 * - cor0.col2 FROM tab2 AS cor0
----
1241
1319
1883

query I rowsort
SELECT ALL col0 + col2 * - col2 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT ( + col2 + + ( col1 ) ) * + tab2.col1 * 2 FROM tab2
----
10030
1870
3596

onlyif mysql # use DIV operator for integer division
query I rowsort label-8990
SELECT DISTINCT - col0 - col2 DIV col0 FROM tab2 cor0
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-8990
SELECT DISTINCT - col0 - col2 / col0 FROM tab2 cor0
----
-10
-78
-79

query I rowsort
SELECT DISTINCT + + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + - ( - 47 ) * - col0 - col0 * - col0 FROM tab0 cor0
----
-420
-552
3738

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 + + col2 col2 FROM tab2 AS cor0
----
104
105
116

query I rowsort
SELECT - 69 * col0 + ( col0 ) FROM tab0 cor0
----
-1632
-2380
-6052

query I rowsort
SELECT - + 28 + - 42 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to c2a2994a4e94583683ccda2cc098c58f

query I rowsort
SELECT DISTINCT 54 AS col1 FROM tab2
----
54

query I rowsort
SELECT DISTINCT ( + tab2.col0 ) * + col0 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 * - col1 col2 FROM tab1 AS cor0
----
1508
580
754

query I rowsort
SELECT + + 81 + - cor0.col2 FROM tab2 AS cor0
----
43
54
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col1 + col1 ) col1 FROM tab0
----
172
182
194

query I rowsort
SELECT + - cor0.col0 * cor0.col1 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9002
SELECT - - col2 + + col2 * CAST( col0 AS SIGNED ) FROM tab0 cor0
----
36
7380
825

skipif mysql # not compatible
query I rowsort label-9002
SELECT - - col2 + + col2 * CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col2 * - 21 + col2 * col0 col0 FROM tab0 AS cor0
----
164000
2072
60390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 * + col2 col1 FROM tab0
----
198
492
6

query I rowsort
SELECT DISTINCT + - cor0.col0 * col2 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ( col1 * ( - 70 ) ) FROM tab2
----
-1190
-2170
-4130

query I rowsort
SELECT + col0 * + col1 + + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - - 26 * col1 FROM tab1 AS cor0
----
260
338
676

query I rowsort
SELECT - tab0.col0 AS col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT + col0 * 95 * + 16 FROM tab2
----
10640
118560
120080

onlyif mysql # use DIV operator for integer division
query I rowsort label-9011
SELECT - col1 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9011
SELECT - col1 / cor0.col1 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + + col2 + + 81 + - col1 FROM tab2 AS cor0
----
102
48
77

query I rowsort
SELECT + col1 + col0 * - col2 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 4 + 62 col1 FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT - + 8 + 61 FROM tab1 AS cor0
----
53
53
53

query I rowsort
SELECT - - col2 + + col2 * col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - col0 + - col1 * col2 * + col1 FROM tab2 AS cor0
----
-11061
-25954
-90584

query I rowsort
SELECT DISTINCT + + 61 AS col1 FROM tab1 AS cor0
----
61

query I rowsort
SELECT - - 40 + - 27 FROM tab2 AS cor0
----
13
13
13

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT DISTINCT 74 * + 60 + - col1 FROM tab1 AS cor0
----
4414
4427
4430

query I rowsort
SELECT - col0 + - col0 + tab0.col1 FROM tab0
----
-87
27
38

query I rowsort
SELECT ALL 93 * ( col1 * tab1.col1 ) + + col1 FROM tab1
----
15730
62894
9310

query I rowsort
SELECT ( col0 + + col2 ) AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL col0 + - 23 * col2 AS col2 FROM tab2
----
-520
-614
-795

query I rowsort
SELECT + + 18 + + col0 * col0 AS col1 FROM tab0 AS cor0
----
1243
594
7939

query I rowsort
SELECT DISTINCT + ( - col2 ) + + col2 FROM tab2
----
0

query I rowsort
SELECT ALL + col1 + + ( col0 ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + + 39 * + col1 + col2 * ( - col0 ) FROM tab1 AS cor0
----
-3258
-7173
852

query I rowsort
SELECT cor0.col0 + - 90 * 87 AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 87e8bc703c1016ae2145137337d7bc7c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9031
SELECT CAST( NULL AS SIGNED ) * col0 + col0 * - col2 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9031
SELECT CAST ( NULL AS INTEGER ) * col0 + col0 * - col2 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 23 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

query I rowsort
SELECT DISTINCT 2 FROM tab1, tab2, tab2 AS cor0
----
2

query I rowsort
SELECT ALL 95 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9035
SELECT 13 + col1 DIV 23 FROM tab0
----
16
16
17

skipif mysql # not compatible
query I rowsort label-9035
SELECT 13 + col1 / 23 FROM tab0
----
16
16
17

query I rowsort
SELECT DISTINCT - 9 * tab1.col2 FROM tab1
----
-486
-513
-864

query I rowsort
SELECT DISTINCT + tab1.col1 * + col0 * + col0 FROM tab1
----
234
40960
83200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9038
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9038
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col0 + col2 * - tab0.col1 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT - - col2 + ( - cor0.col2 ) FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 27 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9042
SELECT DISTINCT col0 DIV - col0 - 0 * col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-9042
SELECT DISTINCT col0 / - col0 - 0 * col1 FROM tab0
----
-1

query I rowsort
SELECT + cor0.col2 * 77 FROM tab0 cor0
----
2541
6314
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-9044
SELECT DISTINCT - col1 + - cor0.col2 * col2 - col0 DIV 4 AS col2 FROM tab0 AS cor0
----
-106
-1181
-6837

skipif mysql # not compatible
query I rowsort label-9044
SELECT DISTINCT - col1 + - cor0.col2 * col2 - col0 / 4 AS col2 FROM tab0 AS cor0
----
-106
-1181
-6837

query I rowsort
SELECT ALL - col2 * + ( - col0 + - col0 ) FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT + + cor0.col0 - + ( + cor0.col0 + + col2 ) FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-9047
SELECT DISTINCT - - col2 DIV + col1 + + col0 AS col2 FROM tab2 cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-9047
SELECT DISTINCT - - col2 / + col1 + + col0 AS col2 FROM tab2 cor0
----
7
78
81

query I rowsort
SELECT ALL col2 * - col0 + - col0 * - cor0.col0 - col0 FROM tab1 AS cor0
----
-1360
-156
384

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9049
SELECT col1 * CAST( + col0 AS SIGNED ) + tab0.col0 * col2 FROM tab0
----
15397
2856
3430

skipif mysql # not compatible
query I rowsort label-9049
SELECT col1 * CAST ( + col0 AS INTEGER ) + tab0.col0 * col2 FROM tab0
----
15397
2856
3430

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL - col1 + col2 * col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL col0 * cor0.col2 + - col0 + col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col0 * 53 AS col2 FROM tab0 AS cor0
----
1272
1855
4717

query I rowsort
SELECT ALL col2 + + ( 60 ) * + col0 * 2 AS col0 FROM tab2 AS cor0
----
867
9386
9518

query I rowsort
SELECT - 53 * col2 AS col1 FROM tab1 AS cor0
----
-2862
-3021
-5088

query I rowsort
SELECT - col1 - 3 FROM tab2 AS cor0
----
-20
-34
-62

query I rowsort
SELECT ALL - + 19 * col1 FROM tab0 AS cor0
----
-1634
-1729
-1843

query I rowsort
SELECT ALL - + col2 * + ( + col2 * + ( - col0 ) ) + + col0 FROM tab2 AS cor0
----
114155
5110
52806

query I rowsort
SELECT - + cor0.col1 * - 64 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT DISTINCT + - 87 * col1 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT + + ( - col2 ) * - col1 + ( - ( cor0.col0 ) ) * + 39 AS col1 FROM tab2 AS cor0
----
-1508
-2435
564

query I rowsort
SELECT + col2 * - ( col2 ) + + col1 FROM tab0
----
-1003
-6633
96

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col0 AS REAL ) * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT 64 * col0 + - col0 FROM tab1 AS cor0
----
189
4032
5040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9065
SELECT ALL - col2 DIV col1 - + col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-9065
SELECT ALL - col2 / col1 - + col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT col1 * cor0.col0 + 46 + col2 AS col2 FROM tab1 cor0
----
1182
178
743

query I rowsort
SELECT DISTINCT - - col0 * + col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col1 + - col2 + - col0 AS col1 FROM tab2 AS cor0
----
-100
-3
-45

query I rowsort
SELECT col1 * col2 + tab2.col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL + col2 + col1 + col2 * 68 AS col2 FROM tab1 AS cor0
----
3752
3943
6637

query I rowsort
SELECT DISTINCT + - col0 * col0 + - 15 FROM tab1 cor0
----
-24
-4111
-6415

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 83 + + col2 * 61 col0 FROM tab1 AS cor0
----
3377
3560
5939

onlyif mysql # use DIV operator for integer division
query I rowsort label-9073
SELECT ALL + 18 DIV col2 - 50 AS col2 FROM tab0 AS cor0
----
-32
-50
-50

skipif mysql # not compatible
query I rowsort label-9073
SELECT ALL + 18 / col2 - 50 AS col2 FROM tab0 AS cor0
----
-32
-50
-50

query I rowsort
SELECT 32 + - col2 * ( - 22 ) * + col0 FROM tab2 cor0
----
4190
44648
66076

query I rowsort
SELECT ALL - - ( col2 ) * 15 - + 60 FROM tab0 AS cor0
----
-45
1170
435

query I rowsort
SELECT + 40 * - col1 FROM tab1 AS cor0
----
-1040
-400
-520

query I rowsort
SELECT DISTINCT + 91 AS col2 FROM tab1 cor0
----
91

query I rowsort
SELECT ALL 25 + cor0.col1 FROM tab1 AS cor0
----
35
38
51

query I rowsort
SELECT ALL + ( col0 ) + - col1 * - col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT DISTINCT + 78 * cor0.col2 + - 71 FROM tab1 AS cor0
----
4141
4375
7417

query I rowsort
SELECT DISTINCT + 79 + col2 AS col2 FROM tab2 AS cor0
----
105
106
117

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + 91 col1 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT DISTINCT + 60 AS col1 FROM tab0, tab1 AS cor0
----
60

query I rowsort
SELECT ( - 47 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT DISTINCT + ( 33 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
33

query I rowsort
SELECT + col0 + col2 * - col2 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT - col0 * - cor0.col2 AS col2 FROM tab0 cor0
----
35
7298
792

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( - col0 * + col2 - + col0 )
----

query I rowsort
SELECT - - col0 * + col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL + col1 * - tab0.col1 AS col2 FROM tab0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-9091
SELECT - + 64 + col0 DIV cor0.col1 + + col0 * cor0.col0 FROM tab1 AS cor0
----
-55
4038
6342

skipif mysql # not compatible
query I rowsort label-9091
SELECT - + 64 + col0 / cor0.col1 + + col0 * cor0.col0 FROM tab1 AS cor0
----
-55
4038
6342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 + col2 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 15 * - col0 AS col1 FROM tab0 AS cor0
----
1335
360
525

query I rowsort
SELECT ALL + + col1 * col2 AS col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + - col2 + - col0 * + col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT + + cor0.col1 + + col0 AS col2 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + col2 col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col1 * col2 - - col0 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT ALL - col0 * col0 + col2 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT - col1 AS col0 FROM tab0 WHERE NOT + col0 IN ( - tab0.col1 / + col2 )
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + + tab2.col2 + - col1 * - col1 * col0 col1 FROM tab2
----
22886
271603
6785

query III rowsort
SELECT ALL * FROM tab0 WHERE col2 IN ( + col1 )
----

query I rowsort
SELECT - tab0.col0 * - col1 - - col2 AS col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT - col1 AS col0 FROM tab2 WHERE NULL <> ( col2 )
----

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0 WHERE NOT NULL <= ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9106
SELECT - col0 + col0 * - col0 + tab1.col2 * col0 DIV + tab1.col2 AS col2 FROM tab1
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-9106
SELECT - col0 + col0 * - col0 + tab1.col2 * col0 / + tab1.col2 AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - 43 + + col0 FROM tab1 AS cor0
----
-40
21
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9109
SELECT DISTINCT col0 * col0 DIV - col2 + col2 FROM tab0 WHERE col1 DIV + col1 NOT IN ( tab0.col2 )
----
-14
16

skipif mysql # not compatible
query I rowsort label-9109
SELECT DISTINCT col0 * col0 / - col2 + col2 FROM tab0 WHERE col1 / + col1 NOT IN ( tab0.col2 )
----
-14
16

query I rowsort
SELECT - col2 * - col1 FROM tab2 WHERE NOT ( + col1 ) BETWEEN + col0 + col0 AND ( + col1 + col2 )
----
1534
646

query I rowsort
SELECT col0 - col2 FROM tab1 WHERE ( NULL ) <= col2
----

query I rowsort
SELECT + col2 * col0 * - col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab0 WHERE NOT NULL > NULL
----

query I rowsort
SELECT col2 + col0 * tab0.col0 FROM tab0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-9115
SELECT col1 * tab1.col2 DIV col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9115
SELECT col1 * tab1.col2 / col2 FROM tab1
----
10
13
26

query I rowsort
SELECT col1 * - col1 - col1 FROM tab2 AS cor0
----
-306
-3540
-992

onlyif mysql # use DIV operator for integer division
query I rowsort label-9117
SELECT DISTINCT + cor0.col2 DIV - col2 - - col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-9117
SELECT DISTINCT + cor0.col2 / - col2 - - col0 FROM tab1 AS cor0
----
2
63
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - tab0.col1 * col2 col2 FROM tab0
----
-3395
-664118
-68112

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 WHERE ( NULL ) BETWEEN ( - col2 ) AND NULL
----

query I rowsort
SELECT - col1 FROM tab1 WHERE NOT NULL = NULL
----

query I rowsort
SELECT col1 * - col0 + col1 * - col0 * col0 FROM tab0
----
-122220
-51600
-728910

query I rowsort
SELECT tab2.col2 * + col1 + + col2 * col1 * col0 AS col2 FROM tab2
----
121186
51680
6696

query III rowsort
SELECT ALL * FROM tab2 WHERE - tab2.col1 < col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col2 * - col0 + + col0 AS col0 FROM tab0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + - col2 col0 FROM tab2
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-9126
SELECT DISTINCT col0 DIV tab0.col0 + + col1 * col1 DIV - col1 + - col1 col0 FROM tab0
----
-171
-181
-193

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9126
SELECT DISTINCT col0 / tab0.col0 + + col1 * col1 / - col1 + - col1 col0 FROM tab0
----
-171
-181
-193

query I rowsort
SELECT + col2 FROM tab2 WHERE NULL <= NULL
----

query I rowsort
SELECT ALL col0 * col2 + + col1 FROM tab0
----
132
7389
878

query I rowsort
SELECT + 87 * + cor0.col1 FROM tab1 AS cor0
----
1131
2262
870

query I rowsort
SELECT ALL - cor0.col1 + col1 * col1 * col1 AS col1 FROM tab0 AS cor0
----
635970
753480
912576

onlyif mysql # use DIV operator for integer division
query I rowsort label-9131
SELECT ALL + col1 DIV col0 + ( - col0 ) + - col0 FROM tab1 AS cor0
----
-128
-160
2

skipif mysql # not compatible
query I rowsort label-9131
SELECT ALL + col1 / col0 + ( - col0 ) + - col0 FROM tab1 AS cor0
----
-128
-160
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9132
SELECT ALL + - 42 * col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-42
-42
-42

skipif mysql # not compatible
query I rowsort label-9132
SELECT ALL + - 42 * col0 / col0 AS col1 FROM tab0 AS cor0
----
-42
-42
-42

query I rowsort
SELECT ALL - - col1 + + col2 * ( + 0 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + - col2 * - col2 + col1 * + cor0.col2 + col0 FROM tab1 AS cor0
----
10544
3883
4323

query I rowsort
SELECT DISTINCT col0 * col2 * col0 - + 8 FROM tab2
----
1315
158176
237150

query I rowsort
SELECT + + col2 + col1 * col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL + col1 * - ( col1 * cor0.col2 ) FROM tab0 AS cor0
----
-244068
-679042
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9138
SELECT + col0 + - CAST( 8 AS SIGNED ) FROM tab2 AS cor0
----
-1
70
71

skipif mysql # not compatible
query I rowsort label-9138
SELECT + col0 + - CAST ( 8 AS INTEGER ) FROM tab2 AS cor0
----
-1
70
71

query I rowsort
SELECT DISTINCT + col1 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col2 + col1 * + ( - col0 ) FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - + col1 + + col1 AS col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + 27 col0 FROM tab2 AS cor0
----
53
54
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-9143
SELECT + cor0.col1 DIV col1 + ( col1 ) * - ( col1 * + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-13519
-2027
-6399

skipif mysql # not compatible
query I rowsort label-9143
SELECT + cor0.col1 / col1 + ( col1 ) * - ( col1 * + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-13519
-2027
-6399

onlyif mysql # use DIV operator for integer division
query I rowsort label-9144
SELECT + col1 DIV + 28 FROM tab0 cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-9144
SELECT + col1 / + 28 FROM tab0 cor0
----
3
3
3

query I rowsort
SELECT DISTINCT + - ( + ( col1 ) ) * + 21 FROM tab2 AS cor0
----
-1239
-357
-651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + 16 col0 FROM tab0 AS cor0
----
-1376
-1456
-1552

query I rowsort
SELECT DISTINCT - cor0.col1 * 3 AS col1 FROM tab0 AS cor0
----
-258
-273
-291

query I rowsort
SELECT - - 82 + - col2 + - col0 FROM tab2 AS cor0
----
-22
-35
48

query I rowsort
SELECT ALL - + 20 * + col1 AS col2 FROM tab0 AS cor0
----
-1720
-1820
-1940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 79 col2 FROM tab0 AS cor0
----
-79

query I rowsort
SELECT + - ( 24 ) * - col0 AS col1 FROM tab2 AS cor0
----
168
1872
1896

query I rowsort
SELECT ALL tab2.col0 * col2 + col1 AS col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT ALL col0 * 24 * tab0.col2 + col0 + col1 FROM tab0
----
175332
19118
972

query I rowsort
SELECT ALL 2 * ( col0 ) AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL 61 * col2 FROM tab1
----
3294
3477
5856

query I rowsort
SELECT - ( - cor0.col1 ) + + col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9157
SELECT ALL col1 DIV 53 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9157
SELECT ALL col1 / 53 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT 48 * + cor0.col0 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to 2bcf786edecdaae4d48c674dd157500a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9159
SELECT DISTINCT ( 20 ) DIV + col1 col2 FROM tab1
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9159
SELECT DISTINCT ( 20 ) / + col1 col2 FROM tab1
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9160
SELECT DISTINCT col2 DIV - 33 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-9160
SELECT DISTINCT col2 / - 33 FROM tab2
----
-1
0

query I rowsort
SELECT DISTINCT + ( + col1 ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL 29 + cor0.col1 * + ( + cor0.col0 ) AS col1 FROM tab0 AS cor0
----
2093
3424
8128

query I rowsort
SELECT DISTINCT - - 73 + - col2 AS col2 FROM tab1 AS cor0
----
-23
16
19

query I rowsort
SELECT + 5 * col1 AS col1 FROM tab2 AS cor0
----
155
295
85

query I rowsort
SELECT ALL + 50 * col1 FROM tab2 AS cor0
----
1550
2950
850

query I rowsort
SELECT ( + cor0.col2 ) * - 79 FROM tab0 AS cor0
----
-2607
-6478
-79

query I rowsort
SELECT ALL + + ( - col2 ) * ( col1 ) AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-9168
SELECT ALL - - cor0.col0 DIV col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-9168
SELECT ALL - - cor0.col0 / col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL + col1 - col2 * 26 FROM tab2 AS cor0
----
-617
-671
-971

query I rowsort
SELECT DISTINCT 75 + cor0.col2 AS col0 FROM tab1 AS cor0
----
129
132
171

onlyif mysql # use DIV operator for integer division
query I rowsort label-9171
SELECT DISTINCT - - 64 * col1 DIV ( - 70 ) FROM tab0 cor0
----
-78
-83
-88

skipif mysql # not compatible
query I rowsort label-9171
SELECT DISTINCT - - 64 * col1 / ( - 70 ) FROM tab0 cor0
----
-78
-83
-88

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab2, tab2 cor2
----
3645 values hashing to 7eb416b97f0ed263f6364cf59aa64c2b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9173
SELECT col0 * - CAST( NULL AS SIGNED ) + + col2 / - col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9173
SELECT col0 * - CAST ( NULL AS INTEGER ) + + col2 / - col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * + ( 8 ) + col2 FROM tab2 AS cor0
----
-182
-189
-266

onlyif mysql # use DIV operator for integer division
query I rowsort label-9175
SELECT - - col2 - + col1 DIV - 43 FROM tab0 AS cor0
----
3
35
84

skipif mysql # not compatible
query I rowsort label-9175
SELECT - - col2 - + col1 / - 43 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT + - col0 * ( + 98 ) + + col0 AS col2 FROM tab2 AS cor0
----
-679
-7566
-7663

query I rowsort
SELECT ALL + 53 + col0 * col0 AS col2 FROM tab2 AS cor0
----
102
6137
6294

query I rowsort
SELECT DISTINCT + ( - ( col0 ) ) * - 17 + 84 + + col0 * 24 FROM tab2 AS cor0
----
3282
3323
371

query I rowsort
SELECT - ( ( col1 ) ) + + col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( - col1 ) * col0 + 8 * cor0.col1 FROM tab2 cor0
----
-1207
-4130
31

query I rowsort
SELECT ALL - + 14 * - col1 + - col0 + ( 49 ) * + col1 FROM tab1 AS cor0
----
1635
566
739

query I rowsort
SELECT DISTINCT 98 * + col2 AS col0 FROM tab1 AS cor0
----
5292
5586
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + + 2 col2 FROM tab1 AS cor0
----
-11
-24
-8

query I rowsort
SELECT + + cor0.col2 + - 66 * - col1 AS col2 FROM tab0 cor0
----
5709
6088
6403

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9185
SELECT DISTINCT - col2 * + CAST( - cor0.col1 AS SIGNED ) FROM tab1 cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-9185
SELECT DISTINCT - col2 * + CAST ( - cor0.col1 AS INTEGER ) FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL - cor0.col0 + - 32 AS col0 FROM tab1 AS cor0
----
-112
-35
-96

query I rowsort
SELECT - col0 + - ( + ( col1 ) ) FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-9188
SELECT ALL col1 DIV - ( + col2 ) AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9188
SELECT ALL col1 / - ( + col2 ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col1 * - cor0.col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT 78 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT + - col1 * + col2 + 77 FROM tab2 AS cor0
----
-1457
-569
-760

query I rowsort
SELECT - + col2 * col1 + - ( col1 * + col1 ) FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT + 13 + col1 + - col1 FROM tab0 AS cor0
----
13
13
13

query I rowsort
SELECT DISTINCT 44 * - cor0.col1 * + col1 AS col2 FROM tab2 AS cor0
----
-12716
-153164
-42284

query I rowsort
SELECT - col2 + + col2 * - 17 FROM tab1 AS cor0
----
-1026
-1728
-972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT - col1 + col0 * + col0 * - col2 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1385
-158302
-237192

query I rowsort
SELECT cor0.col1 + col0 + - col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + 83 + 16 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col1 - col0 col2 FROM tab2
----
210
3403
954

query I rowsort
SELECT + col0 + + col1 + - col0 FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col2 + - tab0.col1 col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col1 * ( col0 * col2 ) AS col1 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-9204
SELECT col0 + - col1 DIV - 75 + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-9204
SELECT col0 + - col1 / - 75 + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + - cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + cor0.col0 + - col0 + + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort
SELECT cor0.col0 / 29 + col0 * col0 + - CAST ( + 36 + + col0 AS REAL ) * col0 AS col0 FROM tab2 AS cor0
----
-252
-2806
-2842

query I rowsort
SELECT - cor0.col2 + + 92 FROM tab0 AS cor0
----
10
59
91

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab1, tab0 AS cor0
----
83

query I rowsort
SELECT ( - cor0.col0 ) * - tab0.col2 + 59 FROM tab0, tab1 AS cor0
----
9 values hashing to 32c7d9ef2cdd770c262842ac5173497a

query I rowsort
SELECT ALL - cor0.col2 + - 69 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 775469cf60ebe55e8a5307a19801bd80

query I rowsort
SELECT + col2 * cor0.col2 * - cor0.col0 - + 53 FROM tab2 AS cor0
----
-114129
-5156
-52781

query I rowsort
SELECT - col0 - col0 * - col0 FROM tab2 AS cor0
----
42
6006
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-9214
SELECT ALL col1 + col1 DIV col2 AS col0 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9214
SELECT ALL col1 + col1 / col2 AS col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + col0 + + col2 * 50 * 24 FROM tab1 AS cor0
----
115280
64803
68464

query I rowsort
SELECT ALL + ( + 66 ) AS col1 FROM tab1
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + col0 col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col2 ) col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - cor0.col2 * - col2 * - 44 - col2 FROM tab1 AS cor0
----
-128358
-143013
-405600

onlyif mysql # use DIV operator for integer division
query I rowsort label-9220
SELECT DISTINCT + 44 DIV 36 FROM tab1, tab2, tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-9220
SELECT DISTINCT + 44 / 36 FROM tab1, tab2, tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT cor0.col1 + + 91 FROM tab2 cor0
----
108
122
150

query I rowsort
SELECT ALL cor0.col0 + - 78 FROM tab2 AS cor0
----
-71
0
1

query I rowsort
SELECT - col2 * - 70 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT + + cor0.col0 + + col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col0 + 36 * col0 AS col2 FROM tab2 AS cor0
----
245
2730
2765

query I rowsort
SELECT 34 * - 65 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 9b56e95fceb8fbaf38d08c1f9c43ed32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9227
SELECT ALL + CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9227
SELECT ALL + CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 76 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to a8a6c4c5005303c62d4e50b6c96b584f

query I rowsort
SELECT ALL cor1.col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL cor1.col2 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2, tab2 cor2
----
243 values hashing to 291cdf20f55dc7bbcb55f561dc0b74d8

query I rowsort
SELECT DISTINCT - - col1 * col2 * - col2 AS col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL col1 + col2 * col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT + 44 AS col2 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT ALL - 39 * + col2 * 43 FROM tab0 AS cor0
----
-137514
-1677
-55341

query I rowsort
SELECT DISTINCT + + col2 * col0 + + col1 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL 86 + col0 AS col0 FROM tab1 AS cor0
----
150
166
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9237
SELECT ALL col1 DIV col1 + + 16 FROM tab2 AS cor0
----
17
17
17

skipif mysql # not compatible
query I rowsort label-9237
SELECT ALL col1 / col1 + + 16 FROM tab2 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 - - col2 AS col1 FROM tab0 cor0
----
195
205
264

query I rowsort
SELECT - col2 + - col0 * - 36 AS col2 FROM tab2 AS cor0
----
225
2782
2806

query I rowsort
SELECT 79 + - col0 * col2 FROM tab2 AS cor0
----
-110
-1949
-2923

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 + + 85 * + col1 * col1 AS col0 FROM tab1 AS cor0
----
11749
23581
60376

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - ( 81 ) col2 FROM tab0 AS cor0
----
-48
-80
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT col1 * col2 + + ( - col1 ) FROM tab2 AS cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + col0 * ( 6 * + col1 ) + + CAST ( + col2 AS REAL ) col0 FROM tab1 cor0
----
3897
522
6336

query I rowsort
SELECT ALL - col2 * ( 95 ) AS col0 FROM tab0 AS cor0
----
-3135
-7790
-95

query I rowsort
SELECT ALL 93 * col1 + col1 AS col2 FROM tab2
----
1598
2914
5546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) + + col0 * - col0 col1 FROM tab0
----
-1128
-490
-7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col1 col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL + 81 + - col2 * col0 FROM tab0
----
-711
-7217
46

query I rowsort
SELECT DISTINCT 74 + + 87 FROM tab2, tab1 AS cor0
----
161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9252
SELECT ALL + - col2 - - CAST( + 6 * + col0 AS SIGNED ) FROM tab1 AS cor0
----
-36
327
384

skipif mysql # not compatible
query I rowsort label-9252
SELECT ALL + - col2 - - CAST ( + 6 * + col0 AS INTEGER ) FROM tab1 AS cor0
----
-36
327
384

query I rowsort
SELECT col1 * - 92 + col1 FROM tab2 cor0
----
-1547
-2821
-5369

query I rowsort
SELECT DISTINCT - col0 + - col0 * 42 AS col2 FROM tab2 AS cor0
----
-301
-3354
-3397

query I rowsort
SELECT DISTINCT - col2 + 92 * - 26 AS col1 FROM tab1 AS cor0
----
-2446
-2449
-2488

query I rowsort
SELECT DISTINCT col2 - + ( + col1 ) FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - + col0 + ( - 49 ) FROM tab1 AS cor0
----
-113
-129
-52

query I rowsort
SELECT ALL - - col0 * cor0.col2 * - col2 + - col0 + col1 AS col0 FROM tab2 AS cor0
----
-114138
-5079
-52747

query I rowsort
SELECT col1 + tab1.col0 + ( - 20 + - col1 ) FROM tab1
----
-17
44
60

query I rowsort
SELECT col2 * 93 AS col2 FROM tab1
----
5022
5301
8928

query I rowsort
SELECT + - col1 * + col2 + col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 59 + cor0.col1 col2 FROM tab2 AS cor0
----
-28
-42
0

query I rowsort
SELECT ( + col0 ) * col2 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - 98 * - 8 FROM tab1
----
784
784
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col0 + ( 49 ) col2 FROM tab2 cor0
----
-1294
-168
-4553

query I rowsort
SELECT + + 8 - col0 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
-2056
-3387
-8091

query I rowsort
SELECT ALL ( tab0.col2 + + col1 ) FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + col1 * 90 * + col0 FROM tab1
----
57600
7020
93600

query I rowsort
SELECT DISTINCT - tab2.col0 * - col0 - + col0 * - col1 FROM tab2
----
10686
266
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9270
SELECT ALL + 32 * + col1 + - col0 * ( + 42 ) * col2 - - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9270
SELECT ALL + 32 * + col1 + - col0 * ( + 42 ) * col2 - - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col1 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ALL - tab1.col0 + - 84 + + col1 FROM tab1
----
-138
-151
-61

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL - col1 * - col0 - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL col1 * + col0 + 73 AS col1 FROM tab1 AS cor0
----
1113
151
713

query I rowsort
SELECT + 74 - + col2 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
236
3722
7754

onlyif mysql # use DIV operator for integer division
query I rowsort label-9277
SELECT DISTINCT + - col0 DIV - col1 - 63 FROM tab2 AS cor0
----
-59
-62
-63

skipif mysql # not compatible
query I rowsort label-9277
SELECT DISTINCT + - col0 / - col1 - 63 FROM tab2 AS cor0
----
-59
-62
-63

query I rowsort
SELECT ALL col2 + col0 * col1 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-9279
SELECT - col1 * col1 + + 6 DIV - col2 col1 FROM tab0 AS cor0
----
-7396
-8281
-9415

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9279
SELECT - col1 * col1 + + 6 / - col2 col1 FROM tab0 AS cor0
----
-7396
-8281
-9415

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9280
SELECT + - col1 - + col2 / - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9280
SELECT + - col1 - + col2 / - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 + - cor0.col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT col1 * tab0.col2 * tab0.col2 AS col0 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - + col1 + - col1 + col2 AS col2 FROM tab1 AS cor0
----
2
37
70

query I rowsort
SELECT - col1 + col0 * col1 + - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-775
1037
1062

query I rowsort
SELECT - ( col0 ) * col1 + - col1 * cor0.col1 AS col1 FROM tab2 cor0
----
-1178
-1632
-8083

onlyif mysql # use DIV operator for integer division
query I rowsort label-9286
SELECT - - col0 * col1 + + 49 * + 33 + + col1 DIV - col2 AS col1 FROM tab0 AS cor0
----
3679
4915
9715

skipif mysql # not compatible
query I rowsort label-9286
SELECT - - col0 * col1 + + 49 * + 33 + + col1 / - col2 AS col1 FROM tab0 AS cor0
----
3679
4915
9715

onlyif mysql # use DIV operator for integer division
query I rowsort label-9287
SELECT + - col1 DIV + col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-9287
SELECT + - col1 / + col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT - - 61 * - col2 + + 3 AS col1 FROM tab1 AS cor0
----
-3291
-3474
-5853

query I rowsort
SELECT - ( cor0.col1 ) + 95 + + col1 * + col1 FROM tab0 AS cor0
----
7405
8285
9407

query I rowsort
SELECT cor0.col0 * + col2 + - col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + + col1 * - col1 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
10048
21200
2190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col2 + col2 * ( - col2 ) col1 FROM tab0 AS cor0
----
-14022
-1881
-36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9293
SELECT ALL - + col2 + - CAST( NULL AS SIGNED ) * + col1 * - cor0.col1 + 94 * - 58 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9293
SELECT ALL - + col2 + - CAST ( NULL AS INTEGER ) * + col1 * - cor0.col1 + 94 * - 58 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * + ( - 88 ) + - col2 AS col1 FROM tab2 AS cor0
----
2262
2349
3306

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0, tab1, tab0 cor0, tab2 AS cor1
----
-1
-33
-82

query I rowsort
SELECT 29 * col0 + + 69 FROM tab2
----
2331
2360
272

query I rowsort
SELECT + col0 * + 1 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - 85 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9299
SELECT DISTINCT - + CAST( NULL AS DECIMAL ) + + col2 / + col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9299
SELECT DISTINCT - + CAST ( NULL AS REAL ) + + col2 / + col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + - cor0.col1 * + col2 + col0 - col0 * - col2 FROM tab1 AS cor0
----
-1239
3142
6512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col2 ) - - col1 * + 90 col0 FROM tab2 AS cor0
----
1568
2817
5336

query I rowsort
SELECT - cor0.col1 * + col0 * + col2 - + col2 AS col2 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT + col1 - 43 AS col2 FROM tab1 AS cor0
----
-17
-30
-33

query I rowsort
SELECT - col1 + 84 FROM tab2 AS cor0
----
25
53
67

query I rowsort
SELECT + col2 * - col1 - col0 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-9306
SELECT ALL + - 25 DIV col1 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9306
SELECT ALL + - 25 / col1 FROM tab2 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 78 col1 FROM tab0 AS cor0
----
-78

query I rowsort
SELECT - cor0.col2 + 92 - - col1 FROM tab2 AS cor0
----
125
71
96

query I rowsort
SELECT ALL 50 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT ALL - 72 AS col2 FROM tab2
----
-72
-72
-72

query I rowsort
SELECT + - ( - 88 ) * cor0.col2 FROM tab2 AS cor0
----
2288
2376
3344

query I rowsort
SELECT DISTINCT tab2.col2 - + 20 AS col1 FROM tab2
----
18
6
7

query I rowsort
SELECT + 34 FROM tab2, tab0 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab0 cor1
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

query I rowsort
SELECT ALL + - col0 + 25 * 16 FROM tab0 AS cor0
----
311
365
376

skipif mysql # not compatible
query I rowsort
SELECT - col0 + col2 * + CAST ( col2 + - col0 AS REAL ) FROM tab0 AS cor0
----
-663
-69
273

query I rowsort
SELECT DISTINCT 56 * col1 AS col2 FROM tab2
----
1736
3304
952

query I rowsort
SELECT - col1 * 14 FROM tab1 AS cor0
----
-140
-182
-364

query I rowsort
SELECT col1 + 90 AS col0 FROM tab1
----
100
103
116

query I rowsort
SELECT col0 + 73 * col0 FROM tab2
----
518
5772
5846

query I rowsort
SELECT + col1 - + col2 * 67 FROM tab1
----
-3592
-3809
-6419

query I rowsort
SELECT DISTINCT col1 - + 7 FROM tab2 AS cor0
----
10
24
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT - ( + 35 ) FROM tab2
----
-35
-35
-35

query I rowsort
SELECT ALL + 50 * + col0 FROM tab2 AS cor0
----
350
3900
3950

onlyif mysql # use DIV operator for integer division
query I rowsort label-9326
SELECT DISTINCT - 54 DIV - col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9326
SELECT DISTINCT - 54 / - col1 AS col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9327
SELECT ALL 22 + col2 DIV + col2 AS col1 FROM tab0
----
23
23
23

skipif mysql # not compatible
query I rowsort label-9327
SELECT ALL 22 + col2 / + col2 AS col1 FROM tab0
----
23
23
23

query I rowsort
SELECT tab2.col2 - + ( col0 ) * + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT + ( - col1 ) - col2 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT col2 + col2 * ( + 67 + - col2 ) FROM tab2
----
1092
1107
1140

query I rowsort
SELECT DISTINCT 69 * col1 AS col0 FROM tab2
----
1173
2139
4071

query I rowsort
SELECT 28 + cor0.col2 * - col2 FROM tab0 AS cor0
----
-1061
-6696
27

query I rowsort
SELECT + - 18 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 2dbe09d9295cfd52d854fefabf2cec4e

query I rowsort
SELECT - col0 + - tab2.col2 * - ( 35 ) FROM tab2
----
1251
832
938

query I rowsort
SELECT DISTINCT col0 * col1 - col0 * 82 * + col0 FROM tab0 AS cor0
----
-45168
-641423
-97055

query I rowsort
SELECT DISTINCT - col2 * col0 - col0 * col1 AS col2 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT - + 31 * - col0 AS col1 FROM tab1 AS cor0
----
1984
2480
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9338
SELECT DISTINCT cor0.col1 DIV - cor0.col1 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9338
SELECT DISTINCT cor0.col1 / - cor0.col1 FROM tab2 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col2 FROM tab1 AS cor0
----
65
65
65

query I rowsort
SELECT + - col2 * - col0 * 90 FROM tab0 AS cor0
----
3150
656820
71280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col0 - tab2.col2 col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - tab1.col2 * ( - 84 ) - col1 FROM tab1
----
4510
4778
8051

query I rowsort
SELECT ALL col0 * tab2.col2 + ( col1 ) FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT col0 - + col2 * tab1.col1 * + col2 AS col2 FROM tab1
----
-119728
-32426
-75813

query I rowsort
SELECT DISTINCT - col0 + + col0 - - col2 AS col2 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-9346
SELECT col2 + - ( col2 * col2 ) + - col2 DIV col1 AS col2 FROM tab0
----
-1056
-6642
0

skipif mysql # not compatible
query I rowsort label-9346
SELECT col2 + - ( col2 * col2 ) + - col2 / col1 AS col2 FROM tab0
----
-1056
-6642
0

query I rowsort
SELECT col0 * + 28 + - col0 FROM tab0
----
2403
648
945

query I rowsort
SELECT col2 * - ( - col2 ) + + col0 + 1 * - ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT col1 * 88 AS col0 FROM tab1 AS cor0
----
1144
2288
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( + cor0.col0 * + cor0.col1 ) col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - - col0 + cor0.col1 * col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT + + ( - 65 ) * col2 FROM tab0 AS cor0
----
-2145
-5330
-65

query I rowsort
SELECT + ( 0 ) + col1 + - 94 AS col2 FROM tab0 AS cor0
----
-3
-8
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-9354
SELECT DISTINCT - ( 33 ) DIV col0 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-9354
SELECT DISTINCT - ( 33 ) / col0 FROM tab2 AS cor0
----
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9355
SELECT DISTINCT - 5 DIV + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
86
91
92

skipif mysql # not compatible
query I rowsort label-9355
SELECT DISTINCT - 5 / + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
86
91
92

query I rowsort
SELECT + cor0.col1 + col2 + - col1 * ( cor0.col1 ) FROM tab2 AS cor0
----
-234
-3396
-903

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9357
SELECT + - CAST( NULL AS SIGNED ) + + col1 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9357
SELECT + - CAST ( NULL AS INTEGER ) + + col1 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 53 + - col1 FROM tab2 AS cor0
----
-112
-70
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9359
SELECT CAST( - col1 AS SIGNED ) + + cor0.col1 col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9359
SELECT CAST ( - col1 AS INTEGER ) + + cor0.col1 col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 6 + + col0 col2 FROM tab1 AS cor0
----
70
86
9

query I rowsort
SELECT DISTINCT ( + ( + col1 ) ) * - col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9362
SELECT ALL + CAST( cor0.col2 AS SIGNED ) * col0 + + ( - col2 ) * - col1 + col0 AS col2 FROM tab0 cor0
----
14849
167
3654

skipif mysql # not compatible
query I rowsort label-9362
SELECT ALL + CAST ( cor0.col2 AS INTEGER ) * col0 + + ( - col2 ) * - col1 + col0 AS col2 FROM tab0 cor0
----
14849
167
3654

query I rowsort
SELECT - 40 + + col0 * + col1 FROM tab2 AS cor0
----
1303
177
4562

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * 7 * cor0.col2 col1 FROM tab1 cor0
----
-1134
-25536
-53760

query I rowsort
SELECT - 80 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT - ( 75 + - col0 ) * + col2 FROM tab2
----
-1836
152
78

query I rowsort
SELECT + + ( - col1 ) + + col2 FROM tab1 cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - cor0.col0 + col0 col1 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9369
SELECT - CAST( col1 AS SIGNED ) DIV + col0 + + col2 AS col0 FROM tab2 AS cor0
----
23
26
38

skipif mysql # not compatible
query I rowsort label-9369
SELECT - CAST ( col1 AS INTEGER ) / + col0 + + col2 AS col0 FROM tab2 AS cor0
----
23
26
38

query I rowsort
SELECT - 36 * 48 FROM tab2 AS cor0
----
-1728
-1728
-1728

query I rowsort
SELECT DISTINCT - col2 * col1 * - col2 + col2 + col2 AS col2 FROM tab2 AS cor0
----
22653
24624
39936

query I rowsort
SELECT ALL 22 * + cor0.col0 FROM tab2 AS cor0
----
154
1716
1738

onlyif mysql # use DIV operator for integer division
query I rowsort label-9373
SELECT - ( - cor0.col0 ) * col2 DIV + cor0.col0 + cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
195
205
264

skipif mysql # not compatible
query I rowsort label-9373
SELECT - ( - cor0.col0 ) * col2 / + cor0.col0 + cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
195
205
264

query I rowsort
SELECT ALL + cor0.col2 * - col1 + + col0 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT - + 55 * - cor0.col2 * + col0 FROM tab2 AS cor0
----
10395
111540
165110

query I rowsort
SELECT ALL - col0 * - col2 + + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT cor0.col2 * - col0 + - col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - + col0 + col0 + + col1 AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL + col0 + + col1 * col0 + col2 AS col0 FROM tab0
----
2121
3431
8270

query I rowsort
SELECT 28 + - 33 AS col1 FROM tab2
----
-5
-5
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9381
SELECT + col2 * col2 DIV col1 AS col0 FROM tab1
----
112
324
708

skipif mysql # not compatible
query I rowsort label-9381
SELECT + col2 * col2 / col1 AS col0 FROM tab1
----
112
324
708

query I rowsort
SELECT + ( + col2 ) * + col0 + + col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9383
SELECT ALL - 85 * col0 DIV + col0 + col1 AS col2 FROM tab2
----
-26
-54
-68

skipif mysql # not compatible
query I rowsort label-9383
SELECT ALL - 85 * col0 / + col0 + col1 AS col2 FROM tab2
----
-26
-54
-68

query I rowsort
SELECT ALL + ( 4 ) + col2 + - col1 AS col2 FROM tab2
----
-29
0
25

query I rowsort
SELECT DISTINCT + col2 - ( + 97 ) FROM tab1 cor0
----
-1
-40
-43

onlyif mysql # use DIV operator for integer division
query I rowsort label-9386
SELECT DISTINCT - cor0.col2 DIV col1 col2 FROM tab1 AS cor0
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9386
SELECT DISTINCT - cor0.col2 / col1 col2 FROM tab1 AS cor0
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( - col0 ) col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col2 * 95 FROM tab0 AS cor0
----
-3135
-7790
-95

query I rowsort
SELECT DISTINCT - - col2 + + col1 * - 55 FROM tab0 AS cor0
----
-4697
-4923
-5334

query I rowsort
SELECT - - col2 + - ( - col1 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + col2 * col1 + + 97 FROM tab1 cor0
----
-1151
-1307
-473

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * - 69 col1 FROM tab2 AS cor0
----
1173
2139
4071

onlyif mysql # use DIV operator for integer division
query I rowsort label-9393
SELECT ALL col2 + - ( col1 ) DIV + col2 FROM tab0 AS cor0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-9393
SELECT ALL col2 + - ( col1 ) / + col2 FROM tab0 AS cor0
----
-96
31
81

query I rowsort
SELECT + - col0 + + 78 * col1 AS col2 FROM tab1 AS cor0
----
2025
716
934

query I rowsort
SELECT + ( col0 ) + + col2 AS col1 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9396
SELECT 96 * - col1 + ( col1 ) DIV - tab1.col1 col2 FROM tab1
----
-1249
-2497
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9396
SELECT 96 * - col1 + ( col1 ) / - tab1.col1 col2 FROM tab1
----
-1249
-2497
-961

query I rowsort
SELECT - col2 - col1 AS col2 FROM tab1
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 col2 FROM tab0, tab2, tab2 AS cor0
----
52

query I rowsort
SELECT ALL cor0.col0 + - cor0.col1 * 62 AS col0 FROM tab1 AS cor0
----
-1609
-556
-726

query I rowsort
SELECT - col2 - 87 FROM tab2 AS cor0
----
-113
-114
-125

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9401
SELECT - CAST( NULL AS SIGNED ) + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9401
SELECT - CAST ( NULL AS INTEGER ) + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + + col1 + + col0 FROM tab1
----
106
55
84

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL + cor0.col1 + 2 FROM tab2 cor0
----
19
33
61

query I rowsort
SELECT DISTINCT - col1 + - col0 * ( + col2 * + col2 ) AS col2 FROM tab0 AS cor0
----
-132
-26222
-598527

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9406
SELECT DISTINCT col2 + + CAST( NULL AS SIGNED ) + + 47 AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9406
SELECT DISTINCT col2 + + CAST ( NULL AS INTEGER ) + + 47 AS col1 FROM tab1 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9407
SELECT ALL col0 - col2 DIV col2 AS col1 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-9407
SELECT ALL col0 - col2 / col2 AS col1 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT col0 + col0 * ( col1 ) FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL col2 * ( - col2 ) AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - + col1 * ( - col1 ) + col1 + - ( 90 ) * + col2 FROM tab0 AS cor0
----
4512
9416
992

query I rowsort
SELECT - col0 * cor0.col2 AS col1 FROM tab0 cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 col0 FROM tab0, tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col0 * - col0 * col1 AS col2 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT - - 67 + - col1 AS col1 FROM tab2 AS cor0
----
36
50
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9415
SELECT - col2 + + col0 DIV 18 AS col2 FROM tab0 AS cor0
----
-32
-78
0

skipif mysql # not compatible
query I rowsort label-9415
SELECT - col2 + + col0 / 18 AS col2 FROM tab0 AS cor0
----
-32
-78
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9416
SELECT 13 * col1 DIV ( col1 ) FROM tab0
----
13
13
13

skipif mysql # not compatible
query I rowsort label-9416
SELECT 13 * col1 / ( col1 ) FROM tab0
----
13
13
13

query I rowsort
SELECT col1 * + cor0.col0 + + 40 + col1 * col2 AS col0 FROM tab1 AS cor0
----
1250
1522
2328

query I rowsort
SELECT - - col2 * - cor0.col2 + 62 AS col1 FROM tab1 AS cor0
----
-2854
-3187
-9154

query I rowsort
SELECT - - col1 * col1 + - 67 * - cor0.col1 FROM tab2 AS cor0
----
1428
3038
7434

query I rowsort
SELECT col2 + - ( col0 ) * - cor0.col0 AS col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT col0 + col2 * 83 FROM tab0 AS cor0
----
118
2763
6895

onlyif mysql # use DIV operator for integer division
query I rowsort label-9422
SELECT - col2 DIV 64 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9422
SELECT - col2 / 64 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT + - 73 * + col0 FROM tab0 AS cor0
----
-1752
-2555
-6497

query I rowsort
SELECT - + 73 + col0 FROM tab1 AS cor0
----
-70
-9
7

query I rowsort
SELECT - cor0.col0 * + cor0.col0 * + col1 FROM tab0 cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + - col2 * col2 + col1 AS col0 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT ALL 73 * + col2 - - col0 AS col1 FROM tab1 AS cor0
----
3945
4225
7088

query I rowsort
SELECT ALL - - 89 * + col0 + col0 + - cor0.col2 FROM tab2 AS cor0
----
603
6994
7072

query I rowsort
SELECT - cor0.col1 * 72 FROM tab0 AS cor0
----
-6192
-6552
-6984

query I rowsort
SELECT - 33 * + col2 FROM tab1 AS cor0
----
-1782
-1881
-3168

query I rowsort
SELECT ALL - cor0.col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 60 col2 FROM tab0
----
-5160
-5460
-5820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9433
SELECT + - ( - col0 ) + CAST( + 69 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
133
149
72

skipif mysql # not compatible
query I rowsort label-9433
SELECT + - ( - col0 ) + CAST ( + 69 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
133
149
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9434
SELECT ( - col0 ) + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9434
SELECT ( - col0 ) + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 14 + + col0 FROM tab1 AS cor0
----
-11
50
66

query I rowsort
SELECT DISTINCT + - 41 * col2 FROM tab2 AS cor0
----
-1066
-1107
-1558

query I rowsort
SELECT ALL + col1 - - col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + + 63 + - col0 AS col0 FROM tab1 AS cor0
----
-1
-17
60

query I rowsort
SELECT ALL - 13 * col1 AS col0 FROM tab2 AS cor0
----
-221
-403
-767

query I rowsort
SELECT DISTINCT + 66 * + col2 FROM tab2 AS cor0
----
1716
1782
2508

query I rowsort
SELECT ALL col0 * 44 + + col0 FROM tab2 AS cor0
----
315
3510
3555

onlyif mysql # use DIV operator for integer division
query I rowsort label-9442
SELECT - col0 + ( col1 ) DIV col0 AS col2 FROM tab2 AS cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-9442
SELECT - col0 + ( col1 ) / col0 AS col2 FROM tab2 AS cor0
----
-3
-78
-79

query I rowsort
SELECT - col0 * - col2 + col1 * - col1 FROM tab0 AS cor0
----
-6604
-9374
-983

query I rowsort
SELECT ALL + - cor0.col1 + + cor0.col2 * + col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT cor0.col1 * 52 FROM tab2, tab1 AS cor0
----
9 values hashing to 5815344d6dd7d359c39dd31c17068f18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col0 col1 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9447
SELECT ALL - CAST( - col2 AS SIGNED ) * col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-9447
SELECT ALL - CAST ( - col2 AS INTEGER ) * col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - + col1 + 54 FROM tab1 AS cor0
----
28
41
44

query I rowsort
SELECT ALL + - col2 + - cor0.col1 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT + 32 + + tab0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8fd193734e6aba211ae1ddd5240b946d

query I rowsort
SELECT + + 66 AS col1 FROM tab2 cor0
----
66
66
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-9453
SELECT DISTINCT col1 DIV + col1 + + col1 DIV - 20 FROM tab0
----
-3

skipif mysql # not compatible
query I rowsort label-9453
SELECT DISTINCT col1 / + col1 + + col1 / - 20 FROM tab0
----
-3

query I rowsort
SELECT - 89 * + col0 - col1 FROM tab0
----
-2222
-3212
-8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-9455
SELECT + + col2 + col2 DIV - col1 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-9455
SELECT + + col2 + col2 / - col1 FROM tab2 AS cor0
----
26
27
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-9456
SELECT ALL - + ( col2 ) + cor0.col1 DIV + col0 AS col0 FROM tab0 AS cor0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-9456
SELECT ALL - + ( col2 ) + cor0.col1 / + col0 AS col0 FROM tab0 AS cor0
----
-30
-81
1

query I rowsort
SELECT col0 * cor0.col2 * cor0.col0 + - 15 AS col2 FROM tab2 cor0
----
1308
158169
237143

onlyif mysql # use DIV operator for integer division
query I rowsort label-9458
SELECT ALL - 80 DIV col1 + col0 col2 FROM tab2 AS cor0
----
5
75
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9458
SELECT ALL - 80 / col1 + col0 col2 FROM tab2 AS cor0
----
5
75
77

query I rowsort
SELECT col0 - - cor0.col0 FROM tab1 cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9460
SELECT ALL - 90 DIV col2 + + cor0.col1 AS col0 FROM tab0 cor0
----
7
84
90

skipif mysql # not compatible
query I rowsort label-9460
SELECT ALL - 90 / col2 + + cor0.col1 AS col0 FROM tab0 cor0
----
7
84
90

query I rowsort
SELECT + 69 + - 30 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT - 42 + - col0 AS col2 FROM tab2 AS cor0
----
-120
-121
-49

query I rowsort
SELECT + 7 * col1 + + cor0.col1 FROM tab1 AS cor0
----
104
208
80

query I rowsort
SELECT DISTINCT ( + 40 ) * + col0 AS col0 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT ALL - - 1 + col1 AS col0 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT DISTINCT + + ( 68 ) + + col1 * ( col1 ) FROM tab2 AS cor0
----
1029
3549
357

onlyif mysql # use DIV operator for integer division
query I rowsort label-9467
SELECT - col0 DIV col0 - + col0 * cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
-262145
-28
-512001

skipif mysql # not compatible
query I rowsort label-9467
SELECT - col0 / col0 - + col0 * cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
-262145
-28
-512001

query I rowsort
SELECT DISTINCT - + col1 * 6 + + cor0.col0 * 36 FROM tab2 AS cor0
----
2454
2742
66

query I rowsort
SELECT ALL ( - 89 ) AS col2 FROM tab2 cor0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab1, tab2 AS cor0
----
73

query I rowsort
SELECT + - col0 * col0 + - col0 AS col2 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT + - col0 * - col0 + + col1 AS col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL + 72 * 2 FROM tab0
----
144
144
144

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

query I rowsort
SELECT DISTINCT + - col0 + col1 + col2 AS col0 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT - - cor0.col1 * col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 * + ( - cor0.col1 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - col2 + col0 * - col1 * col1 + + col1 AS col0 FROM tab1 AS cor0
----
-13411
-1948
-6333

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * - col0 col2 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort
SELECT - + cor0.col1 * + CAST ( + 74 AS REAL ) FROM tab2 AS cor0
----
-1258
-2294
-4366

query I rowsort
SELECT DISTINCT + - col0 * ( col0 ) + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL + col0 * - tab1.col2 + col2 AS col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT ALL - 39 FROM tab0, tab0 AS cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT DISTINCT - 18 FROM tab2, tab1 AS cor0
----
-18

onlyif mysql # use DIV operator for integer division
query I rowsort label-9485
SELECT col0 DIV - ( ( col0 ) ) AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9485
SELECT col0 / - ( ( col0 ) ) AS col2 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + ( col0 ) col1 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - cor0.col2 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor1.col1 + + cor2.col0 + + cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab2 cor2
----
27 values hashing to 8eb6a34f609f7180619603f7766b23a6

query I rowsort
SELECT + col2 * + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL 9 AS col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab2 AS cor3
----
243 values hashing to e956d3f80eb399afdf802a25fe175be7

skipif mysql # not compatible
query I rowsort
SELECT - + CAST ( col1 AS REAL ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + ( 72 ) * + col1 AS col2 FROM tab2 AS cor0
----
1224
2232
4248

onlyif mysql # use DIV operator for integer division
query I rowsort label-9494
SELECT 66 * + cor0.col2 + col0 DIV col0 AS col1 FROM tab0 AS cor0
----
2179
5413
67

skipif mysql # not compatible
query I rowsort label-9494
SELECT 66 * + cor0.col2 + col0 / col0 AS col1 FROM tab0 AS cor0
----
2179
5413
67

query I rowsort
SELECT col2 * 35 * + col1 + 56 FROM tab2 AS cor0
----
22666
29351
53746

query I rowsort
SELECT DISTINCT - col0 + 31 AS col0 FROM tab1 AS cor0
----
-33
-49
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 * - col0 col1 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ( + col0 ) * col0 + - col2 AS col2 FROM tab1
----
-45
4039
6304

query I rowsort
SELECT 30 + col0 AS col1 FROM tab0
----
119
54
65

query I rowsort
SELECT + col1 * col1 + 62 AS col2 FROM tab0 AS cor0
----
7458
8343
9471

query I rowsort
SELECT - 60 + col1 AS col1 FROM tab2 AS cor0
----
-1
-29
-43

query I rowsort
SELECT ALL - 91 AS col0 FROM tab0 AS cor0
----
-91
-91
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 + col0 col2 FROM tab0 AS cor0
----
107
42
53

query I rowsort
SELECT DISTINCT + cor0.col1 + - col1 * col2 + + 14 FROM tab2 AS cor0
----
-1461
-615
-792

query I rowsort
SELECT col0 * + col2 + col2 * + 49 FROM tab1 AS cor0
----
12384
2808
6441

query I rowsort
SELECT DISTINCT + - col2 + - col1 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
2805
7380
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * ( + col2 ) col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9508
SELECT cor0.col2 DIV col0 AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-9508
SELECT cor0.col2 / col0 AS col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT col2 * 21 FROM tab1 cor0
----
1134
1197
2016

query I rowsort
SELECT ALL - - col0 * - ( col1 ) AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-9511
SELECT DISTINCT - col1 * col0 DIV + col0 col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9511
SELECT DISTINCT - col1 * col0 / + col0 col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 56 col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
56

query I rowsort
SELECT 2 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT - ( col0 ) + + 40 FROM tab1 AS cor0
----
-24
-40
37

query I rowsort
SELECT tab1.col1 * ( 56 ) FROM tab1
----
1456
560
728

query I rowsort
SELECT - col2 * ( - col0 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT 55 * - col1 - + col0 FROM tab2
----
-1014
-1712
-3323

query I rowsort
SELECT + ( col1 * + tab0.col2 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT - - ( - cor0.col1 ) AS col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ( 53 ) AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9521
SELECT col1 + cor0.col1 DIV + col0 AS col0 FROM tab2 cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-9521
SELECT col1 + cor0.col1 / + col0 AS col0 FROM tab2 cor0
----
17
35
59

query I rowsort
SELECT cor0.col0 + + tab1.col1 + 83 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 17511e06a57af03ee79fa4f002711e08

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + tab1.col0 col0 FROM tab1
----
29
74
93

query I rowsort
SELECT + - 86 * col1 AS col0 FROM tab0 AS cor0
----
-7396
-7826
-8342

query I rowsort
SELECT ALL - 75 + col2 * - 95 AS col2 FROM tab1 AS cor0
----
-5205
-5490
-9195

query I rowsort
SELECT ALL - + col1 + + col0 * 63 FROM tab2 cor0
----
410
4855
4960

query I rowsort
SELECT ALL 68 + - col0 FROM tab2 AS cor0
----
-10
-11
61

query I rowsort
SELECT ALL - col0 * col2 * - 1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 7 * + col1 col0 FROM tab1 cor0
----
-182
-70
-91

query I rowsort
SELECT + 53 * - col1 FROM tab2 AS cor0
----
-1643
-3127
-901

query I rowsort
SELECT + 87 * + col0 AS col0 FROM tab1 AS cor0
----
261
5568
6960

query I rowsort
SELECT DISTINCT - ( col2 ) * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 * + col2 col0 FROM tab1 cor0
----
1512
1596
2688

query I rowsort
SELECT DISTINCT - col1 * 76 + - 59 * col1 FROM tab1
----
-1350
-1755
-3510

query I rowsort
SELECT + col0 - - col1 * 72 FROM tab0 AS cor0
----
6216
6641
7019

query I rowsort
SELECT col1 - - 50 AS col2 FROM tab1 cor0
----
60
63
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9537
SELECT col2 * - CAST( NULL AS SIGNED ) * + col2 + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9537
SELECT col2 * - CAST ( NULL AS INTEGER ) * + col2 + col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + col2 + col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL + col2 * - ( - col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col2 * - 5 * - 99 + cor0.col0 FROM tab0 AS cor0
----
16359
40679
530

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 68 * + col2 col2 FROM tab1 AS cor0
----
3618
3819
6432

onlyif mysql # use DIV operator for integer division
query I rowsort label-9542
SELECT - col1 - - CAST( + ( - col2 ) AS SIGNED ) DIV col1 col2 FROM tab1 AS cor0
----
-15
-20
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9542
SELECT - col1 - - CAST ( + ( - col2 ) AS INTEGER ) / col1 col2 FROM tab1 AS cor0
----
-15
-20
-28

query I rowsort
SELECT - - col0 * 43 + col2 * - col2 FROM tab0 AS cor0
----
-2897
-57
1504

query I rowsort
SELECT DISTINCT + 7 + ( col0 ) FROM tab2 AS cor0
----
14
85
86

query I rowsort
SELECT DISTINCT + 55 FROM tab2, tab0 AS cor0
----
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-9546
SELECT + - CAST( + 89 AS SIGNED ) + + col2 * col0 DIV + col1 AS col1 FROM tab1 AS cor0
----
-83
275
501

skipif mysql # not compatible
query I rowsort label-9546
SELECT + - CAST ( + 89 AS INTEGER ) + + col2 * col0 / + col1 AS col1 FROM tab1 AS cor0
----
-83
275
501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col1 + col1 + - cor0.col0 col1 FROM tab0 AS cor0
----
-7334
-8279
-9347

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9548
SELECT - - CAST( NULL AS SIGNED ) + - col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9548
SELECT - - CAST ( NULL AS INTEGER ) + - col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( + col0 ) * - cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9550
SELECT ALL + ( col0 ) DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-9550
SELECT ALL + ( col0 ) / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT - 18 + + 9 * + col1 + + col0 FROM tab1 AS cor0
----
136
179
219

query I rowsort
SELECT DISTINCT col2 + - col0 * cor0.col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL 71 * col1 + + ( col1 ) * col2 FROM tab0
----
13923
6984
8944

query I rowsort
SELECT DISTINCT + 72 * - col1 AS col0 FROM tab0 cor0
----
-6192
-6552
-6984

query I rowsort
SELECT ALL - col1 * - col2 + col1 * + 21 FROM tab0 AS cor0
----
2134
4644
9373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9556
SELECT - col1 + cor0.col0 * CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9556
SELECT - col1 + cor0.col0 * CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 * col0 + + col2 * + 31 FROM tab0 cor0
----
10641
3087
3426

query I rowsort
SELECT ALL - - col1 + + cor0.col0 * 71 AS col0 FROM tab2 AS cor0
----
528
5597
5626

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9559
SELECT DISTINCT + - col1 + + col1 / CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9559
SELECT DISTINCT + - col1 + + col1 / CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + col1 + + col0 * 32 * col2 AS col1 FROM tab1 AS cor0
----
116746
245773
5210

query I rowsort
SELECT ALL - 18 + col1 FROM tab0 cor0
----
68
73
79

query I rowsort
SELECT ALL + col1 + + ( 95 ) * - col0 AS col2 FROM tab2 AS cor0
----
-634
-7351
-7488

query I rowsort
SELECT ALL - - col0 + 56 * + col1 FROM tab0 cor0
----
4840
5185
5467

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col0 + col0 * col2 col1 FROM tab0 AS cor0
----
1260
1368
15219

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9565
SELECT DISTINCT + - col0 + - CAST( col0 AS SIGNED ) * col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

skipif mysql # not compatible
query I rowsort label-9565
SELECT DISTINCT + - col0 + - CAST ( col0 AS INTEGER ) * col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-9566
SELECT ALL - - col0 DIV 9 FROM tab0 AS cor0
----
2
3
9

skipif mysql # not compatible
query I rowsort label-9566
SELECT ALL - - col0 / 9 FROM tab0 AS cor0
----
2
3
9

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 WHERE NOT NULL < ( NULL )
----

query I rowsort
SELECT - col1 * + col1 - - ( - 86 ) AS col2 FROM tab2
----
-1047
-3567
-375

query I rowsort
SELECT ALL 67 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT - + col2 * + col1 + 68 AS col0 FROM tab2 AS cor0
----
-1466
-578
-769

query I rowsort
SELECT DISTINCT - cor0.col2 * + 29 FROM tab0 AS cor0
----
-2378
-29
-957

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - + 1 * - col1 - - col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + 84 * - col1 + + col0 AS col1 FROM tab0 AS cor0
----
-7200
-7555
-8113

query I rowsort
SELECT DISTINCT ( + col0 ) + col0 * + 35 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT 22 * cor0.col2 + - col0 FROM tab1 AS cor0
----
1185
1190
2032

query I rowsort
SELECT DISTINCT + - col0 * 62 FROM tab1 cor0
----
-186
-3968
-4960

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab2 cor0
----
-30

query I rowsort
SELECT + + 48 * 16 + - col2 * ( + ( - col0 ) ) * 2 FROM tab1 AS cor0
----
1092
16128
8064

query I rowsort
SELECT ALL ( tab1.col0 ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + 48 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9582
SELECT 76 DIV cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9582
SELECT 76 / cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 * - col0 + + ( + col2 ) * col2 col1 FROM tab2 AS cor0
----
-1352
-1558
540

query I rowsort
SELECT DISTINCT - 79 AS col1 FROM tab0 cor0
----
-79

query I rowsort
SELECT + + col0 * col0 + + ( col1 ) FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT - tab0.col0 * + col0 * + col2 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT - ( - col1 ) * 76 FROM tab1 AS cor0
----
1976
760
988

query I rowsort
SELECT + - col1 + col2 * 11 AS col1 FROM tab2 AS cor0
----
227
266
401

query I rowsort
SELECT 53 * - col0 AS col2 FROM tab2 cor0
----
-371
-4134
-4187

query I rowsort
SELECT ALL - cor0.col2 + + 54 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 2a1effc37e4d8799ef44a531eb01a984

query I rowsort
SELECT + 66 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

query I rowsort
SELECT ALL 52 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

query I rowsort
SELECT + ( + col0 ) + ( col2 + col2 * + 50 ) FROM tab1
----
2757
2971
4976

query I rowsort
SELECT ALL - - col1 - + col2 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT cor0.col0 + - cor0.col1 AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to cd2ed0f8f28bdf79fb96cc708de5c5ff

query I rowsort
SELECT ALL - col2 * - 86 + - 57 FROM tab0
----
2781
29
6995

query I rowsort
SELECT ALL + col2 + + col1 + col0 * col0 FROM tab0
----
1323
695
8094

query I rowsort
SELECT ALL - col0 * - ( col1 ) * col2 + ( - col1 ) FROM tab1
----
36470
4186
99827

query I rowsort
SELECT ALL col2 + + ( tab1.col2 * + tab1.col2 ) AS col0 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT - + col1 * + 48 + + col2 + - col0 FROM tab1 AS cor0
----
-1197
-487
-608

onlyif mysql # use DIV operator for integer division
query I rowsort label-9601
SELECT DISTINCT col2 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-9601
SELECT DISTINCT col2 / col1 col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9602
SELECT DISTINCT - + col2 DIV 69 AS col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9602
SELECT DISTINCT - + col2 / 69 AS col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT col2 + - col2 * - ( + col0 ) AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT col0 + - col0 + - 40 AS col0 FROM tab0 AS cor0
----
-40
-40
-40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9605
SELECT ALL + col2 * - CAST( + col2 AS SIGNED ) + col2 * tab1.col1 + col0 * col0 FROM tab1
----
-1503
-1568
1417

skipif mysql # not compatible
query I rowsort label-9605
SELECT ALL + col2 * - CAST ( + col2 AS INTEGER ) + col2 * tab1.col1 + col0 * col0 FROM tab1
----
-1503
-1568
1417

query I rowsort
SELECT DISTINCT + col2 * ( - ( col1 ) + ( - tab2.col1 ) ) * col2 FROM tab2
----
-45198
-49096
-79768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 9 + + 73 + col1 col0 FROM tab2 cor0
----
123
81
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( col0 ) + col2 col0 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-9609
SELECT - - col0 + - 88 DIV + col2 AS col1 FROM tab1 cor0
----
2
63
80

skipif mysql # not compatible
query I rowsort label-9609
SELECT - - col0 + - 88 / + col2 AS col1 FROM tab1 cor0
----
2
63
80

query I rowsort
SELECT + cor0.col0 + col2 * + col1 + + 64 AS col2 FROM tab1 AS cor0
----
1392
1471
698

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-9612
SELECT cor0.col2 * col2 * col0 + 87 DIV cor0.col0 FROM tab0 AS cor0
----
26139
37
598436

skipif mysql # not compatible
query I rowsort label-9612
SELECT cor0.col2 * col2 * col0 + 87 / cor0.col0 FROM tab0 AS cor0
----
26139
37
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9613
SELECT - CAST( NULL AS SIGNED ) / 11 + col0 + + 47 * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9613
SELECT - CAST ( NULL AS INTEGER ) / 11 + col0 + + 47 * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 9 * + cor0.col0 FROM tab1 cor0
----
-27
-576
-720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 13 * + tab0.col1 col1 FROM tab0
----
-107653
-122317
-96148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * 86 + + col0 col0 FROM tab0 AS cor0
----
-2040
-2975
-7565

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 * + col0 * col0 col1 FROM tab0 AS cor0
----
30528
419813
64925

query I rowsort
SELECT DISTINCT - 6 + col0 AS col2 FROM tab0 cor0
----
18
29
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9619
SELECT ALL + - 61 DIV + ( - col2 ) + - CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
25
89
96

skipif mysql # not compatible
query I rowsort label-9619
SELECT ALL + - 61 / + ( - col2 ) + - CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
25
89
96

query I rowsort
SELECT DISTINCT - cor0.col2 + + col1 + - col2 * + 9 AS col0 FROM tab1 AS cor0
----
-514
-560
-947

onlyif mysql # use DIV operator for integer division
query I rowsort label-9621
SELECT + col0 DIV 30 FROM tab2 cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-9621
SELECT + col0 / 30 FROM tab2 cor0
----
0
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9622
SELECT + + 50 DIV + col1 AS col1 FROM tab2 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9622
SELECT + + 50 / + col1 AS col1 FROM tab2 cor0
----
0
1
2

query I rowsort
SELECT ALL - col1 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT + - col1 + col0 + col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - + col2 * cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT col1 * col0 + - col0 * col1 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
-115050
-49691
-5642

query I rowsort
SELECT - 33 AS col1 FROM tab2 cor0
----
-33
-33
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-9628
SELECT - col1 DIV + col1 + - ( - col1 * col0 ) AS col0 FROM tab1 AS cor0
----
1039
639
77

skipif mysql # not compatible
query I rowsort label-9628
SELECT - col1 / + col1 + - ( - col1 * col0 ) AS col0 FROM tab1 AS cor0
----
1039
639
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 89 * - tab2.col1 + + col2 * + 4 * 83 col1 FROM tab2
----
11103
3381
6205

onlyif mysql # use DIV operator for integer division
query I rowsort label-9630
SELECT ALL - col2 DIV - col1 + 4 FROM tab2 AS cor0
----
4
4
6

skipif mysql # not compatible
query I rowsort label-9630
SELECT ALL - col2 / - col1 + 4 FROM tab2 AS cor0
----
4
4
6

query I rowsort
SELECT - 31 AS col2 FROM tab2
----
-31
-31
-31

query I rowsort
SELECT - col1 * cor0.col1 + + col1 AS col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT ALL - col0 + 4 * col1 AS col0 FROM tab2 AS cor0
----
-11
117
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 * + col0 col2 FROM tab1
----
261
5568
6960

query I rowsort
SELECT DISTINCT - 3 * tab0.col0 FROM tab0
----
-105
-267
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9636
SELECT DISTINCT + col0 + CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9636
SELECT DISTINCT + col0 + CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col2 - 2 FROM tab1 AS cor0
----
52
55
94

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 - - cor0.col0 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9639
SELECT - - col1 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9639
SELECT - - col1 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 - + col1 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9641
SELECT 45 DIV + col0 - - col1 FROM tab1
----
10
13
41

skipif mysql # not compatible
query I rowsort label-9641
SELECT 45 / + col0 - - col1 FROM tab1
----
10
13
41

query I rowsort
SELECT ALL + tab1.col0 - - col1 * - 28 AS col0 FROM tab1
----
-216
-284
-725

query I rowsort
SELECT DISTINCT ( 1 ) * cor0.col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
17
31
59

query I rowsort
SELECT ALL - 18 - col2 AS col1 FROM tab1
----
-114
-72
-75

query I rowsort
SELECT + col0 * tab2.col2 + + 94 + - col0 FROM tab2
----
2044
276
3017

onlyif mysql # use DIV operator for integer division
query I rowsort label-9646
SELECT DISTINCT col2 DIV + col2 + + ( col1 ) * - CAST( col2 AS SIGNED ) FROM tab1
----
-1247
-1403
-569

skipif mysql # not compatible
query I rowsort label-9646
SELECT DISTINCT col2 / + col2 + + ( col1 ) * - CAST ( col2 AS INTEGER ) FROM tab1
----
-1247
-1403
-569

query I rowsort
SELECT 60 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 1ef27a1d2784b3ab642571630db70349

onlyif mysql # use DIV operator for integer division
query I rowsort label-9648
SELECT DISTINCT col2 + ( 12 ) * col0 DIV 6 FROM tab1
----
185
256
60

skipif mysql # not compatible
query I rowsort label-9648
SELECT DISTINCT col2 + ( 12 ) * col0 / 6 FROM tab1
----
185
256
60

query I rowsort
SELECT + col2 * - col0 * + col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT - + col2 * + cor0.col1 + - col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL - col0 * ( col0 * + col0 ) FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT ALL - cor0.col2 * + 67 + + 57 FROM tab2 AS cor0
----
-1685
-1752
-2489

query I rowsort
SELECT col0 * ( col2 ) + + col2 * 75 + col2 FROM tab2 AS cor0
----
2241
4004
5890

query I rowsort
SELECT + col0 * - 56 FROM tab0 AS cor0
----
-1344
-1960
-4984

query I rowsort
SELECT ALL + 38 FROM tab2, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT - - 35 * col2 + ( col0 ) * - col1 AS col2 FROM tab1 AS cor0
----
1355
1812
2320

query I rowsort
SELECT ALL 61 + + col2 FROM tab1
----
115
118
157

query I rowsort
SELECT - col0 * col0 + - ( cor0.col2 ) * - col2 - ( col2 ) * col0 FROM tab1 AS cor0
----
-4495
-4864
2745

query I rowsort
SELECT ALL - col0 + - col0 AS col1 FROM tab0 cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-9660
SELECT + col0 * col0 + ( - col1 ) DIV col0 col1 FROM tab1 AS cor0
----
1
4096
6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9660
SELECT + col0 * col0 + ( - col1 ) / col0 col1 FROM tab1 AS cor0
----
1
4096
6400

query I rowsort
SELECT ALL + ( col1 ) * 65 AS col2 FROM tab0 cor0
----
5590
5915
6305

query I rowsort
SELECT ALL + 47 * + col0 AS col2 FROM tab1 AS cor0
----
141
3008
3760

query I rowsort
SELECT col1 * tab2.col1 + 52 AS col0 FROM tab2
----
1013
341
3533

onlyif mysql # use DIV operator for integer division
query I rowsort label-9664
SELECT DISTINCT col0 DIV 17 AS col1 FROM tab0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-9664
SELECT DISTINCT col0 / 17 AS col1 FROM tab0
----
1
2
5

query I rowsort
SELECT DISTINCT - tab0.col0 * - 92 FROM tab0
----
2208
3220
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-9666
SELECT ALL ( + col1 ) DIV col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9666
SELECT ALL ( + col1 ) / col1 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL col1 * col1 + col2 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT - 43 - - col2 * col0 * - col1 FROM tab0 AS cor0
----
-3438
-664161
-68155

query I rowsort
SELECT - + col2 + 72 FROM tab0 AS cor0
----
-10
39
71

query I rowsort
SELECT DISTINCT - - ( - ( + cor0.col0 ) ) - - col1 * col1 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT - + cor0.col0 + - ( + col1 ) * col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( - col1 ) * - col0 + 30 col0 FROM tab2 AS cor0
----
-1313
-187
-4572

query I rowsort
SELECT col1 * 60 + + col2 FROM tab2 AS cor0
----
1058
1887
3566

query I rowsort
SELECT DISTINCT col0 * + 25 AS col2 FROM tab0 AS cor0
----
2225
600
875

query I rowsort
SELECT - - col1 + col2 * col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL + cor0.col0 * 35 FROM tab2 cor0
----
245
2730
2765

onlyif mysql # use DIV operator for integer division
query I rowsort label-9677
SELECT ALL - + col1 * 44 DIV - col1 FROM tab2 AS cor0
----
44
44
44

skipif mysql # not compatible
query I rowsort label-9677
SELECT ALL - + col1 * 44 / - col1 FROM tab2 AS cor0
----
44
44
44

query I rowsort
SELECT DISTINCT col1 * col2 + col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT + col2 * - cor0.col0 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - col0 + cor0.col0 * - col1 + col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9681
SELECT - + col1 + col1 DIV col2 + col2 AS col0 FROM tab0 AS cor0
----
-51
-8
1

skipif mysql # not compatible
query I rowsort label-9681
SELECT - + col1 + col1 / col2 + col2 AS col0 FROM tab0 AS cor0
----
-51
-8
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9682
SELECT DISTINCT + col0 * col1 DIV cor0.col2 AS col2 FROM tab1 AS cor0
----
1
10
11

skipif mysql # not compatible
query I rowsort label-9682
SELECT DISTINCT + col0 * col1 / cor0.col2 AS col2 FROM tab1 AS cor0
----
1
10
11

query I rowsort
SELECT - 33 + - col2 + - col1 FROM tab0 AS cor0
----
-131
-152
-206

onlyif mysql # use DIV operator for integer division
query I rowsort label-9684
SELECT - 16 + - col0 DIV - 70 + col2 * - col1 FROM tab1 AS cor0
----
-1263
-1420
-586

skipif mysql # not compatible
query I rowsort label-9684
SELECT - 16 + - col0 / - 70 + col2 * - col1 FROM tab1 AS cor0
----
-1263
-1420
-586

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + - col2 col1 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9686
SELECT - 82 + + col1 * 5 + - ( + col1 ) * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9686
SELECT - 82 + + col1 * 5 + - ( + col1 ) * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 64 col0 FROM tab2 cor0
----
-1088
-1984
-3776

query I rowsort
SELECT - col2 * 87 FROM tab1 cor0
----
-4698
-4959
-8352

query I rowsort
SELECT DISTINCT - + cor0.col0 + 21 FROM tab0 AS cor0
----
-14
-3
-68

query I rowsort
SELECT + col1 * - ( - 56 ) + - col1 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT - col2 + col0 + col0 AS col0 FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT ALL col2 - cor0.col1 * + cor0.col0 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9693
SELECT DISTINCT cor0.col2 + CAST( NULL AS SIGNED ) * col0 * col1 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9693
SELECT DISTINCT cor0.col2 + CAST ( NULL AS INTEGER ) * col0 * col1 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 91 + col1 FROM tab1
----
101
104
117

query I rowsort
SELECT ALL + - col1 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - cor0.col1 * 7 AS col0 FROM tab1 AS cor0
----
-182
-70
-91

query I rowsort
SELECT DISTINCT - col1 * ( - cor0.col0 + col0 ) AS col2 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 + - 8 + + col1 col0 FROM tab0 AS cor0
----
-714
-7215
54

query I rowsort
SELECT - 5 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

onlyif mysql # use DIV operator for integer division
query I rowsort label-9700
SELECT + cor0.col1 DIV + 60 + + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9700
SELECT + cor0.col1 / + 60 + + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col1 + - 32 AS col2 FROM tab0 AS cor0
----
54
59
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - cor0.col1 + col1 col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + col2 + 92 FROM tab1 AS cor0
----
146
149
188

query I rowsort
SELECT - - col2 + + 97 FROM tab1 AS cor0
----
151
154
193

query I rowsort
SELECT col1 * cor0.col1 + + 61 FROM tab1 AS cor0
----
161
230
737

query I rowsort
SELECT col1 * - col2 + ( col1 ) * - col0 * col2 FROM tab0 cor0
----
-3492
-671580
-70950

query I rowsort
SELECT 96 * - col0 AS col2 FROM tab1 cor0
----
-288
-6144
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9708
SELECT ( + col0 ) DIV col0 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9708
SELECT ( + col0 ) / col0 AS col0 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9709
SELECT - col1 DIV col1 + cor0.col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-9709
SELECT - col1 / col1 + cor0.col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT - col2 + - col2 * + ( 88 ) * col0 FROM tab0 AS cor0
----
-3081
-642306
-69729

query I rowsort
SELECT ALL col1 + - col2 * + tab2.col0 * tab2.col1 AS col1 FROM tab2
----
-119593
-51017
-5828

query I rowsort
SELECT ALL 95 * tab1.col0 + col2 * + col1 FROM tab1
----
1689
6650
8848

query I rowsort
SELECT ALL + 84 * - tab0.col2 + 30 + - col1 AS col0 FROM tab0
----
-151
-2828
-6949

query I rowsort
SELECT ALL + col0 + col0 + tab1.col0 FROM tab1
----
192
240
9

query I rowsort
SELECT + + ( - col2 ) * ( 57 ) AS col2 FROM tab1 AS cor0
----
-3078
-3249
-5472

query I rowsort
SELECT + + 68 + col0 * - ( col1 ) + - col2 FROM tab1 AS cor0
----
-1068
-629
-64

query I rowsort
SELECT ALL ( + col1 ) * - ( - col1 ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 90 * - col2 FROM tab0
----
-2970
-7380
-90

query I rowsort
SELECT ALL 5 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT - 8 * - col1 FROM tab1 AS cor0
----
104
208
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9721
SELECT - col0 + col1 DIV col1 AS col0 FROM tab2 cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-9721
SELECT - col0 + col1 / col1 AS col0 FROM tab2 cor0
----
-6
-77
-78

query I rowsort
SELECT 16 + col2 AS col1 FROM tab2 AS cor0
----
42
43
54

query I rowsort
SELECT - ( + col2 ) + col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9724
SELECT - col0 DIV + ( col0 ) - ( col2 ) * col2 AS col1 FROM tab2
----
-1445
-677
-730

skipif mysql # not compatible
query I rowsort label-9724
SELECT - col0 / + ( col0 ) - ( col2 ) * col2 AS col1 FROM tab2
----
-1445
-677
-730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + + col1 * + col1 col2 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT - + 29 AS col1 FROM tab0 cor0
----
-29
-29
-29

query I rowsort
SELECT ALL - col1 + - col2 * col1 AS col2 FROM tab1
----
-1261
-1430
-580

onlyif mysql # use DIV operator for integer division
query I rowsort label-9728
SELECT - + 74 DIV col0 + 9 * col0 * col0 AS col0 FROM tab2 AS cor0
----
431
54756
56169

skipif mysql # not compatible
query I rowsort label-9728
SELECT - + 74 / col0 + 9 * col0 * col0 AS col0 FROM tab2 AS cor0
----
431
54756
56169

query I rowsort
SELECT DISTINCT - tab2.col1 - col2 * - col2 AS col1 FROM tab2
----
1427
617
698

onlyif mysql # use DIV operator for integer division
query I rowsort label-9730
SELECT col1 DIV - ( col0 ) FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9730
SELECT col1 / - ( col0 ) FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT 64 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9732
SELECT col0 / CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9732
SELECT col0 / CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * + 49 FROM tab1 AS cor0
----
147
3136
3920

query I rowsort
SELECT col1 * - col2 - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT + + col2 + + ( col0 ) * 19 * - col0 AS col1 FROM tab2 AS cor0
----
-115570
-118541
-904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9736
SELECT ALL - CAST( NULL AS SIGNED ) col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9736
SELECT ALL - CAST ( NULL AS INTEGER ) col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 + col1 * - col1 col1 FROM tab1 cor0
----
-130
-61
-637

query I rowsort
SELECT + - col1 + - col0 * - col2 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT - col2 * - col0 * - tab2.col0 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT ALL + ( - col2 ) * - col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9742
SELECT - col2 * - col2 + col2 DIV col1 FROM tab2 AS cor0
----
1446
676
729

skipif mysql # not compatible
query I rowsort label-9742
SELECT - col2 * - col2 + col2 / col1 FROM tab2 AS cor0
----
1446
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-9743
SELECT ALL - + col2 * + col2 DIV + col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-9743
SELECT ALL - + col2 * + col2 / + col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col1 + - ( + col1 ) * - ( + 1 ) FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - cor0.col1 + 3 AS col1 FROM tab1 AS cor0
----
-10
-23
-7

query I rowsort
SELECT ALL 88 + col0 * + col2 FROM tab1 cor0
----
250
3736
7768

query I rowsort
SELECT ALL - - 52 + + col2 FROM tab0 AS cor0
----
134
53
85

query I rowsort
SELECT DISTINCT + + 15 + - 67 AS col1 FROM tab1 AS cor0
----
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9749
SELECT ALL - CAST( col2 AS SIGNED ) * col0 + + ( col2 ) * - col2 AS col2 FROM tab0 AS cor0
----
-14022
-1881
-36

skipif mysql # not compatible
query I rowsort label-9749
SELECT ALL - CAST ( col2 AS INTEGER ) * col0 + + ( col2 ) * - col2 AS col2 FROM tab0 AS cor0
----
-14022
-1881
-36

query I rowsort
SELECT + 2 AS col2 FROM tab0
----
2
2
2

query I rowsort
SELECT DISTINCT - 53 + col0 * + tab2.col2 - + ( + col0 ) FROM tab2
----
129
1897
2870

onlyif mysql # use DIV operator for integer division
query I rowsort label-9752
SELECT DISTINCT ( + 51 ) DIV col0 + col1 * + col2 - - tab2.col2 FROM tab2
----
1560
684
871

skipif mysql # not compatible
query I rowsort label-9752
SELECT DISTINCT ( + 51 ) / col0 + col1 * + col2 - - tab2.col2 FROM tab2
----
1560
684
871

query I rowsort
SELECT col2 + col1 * cor0.col0 * - 26 FROM tab1 AS cor0
----
-16583
-1974
-26944

query I rowsort
SELECT ALL + 73 * col1 AS col1 FROM tab0 AS cor0
----
6278
6643
7081

onlyif mysql # use DIV operator for integer division
query I rowsort label-9755
SELECT + col0 + cor0.col2 + - cor0.col1 DIV - col0 AS col0 FROM tab0 AS cor0
----
172
38
60

skipif mysql # not compatible
query I rowsort label-9755
SELECT + col0 + cor0.col2 + - cor0.col1 / - col0 AS col0 FROM tab0 AS cor0
----
172
38
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 29 + col2 * col2 FROM tab1 AS cor0
----
2945
3278
9245

query I rowsort
SELECT DISTINCT - col0 * col0 * col1 + + col0 * - col1 AS col0 FROM tab1
----
-312
-41600
-84240

query I rowsort
SELECT - col1 * + col0 + + col1 AS col1 FROM tab1
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 - - col1 col1 FROM tab0
----
110
132
180

query I rowsort
SELECT + tab1.col2 + + col1 + + col1 AS col1 FROM tab1
----
106
122
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-9762
SELECT - col0 + 97 DIV col0 FROM tab1
----
-63
-79
29

skipif mysql # not compatible
query I rowsort label-9762
SELECT - col0 + 97 / col0 FROM tab1
----
-63
-79
29

query I rowsort
SELECT - 54 + ( - col2 ) + col1 * - col1 FROM tab0
----
-7483
-8417
-9464

query I rowsort
SELECT ( - col2 ) * col2 AS col0 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - col0 - col2 AS col2 FROM tab0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9766
SELECT DISTINCT cor0.col0 DIV col2 + + col2 * col1 + - col0 DIV cor0.col1 AS col1 FROM tab0 cor0
----
132
2838
7463

skipif mysql # not compatible
query I rowsort label-9766
SELECT DISTINCT cor0.col0 / col2 + + col2 * col1 + - col0 / cor0.col1 AS col1 FROM tab0 cor0
----
132
2838
7463

query I rowsort
SELECT ALL + col0 + - ( - cor0.col1 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + + col0 + ( + cor0.col0 * - col0 ) AS col1 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT col1 - 81 AS col2 FROM tab1 cor0
----
-55
-68
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9770
SELECT DISTINCT - + col0 * col0 DIV - col2 + + col0 AS col2 FROM tab0 AS cor0
----
1260
185
41

skipif mysql # not compatible
query I rowsort label-9770
SELECT DISTINCT - + col0 * col0 / - col2 + + col0 AS col2 FROM tab0 AS cor0
----
1260
185
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-9771
SELECT DISTINCT + + col2 DIV col2 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-9771
SELECT DISTINCT + + col2 / col2 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL - col0 + + col0 * 11 * col2 FROM tab0 cor0
----
350
80189
8688

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9773
SELECT ALL col2 * - CAST( col0 AS SIGNED ) + - cor0.col1 col0 FROM tab1 AS cor0
----
-188
-3658
-7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9773
SELECT ALL col2 * - CAST ( col0 AS INTEGER ) + - cor0.col1 col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT + - col0 * ( + cor0.col1 + col0 ) * - 58 AS col0 FROM tab1 AS cor0
----
274688
431520
5046

query I rowsort
SELECT ALL - 83 + + col0 FROM tab2
----
-4
-5
-76

query I rowsort
SELECT ALL col2 + - col2 * - col0 AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT ALL - 45 + - col2 FROM tab0
----
-127
-46
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 col1 FROM tab0
----
61
61
61

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 40a052eaf1d698dbf3ba319dc3e245ee

query I rowsort
SELECT ALL - col1 + col0 + cor0.col0 FROM tab2 AS cor0
----
-17
141
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9781
SELECT DISTINCT col1 - col0 DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-9781
SELECT DISTINCT col1 - col0 / - cor0.col0 AS col2 FROM tab2 AS cor0
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 35 * ( + col1 ) col2 FROM tab0 AS cor0
----
2986
3096
3360

onlyif mysql # use DIV operator for integer division
query I rowsort label-9783
SELECT ALL - - cor0.col2 * col0 + col0 DIV cor0.col0 col0 FROM tab0 AS cor0
----
36
7299
793

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9783
SELECT ALL - - cor0.col2 * col0 + col0 / cor0.col0 col0 FROM tab0 AS cor0
----
36
7299
793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * + cor0.col0 col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9785
SELECT ALL col0 * + CAST( NULL AS DECIMAL ) * + col0 + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9785
SELECT ALL col0 * + CAST ( NULL AS REAL ) * + col0 + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col0 * - 42 + col1 FROM tab0 AS cor0
----
-1373
-3647
-922

query I rowsort
SELECT - cor0.col1 + + 22 FROM tab1 AS cor0
----
-4
12
9

query I rowsort
SELECT + cor0.col0 + - cor0.col2 * col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT col1 * + ( + col0 ) AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + 91 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT + col0 + + col1 * - 2 AS col2 FROM tab2 AS cor0
----
-40
-55
45

query I rowsort
SELECT ALL + + col1 + ( - col2 ) FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + cor0.col2 * col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + ( col2 * col2 ) + col1 col1 FROM tab0 AS cor0
----
1142
6733
97

query I rowsort
SELECT ALL - 61 FROM tab0, tab2 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9796
SELECT col1 DIV - cor0.col0 + col1 * col2 FROM tab2 AS cor0
----
1534
646
833

skipif mysql # not compatible
query I rowsort label-9796
SELECT col1 / - cor0.col0 + col1 * col2 FROM tab2 AS cor0
----
1534
646
833

query I rowsort
SELECT ALL + cor0.col2 + + ( col0 + col1 ) * col0 FROM tab0 AS cor0
----
16102
2673
4621

query I rowsort
SELECT ALL col0 + col1 + tab1.col1 * - col0 FROM tab1
----
-49
-566
-947

onlyif mysql # use DIV operator for integer division
query I rowsort label-9799
SELECT DISTINCT - col2 DIV + tab0.col2 AS col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-9799
SELECT DISTINCT - col2 / + tab0.col2 AS col1 FROM tab0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9800
SELECT ALL tab2.col1 DIV col0 AS col1 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-9800
SELECT ALL tab2.col1 / col0 AS col1 FROM tab2
----
0
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9801
SELECT ALL - - col1 * + col2 - - CAST( - 6 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1528
640
831

skipif mysql # not compatible
query I rowsort label-9801
SELECT ALL - - col1 * + col2 - - CAST ( - 6 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1528
640
831

query I rowsort
SELECT + 87 * - col2 - 74 * + ( col1 ) FROM tab2 AS cor0
----
-4564
-4643
-6628

onlyif mysql # use DIV operator for integer division
query I rowsort label-9803
SELECT ALL col1 * col0 DIV col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9803
SELECT ALL col1 * col0 / col0 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9804
SELECT DISTINCT col0 + - col2 * + col1 DIV col1 + - col2 AS col0 FROM tab0
----
-42
-75
33

skipif mysql # not compatible
query I rowsort label-9804
SELECT DISTINCT col0 + - col2 * + col1 / col1 + - col2 AS col0 FROM tab0
----
-42
-75
33

query I rowsort
SELECT DISTINCT - col2 + col2 * + col2 - col1 * col0 AS col2 FROM tab1
----
2552
2784
8080

query I rowsort
SELECT DISTINCT col1 * + col2 * tab1.col1 FROM tab1
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-9807
SELECT tab0.col1 * + col0 DIV + col0 + + tab0.col0 + - col2 DIV col1 AS col0 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-9807
SELECT tab0.col1 * + col0 / + col0 + + tab0.col0 + - col2 / col1 AS col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - col1 col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - col2 * + col2 * col2 FROM tab0
----
-1
-35937
-551368

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL <> ( col2 )
----

query I rowsort
SELECT tab0.col0 * - col0 - col1 * + col2 FROM tab0
----
-1322
-15383
-3414

query I rowsort
SELECT col2 * col2 * + col0 AS col2 FROM tab0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-9813
SELECT DISTINCT - col0 DIV col1 + - col0 - col1 FROM tab0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-9813
SELECT DISTINCT - col0 / col1 + - col0 - col1 FROM tab0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-9814
SELECT col2 + col1 DIV + 43 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9814
SELECT col2 + col1 / + 43 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT col0 + + col1 + + col0 AS col2 FROM tab0
----
134
167
269

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 + 50 col0 FROM tab2 AS cor0
----
-139
-1978
-2952

query I rowsort
SELECT - - 18 * col1 + cor0.col2 FROM tab2 AS cor0
----
1088
344
585

query I rowsort
SELECT ALL 23 + - col0 AS col1 FROM tab2 AS cor0
----
-55
-56
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( col2 ) - col1 col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 64 col0 FROM tab0
----
-64

query I rowsort
SELECT + + 53 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT ALL 0 + + col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - - 74 + + col2 + cor0.col2 AS col0 FROM tab0 cor0
----
140
238
76

query I rowsort
SELECT ALL + 26 + - col1 AS col0 FROM tab2 AS cor0
----
-33
-5
9

query I rowsort
SELECT + col2 * - col2 + + col2 + 72 AS col2 FROM tab1 AS cor0
----
-2790
-3120
-9048

query I rowsort
SELECT ALL col1 * + col1 + + ( col0 * + col2 ) AS col1 FROM tab2 AS cor0
----
1150
3291
5509

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 70 + + col0 col2 FROM tab1 cor0
----
134
150
73

query I rowsort
SELECT DISTINCT - - ( - col2 ) + - col1 * 24 FROM tab0 AS cor0
----
-2097
-2266
-2329

query I rowsort
SELECT + cor0.col2 + + 13 FROM tab2 AS cor0
----
39
40
51

query I rowsort
SELECT col1 * 90 + 2 + - col0 AS col0 FROM tab2 AS cor0
----
1453
2785
5234

onlyif mysql # use DIV operator for integer division
query I rowsort label-9831
SELECT DISTINCT - col0 + col1 DIV col0 + col1 FROM tab0 cor0
----
3
64
65

skipif mysql # not compatible
query I rowsort label-9831
SELECT DISTINCT - col0 + col1 / col0 + col1 FROM tab0 cor0
----
3
64
65

query I rowsort
SELECT 53 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT col0 * - col0 + col1 FROM tab1 cor0
----
-4086
-6387
17

query I rowsort
SELECT + col1 + 28 * - col1 + - col0 FROM tab2 AS cor0
----
-1671
-538
-844

query I rowsort
SELECT 10 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ALL + 79 * 19 AS col0 FROM tab1
----
1501
1501
1501

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) + - col1 + col2 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + + 32 * - col0 + + col1 FROM tab2 AS cor0
----
-193
-2437
-2511

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - 73 - col2 col0 FROM tab0 cor0
----
-1785
-2556
-6579

query I rowsort
SELECT - col2 * + col2 - + ( col0 ) FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT - + 45 * - col0 FROM tab0 AS cor0
----
1080
1575
4005

onlyif mysql # use DIV operator for integer division
query I rowsort label-9842
SELECT DISTINCT - ( + col0 ) DIV col1 FROM tab1
----
-6
0

skipif mysql # not compatible
query I rowsort label-9842
SELECT DISTINCT - ( + col0 ) / col1 FROM tab1
----
-6
0

query I rowsort
SELECT - - col2 * col1 * 40 FROM tab0 AS cor0
----
113520
298480
3880

onlyif mysql # use DIV operator for integer division
query I rowsort label-9844
SELECT - col1 * cor0.col0 DIV 53 - col0 FROM tab1 cor0
----
-4
-76
-99

skipif mysql # not compatible
query I rowsort label-9844
SELECT - col1 * cor0.col0 / 53 - col0 FROM tab1 cor0
----
-4
-76
-99

query I rowsort
SELECT ALL - col0 + - col2 - col0 AS col1 FROM tab1 AS cor0
----
-185
-256
-60

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE NULL = + cor0.col2
----

query I rowsort
SELECT DISTINCT - 7 * col0 * + tab1.col2 AS col1 FROM tab1
----
-1134
-25536
-53760

query I rowsort
SELECT DISTINCT - - cor0.col2 * - cor0.col0 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - col2 + + col0 - - col0 FROM tab0
----
15
69
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9850
SELECT + col2 * - tab0.col1 DIV col1 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-9850
SELECT + col2 * - tab0.col1 / col1 FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - + col2 col0 FROM tab0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + tab0.col1 col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + col2 + col0 * col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9854
SELECT ALL col0 * col2 DIV - col0 + - col1 * col2 * col0 FROM tab2
----
-119678
-51072
-5886

skipif mysql # not compatible
query I rowsort label-9854
SELECT ALL col0 * col2 / - col0 + - col1 * col2 * col0 FROM tab2
----
-119678
-51072
-5886

query I rowsort
SELECT ALL col0 * + col2 + + col1 * + tab2.col1 * + col1 FROM tab2
----
207407
29980
7915

query I rowsort
SELECT DISTINCT 22 * col1 AS col2 FROM tab1
----
220
286
572

query I rowsort
SELECT - ( 52 * - col2 ) FROM tab0
----
1716
4264
52

query I rowsort
SELECT ALL + 59 * tab0.col1 FROM tab0
----
5074
5369
5723

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-9860
SELECT ALL col0 DIV 88 col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9860
SELECT ALL col0 / 88 col2 FROM tab1
----
0
0
0

query I rowsort
SELECT + 6 * - col0 AS col0 FROM tab2 AS cor0
----
-42
-468
-474

query I rowsort
SELECT + - col1 + + col0 * col0 * col0 FROM tab0 AS cor0
----
13738
42778
704878

onlyif mysql # use DIV operator for integer division
query I rowsort label-9863
SELECT + cor0.col0 DIV col0 col2 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9863
SELECT + cor0.col0 / col0 col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + col0 + col2 * col1 + col0 AS col2 FROM tab2
----
1690
804
851

query I rowsort
SELECT tab2.col2 - tab2.col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL col1 + tab1.col2 * - col2 FROM tab1
----
-2890
-3239
-9203

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) IN ( - tab2.col0 * + col2 )
----

query I rowsort
SELECT - col0 FROM tab1 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 AS cor0 WHERE col2 * col0 IN ( col2 * - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT col0 + col2 * - tab2.col2 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT ALL col1 + + col0 - + col0 FROM tab0 WHERE NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT - col2 + + col0 + col1 FROM tab0
----
131
77
98

query I rowsort
SELECT + col1 * col2 + + col1 + col1 FROM tab2
----
1652
680
899

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) NOT IN ( + col1 * + col2 )
----

query I rowsort
SELECT col2 AS col0 FROM tab2 WHERE NOT ( NULL ) BETWEEN col0 * col2 AND NULL
----

query I rowsort
SELECT col2 + col1 * - tab0.col2 AS col0 FROM tab0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - + col0 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col0 - col0 * tab2.col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT + col1 * cor0.col1 + + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - cor0.col0 * - cor0.col1 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - col1 * col1 + - cor0.col0 AS col2 FROM tab1 cor0
----
-164
-249
-679

onlyif mysql # use DIV operator for integer division
query I rowsort label-9883
SELECT col0 + - col2 DIV - col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9883
SELECT col0 + - col2 / - col2 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9884
SELECT ALL - col0 DIV col0 + + col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-9884
SELECT ALL - col0 / col0 + + col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL col2 * + col2 + - cor0.col0 * col0 * - col2 FROM tab0 AS cor0
----
1226
20097
656246

query I rowsort
SELECT ALL col2 + - col0 * col2 * col0 AS col0 FROM tab2 AS cor0
----
-1296
-158158
-237120

query I rowsort
SELECT DISTINCT + + col0 * col0 - col0 * - col2 * + col2 AS col1 FROM tab1 AS cor0
----
212032
743680
8757

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 / - col0 IN ( col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab1 AS cor0 WHERE NOT col2 BETWEEN col1 AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 WHERE col0 / + cor0.col2 NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col1 + - col0 * + col2 AS col0 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + col2 * - tab2.col0 + + col2 * col1 FROM tab2
----
-2356
-494
648

query I rowsort
SELECT DISTINCT tab2.col2 + col2 + + tab2.col1 * tab2.col2 AS col2 FROM tab2
----
1586
722
891

query I rowsort
SELECT DISTINCT + col1 + tab2.col1 * - col1 AS col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT - col1 + - col0 * - col2 * + col0 FROM tab0 cor0
----
1128
18922
649431

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9896
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col2 * + col0 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9896
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col2 * + col0 AS col0 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9897
SELECT DISTINCT CAST( - ( + col2 ) AS SIGNED ) DIV - 77 AS col0 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9897
SELECT DISTINCT CAST ( - ( + col2 ) AS INTEGER ) / - 77 AS col0 FROM tab1 cor0
----
0
1

query I rowsort
SELECT 74 + col1 FROM tab2 cor0
----
105
133
91

query I rowsort
SELECT ALL + 84 + - col0 FROM tab2 AS cor0
----
5
6
77

query I rowsort
SELECT + 75 * + 37 * col2 + col1 AS col2 FROM tab1 AS cor0
----
149876
158185
266413

query I rowsort
SELECT - col0 + cor0.col0 * 15 + + col2 AS col2 FROM tab0 cor0
----
1328
369
491

query I rowsort
SELECT ALL + ( - col2 ) - col2 * ( + col1 ) FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT + - 61 + + col0 AS col0 FROM tab2 cor0
----
-54
17
18

query I rowsort
SELECT + - 98 AS col1 FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT ALL + tab1.col1 * - col0 * tab1.col0 + + col1 * - 5 AS col1 FROM tab1
----
-364
-41010
-83265

query I rowsort
SELECT 39 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT ALL col1 + + col1 * + col2 AS col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT + 6 + 77 AS col0 FROM tab0
----
83

query I rowsort
SELECT 48 - + col2 FROM tab2
----
10
21
22

query I rowsort
SELECT + col1 + - col1 * - 93 * - 80 + col0 AS col2 FROM tab2 AS cor0
----
-126384
-230602
-438823

query I rowsort
SELECT DISTINCT + col1 * - col2 + - 42 AS col0 FROM tab0 AS cor0
----
-139
-2880
-7504

onlyif mysql # use DIV operator for integer division
query I rowsort label-9912
SELECT cor0.col2 + + 12 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9912
SELECT cor0.col2 + + 12 / cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col1 + 33 AS col2 FROM tab2 AS cor0
----
-26
16
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col2 + + 30 col0 FROM tab1 AS cor0
----
126
84
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-9915
SELECT ALL col0 + + ( - col1 ) DIV + col1 col2 FROM tab2 AS cor0
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9915
SELECT ALL col0 + + ( - col1 ) / + col1 col2 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT + col0 + - cor0.col1 * - 62 AS col1 FROM tab1 AS cor0
----
1615
684
886

onlyif mysql # use DIV operator for integer division
query I rowsort label-9917
SELECT + + col1 * col2 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
15
468
8

skipif mysql # not compatible
query I rowsort label-9917
SELECT + + col1 * col2 / cor0.col0 AS col2 FROM tab1 AS cor0
----
15
468
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9918
SELECT ALL - - col0 * CAST( - col2 AS SIGNED ) + - col2 AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

skipif mysql # not compatible
query I rowsort label-9918
SELECT ALL - - col0 * CAST ( - col2 AS INTEGER ) + - col2 AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT + 46 + col0 AS col2 FROM tab1
----
110
126
49

query I rowsort
SELECT DISTINCT tab2.col1 + col1 + + 26 AS col2 FROM tab2
----
144
60
88

query I rowsort
SELECT - col2 * + 11 AS col0 FROM tab2 AS cor0
----
-286
-297
-418

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9922
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) col0 FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9922
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT cor0.col1 * 61 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to ed0672ef97c138fe27694d55a920f8e8

query I rowsort
SELECT - 8 + + 30 * col2 FROM tab2 AS cor0
----
1132
772
802

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 * - col1 col1 FROM tab0 cor0
----
4988
5278
5626

query I rowsort
SELECT DISTINCT col1 * + 10 AS col0 FROM tab1
----
100
130
260

query I rowsort
SELECT ALL 76 AS col0 FROM tab0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 64 col0 FROM tab1
----
-64
-64
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-9929
SELECT DISTINCT - 77 DIV col2 AS col1 FROM tab0
----
-2
-77
0

skipif mysql # not compatible
query I rowsort label-9929
SELECT DISTINCT - 77 / col2 AS col1 FROM tab0
----
-2
-77
0

query I rowsort
SELECT 57 FROM tab0, tab2 cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9931
SELECT col0 DIV col2 + + col2 * col1 * col2 AS col2 FROM tab1 AS cor0
----
119808
32491
75816

skipif mysql # not compatible
query I rowsort label-9931
SELECT col0 / col2 + + col2 * col1 * col2 AS col2 FROM tab1 AS cor0
----
119808
32491
75816

query I rowsort
SELECT col0 * + 80 AS col2 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT - col0 * col0 * col2 AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT - col0 * + col1 - + col1 * 57 FROM tab0 AS cor0
----
-13286
-6966
-8924

query I rowsort
SELECT - 88 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT ALL - col2 + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT + 37 AS col2 FROM tab2, tab0 AS cor0
----
37

query I rowsort
SELECT DISTINCT - col0 * - 47 FROM tab0 AS cor0
----
1128
1645
4183

onlyif mysql # use DIV operator for integer division
query I rowsort label-9939
SELECT ALL - - cor0.col2 DIV col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9939
SELECT ALL - - cor0.col2 / col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + col2 * + 69 AS col2 FROM tab0 AS cor0
----
2277
5658
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9941
SELECT + col2 * CAST( col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-9941
SELECT + col2 * CAST ( col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9942
SELECT DISTINCT - cor0.col0 + + col1 DIV - col0 AS col1 FROM tab1 AS cor0
----
-11
-64
-80

skipif mysql # not compatible
query I rowsort label-9942
SELECT DISTINCT - cor0.col0 + + col1 / - col0 AS col1 FROM tab1 AS cor0
----
-11
-64
-80

query I rowsort
SELECT ALL - - 70 AS col2 FROM tab2 AS cor0
----
70
70
70

query I rowsort
SELECT ALL - + col1 + - col2 + col2 * - cor0.col1 FROM tab1 AS cor0
----
-1357
-1484
-637

query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 + + col0 * - col1 + + cor0.col2 FROM tab1 AS cor0
----
2666
2892
8272

query I rowsort
SELECT ALL 89 + col1 * + col2 FROM tab1 cor0
----
1337
1493
659

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 23 * + col2 * col1 col1 FROM tab2 AS cor0
----
-14858
-19251
-35282

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + col0 + - cor0.col2 col2 FROM tab2 AS cor0
----
-47
26
3

query I rowsort
SELECT DISTINCT + cor0.col1 * ( 63 ) FROM tab2 AS cor0
----
1071
1953
3717

onlyif mysql # use DIV operator for integer division
query I rowsort label-9950
SELECT ALL + + col1 DIV 36 AS col0 FROM tab0 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-9950
SELECT ALL + + col1 / 36 AS col0 FROM tab0 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT + col1 + + 82 FROM tab1 cor0
----
108
92
95

query I rowsort
SELECT ALL - + col1 + + col1 FROM tab2 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9953
SELECT - col1 / col1 + CAST( NULL AS SIGNED ) * col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9953
SELECT - col1 / col1 + CAST ( NULL AS INTEGER ) * col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col1 + col2 FROM tab1 cor0
----
-43
-622
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 + 86 col1 FROM tab1 AS cor0
----
141
141
141

query I rowsort
SELECT + col1 * - col2 + - col2 AS col1 FROM tab0 cor0
----
-2871
-7544
-98

query I rowsort
SELECT - 71 AS col0 FROM tab2 cor0
----
-71
-71
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9958
SELECT - cor0.col1 * + col0 + col1 DIV + cor0.col1 FROM tab1 AS cor0
----
-1039
-639
-77

skipif mysql # not compatible
query I rowsort label-9958
SELECT - cor0.col1 * + col0 + col1 / + cor0.col1 FROM tab1 AS cor0
----
-1039
-639
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9959
SELECT - CAST( NULL AS DECIMAL ) FROM tab1, tab1 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-9959
SELECT - CAST ( NULL AS REAL ) FROM tab1, tab1 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT + col1 + + 19 * - col1 AS col0 FROM tab1 cor0
----
-180
-234
-468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9961
SELECT ( col2 * + col0 + CAST( ( col0 ) AS SIGNED ) ) FROM tab2
----
196
2106
3081

skipif mysql # not compatible
query I rowsort label-9961
SELECT ( col2 * + col0 + CAST ( ( col0 ) AS INTEGER ) ) FROM tab2
----
196
2106
3081

query I rowsort
SELECT - ( col2 * + col1 ) AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL ( + 23 ) * - col1 + + col1 AS col1 FROM tab1
----
-220
-286
-572

query I rowsort
SELECT ALL 40 * - tab2.col1 * col1 FROM tab2
----
-11560
-139240
-38440

query I rowsort
SELECT + col1 + - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + cor0.col2 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab2 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT DISTINCT cor1.col1 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT ALL col2 + + col1 + + ( + col0 ) AS col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT - - 93 AS col0 FROM tab0 cor0
----
93
93
93

query I rowsort
SELECT - - col0 + col0 * - 72 FROM tab1 AS cor0
----
-213
-4544
-5680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9972
SELECT 37 * col1 + - tab1.col2 / + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9972
SELECT 37 * col1 + - tab1.col2 / + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT 48 * col2 + - ( + col2 ) AS col2 FROM tab2
----
1222
1269
1786

onlyif mysql # use DIV operator for integer division
query I rowsort label-9975
SELECT ALL + - col2 DIV - col2 - + col1 AS col1 FROM tab1 cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-9975
SELECT ALL + - col2 / - col2 - + col1 AS col1 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT + col0 + - col0 * ( + 49 ) FROM tab1
----
-144
-3072
-3840

query I rowsort
SELECT + + 94 + - col2 AS col0 FROM tab2 AS cor0
----
56
67
68

query I rowsort
SELECT + 65 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT + col1 * - cor0.col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col0 * - cor0.col0 + col1 AS col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT 5 + col2 AS col2 FROM tab2 AS cor0
----
31
32
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-9982
SELECT ALL + + col0 DIV cor0.col0 + col2 - ( + col2 ) FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9982
SELECT ALL + + col0 / cor0.col0 + col2 - ( + col2 ) FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT col0 + 70 AS col0 FROM tab0
----
105
159
94

query I rowsort
SELECT DISTINCT + col0 * col1 * col2 + - col1 + col2 * col0 * col1 FROM tab2
----
102051
11687
239245

onlyif mysql # use DIV operator for integer division
query I rowsort label-9985
SELECT col1 DIV - cor0.col0 col0 FROM tab1 AS cor0
----
-8
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9985
SELECT col1 / - cor0.col0 col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT + - col2 + ( - col1 ) AS col1 FROM tab2 cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9987
SELECT + col2 DIV + col1 AS col2 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9987
SELECT + col2 / + col1 AS col2 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT DISTINCT - cor0.col0 - col1 * col0 * - col2 AS col2 FROM tab2 AS cor0
----
119574
50955
5852

query I rowsort
SELECT DISTINCT - col2 * col1 - col1 * + 55 AS col2 FROM tab0 AS cor0
----
-12467
-5432
-7568

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9990
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9990
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - - 68 * + 6 + col0 FROM tab0 AS cor0
----
432
443
497

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - col0 ) col2 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9993
SELECT + - col1 + - col2 DIV - col1 AS col2 FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-9993
SELECT + - col1 + - col2 / - col1 AS col2 FROM tab1 AS cor0
----
-24
-5
-6

query I rowsort
SELECT ALL + + col2 * - col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT - - col0 - col1 * col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT - + col0 + ( - col1 ) FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-9997
SELECT ALL - 16 DIV + cor0.col0 col2 FROM tab2 AS cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9997
SELECT ALL - 16 / + cor0.col0 col2 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT + ( ( cor0.col2 ) ) FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

